diff --git a/.kokoro/build.sh b/.kokoro/build.sh index f1ae58408..774c87a51 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -37,19 +37,23 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) fi +RETURN_CODE=0 +set +e + case ${JOB_TYPE} in test) mvn test -B -Dclirr.skip=true -Denforcer.skip=true - bash ${KOKORO_GFILE_DIR}/codecov.sh - bash .kokoro/coerce_logs.sh + RETURN_CODE=$? ;; lint) mvn \ -Penable-samples \ com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? ;; javadoc) mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ @@ -59,21 +63,46 @@ integration) -Denforcer.skip=true \ -fae \ verify - bash .kokoro/coerce_logs.sh + RETURN_CODE=$? ;; samples) - mvn -B \ - -Penable-samples \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - bash .kokoro/coerce_logs.sh + if [[ -f samples/pom.xml ]] + then + pushd samples + mvn -B \ + -Penable-samples \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi ;; clirr) mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? ;; *) ;; esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop + ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-asset +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg index 3b017fc80..495cc7bac 100644 --- a/.kokoro/continuous/java8.cfg +++ b/.kokoro/continuous/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index 3b017fc80..8bf59c02e 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -5,3 +5,17 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg index 3b017fc80..495cc7bac 100644 --- a/.kokoro/nightly/java8.cfg +++ b/.kokoro/nightly/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index 9a9102490..b4b051cd0 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -2,23 +2,28 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { - key: "JOB_TYPE" - value: "samples" + key: "JOB_TYPE" + value: "samples" } env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" + key: "GCLOUD_PROJECT" + value: "gcloud-devel" } env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" } before_action { diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg index 3b017fc80..495cc7bac 100644 --- a/.kokoro/presubmit/java8.cfg +++ b/.kokoro/presubmit/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/README.md b/README.md index d76f0ae86..dd8a00dfe 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,12 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 3.4.0 + 4.2.0 pom import - com.google.cloud @@ -87,6 +86,8 @@ use this Cloud Asset Inventory Client Library. + + ## Troubleshooting To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. @@ -158,4 +159,5 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] [license]: https://github.com/googleapis/java-asset/blob/master/LICENSE [enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudasset.googleapis.com -[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM \ No newline at end of file +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png diff --git a/google-cloud-asset/clirr-ignored-differences.xml b/google-cloud-asset/clirr-ignored-differences.xml new file mode 100644 index 000000000..35c3274fa --- /dev/null +++ b/google-cloud-asset/clirr-ignored-differences.xml @@ -0,0 +1,53 @@ + + + + + + 7002 + com/google/cloud/asset/v1p1beta1/AssetServiceClient + * + + + 7002 + com/google/cloud/asset/v1p1beta1/AssetServiceSettings* + * + + + 7002 + com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub* + * + + + 7002 + com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub* + * + + + 7002 + com/google/cloud/asset/v1p2beta1/AssetServiceClient + * + + + 7002 + com/google/cloud/asset/v1p2beta1/AssetServiceSettings* + * + + + 7002 + com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub* + * + + + 7002 + com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub* + * + + + 8001 + com/google/cloud/asset/v1p1beta1/AssetServiceClient$SearchIam* + + + 8001 + com/google/cloud/asset/v1p1beta1/AssetServiceClient$SearchResources* + + diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java index d65715aae..1070d0565 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java @@ -54,8 +54,12 @@ * * AssetServiceSettings.Builder assetServiceSettingsBuilder = * AssetServiceSettings.newBuilder(); - * assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)); + * assetServiceSettingsBuilder + * .createFeedSettings() + * .setRetrySettings( + * assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); * * diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java index ca276bc50..ee0022814 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java @@ -77,8 +77,12 @@ * * AssetServiceStubSettings.Builder assetServiceSettingsBuilder = * AssetServiceStubSettings.newBuilder(); - * assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)); + * assetServiceSettingsBuilder + * .createFeedSettings() + * .setRetrySettings( + * assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); * * diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceSettings.java index adbe7c489..0c4a2bd9d 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceSettings.java @@ -53,8 +53,12 @@ * * AssetServiceSettings.Builder assetServiceSettingsBuilder = * AssetServiceSettings.newBuilder(); - * assetServiceSettingsBuilder.batchGetAssetsHistorySettings().getRetrySettings().toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)); + * assetServiceSettingsBuilder + * .batchGetAssetsHistorySettings() + * .setRetrySettings( + * assetServiceSettingsBuilder.batchGetAssetsHistorySettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); * * diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java index 43f2b38fb..dd04d34ef 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java @@ -69,8 +69,12 @@ * * AssetServiceStubSettings.Builder assetServiceSettingsBuilder = * AssetServiceStubSettings.newBuilder(); - * assetServiceSettingsBuilder.batchGetAssetsHistorySettings().getRetrySettings().toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)); + * assetServiceSettingsBuilder + * .batchGetAssetsHistorySettings() + * .setRetrySettings( + * assetServiceSettingsBuilder.batchGetAssetsHistorySettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); * * diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java index 4e2134fff..03358db03 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java @@ -46,7 +46,7 @@ * String scope = ""; * String query = ""; * List<String> assetTypes = new ArrayList<>(); - * for (StandardResourceMetadata element : assetServiceClient.searchResources(scope, query, assetTypes).iterateAll()) { + * for (StandardResourceMetadata element : assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) { * // doThingsWith(element); * } * } @@ -156,238 +156,6 @@ public AssetServiceStub getStub() { return stub; } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Searches resources which are accessible with .get permission. - * - *

Sample code: - * - *


-   * 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 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 assetTypes) { - SearchResourcesRequest request = - SearchResourcesRequest.newBuilder() - .setScope(scope) - .setQuery(query) - .addAllAssetTypes(assetTypes) - .build(); - return searchResources(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Searches resources which are accessible with .get permission. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String scope = "";
-   *   SearchResourcesRequest request = SearchResourcesRequest.newBuilder()
-   *     .setScope(scope)
-   *     .build();
-   *   for (StandardResourceMetadata element : assetServiceClient.searchResources(request).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. - * - *

Sample code: - * - *


-   * 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 - searchResourcesPagedCallable() { - return stub.searchResourcesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Searches resources which are accessible with .get permission. - * - *

Sample code: - * - *


-   * 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;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - searchResourcesCallable() { - return stub.searchResourcesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Searches IAM policies which are accessible with .getIamPolicy permission. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String scope = "";
-   *   String query = "";
-   *   for (IamPolicySearchResult element : assetServiceClient.searchIamPolicies(scope, query).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @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. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String scope = "";
-   *   SearchIamPoliciesRequest request = SearchIamPoliciesRequest.newBuilder()
-   *     .setScope(scope)
-   *     .build();
-   *   for (IamPolicySearchResult element : assetServiceClient.searchIamPolicies(request).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. - * - *

Sample code: - * - *


-   * 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 - searchIamPoliciesPagedCallable() { - return stub.searchIamPoliciesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Searches IAM policies which are accessible with .getIamPolicy permission. - * - *

Sample code: - * - *


-   * 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;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - searchIamPoliciesCallable() { - return stub.searchIamPoliciesCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Searches all the resources under a given accessible CRM scope (project/folder/organization). @@ -684,184 +452,6 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted return stub.awaitTermination(duration, unit); } - public static class SearchResourcesPagedResponse - extends AbstractPagedListResponse< - SearchResourcesRequest, - SearchResourcesResponse, - StandardResourceMetadata, - SearchResourcesPage, - SearchResourcesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - SearchResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public SearchResourcesPagedResponse apply(SearchResourcesPage input) { - return new SearchResourcesPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private SearchResourcesPagedResponse(SearchResourcesPage page) { - super(page, SearchResourcesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class SearchResourcesPage - extends AbstractPage< - SearchResourcesRequest, - SearchResourcesResponse, - StandardResourceMetadata, - SearchResourcesPage> { - - private SearchResourcesPage( - PageContext - context, - SearchResourcesResponse response) { - super(context, response); - } - - private static SearchResourcesPage createEmptyPage() { - return new SearchResourcesPage(null, null); - } - - @Override - protected SearchResourcesPage createPage( - PageContext - context, - SearchResourcesResponse response) { - return new SearchResourcesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class SearchResourcesFixedSizeCollection - extends AbstractFixedSizeCollection< - SearchResourcesRequest, - SearchResourcesResponse, - StandardResourceMetadata, - SearchResourcesPage, - SearchResourcesFixedSizeCollection> { - - private SearchResourcesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static SearchResourcesFixedSizeCollection createEmptyCollection() { - return new SearchResourcesFixedSizeCollection(null, 0); - } - - @Override - protected SearchResourcesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new SearchResourcesFixedSizeCollection(pages, collectionSize); - } - } - - public static class SearchIamPoliciesPagedResponse - extends AbstractPagedListResponse< - SearchIamPoliciesRequest, - SearchIamPoliciesResponse, - IamPolicySearchResult, - SearchIamPoliciesPage, - SearchIamPoliciesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - SearchIamPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public SearchIamPoliciesPagedResponse apply(SearchIamPoliciesPage input) { - return new SearchIamPoliciesPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private SearchIamPoliciesPagedResponse(SearchIamPoliciesPage page) { - super(page, SearchIamPoliciesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class SearchIamPoliciesPage - extends AbstractPage< - SearchIamPoliciesRequest, - SearchIamPoliciesResponse, - IamPolicySearchResult, - SearchIamPoliciesPage> { - - private SearchIamPoliciesPage( - PageContext - context, - SearchIamPoliciesResponse response) { - super(context, response); - } - - private static SearchIamPoliciesPage createEmptyPage() { - return new SearchIamPoliciesPage(null, null); - } - - @Override - protected SearchIamPoliciesPage createPage( - PageContext - context, - SearchIamPoliciesResponse response) { - return new SearchIamPoliciesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class SearchIamPoliciesFixedSizeCollection - extends AbstractFixedSizeCollection< - SearchIamPoliciesRequest, - SearchIamPoliciesResponse, - IamPolicySearchResult, - SearchIamPoliciesPage, - SearchIamPoliciesFixedSizeCollection> { - - private SearchIamPoliciesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static SearchIamPoliciesFixedSizeCollection createEmptyCollection() { - return new SearchIamPoliciesFixedSizeCollection(null, 0); - } - - @Override - protected SearchIamPoliciesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new SearchIamPoliciesFixedSizeCollection(pages, collectionSize); - } - } - public static class SearchAllResourcesPagedResponse extends AbstractPagedListResponse< SearchAllResourcesRequest, diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java index a5d537b7f..e4bf6a2a7 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java @@ -17,8 +17,6 @@ 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.ApiFunction; import com.google.api.core.BetaApi; @@ -51,14 +49,18 @@ *

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: + *

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

  * 
  * AssetServiceSettings.Builder assetServiceSettingsBuilder =
  *     AssetServiceSettings.newBuilder();
- * assetServiceSettingsBuilder.searchResourcesSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * assetServiceSettingsBuilder
+ *     .searchAllResourcesSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
  * 
  * 
@@ -66,20 +68,6 @@ @Generated("by gapic-generator") @BetaApi public class AssetServiceSettings extends ClientSettings { - /** Returns the object with the settings used for calls to searchResources. */ - public PagedCallSettings< - SearchResourcesRequest, SearchResourcesResponse, SearchResourcesPagedResponse> - searchResourcesSettings() { - return ((AssetServiceStubSettings) getStubSettings()).searchResourcesSettings(); - } - - /** Returns the object with the settings used for calls to searchIamPolicies. */ - public PagedCallSettings< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, SearchIamPoliciesPagedResponse> - searchIamPoliciesSettings() { - return ((AssetServiceStubSettings) getStubSettings()).searchIamPoliciesSettings(); - } - /** Returns the object with the settings used for calls to searchAllResources. */ public PagedCallSettings< SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> @@ -193,20 +181,6 @@ public Builder applyToAllUnaryMethods( return this; } - /** Returns the builder for the settings used for calls to searchResources. */ - public PagedCallSettings.Builder< - SearchResourcesRequest, SearchResourcesResponse, SearchResourcesPagedResponse> - searchResourcesSettings() { - return getStubSettingsBuilder().searchResourcesSettings(); - } - - /** Returns the builder for the settings used for calls to searchIamPolicies. */ - public PagedCallSettings.Builder< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, SearchIamPoliciesPagedResponse> - searchIamPoliciesSettings() { - return getStubSettingsBuilder().searchIamPoliciesSettings(); - } - /** Returns the builder for the settings used for calls to searchAllResources. */ public PagedCallSettings.Builder< SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java index b83807eac..09f1e8828 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java @@ -31,7 +31,7 @@ * String scope = ""; * String query = ""; * List<String> assetTypes = new ArrayList<>(); - * SearchResourcesPagedResponse response = assetServiceClient.searchResources(scope, query, assetTypes); + * SearchAllResourcesPagedResponse response = assetServiceClient.searchAllResources(scope, query, assetTypes); * } * * 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 index 0ea88fbf2..5c7ad8743 100644 --- 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 @@ -17,8 +17,6 @@ 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; @@ -27,10 +25,6 @@ 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 @@ -43,25 +37,6 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class AssetServiceStub implements BackgroundResource { - public UnaryCallable - searchResourcesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: searchResourcesPagedCallable()"); - } - - public UnaryCallable searchResourcesCallable() { - throw new UnsupportedOperationException("Not implemented: searchResourcesCallable()"); - } - - public UnaryCallable - searchIamPoliciesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: searchIamPoliciesPagedCallable()"); - } - - public UnaryCallable - searchIamPoliciesCallable() { - throw new UnsupportedOperationException("Not implemented: searchIamPoliciesCallable()"); - } - public UnaryCallable searchAllResourcesPagedCallable() { throw new UnsupportedOperationException("Not implemented: searchAllResourcesPagedCallable()"); diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java index a61917d1b..69aac38be 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java @@ -17,8 +17,6 @@ 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.ApiFunction; import com.google.api.core.ApiFuture; @@ -47,10 +45,6 @@ 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 com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -76,14 +70,18 @@ *

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: + *

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

  * 
  * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
  *     AssetServiceStubSettings.newBuilder();
- * assetServiceSettingsBuilder.searchResourcesSettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * assetServiceSettingsBuilder
+ *     .searchAllResourcesSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
  * 
  * 
@@ -95,12 +93,6 @@ public class AssetServiceStubSettings extends StubSettings DEFAULT_SERVICE_SCOPES = ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - private final PagedCallSettings< - SearchResourcesRequest, SearchResourcesResponse, SearchResourcesPagedResponse> - searchResourcesSettings; - private final PagedCallSettings< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, SearchIamPoliciesPagedResponse> - searchIamPoliciesSettings; private final PagedCallSettings< SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> searchAllResourcesSettings; @@ -110,20 +102,6 @@ public class AssetServiceStubSettings extends StubSettings searchAllIamPoliciesSettings; - /** Returns the object with the settings used for calls to searchResources. */ - public PagedCallSettings< - SearchResourcesRequest, SearchResourcesResponse, SearchResourcesPagedResponse> - searchResourcesSettings() { - return searchResourcesSettings; - } - - /** Returns the object with the settings used for calls to searchIamPolicies. */ - public PagedCallSettings< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, SearchIamPoliciesPagedResponse> - searchIamPoliciesSettings() { - return searchIamPoliciesSettings; - } - /** Returns the object with the settings used for calls to searchAllResources. */ public PagedCallSettings< SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> @@ -209,94 +187,10 @@ public Builder toBuilder() { protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); - searchResourcesSettings = settingsBuilder.searchResourcesSettings().build(); - searchIamPoliciesSettings = settingsBuilder.searchIamPoliciesSettings().build(); searchAllResourcesSettings = settingsBuilder.searchAllResourcesSettings().build(); searchAllIamPoliciesSettings = settingsBuilder.searchAllIamPoliciesSettings().build(); } - private static final PagedListDescriptor< - SearchResourcesRequest, SearchResourcesResponse, StandardResourceMetadata> - SEARCH_RESOURCES_PAGE_STR_DESC = - new PagedListDescriptor< - SearchResourcesRequest, SearchResourcesResponse, StandardResourceMetadata>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public SearchResourcesRequest injectToken( - SearchResourcesRequest payload, String token) { - return SearchResourcesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public SearchResourcesRequest injectPageSize( - SearchResourcesRequest payload, int pageSize) { - return SearchResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(SearchResourcesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(SearchResourcesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - SearchResourcesResponse payload) { - return payload.getResultsList() != null - ? payload.getResultsList() - : ImmutableList.of(); - } - }; - - private static final PagedListDescriptor< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, IamPolicySearchResult> - SEARCH_IAM_POLICIES_PAGE_STR_DESC = - new PagedListDescriptor< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, IamPolicySearchResult>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public SearchIamPoliciesRequest injectToken( - SearchIamPoliciesRequest payload, String token) { - return SearchIamPoliciesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public SearchIamPoliciesRequest injectPageSize( - SearchIamPoliciesRequest payload, int pageSize) { - return SearchIamPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(SearchIamPoliciesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(SearchIamPoliciesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - SearchIamPoliciesResponse payload) { - return payload.getResultsList() != null - ? payload.getResultsList() - : ImmutableList.of(); - } - }; - private static final PagedListDescriptor< SearchAllResourcesRequest, SearchAllResourcesResponse, StandardResourceMetadata> SEARCH_ALL_RESOURCES_PAGE_STR_DESC = @@ -379,47 +273,6 @@ public Iterable extractResources( } }; - private static final PagedListResponseFactory< - SearchResourcesRequest, SearchResourcesResponse, SearchResourcesPagedResponse> - SEARCH_RESOURCES_PAGE_STR_FACT = - new PagedListResponseFactory< - SearchResourcesRequest, SearchResourcesResponse, SearchResourcesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - SearchResourcesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, SEARCH_RESOURCES_PAGE_STR_DESC, request, context); - return SearchResourcesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, SearchIamPoliciesPagedResponse> - SEARCH_IAM_POLICIES_PAGE_STR_FACT = - new PagedListResponseFactory< - SearchIamPoliciesRequest, - SearchIamPoliciesResponse, - SearchIamPoliciesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - SearchIamPoliciesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, IamPolicySearchResult> - pageContext = - PageContext.create( - callable, SEARCH_IAM_POLICIES_PAGE_STR_DESC, request, context); - return SearchIamPoliciesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - private static final PagedListResponseFactory< SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> SEARCH_ALL_RESOURCES_PAGE_STR_FACT = @@ -474,12 +327,6 @@ public ApiFuture getFuturePagedResponse( public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - SearchResourcesRequest, SearchResourcesResponse, SearchResourcesPagedResponse> - searchResourcesSettings; - private final PagedCallSettings.Builder< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, SearchIamPoliciesPagedResponse> - searchIamPoliciesSettings; private final PagedCallSettings.Builder< SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> searchAllResourcesSettings; @@ -530,10 +377,6 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); - searchResourcesSettings = PagedCallSettings.newBuilder(SEARCH_RESOURCES_PAGE_STR_FACT); - - searchIamPoliciesSettings = PagedCallSettings.newBuilder(SEARCH_IAM_POLICIES_PAGE_STR_FACT); - searchAllResourcesSettings = PagedCallSettings.newBuilder(SEARCH_ALL_RESOURCES_PAGE_STR_FACT); searchAllIamPoliciesSettings = @@ -541,10 +384,7 @@ protected Builder(ClientContext clientContext) { unaryMethodSettingsBuilders = ImmutableList.>of( - searchResourcesSettings, - searchIamPoliciesSettings, - searchAllResourcesSettings, - searchAllIamPoliciesSettings); + searchAllResourcesSettings, searchAllIamPoliciesSettings); initDefaults(this); } @@ -560,16 +400,6 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { - builder - .searchResourcesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .searchIamPoliciesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder .searchAllResourcesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) @@ -586,17 +416,12 @@ private static Builder initDefaults(Builder builder) { protected Builder(AssetServiceStubSettings settings) { super(settings); - searchResourcesSettings = settings.searchResourcesSettings.toBuilder(); - searchIamPoliciesSettings = settings.searchIamPoliciesSettings.toBuilder(); searchAllResourcesSettings = settings.searchAllResourcesSettings.toBuilder(); searchAllIamPoliciesSettings = settings.searchAllIamPoliciesSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - searchResourcesSettings, - searchIamPoliciesSettings, - searchAllResourcesSettings, - searchAllIamPoliciesSettings); + searchAllResourcesSettings, searchAllIamPoliciesSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -615,20 +440,6 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } - /** Returns the builder for the settings used for calls to searchResources. */ - public PagedCallSettings.Builder< - SearchResourcesRequest, SearchResourcesResponse, SearchResourcesPagedResponse> - searchResourcesSettings() { - return searchResourcesSettings; - } - - /** Returns the builder for the settings used for calls to searchIamPolicies. */ - public PagedCallSettings.Builder< - SearchIamPoliciesRequest, SearchIamPoliciesResponse, SearchIamPoliciesPagedResponse> - searchIamPoliciesSettings() { - return searchIamPoliciesSettings; - } - /** Returns the builder for the settings used for calls to searchAllResources. */ public PagedCallSettings.Builder< SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java index 248f04615..015c232b1 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java @@ -17,8 +17,6 @@ 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; @@ -32,10 +30,6 @@ 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 com.google.common.collect.ImmutableMap; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -54,26 +48,6 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcAssetServiceStub extends AssetServiceStub { - private static final MethodDescriptor - searchResourcesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchResources") - .setRequestMarshaller( - ProtoUtils.marshaller(SearchResourcesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SearchResourcesResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor - searchIamPoliciesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchIamPolicies") - .setRequestMarshaller( - ProtoUtils.marshaller(SearchIamPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SearchIamPoliciesResponse.getDefaultInstance())) - .build(); private static final MethodDescriptor searchAllResourcesMethodDescriptor = MethodDescriptor.newBuilder() @@ -97,14 +71,6 @@ public class GrpcAssetServiceStub extends AssetServiceStub { private final BackgroundResource backgroundResources; - private final UnaryCallable - searchResourcesCallable; - private final UnaryCallable - searchResourcesPagedCallable; - private final UnaryCallable - searchIamPoliciesCallable; - private final UnaryCallable - searchIamPoliciesPagedCallable; private final UnaryCallable searchAllResourcesCallable; private final UnaryCallable @@ -153,16 +119,6 @@ protected GrpcAssetServiceStub( throws IOException { this.callableFactory = callableFactory; - GrpcCallSettings - searchResourcesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(searchResourcesMethodDescriptor) - .build(); - GrpcCallSettings - searchIamPoliciesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(searchIamPoliciesMethodDescriptor) - .build(); GrpcCallSettings searchAllResourcesTransportSettings = GrpcCallSettings.newBuilder() @@ -192,22 +148,6 @@ public Map extract(SearchAllIamPoliciesRequest request) { }) .build(); - this.searchResourcesCallable = - callableFactory.createUnaryCallable( - searchResourcesTransportSettings, settings.searchResourcesSettings(), clientContext); - this.searchResourcesPagedCallable = - callableFactory.createPagedCallable( - searchResourcesTransportSettings, settings.searchResourcesSettings(), clientContext); - this.searchIamPoliciesCallable = - callableFactory.createUnaryCallable( - searchIamPoliciesTransportSettings, - settings.searchIamPoliciesSettings(), - clientContext); - this.searchIamPoliciesPagedCallable = - callableFactory.createPagedCallable( - searchIamPoliciesTransportSettings, - settings.searchIamPoliciesSettings(), - clientContext); this.searchAllResourcesCallable = callableFactory.createUnaryCallable( searchAllResourcesTransportSettings, @@ -232,25 +172,6 @@ public Map extract(SearchAllIamPoliciesRequest request) { backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } - public UnaryCallable - searchResourcesPagedCallable() { - return searchResourcesPagedCallable; - } - - public UnaryCallable searchResourcesCallable() { - return searchResourcesCallable; - } - - public UnaryCallable - searchIamPoliciesPagedCallable() { - return searchIamPoliciesPagedCallable; - } - - public UnaryCallable - searchIamPoliciesCallable() { - return searchIamPoliciesCallable; - } - public UnaryCallable searchAllResourcesPagedCallable() { return searchAllResourcesPagedCallable; diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java index 7cf60e335..f1f0cb921 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java @@ -17,14 +17,10 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.api.pathtemplate.PathTemplate; import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStub; import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStubSettings; -import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; import com.google.protobuf.Empty; import java.io.IOException; import java.util.concurrent.TimeUnit; @@ -41,7 +37,7 @@ * * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { * String parent = ""; - * BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(parent); + * Feed response = assetServiceClient.createFeed(parent); * } * * @@ -101,7 +97,6 @@ public class AssetServiceClient implements BackgroundResource { private final AssetServiceSettings settings; private final AssetServiceStub stub; - private final OperationsClient operationsClient; private static final PathTemplate FEED_PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("projects/{project}/feeds/{feed}"); @@ -168,14 +163,12 @@ public static final AssetServiceClient create(AssetServiceStub stub) { protected AssetServiceClient(AssetServiceSettings settings) throws IOException { this.settings = settings; this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected AssetServiceClient(AssetServiceStub stub) { this.settings = null; this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } public final AssetServiceSettings getSettings() { @@ -187,191 +180,6 @@ public AssetServiceStub getStub() { return stub; } - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports assets with time and resource types to a given Cloud Storage location. The output - * format is newline-delimited JSON. This API implements the - * [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep track of - * the export. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "";
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   ExportAssetsRequest request = ExportAssetsRequest.newBuilder()
-   *     .setParent(parent)
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportAssetsAsync( - ExportAssetsRequest request) { - return exportAssetsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports assets with time and resource types to a given Cloud Storage location. The output - * format is newline-delimited JSON. This API implements the - * [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep track of - * the export. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "";
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   ExportAssetsRequest request = ExportAssetsRequest.newBuilder()
-   *     .setParent(parent)
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   OperationFuture<ExportAssetsResponse, ExportAssetsRequest> future = assetServiceClient.exportAssetsOperationCallable().futureCall(request);
-   *   // Do something
-   *   ExportAssetsResponse response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - exportAssetsOperationCallable() { - return stub.exportAssetsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports assets with time and resource types to a given Cloud Storage location. The output - * format is newline-delimited JSON. This API implements the - * [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep track of - * the export. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "";
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   ExportAssetsRequest request = ExportAssetsRequest.newBuilder()
-   *     .setParent(parent)
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   ApiFuture<Operation> future = assetServiceClient.exportAssetsCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable exportAssetsCallable() { - return stub.exportAssetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Batch gets the update history of assets that overlap a time window. For RESOURCE content, this - * API outputs history with asset in both non-delete or deleted status. For IAM_POLICY content, - * this API outputs history when the asset and its attached IAM POLICY both exist. This can create - * gaps in the output history. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "";
-   *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(parent);
-   * }
-   * 
- * - * @param parent Required. The relative name of the root asset. It can only be an organization - * number (such as "organizations/123"), a project ID (such as "projects/my-project-id")", or - * a project number (such as "projects/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchGetAssetsHistoryResponse batchGetAssetsHistory(String parent) { - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder().setParent(parent).build(); - return batchGetAssetsHistory(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Batch gets the update history of assets that overlap a time window. For RESOURCE content, this - * API outputs history with asset in both non-delete or deleted status. For IAM_POLICY content, - * this API outputs history when the asset and its attached IAM POLICY both exist. This can create - * gaps in the output history. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "";
-   *   List<String> assetNames = new ArrayList<>();
-   *   ContentType contentType = ContentType.CONTENT_TYPE_UNSPECIFIED;
-   *   BatchGetAssetsHistoryRequest request = BatchGetAssetsHistoryRequest.newBuilder()
-   *     .setParent(parent)
-   *     .addAllAssetNames(assetNames)
-   *     .setContentType(contentType)
-   *     .build();
-   *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchGetAssetsHistoryResponse batchGetAssetsHistory( - BatchGetAssetsHistoryRequest request) { - return batchGetAssetsHistoryCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Batch gets the update history of assets that overlap a time window. For RESOURCE content, this - * API outputs history with asset in both non-delete or deleted status. For IAM_POLICY content, - * this API outputs history when the asset and its attached IAM POLICY both exist. This can create - * gaps in the output history. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "";
-   *   List<String> assetNames = new ArrayList<>();
-   *   ContentType contentType = ContentType.CONTENT_TYPE_UNSPECIFIED;
-   *   BatchGetAssetsHistoryRequest request = BatchGetAssetsHistoryRequest.newBuilder()
-   *     .setParent(parent)
-   *     .addAllAssetNames(assetNames)
-   *     .setContentType(contentType)
-   *     .build();
-   *   ApiFuture<BatchGetAssetsHistoryResponse> future = assetServiceClient.batchGetAssetsHistoryCallable().futureCall(request);
-   *   // Do something
-   *   BatchGetAssetsHistoryResponse response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable - batchGetAssetsHistoryCallable() { - return stub.batchGetAssetsHistoryCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a feed in a parent project/folder/organization to listen to its asset updates. @@ -462,7 +270,7 @@ public final UnaryCallable createFeedCallable() { * } * * - * @param name The name of the Feed and it must be in the format of: + * @param name Required. The name of the Feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -599,8 +407,8 @@ public final UnaryCallable listFeedsCallabl * } * * - * @param feed The new values of feed details. It must match an existing feed and the field `name` - * must be in the format of: projects/project_number/feeds/feed_id or + * @param feed Required. The new values of feed details. It must match an existing feed and the + * field `name` must be in the format of: projects/project_number/feeds/feed_id or * folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -671,7 +479,7 @@ public final UnaryCallable updateFeedCallable() { * } * * - * @param name The name of the feed and it must be in the format of: + * @param name Required. The name of the feed and it must be in the format of: * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id * organizations/organization_number/feeds/feed_id * @throws com.google.api.gax.rpc.ApiException if the remote call fails diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java index 7ebd1034d..38136ca65 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java @@ -23,11 +23,9 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStubSettings; -import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -48,14 +46,18 @@ *

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 batchGetAssetsHistory to 30 seconds: + *

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

  * 
  * AssetServiceSettings.Builder assetServiceSettingsBuilder =
  *     AssetServiceSettings.newBuilder();
- * assetServiceSettingsBuilder.batchGetAssetsHistorySettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * assetServiceSettingsBuilder
+ *     .createFeedSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
  * 
  * 
@@ -63,25 +65,6 @@ @Generated("by gapic-generator") @BetaApi public class AssetServiceSettings extends ClientSettings { - /** Returns the object with the settings used for calls to exportAssets. */ - public UnaryCallSettings exportAssetsSettings() { - return ((AssetServiceStubSettings) getStubSettings()).exportAssetsSettings(); - } - - /** Returns the object with the settings used for calls to exportAssets. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - exportAssetsOperationSettings() { - return ((AssetServiceStubSettings) getStubSettings()).exportAssetsOperationSettings(); - } - - /** Returns the object with the settings used for calls to batchGetAssetsHistory. */ - public UnaryCallSettings - batchGetAssetsHistorySettings() { - return ((AssetServiceStubSettings) getStubSettings()).batchGetAssetsHistorySettings(); - } - /** Returns the object with the settings used for calls to createFeed. */ public UnaryCallSettings createFeedSettings() { return ((AssetServiceStubSettings) getStubSettings()).createFeedSettings(); @@ -204,26 +187,6 @@ public Builder applyToAllUnaryMethods( return this; } - /** Returns the builder for the settings used for calls to exportAssets. */ - public UnaryCallSettings.Builder exportAssetsSettings() { - return getStubSettingsBuilder().exportAssetsSettings(); - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings() { - return getStubSettingsBuilder().exportAssetsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to batchGetAssetsHistory. */ - public UnaryCallSettings.Builder - batchGetAssetsHistorySettings() { - return getStubSettingsBuilder().batchGetAssetsHistorySettings(); - } - /** Returns the builder for the settings used for calls to createFeed. */ public UnaryCallSettings.Builder createFeedSettings() { return getStubSettingsBuilder().createFeedSettings(); diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java index ad9e28b15..2398e0eae 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java @@ -29,7 +29,7 @@ * * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { * String parent = ""; - * BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(parent); + * Feed response = assetServiceClient.createFeed(parent); * } * * diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java index 81be470e4..b6daeba03 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java @@ -17,21 +17,14 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse; import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.ExportAssetsRequest; -import com.google.cloud.asset.v1p2beta1.ExportAssetsResponse; import com.google.cloud.asset.v1p2beta1.Feed; import com.google.cloud.asset.v1p2beta1.GetFeedRequest; import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; import javax.annotation.Generated; @@ -45,26 +38,6 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class AssetServiceStub implements BackgroundResource { - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportAssetsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportAssetsOperationCallable()"); - } - - public UnaryCallable exportAssetsCallable() { - throw new UnsupportedOperationException("Not implemented: exportAssetsCallable()"); - } - - public UnaryCallable - batchGetAssetsHistoryCallable() { - throw new UnsupportedOperationException("Not implemented: batchGetAssetsHistoryCallable()"); - } - public UnaryCallable createFeedCallable() { throw new UnsupportedOperationException("Not implemented: createFeedCallable()"); } diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java index 640191df9..227c5d228 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java @@ -23,23 +23,15 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse; import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.ExportAssetsRequest; -import com.google.cloud.asset.v1p2beta1.ExportAssetsResponse; import com.google.cloud.asset.v1p2beta1.Feed; import com.google.cloud.asset.v1p2beta1.GetFeedRequest; import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; @@ -49,7 +41,6 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; -import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -71,14 +62,18 @@ *

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 batchGetAssetsHistory to 30 seconds: + *

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

  * 
  * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
  *     AssetServiceStubSettings.newBuilder();
- * assetServiceSettingsBuilder.batchGetAssetsHistorySettings().getRetrySettings().toBuilder()
- *     .setTotalTimeout(Duration.ofSeconds(30));
+ * assetServiceSettingsBuilder
+ *     .createFeedSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
  * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
  * 
  * 
@@ -90,36 +85,12 @@ public class AssetServiceStubSettings extends StubSettings DEFAULT_SERVICE_SCOPES = ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - private final UnaryCallSettings exportAssetsSettings; - private final OperationCallSettings< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings; - private final UnaryCallSettings - batchGetAssetsHistorySettings; private final UnaryCallSettings createFeedSettings; private final UnaryCallSettings getFeedSettings; private final UnaryCallSettings listFeedsSettings; private final UnaryCallSettings updateFeedSettings; private final UnaryCallSettings deleteFeedSettings; - /** Returns the object with the settings used for calls to exportAssets. */ - public UnaryCallSettings exportAssetsSettings() { - return exportAssetsSettings; - } - - /** Returns the object with the settings used for calls to exportAssets. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - exportAssetsOperationSettings() { - return exportAssetsOperationSettings; - } - - /** Returns the object with the settings used for calls to batchGetAssetsHistory. */ - public UnaryCallSettings - batchGetAssetsHistorySettings() { - return batchGetAssetsHistorySettings; - } - /** Returns the object with the settings used for calls to createFeed. */ public UnaryCallSettings createFeedSettings() { return createFeedSettings; @@ -214,9 +185,6 @@ public Builder toBuilder() { protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); - exportAssetsSettings = settingsBuilder.exportAssetsSettings().build(); - exportAssetsOperationSettings = settingsBuilder.exportAssetsOperationSettings().build(); - batchGetAssetsHistorySettings = settingsBuilder.batchGetAssetsHistorySettings().build(); createFeedSettings = settingsBuilder.createFeedSettings().build(); getFeedSettings = settingsBuilder.getFeedSettings().build(); listFeedsSettings = settingsBuilder.listFeedsSettings().build(); @@ -228,13 +196,6 @@ protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder exportAssetsSettings; - private final OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings; - private final UnaryCallSettings.Builder< - BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> - batchGetAssetsHistorySettings; private final UnaryCallSettings.Builder createFeedSettings; private final UnaryCallSettings.Builder getFeedSettings; private final UnaryCallSettings.Builder listFeedsSettings; @@ -282,12 +243,6 @@ protected Builder() { protected Builder(ClientContext clientContext) { super(clientContext); - exportAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - exportAssetsOperationSettings = OperationCallSettings.newBuilder(); - - batchGetAssetsHistorySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -300,8 +255,6 @@ protected Builder(ClientContext clientContext) { unaryMethodSettingsBuilders = ImmutableList.>of( - exportAssetsSettings, - batchGetAssetsHistorySettings, createFeedSettings, getFeedSettings, listFeedsSettings, @@ -322,16 +275,6 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { - builder - .exportAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .batchGetAssetsHistorySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder .createFeedSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -356,29 +299,6 @@ private static Builder initDefaults(Builder builder) { .deleteFeedSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder - .exportAssetsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(ExportAssetsResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ExportAssetsRequest.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); return builder; } @@ -386,9 +306,6 @@ private static Builder initDefaults(Builder builder) { protected Builder(AssetServiceStubSettings settings) { super(settings); - exportAssetsSettings = settings.exportAssetsSettings.toBuilder(); - exportAssetsOperationSettings = settings.exportAssetsOperationSettings.toBuilder(); - batchGetAssetsHistorySettings = settings.batchGetAssetsHistorySettings.toBuilder(); createFeedSettings = settings.createFeedSettings.toBuilder(); getFeedSettings = settings.getFeedSettings.toBuilder(); listFeedsSettings = settings.listFeedsSettings.toBuilder(); @@ -397,8 +314,6 @@ protected Builder(AssetServiceStubSettings settings) { unaryMethodSettingsBuilders = ImmutableList.>of( - exportAssetsSettings, - batchGetAssetsHistorySettings, createFeedSettings, getFeedSettings, listFeedsSettings, @@ -422,26 +337,6 @@ public Builder applyToAllUnaryMethods( return unaryMethodSettingsBuilders; } - /** Returns the builder for the settings used for calls to exportAssets. */ - public UnaryCallSettings.Builder exportAssetsSettings() { - return exportAssetsSettings; - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings() { - return exportAssetsOperationSettings; - } - - /** Returns the builder for the settings used for calls to batchGetAssetsHistory. */ - public UnaryCallSettings.Builder - batchGetAssetsHistorySettings() { - return batchGetAssetsHistorySettings; - } - /** Returns the builder for the settings used for calls to createFeed. */ public UnaryCallSettings.Builder createFeedSettings() { return createFeedSettings; diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java index 9ddb417c2..810beeefc 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java @@ -21,23 +21,16 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse; import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.ExportAssetsRequest; -import com.google.cloud.asset.v1p2beta1.ExportAssetsResponse; import com.google.cloud.asset.v1p2beta1.Feed; import com.google.cloud.asset.v1p2beta1.GetFeedRequest; import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -56,24 +49,6 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcAssetServiceStub extends AssetServiceStub { - private static final MethodDescriptor - exportAssetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/ExportAssets") - .setRequestMarshaller(ProtoUtils.marshaller(ExportAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - batchGetAssetsHistoryMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/BatchGetAssetsHistory") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchGetAssetsHistoryRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchGetAssetsHistoryResponse.getDefaultInstance())) - .build(); private static final MethodDescriptor createFeedMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -112,13 +87,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .build(); private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final UnaryCallable exportAssetsCallable; - private final OperationCallable - exportAssetsOperationCallable; - private final UnaryCallable - batchGetAssetsHistoryCallable; private final UnaryCallable createFeedCallable; private final UnaryCallable getFeedCallable; private final UnaryCallable listFeedsCallable; @@ -163,36 +132,7 @@ protected GrpcAssetServiceStub( GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - GrpcCallSettings exportAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(exportAssetsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ExportAssetsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - batchGetAssetsHistoryTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(batchGetAssetsHistoryMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchGetAssetsHistoryRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); GrpcCallSettings createFeedTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createFeedMethodDescriptor) @@ -259,20 +199,6 @@ public Map extract(DeleteFeedRequest request) { }) .build(); - this.exportAssetsCallable = - callableFactory.createUnaryCallable( - exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext); - this.exportAssetsOperationCallable = - callableFactory.createOperationCallable( - exportAssetsTransportSettings, - settings.exportAssetsOperationSettings(), - clientContext, - this.operationsStub); - this.batchGetAssetsHistoryCallable = - callableFactory.createUnaryCallable( - batchGetAssetsHistoryTransportSettings, - settings.batchGetAssetsHistorySettings(), - clientContext); this.createFeedCallable = callableFactory.createUnaryCallable( createFeedTransportSettings, settings.createFeedSettings(), clientContext); @@ -292,26 +218,6 @@ public Map extract(DeleteFeedRequest request) { backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportAssetsOperationCallable() { - return exportAssetsOperationCallable; - } - - public UnaryCallable exportAssetsCallable() { - return exportAssetsCallable; - } - - public UnaryCallable - batchGetAssetsHistoryCallable() { - return batchGetAssetsHistoryCallable; - } - public UnaryCallable createFeedCallable() { return createFeedCallable; } diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java index 3ec4a1b7d..e5d08a28a 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java @@ -22,7 +22,10 @@ import com.google.api.gax.grpc.testing.MockServiceHelper; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; import com.google.protobuf.Empty; import io.grpc.Status; import io.grpc.StatusRuntimeException; @@ -30,6 +33,7 @@ import java.util.Arrays; import java.util.List; import java.util.UUID; +import java.util.concurrent.ExecutionException; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -75,6 +79,123 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void exportAssetsTest() throws Exception { + ExportAssetsResponse expectedResponse = ExportAssetsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportAssetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAssetService.addResponse(resultOperation); + + ProjectName parent = ProjectName.of("[PROJECT]"); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(parent.toString()) + .setOutputConfig(outputConfig) + .build(); + + ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportAssetsRequest actualRequest = (ExportAssetsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void exportAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(parent.toString()) + .setOutputConfig(outputConfig) + .build(); + + client.exportAssetsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void batchGetAssetsHistoryTest() { + BatchGetAssetsHistoryResponse expectedResponse = + BatchGetAssetsHistoryResponse.newBuilder().build(); + mockAssetService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + ContentType contentType = ContentType.CONTENT_TYPE_UNSPECIFIED; + TimeWindow readTimeWindow = TimeWindow.newBuilder().build(); + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(parent.toString()) + .setContentType(contentType) + .setReadTimeWindow(readTimeWindow) + .build(); + + BatchGetAssetsHistoryResponse actualResponse = client.batchGetAssetsHistory(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchGetAssetsHistoryRequest actualRequest = + (BatchGetAssetsHistoryRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); + Assert.assertEquals(contentType, actualRequest.getContentType()); + Assert.assertEquals(readTimeWindow, actualRequest.getReadTimeWindow()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchGetAssetsHistoryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + ContentType contentType = ContentType.CONTENT_TYPE_UNSPECIFIED; + TimeWindow readTimeWindow = TimeWindow.newBuilder().build(); + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(parent.toString()) + .setContentType(contentType) + .setReadTimeWindow(readTimeWindow) + .build(); + + client.batchGetAssetsHistory(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void createFeedTest() { diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/AssetServiceClientTest.java index b81114fd3..99841c828 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/AssetServiceClientTest.java @@ -16,16 +16,29 @@ package com.google.cloud.asset.v1beta1; import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.grpc.testing.MockGrpcService; import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.Arrays; +import java.util.List; import java.util.UUID; +import java.util.concurrent.ExecutionException; import org.junit.After; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Test; @javax.annotation.Generated("by GAPIC") public class AssetServiceClientTest { @@ -64,4 +77,121 @@ public void setUp() throws IOException { public void tearDown() throws Exception { client.close(); } + + @Test + @SuppressWarnings("all") + public void exportAssetsTest() throws Exception { + ExportAssetsResponse expectedResponse = ExportAssetsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportAssetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAssetService.addResponse(resultOperation); + + ProjectName parent = ProjectName.of("[PROJECT]"); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(parent.toString()) + .setOutputConfig(outputConfig) + .build(); + + ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportAssetsRequest actualRequest = (ExportAssetsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void exportAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(parent.toString()) + .setOutputConfig(outputConfig) + .build(); + + client.exportAssetsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void batchGetAssetsHistoryTest() { + BatchGetAssetsHistoryResponse expectedResponse = + BatchGetAssetsHistoryResponse.newBuilder().build(); + mockAssetService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + ContentType contentType = ContentType.CONTENT_TYPE_UNSPECIFIED; + TimeWindow readTimeWindow = TimeWindow.newBuilder().build(); + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(parent.toString()) + .setContentType(contentType) + .setReadTimeWindow(readTimeWindow) + .build(); + + BatchGetAssetsHistoryResponse actualResponse = client.batchGetAssetsHistory(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchGetAssetsHistoryRequest actualRequest = + (BatchGetAssetsHistoryRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); + Assert.assertEquals(contentType, actualRequest.getContentType()); + Assert.assertEquals(readTimeWindow, actualRequest.getReadTimeWindow()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchGetAssetsHistoryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + ContentType contentType = ContentType.CONTENT_TYPE_UNSPECIFIED; + TimeWindow readTimeWindow = TimeWindow.newBuilder().build(); + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(parent.toString()) + .setContentType(contentType) + .setReadTimeWindow(readTimeWindow) + .build(); + + client.batchGetAssetsHistory(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } } diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java index 279ae9185..771e370f2 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java @@ -17,8 +17,6 @@ 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.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -81,112 +79,6 @@ public void tearDown() throws Exception { client.close(); } - @Test - @SuppressWarnings("all") - public void searchResourcesTest() { - String nextPageToken = ""; - StandardResourceMetadata resultsElement = StandardResourceMetadata.newBuilder().build(); - List results = Arrays.asList(resultsElement); - SearchResourcesResponse expectedResponse = - SearchResourcesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllResults(results) - .build(); - mockAssetService.addResponse(expectedResponse); - - String scope = "scope109264468"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - - SearchResourcesPagedResponse pagedListResponse = - client.searchResources(scope, query, assetTypes); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SearchResourcesRequest actualRequest = (SearchResourcesRequest) actualRequests.get(0); - - Assert.assertEquals(scope, actualRequest.getScope()); - Assert.assertEquals(query, actualRequest.getQuery()); - Assert.assertEquals(assetTypes, actualRequest.getAssetTypesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void searchResourcesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String scope = "scope109264468"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - - client.searchResources(scope, query, assetTypes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void searchIamPoliciesTest() { - String nextPageToken = ""; - IamPolicySearchResult resultsElement = IamPolicySearchResult.newBuilder().build(); - List results = Arrays.asList(resultsElement); - SearchIamPoliciesResponse expectedResponse = - SearchIamPoliciesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllResults(results) - .build(); - mockAssetService.addResponse(expectedResponse); - - String scope = "scope109264468"; - String query = "query107944136"; - - SearchIamPoliciesPagedResponse pagedListResponse = client.searchIamPolicies(scope, query); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SearchIamPoliciesRequest actualRequest = (SearchIamPoliciesRequest) actualRequests.get(0); - - Assert.assertEquals(scope, actualRequest.getScope()); - Assert.assertEquals(query, actualRequest.getQuery()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void searchIamPoliciesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String scope = "scope109264468"; - String query = "query107944136"; - - client.searchIamPolicies(scope, query); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - @Test @SuppressWarnings("all") public void searchAllResourcesTest() { diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java index 7e7013b0c..1fae3c553 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java @@ -56,37 +56,6 @@ public void reset() { responses = new LinkedList<>(); } - @Override - public void searchResources( - SearchResourcesRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof SearchResourcesResponse) { - requests.add(request); - responseObserver.onNext((SearchResourcesResponse) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void searchIamPolicies( - SearchIamPoliciesRequest request, - StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof SearchIamPoliciesResponse) { - requests.add(request); - responseObserver.onNext((SearchIamPoliciesResponse) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - @Override public void searchAllResources( SearchAllResourcesRequest request, diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java index ac63ace0e..a713511d0 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java @@ -75,46 +75,6 @@ public void tearDown() throws Exception { client.close(); } - @Test - @SuppressWarnings("all") - public void batchGetAssetsHistoryTest() { - BatchGetAssetsHistoryResponse expectedResponse = - BatchGetAssetsHistoryResponse.newBuilder().build(); - mockAssetService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - BatchGetAssetsHistoryResponse actualResponse = client.batchGetAssetsHistory(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchGetAssetsHistoryRequest actualRequest = - (BatchGetAssetsHistoryRequest) actualRequests.get(0); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void batchGetAssetsHistoryExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String parent = "parent-995424086"; - - client.batchGetAssetsHistory(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - @Test @SuppressWarnings("all") public void createFeedTest() { diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java index b5ea9cc9c..0be684751 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java @@ -17,7 +17,6 @@ import com.google.api.core.BetaApi; import com.google.cloud.asset.v1p2beta1.AssetServiceGrpc.AssetServiceImplBase; -import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; @@ -58,37 +57,6 @@ public void reset() { responses = new LinkedList<>(); } - @Override - public void exportAssets( - ExportAssetsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext((Operation) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void batchGetAssetsHistory( - BatchGetAssetsHistoryRequest request, - StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof BatchGetAssetsHistoryResponse) { - requests.add(request); - responseObserver.onNext((BatchGetAssetsHistoryResponse) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - @Override public void createFeed(CreateFeedRequest request, StreamObserver responseObserver) { Object response = responses.remove(); diff --git a/grpc-google-cloud-asset-v1p1beta1/clirr-ignored-differences.xml b/grpc-google-cloud-asset-v1p1beta1/clirr-ignored-differences.xml new file mode 100644 index 000000000..48495658f --- /dev/null +++ b/grpc-google-cloud-asset-v1p1beta1/clirr-ignored-differences.xml @@ -0,0 +1,20 @@ + + + + + + 6001 + com/google/cloud/asset/v1p1beta1/AssetServiceGrpc + METHOD_SEARCH_IAM_POLICIES + + + 6001 + com/google/cloud/asset/v1p1beta1/AssetServiceGrpc + METHOD_SEARCH_RESOURCES + + + 7002 + com/google/cloud/asset/v1p1beta1/AssetServiceGrpc* + * + + diff --git a/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java b/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java index e6665a241..7c333f887 100644 --- a/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java +++ b/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java @@ -39,124 +39,6 @@ private AssetServiceGrpc() {} public static final String SERVICE_NAME = "google.cloud.asset.v1p1beta1.AssetService"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getSearchResourcesMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest, - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse> - METHOD_SEARCH_RESOURCES = getSearchResourcesMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest, - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse> - getSearchResourcesMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest, - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse> - getSearchResourcesMethod() { - return getSearchResourcesMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest, - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse> - getSearchResourcesMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest, - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse> - getSearchResourcesMethod; - if ((getSearchResourcesMethod = AssetServiceGrpc.getSearchResourcesMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getSearchResourcesMethod = AssetServiceGrpc.getSearchResourcesMethod) == null) { - AssetServiceGrpc.getSearchResourcesMethod = - getSearchResourcesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.asset.v1p1beta1.AssetService", "SearchResources")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AssetServiceMethodDescriptorSupplier("SearchResources")) - .build(); - } - } - } - return getSearchResourcesMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getSearchIamPoliciesMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest, - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse> - METHOD_SEARCH_IAM_POLICIES = getSearchIamPoliciesMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest, - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse> - getSearchIamPoliciesMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest, - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse> - getSearchIamPoliciesMethod() { - return getSearchIamPoliciesMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest, - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse> - getSearchIamPoliciesMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest, - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse> - getSearchIamPoliciesMethod; - if ((getSearchIamPoliciesMethod = AssetServiceGrpc.getSearchIamPoliciesMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getSearchIamPoliciesMethod = AssetServiceGrpc.getSearchIamPoliciesMethod) == null) { - AssetServiceGrpc.getSearchIamPoliciesMethod = - getSearchIamPoliciesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.asset.v1p1beta1.AssetService", "SearchIamPolicies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AssetServiceMethodDescriptorSupplier("SearchIamPolicies")) - .build(); - } - } - } - return getSearchIamPoliciesMethod; - } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getSearchAllResourcesMethod()} instead. public static final io.grpc.MethodDescriptor< @@ -302,34 +184,6 @@ public static AssetServiceFutureStub newFutureStub(io.grpc.Channel channel) { */ public abstract static class AssetServiceImplBase implements io.grpc.BindableService { - /** - * - * - *
-     * Searches resources which are accessible with .get permission.
-     * 
- */ - public void searchResources( - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getSearchResourcesMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Searches IAM policies which are accessible with .getIamPolicy permission.
-     * 
- */ - public void searchIamPolicies( - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getSearchIamPoliciesMethodHelper(), responseObserver); - } - /** * * @@ -371,20 +225,6 @@ public void searchAllIamPolicies( @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSearchResourcesMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest, - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse>( - this, METHODID_SEARCH_RESOURCES))) - .addMethod( - getSearchIamPoliciesMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest, - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse>( - this, METHODID_SEARCH_IAM_POLICIES))) .addMethod( getSearchAllResourcesMethodHelper(), asyncUnaryCall( @@ -424,40 +264,6 @@ protected AssetServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions ca return new AssetServiceStub(channel, callOptions); } - /** - * - * - *
-     * Searches resources which are accessible with .get permission.
-     * 
- */ - public void searchResources( - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getSearchResourcesMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Searches IAM policies which are accessible with .getIamPolicy permission.
-     * 
- */ - public void searchIamPolicies( - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getSearchIamPoliciesMethodHelper(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -526,32 +332,6 @@ protected AssetServiceBlockingStub build( return new AssetServiceBlockingStub(channel, callOptions); } - /** - * - * - *
-     * Searches resources which are accessible with .get permission.
-     * 
- */ - public com.google.cloud.asset.v1p1beta1.SearchResourcesResponse searchResources( - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest request) { - return blockingUnaryCall( - getChannel(), getSearchResourcesMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Searches IAM policies which are accessible with .getIamPolicy permission.
-     * 
- */ - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse searchIamPolicies( - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest request) { - return blockingUnaryCall( - getChannel(), getSearchIamPoliciesMethodHelper(), getCallOptions(), request); - } - /** * * @@ -612,34 +392,6 @@ protected AssetServiceFutureStub build( return new AssetServiceFutureStub(channel, callOptions); } - /** - * - * - *
-     * Searches resources which are accessible with .get permission.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse> - searchResources(com.google.cloud.asset.v1p1beta1.SearchResourcesRequest request) { - return futureUnaryCall( - getChannel().newCall(getSearchResourcesMethodHelper(), getCallOptions()), request); - } - - /** - * - * - *
-     * Searches IAM policies which are accessible with .getIamPolicy permission.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse> - searchIamPolicies(com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest request) { - return futureUnaryCall( - getChannel().newCall(getSearchIamPoliciesMethodHelper(), getCallOptions()), request); - } - /** * * @@ -679,10 +431,8 @@ protected AssetServiceFutureStub build( } } - private static final int METHODID_SEARCH_RESOURCES = 0; - private static final int METHODID_SEARCH_IAM_POLICIES = 1; - private static final int METHODID_SEARCH_ALL_RESOURCES = 2; - private static final int METHODID_SEARCH_ALL_IAM_POLICIES = 3; + private static final int METHODID_SEARCH_ALL_RESOURCES = 0; + private static final int METHODID_SEARCH_ALL_IAM_POLICIES = 1; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -701,20 +451,6 @@ private static final class MethodHandlers @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { - case METHODID_SEARCH_RESOURCES: - serviceImpl.searchResources( - (com.google.cloud.asset.v1p1beta1.SearchResourcesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse>) - responseObserver); - break; - case METHODID_SEARCH_IAM_POLICIES: - serviceImpl.searchIamPolicies( - (com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse>) - responseObserver); - break; case METHODID_SEARCH_ALL_RESOURCES: serviceImpl.searchAllResources( (com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) request, @@ -793,8 +529,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) - .addMethod(getSearchResourcesMethodHelper()) - .addMethod(getSearchIamPoliciesMethodHelper()) .addMethod(getSearchAllResourcesMethodHelper()) .addMethod(getSearchAllIamPoliciesMethodHelper()) .build(); diff --git a/grpc-google-cloud-asset-v1p2beta1/clirr-ignored-differences.xml b/grpc-google-cloud-asset-v1p2beta1/clirr-ignored-differences.xml new file mode 100644 index 000000000..95ce450f0 --- /dev/null +++ b/grpc-google-cloud-asset-v1p2beta1/clirr-ignored-differences.xml @@ -0,0 +1,20 @@ + + + + + + 6001 + com/google/cloud/asset/v1p2beta1/AssetServiceGrpc + METHOD_BATCH_GET_ASSETS_HISTORY + + + 6001 + com/google/cloud/asset/v1p2beta1/AssetServiceGrpc + METHOD_EXPORT_ASSETS + + + 7002 + com/google/cloud/asset/v1p2beta1/AssetServiceGrpc* + * + + diff --git a/grpc-google-cloud-asset-v1p2beta1/pom.xml b/grpc-google-cloud-asset-v1p2beta1/pom.xml index 3067f9f16..76d400e57 100644 --- a/grpc-google-cloud-asset-v1p2beta1/pom.xml +++ b/grpc-google-cloud-asset-v1p2beta1/pom.xml @@ -33,10 +33,6 @@ com.google.api.grpc proto-google-cloud-asset-v1p2beta1
- - com.google.api.grpc - proto-google-common-protos - com.google.guava guava diff --git a/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java b/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java index 36ea65f15..8ce8a6d30 100644 --- a/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java +++ b/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java @@ -39,119 +39,6 @@ private AssetServiceGrpc() {} public static final String SERVICE_NAME = "google.cloud.asset.v1p2beta1.AssetService"; // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getExportAssetsMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest, com.google.longrunning.Operation> - METHOD_EXPORT_ASSETS = getExportAssetsMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest, com.google.longrunning.Operation> - getExportAssetsMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest, com.google.longrunning.Operation> - getExportAssetsMethod() { - return getExportAssetsMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest, com.google.longrunning.Operation> - getExportAssetsMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest, com.google.longrunning.Operation> - getExportAssetsMethod; - if ((getExportAssetsMethod = AssetServiceGrpc.getExportAssetsMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getExportAssetsMethod = AssetServiceGrpc.getExportAssetsMethod) == null) { - AssetServiceGrpc.getExportAssetsMethod = - getExportAssetsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.asset.v1p2beta1.AssetService", "ExportAssets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ExportAssets")) - .build(); - } - } - } - return getExportAssetsMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getBatchGetAssetsHistoryMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse> - METHOD_BATCH_GET_ASSETS_HISTORY = getBatchGetAssetsHistoryMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse> - getBatchGetAssetsHistoryMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse> - getBatchGetAssetsHistoryMethod() { - return getBatchGetAssetsHistoryMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse> - getBatchGetAssetsHistoryMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse> - getBatchGetAssetsHistoryMethod; - if ((getBatchGetAssetsHistoryMethod = AssetServiceGrpc.getBatchGetAssetsHistoryMethod) - == null) { - synchronized (AssetServiceGrpc.class) { - if ((getBatchGetAssetsHistoryMethod = AssetServiceGrpc.getBatchGetAssetsHistoryMethod) - == null) { - AssetServiceGrpc.getBatchGetAssetsHistoryMethod = - getBatchGetAssetsHistoryMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.asset.v1p2beta1.AssetService", "BatchGetAssetsHistory")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AssetServiceMethodDescriptorSupplier("BatchGetAssetsHistory")) - .build(); - } - } - } - return getBatchGetAssetsHistoryMethod; - } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getCreateFeedMethod()} instead. public static final io.grpc.MethodDescriptor< @@ -445,40 +332,6 @@ public static AssetServiceFutureStub newFutureStub(io.grpc.Channel channel) { */ public abstract static class AssetServiceImplBase implements io.grpc.BindableService { - /** - * - * - *
-     * Exports assets with time and resource types to a given Cloud Storage
-     * location. The output format is newline-delimited JSON.
-     * This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
-     * to keep track of the export.
-     * 
- */ - public void exportAssets( - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getExportAssetsMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Batch gets the update history of assets that overlap a time window.
-     * For RESOURCE content, this API outputs history with asset in both
-     * non-delete or deleted status.
-     * For IAM_POLICY content, this API outputs history when the asset and its
-     * attached IAM POLICY both exist. This can create gaps in the output history.
-     * 
- */ - public void batchGetAssetsHistory( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getBatchGetAssetsHistoryMethodHelper(), responseObserver); - } - /** * * @@ -549,19 +402,6 @@ public void deleteFeed( @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getExportAssetsMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest, - com.google.longrunning.Operation>(this, METHODID_EXPORT_ASSETS))) - .addMethod( - getBatchGetAssetsHistoryMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse>( - this, METHODID_BATCH_GET_ASSETS_HISTORY))) .addMethod( getCreateFeedMethodHelper(), asyncUnaryCall( @@ -618,46 +458,6 @@ protected AssetServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions ca return new AssetServiceStub(channel, callOptions); } - /** - * - * - *
-     * Exports assets with time and resource types to a given Cloud Storage
-     * location. The output format is newline-delimited JSON.
-     * This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
-     * to keep track of the export.
-     * 
- */ - public void exportAssets( - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getExportAssetsMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Batch gets the update history of assets that overlap a time window.
-     * For RESOURCE content, this API outputs history with asset in both
-     * non-delete or deleted status.
-     * For IAM_POLICY content, this API outputs history when the asset and its
-     * attached IAM POLICY both exist. This can create gaps in the output history.
-     * 
- */ - public void batchGetAssetsHistory( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getBatchGetAssetsHistoryMethodHelper(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -764,39 +564,6 @@ protected AssetServiceBlockingStub build( return new AssetServiceBlockingStub(channel, callOptions); } - /** - * - * - *
-     * Exports assets with time and resource types to a given Cloud Storage
-     * location. The output format is newline-delimited JSON.
-     * This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
-     * to keep track of the export.
-     * 
- */ - public com.google.longrunning.Operation exportAssets( - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest request) { - return blockingUnaryCall( - getChannel(), getExportAssetsMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Batch gets the update history of assets that overlap a time window.
-     * For RESOURCE content, this API outputs history with asset in both
-     * non-delete or deleted status.
-     * For IAM_POLICY content, this API outputs history when the asset and its
-     * attached IAM POLICY both exist. This can create gaps in the output history.
-     * 
- */ - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse batchGetAssetsHistory( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest request) { - return blockingUnaryCall( - getChannel(), getBatchGetAssetsHistoryMethodHelper(), getCallOptions(), request); - } - /** * * @@ -885,41 +652,6 @@ protected AssetServiceFutureStub build( return new AssetServiceFutureStub(channel, callOptions); } - /** - * - * - *
-     * Exports assets with time and resource types to a given Cloud Storage
-     * location. The output format is newline-delimited JSON.
-     * This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
-     * to keep track of the export.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - exportAssets(com.google.cloud.asset.v1p2beta1.ExportAssetsRequest request) { - return futureUnaryCall( - getChannel().newCall(getExportAssetsMethodHelper(), getCallOptions()), request); - } - - /** - * - * - *
-     * Batch gets the update history of assets that overlap a time window.
-     * For RESOURCE content, this API outputs history with asset in both
-     * non-delete or deleted status.
-     * For IAM_POLICY content, this API outputs history when the asset and its
-     * attached IAM POLICY both exist. This can create gaps in the output history.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse> - batchGetAssetsHistory( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest request) { - return futureUnaryCall( - getChannel().newCall(getBatchGetAssetsHistoryMethodHelper(), getCallOptions()), request); - } - /** * * @@ -988,13 +720,11 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1013,18 +743,6 @@ private static final class MethodHandlers @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { - case METHODID_EXPORT_ASSETS: - serviceImpl.exportAssets( - (com.google.cloud.asset.v1p2beta1.ExportAssetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_GET_ASSETS_HISTORY: - serviceImpl.batchGetAssetsHistory( - (com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse>) - responseObserver); - break; case METHODID_CREATE_FEED: serviceImpl.createFeed( (com.google.cloud.asset.v1p2beta1.CreateFeedRequest) request, @@ -1118,8 +836,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) - .addMethod(getExportAssetsMethodHelper()) - .addMethod(getBatchGetAssetsHistoryMethodHelper()) .addMethod(getCreateFeedMethodHelper()) .addMethod(getGetFeedMethodHelper()) .addMethod(getListFeedsMethodHelper()) diff --git a/proto-google-cloud-asset-v1p1beta1/clirr-ignored-differences.xml b/proto-google-cloud-asset-v1p1beta1/clirr-ignored-differences.xml index 7b6bced8a..786de7a83 100644 --- a/proto-google-cloud-asset-v1p1beta1/clirr-ignored-differences.xml +++ b/proto-google-cloud-asset-v1p1beta1/clirr-ignored-differences.xml @@ -11,4 +11,14 @@ com/google/cloud/asset/v1p1beta1/*OrBuilder boolean contains*(*) + + + + 8001 + com/google/cloud/asset/v1p1beta1/SearchIamPolicies* + + + 8001 + com/google/cloud/asset/v1p1beta1/SearchResources* + diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java index 5f65dc46d..8ba13c72f 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java @@ -27,22 +27,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -73,60 +57,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\032\034google/api/annotations.proto\032\027google/a" + "pi/client.proto\032\037google/api/field_behavi" + "or.proto\032)google/cloud/asset/v1p1beta1/a" - + "ssets.proto\"\213\001\n\026SearchResourcesRequest\022\022" - + "\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\030" - + "\n\013asset_types\030\003 \003(\tB\003\340A\001\022\026\n\tpage_size\030\004 " - + "\001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001\"{\n\027Sea" - + "rchResourcesResponse\022G\n\007results\030\001 \003(\01326." - + "google.cloud.asset.v1p1beta1.StandardRes" - + "ourceMetadata\022\027\n\017next_page_token\030\002 \001(\t\"s" - + "\n\030SearchIamPoliciesRequest\022\022\n\005scope\030\004 \001(" - + "\tB\003\340A\002\022\022\n\005query\030\001 \001(\tB\003\340A\001\022\026\n\tpage_size\030" - + "\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"z\n\031S" - + "earchIamPoliciesResponse\022D\n\007results\030\001 \003(" - + "\01323.google.cloud.asset.v1p1beta1.IamPoli" - + "cySearchResult\022\027\n\017next_page_token\030\002 \001(\t\"" - + "\216\001\n\031SearchAllResourcesRequest\022\022\n\005scope\030\001" - + " \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\030\n\013asset_t" - + "ypes\030\003 \003(\tB\003\340A\001\022\026\n\tpage_size\030\004 \001(\005B\003\340A\001\022" - + "\027\n\npage_token\030\005 \001(\tB\003\340A\001\"~\n\032SearchAllRes" - + "ourcesResponse\022G\n\007results\030\001 \003(\01326.google" - + ".cloud.asset.v1p1beta1.StandardResourceM" - + "etadata\022\027\n\017next_page_token\030\002 \001(\t\"v\n\033Sear" - + "chAllIamPoliciesRequest\022\022\n\005scope\030\001 \001(\tB\003" - + "\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001" - + "(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"}\n\034Sear" - + "chAllIamPoliciesResponse\022D\n\007results\030\001 \003(" - + "\01323.google.cloud.asset.v1p1beta1.IamPoli" - + "cySearchResult\022\027\n\017next_page_token\030\002 \001(\t2" - + "\205\007\n\014AssetService\022\275\001\n\017SearchResources\0224.g" - + "oogle.cloud.asset.v1p1beta1.SearchResour" - + "cesRequest\0325.google.cloud.asset.v1p1beta" - + "1.SearchResourcesResponse\"=\202\323\344\223\002\035\022\033/v1p1" - + "beta1/resources:search\332A\027scope,query,ass" - + "et_types\022\271\001\n\021SearchIamPolicies\0226.google." - + "cloud.asset.v1p1beta1.SearchIamPoliciesR" - + "equest\0327.google.cloud.asset.v1p1beta1.Se" - + "archIamPoliciesResponse\"3\202\323\344\223\002\037\022\035/v1p1be" - + "ta1/iamPolicies:search\332A\013scope,query\022\325\001\n" - + "\022SearchAllResources\0227.google.cloud.asset" - + ".v1p1beta1.SearchAllResourcesRequest\0328.g" - + "oogle.cloud.asset.v1p1beta1.SearchAllRes" - + "ourcesResponse\"L\202\323\344\223\002,\022*/v1p1beta1/{scop" - + "e=*/*}/resources:searchAll\332A\027scope,query" - + ",asset_types\022\321\001\n\024SearchAllIamPolicies\0229." - + "google.cloud.asset.v1p1beta1.SearchAllIa" - + "mPoliciesRequest\032:.google.cloud.asset.v1" - + "p1beta1.SearchAllIamPoliciesResponse\"B\202\323" - + "\344\223\002.\022,/v1p1beta1/{scope=*/*}/iamPolicies" - + ":searchAll\332A\013scope,query\032M\312A\031cloudasset." - + "googleapis.com\322A.https://www.googleapis." - + "com/auth/cloud-platformB\270\001\n com.google.c" - + "loud.asset.v1p1beta1B\021AssetServiceProtoP" - + "\001ZAgoogle.golang.org/genproto/googleapis" - + "/cloud/asset/v1p1beta1;asset\252\002\034Google.Cl" - + "oud.Asset.V1P1Beta1\312\002\034Google\\Cloud\\Asset" - + "\\V1p1beta1b\006proto3" + + "ssets.proto\"\216\001\n\031SearchAllResourcesReques" + + "t\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A" + + "\001\022\030\n\013asset_types\030\003 \003(\tB\003\340A\001\022\026\n\tpage_size" + + "\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001\"~\n\032" + + "SearchAllResourcesResponse\022G\n\007results\030\001 " + + "\003(\01326.google.cloud.asset.v1p1beta1.Stand" + + "ardResourceMetadata\022\027\n\017next_page_token\030\002" + + " \001(\t\"v\n\033SearchAllIamPoliciesRequest\022\022\n\005s" + + "cope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\026\n\tp" + + "age_size\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB" + + "\003\340A\001\"}\n\034SearchAllIamPoliciesResponse\022D\n\007" + + "results\030\001 \003(\01323.google.cloud.asset.v1p1b" + + "eta1.IamPolicySearchResult\022\027\n\017next_page_" + + "token\030\002 \001(\t2\211\004\n\014AssetService\022\325\001\n\022SearchA" + + "llResources\0227.google.cloud.asset.v1p1bet" + + "a1.SearchAllResourcesRequest\0328.google.cl" + + "oud.asset.v1p1beta1.SearchAllResourcesRe" + + "sponse\"L\202\323\344\223\002,\022*/v1p1beta1/{scope=*/*}/r" + + "esources:searchAll\332A\027scope,query,asset_t" + + "ypes\022\321\001\n\024SearchAllIamPolicies\0229.google.c" + + "loud.asset.v1p1beta1.SearchAllIamPolicie" + + "sRequest\032:.google.cloud.asset.v1p1beta1." + + "SearchAllIamPoliciesResponse\"B\202\323\344\223\002.\022,/v" + + "1p1beta1/{scope=*/*}/iamPolicies:searchA" + + "ll\332A\013scope,query\032M\312A\031cloudasset.googleap" + + "is.com\322A.https://www.googleapis.com/auth" + + "/cloud-platformB\270\001\n com.google.cloud.ass" + + "et.v1p1beta1B\021AssetServiceProtoP\001ZAgoogl" + + "e.golang.org/genproto/googleapis/cloud/a" + + "sset/v1p1beta1;asset\252\002\034Google.Cloud.Asse" + + "t.V1P1Beta1\312\002\034Google\\Cloud\\Asset\\V1p1bet" + + "a1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -137,40 +99,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.cloud.asset.v1p1beta1.AssetProto.getDescriptor(), }); - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesRequest_descriptor, - new java.lang.String[] { - "Scope", "Query", "AssetTypes", "PageSize", "PageToken", - }); - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_SearchResourcesResponse_descriptor, - new java.lang.String[] { - "Results", "NextPageToken", - }); - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesRequest_descriptor, - new java.lang.String[] { - "Scope", "Query", "PageSize", "PageToken", - }); - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesResponse_descriptor, - new java.lang.String[] { - "Results", "NextPageToken", - }); internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor, @@ -178,7 +108,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Scope", "Query", "AssetTypes", "PageSize", "PageToken", }); internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor, @@ -186,7 +116,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Results", "NextPageToken", }); internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor, @@ -194,7 +124,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Scope", "Query", "PageSize", "PageToken", }); internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor, 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 index 711fd4208..b3a8d42d2 100644 --- 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 @@ -246,9 +246,10 @@ public 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.
+   * Optional. The page size for search result pagination. Page size is capped at 500 even
+   * if a larger value is given. If set to zero, server will pick an appropriate
+   * default. Returned results may be fewer than requested. When this happens,
+   * there could be more results as long as `next_page_token` is returned.
    * 
* * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -932,9 +933,10 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) { * * *
-     * 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.
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
      * 
* * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -948,9 +950,10 @@ public int getPageSize() { * * *
-     * 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.
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
      * 
* * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -968,9 +971,10 @@ public Builder setPageSize(int value) { * * *
-     * 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.
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
      * 
* * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java index 20b97fbad..5855985fe 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java @@ -91,9 +91,10 @@ public interface SearchAllIamPoliciesRequestOrBuilder * * *
-   * 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.
+   * Optional. The page size for search result pagination. Page size is capped at 500 even
+   * if a larger value is given. If set to zero, server will pick an appropriate
+   * default. Returned results may be fewer than requested. When this happens,
+   * there could be more results as long as `next_page_token` is returned.
    * 
* * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; 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 index 8acdc7cee..fc5159c7a 100644 --- 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 @@ -320,9 +320,10 @@ public 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.
+   * Optional. The page size for search result pagination. Page size is capped at 500 even
+   * if a larger value is given. If set to zero, server will pick an appropriate
+   * default. Returned results may be fewer than requested. When this happens,
+   * there could be more results as long as `next_page_token` is returned.
    * 
* * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -1202,9 +1203,10 @@ public Builder addAssetTypesBytes(com.google.protobuf.ByteString value) { * * *
-     * 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.
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
      * 
* * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -1218,9 +1220,10 @@ public int getPageSize() { * * *
-     * 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.
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
      * 
* * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -1238,9 +1241,10 @@ public Builder setPageSize(int value) { * * *
-     * 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.
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
      * 
* * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java index 29d63cb8d..10f9b9711 100644 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java @@ -140,9 +140,10 @@ public interface SearchAllResourcesRequestOrBuilder * * *
-   * 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.
+   * Optional. The page size for search result pagination. Page size is capped at 500 even
+   * if a larger value is given. If set to zero, server will pick an appropriate
+   * default. Returned results may be fewer than requested. When this happens,
+   * there could be more results as long as `next_page_token` is returned.
    * 
* * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; 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 deleted file mode 100644 index 277089bfd..000000000 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequest.java +++ /dev/null @@ -1,1155 +0,0 @@ -/* - * 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 - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequestOrBuilder { - 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); - } - - // Construct using com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - scope_ = ""; - - query_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest build() { - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest buildPartial() { - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest result = - new com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest(this); - result.scope_ = scope_; - result.query_ = query_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest other) { - if (other == com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.getDefaultInstance()) - return this; - if (!other.getScope().isEmpty()) { - scope_ = other.scope_; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private 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)) { - 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 PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchIamPoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchIamPoliciesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequestOrBuilder.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequestOrBuilder.java deleted file mode 100644 index 236b92dc7..000000000 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequestOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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; - -public interface SearchIamPoliciesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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 deleted file mode 100644 index 85dda83eb..000000000 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponse.java +++ /dev/null @@ -1,1173 +0,0 @@ -/* - * 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 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 java.util.List getResultsList() { - 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 java.util.List - 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 - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponseOrBuilder { - 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); - } - - // Construct using com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse build() { - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse buildPartial() { - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse result = - new com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse other) { - if (other == com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.getDefaultInstance()) - return this; - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getResultsFieldBuilder() - : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List results_ = - java.util.Collections.emptyList(); - - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = - new java.util.ArrayList( - results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, - com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder> - resultsBuilder_; - - /** - * - * - *
-     * 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 getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * 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 - 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 - 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 - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, - com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, - com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>( - results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private 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)) { - 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 PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchIamPoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchIamPoliciesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponseOrBuilder.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponseOrBuilder.java deleted file mode 100644 index 55ddfc598..000000000 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponseOrBuilder.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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; - -public interface SearchIamPoliciesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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 getResultsList(); - /** - * - * - *
-   * 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 - 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 deleted file mode 100644 index 8ce052689..000000000 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequest.java +++ /dev/null @@ -1,1427 +0,0 @@ -/* - * 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 - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchResourcesRequest) - com.google.cloud.asset.v1p1beta1.SearchResourcesRequestOrBuilder { - 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); - } - - // Construct using com.google.cloud.asset.v1p1beta1.SearchResourcesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - scope_ = ""; - - query_ = ""; - - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p1beta1_SearchResourcesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchResourcesRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.SearchResourcesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchResourcesRequest build() { - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchResourcesRequest buildPartial() { - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest result = - new com.google.cloud.asset.v1p1beta1.SearchResourcesRequest(this); - int from_bitField0_ = bitField0_; - result.scope_ = scope_; - result.query_ = query_; - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.SearchResourcesRequest) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchResourcesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchResourcesRequest other) { - if (other == com.google.cloud.asset.v1p1beta1.SearchResourcesRequest.getDefaultInstance()) - return this; - if (!other.getScope().isEmpty()) { - scope_ = other.scope_; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - onChanged(); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchResourcesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p1beta1.SearchResourcesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private 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)) { - 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 values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetTypes_); - 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]; - * - * @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 PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchResourcesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchResourcesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchResourcesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequestOrBuilder.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequestOrBuilder.java deleted file mode 100644 index ea226bf72..000000000 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequestOrBuilder.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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; - -public interface SearchResourcesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchResourcesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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 getAssetTypesList(); - /** - * - * - *
-   * 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 deleted file mode 100644 index 2b646d60c..000000000 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponse.java +++ /dev/null @@ -1,1158 +0,0 @@ -/* - * 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 results_; - /** - * - * - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public java.util.List - getResultsList() { - return results_; - } - /** - * - * - *
-   * 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 - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchResourcesResponse) - com.google.cloud.asset.v1p1beta1.SearchResourcesResponseOrBuilder { - 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); - } - - // Construct using com.google.cloud.asset.v1p1beta1.SearchResourcesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p1beta1_SearchResourcesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchResourcesResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.SearchResourcesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchResourcesResponse build() { - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchResourcesResponse buildPartial() { - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse result = - new com.google.cloud.asset.v1p1beta1.SearchResourcesResponse(this); - int from_bitField0_ = bitField0_; - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.SearchResourcesResponse) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchResourcesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchResourcesResponse other) { - if (other == com.google.cloud.asset.v1p1beta1.SearchResourcesResponse.getDefaultInstance()) - return this; - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getResultsFieldBuilder() - : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchResourcesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p1beta1.SearchResourcesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List results_ = - java.util.Collections.emptyList(); - - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = - new java.util.ArrayList( - results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, - com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder> - resultsBuilder_; - - /** - * - * - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public java.util.List - getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * 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 - 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 - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, - com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, - com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>( - results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private 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)) { - 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 PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchResourcesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchResourcesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchResourcesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponseOrBuilder.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponseOrBuilder.java deleted file mode 100644 index 1a74e4c62..000000000 --- a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponseOrBuilder.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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; - -public interface SearchResourcesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchResourcesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - java.util.List getResultsList(); - /** - * - * - *
-   * 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 - 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/proto/google/cloud/asset/v1p1beta1/asset_service.proto b/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto index 025adb27f..c75ce7adf 100644 --- 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 @@ -34,22 +34,6 @@ 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" - }; - option (google.api.method_signature) = "scope,query,asset_types"; - } - - // Searches IAM policies which are accessible with .getIamPolicy permission. - rpc SearchIamPolicies(SearchIamPoliciesRequest) returns (SearchIamPoliciesResponse) { - option (google.api.http) = { - get: "/v1p1beta1/iamPolicies:search" - }; - option (google.api.method_signature) = "scope,query"; - } - // 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, @@ -77,84 +61,6 @@ service AssetService { } } -// 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 @@ -171,9 +77,10 @@ message SearchAllResourcesRequest { // 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. + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the preceding call @@ -209,9 +116,10 @@ message SearchAllIamPoliciesRequest { // * "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. + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, retrieve the next batch of results from the preceding call to diff --git a/proto-google-cloud-asset-v1p2beta1/clirr-ignored-differences.xml b/proto-google-cloud-asset-v1p2beta1/clirr-ignored-differences.xml new file mode 100644 index 000000000..c577046af --- /dev/null +++ b/proto-google-cloud-asset-v1p2beta1/clirr-ignored-differences.xml @@ -0,0 +1,108 @@ + + + + + 7012 + com/google/cloud/asset/v1p2beta1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/asset/v1p2beta1/*OrBuilder + boolean contains*(*) + + + + + 8001 + com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistory* + + + 8001 + com/google/cloud/asset/v1p2beta1/BigQueryDestination* + + + 8001 + com/google/cloud/asset/v1p2beta1/ExportAssets* + + + 6011 + com/google/cloud/asset/v1p2beta1/Asset + IAM_POLICY_NAME_FIELD_NUMBER + + + 6011 + com/google/cloud/asset/v1p2beta1/ContentType + ACCESS_POLICY_VALUE + + + 6011 + com/google/cloud/asset/v1p2beta1/ContentType + IAM_POLICY_NAME_VALUE + + + 6011 + com/google/cloud/asset/v1p2beta1/ContentType + ORG_POLICY_VALUE + + + 6011 + com/google/cloud/asset/v1p2beta1/GcsDestination + URI_PREFIX_FIELD_NUMBER + + + 6011 + com/google/cloud/asset/v1p2beta1/OutputConfig + BIGQUERY_DESTINATION_FIELD_NUMBER + + + 6011 + com/google/cloud/asset/v1p2beta1/Resource + INTERNAL_DATA_FIELD_NUMBER + + + 6001 + com/google/cloud/asset/v1p2beta1/ContentType + ACCESS_POLICY + + + 6001 + com/google/cloud/asset/v1p2beta1/ContentType + IAM_POLICY_NAME + + + 6001 + com/google/cloud/asset/v1p2beta1/ContentType + ORG_POLICY + + + 6001 + com/google/cloud/asset/v1p2beta1/GcsDestination* + URI_PREFIX + + + 6001 + com/google/cloud/asset/v1p2beta1/OutputConfig* + BIGQUERY_DESTINATION + + + 7002 + com/google/cloud/asset/v1p2beta1/Asset* + * + + + 7002 + com/google/cloud/asset/v1p2beta1/GcsDestination* + * + + + 7002 + com/google/cloud/asset/v1p2beta1/OutputConfig* + * + + + 7002 + com/google/cloud/asset/v1p2beta1/Resource* + * + + diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java index dcc28fb08..83a0232e6 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java @@ -41,7 +41,6 @@ private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Asset() { name_ = ""; assetType_ = ""; - iamPolicyName_ = com.google.protobuf.ByteString.EMPTY; ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @@ -117,11 +116,6 @@ private Asset( iamPolicy_ = subBuilder.buildPartial(); } - break; - } - case 42: - { - iamPolicyName_ = input.readBytes(); break; } case 50: @@ -364,25 +358,6 @@ public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { return getIamPolicy(); } - public static final int IAM_POLICY_NAME_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString iamPolicyName_; - /** - * - * - *
-   * Cloud IAM policy name of the Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy name associated
-   * with it.
-   * 
- * - * bytes iam_policy_name = 5; - * - * @return The iamPolicyName. - */ - public com.google.protobuf.ByteString getIamPolicyName() { - return iamPolicyName_; - } - public static final int ANCESTORS_FIELD_NUMBER = 6; private com.google.protobuf.LazyStringList ancestors_; /** @@ -391,8 +366,8 @@ public com.google.protobuf.ByteString getIamPolicyName() { *
    * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ending at a visible root. If the asset is a
-   * CRM project/ folder/organization, this starts from the asset itself.
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
    * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    * 
* @@ -409,8 +384,8 @@ public com.google.protobuf.ProtocolStringList getAncestorsList() { *
    * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ending at a visible root. If the asset is a
-   * CRM project/ folder/organization, this starts from the asset itself.
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
    * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    * 
* @@ -427,8 +402,8 @@ public int getAncestorsCount() { *
    * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ending at a visible root. If the asset is a
-   * CRM project/ folder/organization, this starts from the asset itself.
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
    * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    * 
* @@ -446,8 +421,8 @@ public java.lang.String getAncestors(int index) { *
    * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ending at a visible root. If the asset is a
-   * CRM project/ folder/organization, this starts from the asset itself.
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
    * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    * 
* @@ -486,9 +461,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (iamPolicy_ != null) { output.writeMessage(4, getIamPolicy()); } - if (!iamPolicyName_.isEmpty()) { - output.writeBytes(5, iamPolicyName_); - } for (int i = 0; i < ancestors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ancestors_.getRaw(i)); } @@ -513,9 +485,6 @@ public int getSerializedSize() { if (iamPolicy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getIamPolicy()); } - if (!iamPolicyName_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, iamPolicyName_); - } { int dataSize = 0; for (int i = 0; i < ancestors_.size(); i++) { @@ -549,7 +518,6 @@ public boolean equals(final java.lang.Object obj) { if (hasIamPolicy()) { if (!getIamPolicy().equals(other.getIamPolicy())) return false; } - if (!getIamPolicyName().equals(other.getIamPolicyName())) return false; if (!getAncestorsList().equals(other.getAncestorsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -574,8 +542,6 @@ public int hashCode() { hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; hash = (53 * hash) + getIamPolicy().hashCode(); } - hash = (37 * hash) + IAM_POLICY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getIamPolicyName().hashCode(); if (getAncestorsCount() > 0) { hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; hash = (53 * hash) + getAncestorsList().hashCode(); @@ -742,8 +708,6 @@ public Builder clear() { iamPolicy_ = null; iamPolicyBuilder_ = null; } - iamPolicyName_ = com.google.protobuf.ByteString.EMPTY; - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; @@ -786,7 +750,6 @@ public com.google.cloud.asset.v1p2beta1.Asset buildPartial() { } else { result.iamPolicy_ = iamPolicyBuilder_.build(); } - result.iamPolicyName_ = iamPolicyName_; if (((bitField0_ & 0x00000001) != 0)) { ancestors_ = ancestors_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); @@ -855,9 +818,6 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Asset other) { if (other.hasIamPolicy()) { mergeIamPolicy(other.getIamPolicy()); } - if (other.getIamPolicyName() != com.google.protobuf.ByteString.EMPTY) { - setIamPolicyName(other.getIamPolicyName()); - } if (!other.ancestors_.isEmpty()) { if (ancestors_.isEmpty()) { ancestors_ = other.ancestors_; @@ -1504,66 +1464,6 @@ public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { return iamPolicyBuilder_; } - private com.google.protobuf.ByteString iamPolicyName_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-     * Cloud IAM policy name of the Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy name associated
-     * with it.
-     * 
- * - * bytes iam_policy_name = 5; - * - * @return The iamPolicyName. - */ - public com.google.protobuf.ByteString getIamPolicyName() { - return iamPolicyName_; - } - /** - * - * - *
-     * Cloud IAM policy name of the Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy name associated
-     * with it.
-     * 
- * - * bytes iam_policy_name = 5; - * - * @param value The iamPolicyName to set. - * @return This builder for chaining. - */ - public Builder setIamPolicyName(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - iamPolicyName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Cloud IAM policy name of the Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy name associated
-     * with it.
-     * 
- * - * bytes iam_policy_name = 5; - * - * @return This builder for chaining. - */ - public Builder clearIamPolicyName() { - - iamPolicyName_ = getDefaultInstance().getIamPolicyName(); - onChanged(); - return this; - } - private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -1579,8 +1479,8 @@ private void ensureAncestorsIsMutable() { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* @@ -1597,8 +1497,8 @@ public com.google.protobuf.ProtocolStringList getAncestorsList() { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* @@ -1615,8 +1515,8 @@ public int getAncestorsCount() { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* @@ -1634,8 +1534,8 @@ public java.lang.String getAncestors(int index) { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* @@ -1653,8 +1553,8 @@ public com.google.protobuf.ByteString getAncestorsBytes(int index) { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* @@ -1679,8 +1579,8 @@ public Builder setAncestors(int index, java.lang.String value) { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* @@ -1704,8 +1604,8 @@ public Builder addAncestors(java.lang.String value) { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* @@ -1726,8 +1626,8 @@ public Builder addAllAncestors(java.lang.Iterable values) { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* @@ -1747,8 +1647,8 @@ public Builder clearAncestors() { *
      * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
      * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ending at a visible root. If the asset is a
-     * CRM project/ folder/organization, this starts from the asset itself.
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
      * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
      * 
* diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java index d7d696b9b..6396365ad 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java @@ -154,29 +154,14 @@ public interface AssetOrBuilder */ com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); - /** - * - * - *
-   * Cloud IAM policy name of the Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy name associated
-   * with it.
-   * 
- * - * bytes iam_policy_name = 5; - * - * @return The iamPolicyName. - */ - com.google.protobuf.ByteString getIamPolicyName(); - /** * * *
    * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ending at a visible root. If the asset is a
-   * CRM project/ folder/organization, this starts from the asset itself.
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
    * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    * 
* @@ -191,8 +176,8 @@ public interface AssetOrBuilder *
    * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ending at a visible root. If the asset is a
-   * CRM project/ folder/organization, this starts from the asset itself.
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
    * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    * 
* @@ -207,8 +192,8 @@ public interface AssetOrBuilder *
    * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ending at a visible root. If the asset is a
-   * CRM project/ folder/organization, this starts from the asset itself.
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
    * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    * 
* @@ -224,8 +209,8 @@ public interface AssetOrBuilder *
    * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
    * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ending at a visible root. If the asset is a
-   * CRM project/ folder/organization, this starts from the asset itself.
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
    * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
    * 
* diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java index fb74facd4..971d0bb1f 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java @@ -63,22 +63,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "set\030\003 \001(\0132#.google.cloud.asset.v1p2beta1" + ".Asset\"j\n\nTimeWindow\022.\n\nstart_time\030\001 \001(\013" + "2\032.google.protobuf.Timestamp\022,\n\010end_time" - + "\030\002 \001(\0132\032.google.protobuf.Timestamp\"\272\001\n\005A" + + "\030\002 \001(\0132\032.google.protobuf.Timestamp\"\241\001\n\005A" + "sset\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0228" + "\n\010resource\030\003 \001(\0132&.google.cloud.asset.v1" + "p2beta1.Resource\022)\n\niam_policy\030\004 \001(\0132\025.g" - + "oogle.iam.v1.Policy\022\027\n\017iam_policy_name\030\005" - + " \001(\014\022\021\n\tancestors\030\006 \003(\t\"\315\001\n\010Resource\022\017\n\007" - + "version\030\001 \001(\t\022\036\n\026discovery_document_uri\030" - + "\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n\014resourc" - + "e_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001(" - + "\0132\027.google.protobuf.Struct\022+\n\rinternal_d" - + "ata\030\007 \001(\0132\024.google.protobuf.AnyB\264\001\n com." - + "google.cloud.asset.v1p2beta1B\nAssetProto" - + "P\001ZAgoogle.golang.org/genproto/googleapi" - + "s/cloud/asset/v1p2beta1;asset\370\001\001\252\002\034Googl" - + "e.Cloud.Asset.v1p2beta1\312\002\034Google\\Cloud\\A" - + "sset\\v1p2beta1b\006proto3" + + "oogle.iam.v1.Policy\022\021\n\tancestors\030\006 \003(\t\"\240" + + "\001\n\010Resource\022\017\n\007version\030\001 \001(\t\022\036\n\026discover" + + "y_document_uri\030\002 \001(\t\022\026\n\016discovery_name\030\003" + + " \001(\t\022\024\n\014resource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001" + + "(\t\022%\n\004data\030\006 \001(\0132\027.google.protobuf.Struc" + + "tB\264\001\n com.google.cloud.asset.v1p2beta1B\n" + + "AssetProtoP\001ZAgoogle.golang.org/genproto" + + "/googleapis/cloud/asset/v1p2beta1;asset\370" + + "\001\001\252\002\034Google.Cloud.Asset.v1p2beta1\312\002\034Goog" + + "le\\Cloud\\Asset\\v1p2beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -112,7 +110,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor, new java.lang.String[] { - "Name", "AssetType", "Resource", "IamPolicy", "IamPolicyName", "Ancestors", + "Name", "AssetType", "Resource", "IamPolicy", "Ancestors", }); internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor = getDescriptor().getMessageTypes().get(3); @@ -120,13 +118,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor, new java.lang.String[] { - "Version", - "DiscoveryDocumentUri", - "DiscoveryName", - "ResourceUrl", - "Parent", - "Data", - "InternalData", + "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", }); com.google.api.AnnotationsProto.getDescriptor(); com.google.iam.v1.PolicyProto.getDescriptor(); diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java index 12b8a80ac..c6d166077 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java @@ -27,22 +27,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -75,10 +59,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -102,140 +82,88 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n0google/cloud/asset/v1p2beta1/asset_ser" + "vice.proto\022\034google.cloud.asset.v1p2beta1" - + "\032\034google/api/annotations.proto\032)google/c" - + "loud/asset/v1p2beta1/assets.proto\032#googl" - + "e/longrunning/operations.proto\032\033google/p" - + "rotobuf/empty.proto\032 google/protobuf/fie" - + "ld_mask.proto\032\037google/protobuf/timestamp" - + ".proto\032\027google/api/client.proto\"\355\001\n\023Expo" - + "rtAssetsRequest\022\016\n\006parent\030\001 \001(\t\022-\n\tread_" - + "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\023" - + "\n\013asset_types\030\003 \003(\t\022?\n\014content_type\030\004 \001(" - + "\0162).google.cloud.asset.v1p2beta1.Content" - + "Type\022A\n\routput_config\030\005 \001(\0132*.google.clo" - + "ud.asset.v1p2beta1.OutputConfig\"\210\001\n\024Expo" - + "rtAssetsResponse\022-\n\tread_time\030\001 \001(\0132\032.go" - + "ogle.protobuf.Timestamp\022A\n\routput_config" - + "\030\002 \001(\0132*.google.cloud.asset.v1p2beta1.Ou" - + "tputConfig\"\310\001\n\034BatchGetAssetsHistoryRequ" - + "est\022\016\n\006parent\030\001 \001(\t\022\023\n\013asset_names\030\002 \003(\t" - + "\022?\n\014content_type\030\003 \001(\0162).google.cloud.as" - + "set.v1p2beta1.ContentType\022B\n\020read_time_w" - + "indow\030\004 \001(\0132(.google.cloud.asset.v1p2bet" - + "a1.TimeWindow\"\\\n\035BatchGetAssetsHistoryRe" - + "sponse\022;\n\006assets\030\001 \003(\0132+.google.cloud.as" - + "set.v1p2beta1.TemporalAsset\"f\n\021CreateFee" - + "dRequest\022\016\n\006parent\030\001 \001(\t\022\017\n\007feed_id\030\002 \001(" - + "\t\0220\n\004feed\030\003 \001(\0132\".google.cloud.asset.v1p" - + "2beta1.Feed\"\036\n\016GetFeedRequest\022\014\n\004name\030\001 " - + "\001(\t\"\"\n\020ListFeedsRequest\022\016\n\006parent\030\001 \001(\t\"" - + "F\n\021ListFeedsResponse\0221\n\005feeds\030\001 \003(\0132\".go" - + "ogle.cloud.asset.v1p2beta1.Feed\"v\n\021Updat" - + "eFeedRequest\0220\n\004feed\030\001 \001(\0132\".google.clou" - + "d.asset.v1p2beta1.Feed\022/\n\013update_mask\030\002 " - + "\001(\0132\032.google.protobuf.FieldMask\"!\n\021Delet" - + "eFeedRequest\022\014\n\004name\030\001 \001(\t\"\271\001\n\014OutputCon" - + "fig\022G\n\017gcs_destination\030\001 \001(\0132,.google.cl" - + "oud.asset.v1p2beta1.GcsDestinationH\000\022Q\n\024" - + "bigquery_destination\030\002 \001(\01321.google.clou" - + "d.asset.v1p2beta1.BigQueryDestinationH\000B" - + "\r\n\013destination\"C\n\016GcsDestination\022\r\n\003uri\030" - + "\001 \001(\tH\000\022\024\n\nuri_prefix\030\002 \001(\tH\000B\014\n\nobject_" - + "uri\"D\n\023BigQueryDestination\022\017\n\007dataset\030\001 " - + "\001(\t\022\r\n\005table\030\002 \001(\t\022\r\n\005force\030\003 \001(\010\"\"\n\021Pub" - + "subDestination\022\r\n\005topic\030\001 \001(\t\"p\n\020FeedOut" - + "putConfig\022M\n\022pubsub_destination\030\001 \001(\0132/." - + "google.cloud.asset.v1p2beta1.PubsubDesti" - + "nationH\000B\r\n\013destination\"\313\001\n\004Feed\022\014\n\004name" - + "\030\001 \001(\t\022\023\n\013asset_names\030\002 \003(\t\022\023\n\013asset_typ" - + "es\030\003 \003(\t\022?\n\014content_type\030\004 \001(\0162).google." - + "cloud.asset.v1p2beta1.ContentType\022J\n\022fee" - + "d_output_config\030\005 \001(\0132..google.cloud.ass" - + "et.v1p2beta1.FeedOutputConfig*\201\001\n\013Conten" - + "tType\022\034\n\030CONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010R" - + "ESOURCE\020\001\022\016\n\nIAM_POLICY\020\002\022\023\n\017IAM_POLICY_" - + "NAME\020\003\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020" - + "\0052\365\010\n\014AssetService\022\221\001\n\014ExportAssets\0221.go" - + "ogle.cloud.asset.v1p2beta1.ExportAssetsR" - + "equest\032\035.google.longrunning.Operation\"/\202" - + "\323\344\223\002)\"$/v1p2beta1/{parent=*/*}:exportAss" - + "ets:\001*\022\307\001\n\025BatchGetAssetsHistory\022:.googl" - + "e.cloud.asset.v1p2beta1.BatchGetAssetsHi" - + "storyRequest\032;.google.cloud.asset.v1p2be" - + "ta1.BatchGetAssetsHistoryResponse\"5\202\323\344\223\002" - + "/\022-/v1p2beta1/{parent=*/*}:batchGetAsset" - + "sHistory\022\213\001\n\nCreateFeed\022/.google.cloud.a" - + "sset.v1p2beta1.CreateFeedRequest\032\".googl" - + "e.cloud.asset.v1p2beta1.Feed\"(\202\323\344\223\002\"\"\035/v" - + "1p2beta1/{parent=*/*}/feeds:\001*\022\202\001\n\007GetFe" - + "ed\022,.google.cloud.asset.v1p2beta1.GetFee" - + "dRequest\032\".google.cloud.asset.v1p2beta1." - + "Feed\"%\202\323\344\223\002\037\022\035/v1p2beta1/{name=*/*/feeds" - + "/*}\022\223\001\n\tListFeeds\022..google.cloud.asset.v" - + "1p2beta1.ListFeedsRequest\032/.google.cloud" - + ".asset.v1p2beta1.ListFeedsResponse\"%\202\323\344\223" - + "\002\037\022\035/v1p2beta1/{parent=*/*}/feeds\022\220\001\n\nUp" - + "dateFeed\022/.google.cloud.asset.v1p2beta1." - + "UpdateFeedRequest\032\".google.cloud.asset.v" - + "1p2beta1.Feed\"-\202\323\344\223\002\'2\"/v1p2beta1/{feed." - + "name=*/*/feeds/*}:\001*\022|\n\nDeleteFeed\022/.goo" - + "gle.cloud.asset.v1p2beta1.DeleteFeedRequ" - + "est\032\026.google.protobuf.Empty\"%\202\323\344\223\002\037*\035/v1" - + "p2beta1/{name=*/*/feeds/*}\032M\312A\031cloudasse" - + "t.googleapis.com\322A.https://www.googleapi" - + "s.com/auth/cloud-platformB\270\001\n com.google" - + ".cloud.asset.v1p2beta1B\021AssetServiceProt" - + "oP\001ZAgoogle.golang.org/genproto/googleap" - + "is/cloud/asset/v1p2beta1;asset\252\002\034Google." - + "Cloud.Asset.V1p2Beta1\312\002\034Google\\Cloud\\Ass" - + "et\\V1p2Beta1b\006proto3" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\032)goo" + + "gle/cloud/asset/v1p2beta1/assets.proto\032#" + + "google/longrunning/operations.proto\032\033goo" + + "gle/protobuf/empty.proto\032 google/protobu" + + "f/field_mask.proto\032\037google/protobuf/time" + + "stamp.proto\"u\n\021CreateFeedRequest\022\023\n\006pare" + + "nt\030\001 \001(\tB\003\340A\002\022\024\n\007feed_id\030\002 \001(\tB\003\340A\002\0225\n\004f" + + "eed\030\003 \001(\0132\".google.cloud.asset.v1p2beta1" + + ".FeedB\003\340A\002\"F\n\016GetFeedRequest\0224\n\004name\030\001 \001" + + "(\tB&\340A\002\372A \n\036cloudasset.googleapis.com/Fe" + + "ed\"\'\n\020ListFeedsRequest\022\023\n\006parent\030\001 \001(\tB\003" + + "\340A\002\"F\n\021ListFeedsResponse\0221\n\005feeds\030\001 \003(\0132" + + "\".google.cloud.asset.v1p2beta1.Feed\"\200\001\n\021" + + "UpdateFeedRequest\0225\n\004feed\030\001 \001(\0132\".google" + + ".cloud.asset.v1p2beta1.FeedB\003\340A\002\0224\n\013upda" + + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas" + + "kB\003\340A\002\"I\n\021DeleteFeedRequest\0224\n\004name\030\001 \001(" + + "\tB&\340A\002\372A \n\036cloudasset.googleapis.com/Fee" + + "d\"f\n\014OutputConfig\022G\n\017gcs_destination\030\001 \001" + + "(\0132,.google.cloud.asset.v1p2beta1.GcsDes" + + "tinationH\000B\r\n\013destination\"-\n\016GcsDestinat" + + "ion\022\r\n\003uri\030\001 \001(\tH\000B\014\n\nobject_uri\"\"\n\021Pubs" + + "ubDestination\022\r\n\005topic\030\001 \001(\t\"p\n\020FeedOutp" + + "utConfig\022M\n\022pubsub_destination\030\001 \001(\0132/.g" + + "oogle.cloud.asset.v1p2beta1.PubsubDestin" + + "ationH\000B\r\n\013destination\"\351\002\n\004Feed\022\021\n\004name\030" + + "\001 \001(\tB\003\340A\002\022\023\n\013asset_names\030\002 \003(\t\022\023\n\013asset" + + "_types\030\003 \003(\t\022?\n\014content_type\030\004 \001(\0162).goo" + + "gle.cloud.asset.v1p2beta1.ContentType\022O\n" + + "\022feed_output_config\030\005 \001(\0132..google.cloud" + + ".asset.v1p2beta1.FeedOutputConfigB\003\340A\002:\221" + + "\001\352A\215\001\n\036cloudasset.googleapis.com/Feed\022\037p" + + "rojects/{project}/feeds/{feed}\022\035folders/" + + "{folder}/feeds/{feed}\022)organizations/{or" + + "ganization}/feeds/{feed} \001*I\n\013ContentTyp" + + "e\022\034\n\030CONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOU" + + "RCE\020\001\022\016\n\nIAM_POLICY\020\0022\277\006\n\014AssetService\022\224" + + "\001\n\nCreateFeed\022/.google.cloud.asset.v1p2b" + + "eta1.CreateFeedRequest\032\".google.cloud.as" + + "set.v1p2beta1.Feed\"1\202\323\344\223\002\"\"\035/v1p2beta1/{" + + "parent=*/*}/feeds:\001*\332A\006parent\022\211\001\n\007GetFee" + + "d\022,.google.cloud.asset.v1p2beta1.GetFeed" + + "Request\032\".google.cloud.asset.v1p2beta1.F" + + "eed\",\202\323\344\223\002\037\022\035/v1p2beta1/{name=*/*/feeds/" + + "*}\332A\004name\022\234\001\n\tListFeeds\022..google.cloud.a" + + "sset.v1p2beta1.ListFeedsRequest\032/.google" + + ".cloud.asset.v1p2beta1.ListFeedsResponse" + + "\".\202\323\344\223\002\037\022\035/v1p2beta1/{parent=*/*}/feeds\332" + + "A\006parent\022\227\001\n\nUpdateFeed\022/.google.cloud.a" + + "sset.v1p2beta1.UpdateFeedRequest\032\".googl" + + "e.cloud.asset.v1p2beta1.Feed\"4\202\323\344\223\002\'2\"/v" + + "1p2beta1/{feed.name=*/*/feeds/*}:\001*\332A\004fe" + + "ed\022\203\001\n\nDeleteFeed\022/.google.cloud.asset.v" + + "1p2beta1.DeleteFeedRequest\032\026.google.prot" + + "obuf.Empty\",\202\323\344\223\002\037*\035/v1p2beta1/{name=*/*" + + "/feeds/*}\332A\004name\032M\312A\031cloudasset.googleap" + + "is.com\322A.https://www.googleapis.com/auth" + + "/cloud-platformB\270\001\n com.google.cloud.ass" + + "et.v1p2beta1B\021AssetServiceProtoP\001ZAgoogl" + + "e.golang.org/genproto/googleapis/cloud/a" + + "sset/v1p2beta1;asset\252\002\034Google.Cloud.Asse" + + "t.V1p2Beta1\312\002\034Google\\Cloud\\Asset\\V1p2Bet" + + "a1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.cloud.asset.v1p2beta1.AssetProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_descriptor, - new java.lang.String[] { - "Parent", "ReadTime", "AssetTypes", "ContentType", "OutputConfig", - }); - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_descriptor, - new java.lang.String[] { - "ReadTime", "OutputConfig", - }); - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_descriptor, - new java.lang.String[] { - "Parent", "AssetNames", "ContentType", "ReadTimeWindow", - }); - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_descriptor, - new java.lang.String[] { - "Assets", }); internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor, @@ -243,7 +171,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "FeedId", "Feed", }); internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor, @@ -251,7 +179,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor, @@ -259,7 +187,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", }); internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor, @@ -267,7 +195,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Feeds", }); internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor, @@ -275,7 +203,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Feed", "UpdateMask", }); internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor, @@ -283,31 +211,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor, new java.lang.String[] { - "GcsDestination", "BigqueryDestination", "Destination", + "GcsDestination", "Destination", }); internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor, new java.lang.String[] { - "Uri", "UriPrefix", "ObjectUri", - }); - internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_descriptor, - new java.lang.String[] { - "Dataset", "Table", "Force", + "Uri", "ObjectUri", }); internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor, @@ -315,7 +235,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", }); internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor, @@ -323,7 +243,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PubsubDestination", "Destination", }); internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor, @@ -333,17 +253,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.cloud.asset.v1p2beta1.AssetProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryRequest.java deleted file mode 100644 index 515612675..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryRequest.java +++ /dev/null @@ -1,1519 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - * - * - *
- * Batch get assets history request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest} - */ -public final class BatchGetAssetsHistoryRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) - BatchGetAssetsHistoryRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchGetAssetsHistoryRequest.newBuilder() to construct. - private BatchGetAssetsHistoryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchGetAssetsHistoryRequest() { - parent_ = ""; - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchGetAssetsHistoryRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchGetAssetsHistoryRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetNames_.add(s); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 34: - { - com.google.cloud.asset.v1p2beta1.TimeWindow.Builder subBuilder = null; - if (readTimeWindow_ != null) { - subBuilder = readTimeWindow_.toBuilder(); - } - readTimeWindow_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTimeWindow_); - readTimeWindow_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.class, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The relative name of the root asset. It can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id")", or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1; - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative name of the root asset. It can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id")", or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1; - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_NAMES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList assetNames_; - /** - * - * - *
-   * A list of the full names of the assets. 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)
-   * and [Resource Name
-   * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-   * for more info.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * - * @return A list containing the assetNames. - */ - public com.google.protobuf.ProtocolStringList getAssetNamesList() { - return assetNames_; - } - /** - * - * - *
-   * A list of the full names of the assets. 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)
-   * and [Resource Name
-   * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-   * for more info.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * - * @return The count of assetNames. - */ - public int getAssetNamesCount() { - return assetNames_.size(); - } - /** - * - * - *
-   * A list of the full names of the assets. 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)
-   * and [Resource Name
-   * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-   * for more info.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - public java.lang.String getAssetNames(int index) { - return assetNames_.get(index); - } - /** - * - * - *
-   * A list of the full names of the assets. 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)
-   * and [Resource Name
-   * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-   * for more info.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - public com.google.protobuf.ByteString getAssetNamesBytes(int index) { - return assetNames_.getByteString(index); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 3; - private int contentType_; - /** - * - * - *
-   * Required. The content type.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @return The enum numeric value on the wire for contentType. - */ - public int getContentTypeValue() { - return contentType_; - } - /** - * - * - *
-   * Required. The content type.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @return The contentType. - */ - public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p2beta1.ContentType result = - com.google.cloud.asset.v1p2beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result; - } - - public static final int READ_TIME_WINDOW_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1p2beta1.TimeWindow readTimeWindow_; - /** - * - * - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-   * end_time is not set, it is default to current timestamp. If start_time is
-   * not set, the snapshot of the assets at end_time will be returned. The
-   * returned results contain all temporal assets whose time window overlap with
-   * read_time_window.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - * - * @return Whether the readTimeWindow field is set. - */ - public boolean hasReadTimeWindow() { - return readTimeWindow_ != null; - } - /** - * - * - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-   * end_time is not set, it is default to current timestamp. If start_time is
-   * not set, the snapshot of the assets at end_time will be returned. The
-   * returned results contain all temporal assets whose time window overlap with
-   * read_time_window.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - * - * @return The readTimeWindow. - */ - public com.google.cloud.asset.v1p2beta1.TimeWindow getReadTimeWindow() { - return readTimeWindow_ == null - ? com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() - : readTimeWindow_; - } - /** - * - * - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-   * end_time is not set, it is default to current timestamp. If start_time is
-   * not set, the snapshot of the assets at end_time will be returned. The
-   * returned results contain all temporal assets whose time window overlap with
-   * read_time_window.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - public com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { - return getReadTimeWindow(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - for (int i = 0; i < assetNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i)); - } - if (contentType_ - != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, contentType_); - } - if (readTimeWindow_ != null) { - output.writeMessage(4, getReadTimeWindow()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - { - int dataSize = 0; - for (int i = 0; i < assetNames_.size(); i++) { - dataSize += computeStringSizeNoTag(assetNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetNamesList().size(); - } - if (contentType_ - != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, contentType_); - } - if (readTimeWindow_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReadTimeWindow()); - } - 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.v1p2beta1.BatchGetAssetsHistoryRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest other = - (com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getAssetNamesList().equals(other.getAssetNamesList())) return false; - if (contentType_ != other.contentType_) return false; - if (hasReadTimeWindow() != other.hasReadTimeWindow()) return false; - if (hasReadTimeWindow()) { - if (!getReadTimeWindow().equals(other.getReadTimeWindow())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (getAssetNamesCount() > 0) { - hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getAssetNamesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - if (hasReadTimeWindow()) { - hash = (37 * hash) + READ_TIME_WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getReadTimeWindow().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest 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.v1p2beta1.BatchGetAssetsHistoryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest 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.v1p2beta1.BatchGetAssetsHistoryRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest 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.v1p2beta1.BatchGetAssetsHistoryRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest 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.v1p2beta1.BatchGetAssetsHistoryRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest 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.v1p2beta1.BatchGetAssetsHistoryRequest 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; - } - /** - * - * - *
-   * Batch get assets history request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.class, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - contentType_ = 0; - - if (readTimeWindowBuilder_ == null) { - readTimeWindow_ = null; - } else { - readTimeWindow_ = null; - readTimeWindowBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest - getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest build() { - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest buildPartial() { - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest result = - new com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest(this); - int from_bitField0_ = bitField0_; - result.parent_ = parent_; - if (((bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetNames_ = assetNames_; - result.contentType_ = contentType_; - if (readTimeWindowBuilder_ == null) { - result.readTimeWindow_ = readTimeWindow_; - } else { - result.readTimeWindow_ = readTimeWindowBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest other) { - if (other - == com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.assetNames_.isEmpty()) { - if (assetNames_.isEmpty()) { - assetNames_ = other.assetNames_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetNamesIsMutable(); - assetNames_.addAll(other.assetNames_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.hasReadTimeWindow()) { - mergeReadTimeWindow(other.getReadTimeWindow()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetNames_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureAssetNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @return A list containing the assetNames. - */ - public com.google.protobuf.ProtocolStringList getAssetNamesList() { - return assetNames_.getUnmodifiableView(); - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @return The count of assetNames. - */ - public int getAssetNamesCount() { - return assetNames_.size(); - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - public java.lang.String getAssetNames(int index) { - return assetNames_.get(index); - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - public com.google.protobuf.ByteString getAssetNamesBytes(int index) { - return assetNames_.getByteString(index); - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @param index The index to set the value at. - * @param value The assetNames to set. - * @return This builder for chaining. - */ - public Builder setAssetNames(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetNamesIsMutable(); - assetNames_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @param value The assetNames to add. - * @return This builder for chaining. - */ - public Builder addAssetNames(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetNamesIsMutable(); - assetNames_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @param values The assetNames to add. - * @return This builder for chaining. - */ - public Builder addAllAssetNames(java.lang.Iterable values) { - ensureAssetNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetNames_); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @return This builder for chaining. - */ - public Builder clearAssetNames() { - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of the full names of the assets. 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)
-     * and [Resource Name
-     * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-     * for more info.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * - * @param value The bytes of the assetNames to add. - * @return This builder for chaining. - */ - public Builder addAssetNamesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetNamesIsMutable(); - assetNames_.add(value); - onChanged(); - return this; - } - - private int contentType_ = 0; - /** - * - * - *
-     * Required. The content type.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @return The enum numeric value on the wire for contentType. - */ - public int getContentTypeValue() { - return contentType_; - } - /** - * - * - *
-     * Required. The content type.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - contentType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The content type.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @return The contentType. - */ - public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p2beta1.ContentType result = - com.google.cloud.asset.v1p2beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Required. The content type.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1p2beta1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The content type.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p2beta1.TimeWindow readTimeWindow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TimeWindow, - com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, - com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder> - readTimeWindowBuilder_; - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - * - * @return Whether the readTimeWindow field is set. - */ - public boolean hasReadTimeWindow() { - return readTimeWindowBuilder_ != null || readTimeWindow_ != null; - } - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - * - * @return The readTimeWindow. - */ - public com.google.cloud.asset.v1p2beta1.TimeWindow getReadTimeWindow() { - if (readTimeWindowBuilder_ == null) { - return readTimeWindow_ == null - ? com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() - : readTimeWindow_; - } else { - return readTimeWindowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - public Builder setReadTimeWindow(com.google.cloud.asset.v1p2beta1.TimeWindow value) { - if (readTimeWindowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTimeWindow_ = value; - onChanged(); - } else { - readTimeWindowBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - public Builder setReadTimeWindow( - com.google.cloud.asset.v1p2beta1.TimeWindow.Builder builderForValue) { - if (readTimeWindowBuilder_ == null) { - readTimeWindow_ = builderForValue.build(); - onChanged(); - } else { - readTimeWindowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - public Builder mergeReadTimeWindow(com.google.cloud.asset.v1p2beta1.TimeWindow value) { - if (readTimeWindowBuilder_ == null) { - if (readTimeWindow_ != null) { - readTimeWindow_ = - com.google.cloud.asset.v1p2beta1.TimeWindow.newBuilder(readTimeWindow_) - .mergeFrom(value) - .buildPartial(); - } else { - readTimeWindow_ = value; - } - onChanged(); - } else { - readTimeWindowBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - public Builder clearReadTimeWindow() { - if (readTimeWindowBuilder_ == null) { - readTimeWindow_ = null; - onChanged(); - } else { - readTimeWindow_ = null; - readTimeWindowBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - public com.google.cloud.asset.v1p2beta1.TimeWindow.Builder getReadTimeWindowBuilder() { - - onChanged(); - return getReadTimeWindowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - public com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { - if (readTimeWindowBuilder_ != null) { - return readTimeWindowBuilder_.getMessageOrBuilder(); - } else { - return readTimeWindow_ == null - ? com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() - : readTimeWindow_; - } - } - /** - * - * - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-     * end_time is not set, it is default to current timestamp. If start_time is
-     * not set, the snapshot of the assets at end_time will be returned. The
-     * returned results contain all temporal assets whose time window overlap with
-     * read_time_window.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TimeWindow, - com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, - com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder> - getReadTimeWindowFieldBuilder() { - if (readTimeWindowBuilder_ == null) { - readTimeWindowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TimeWindow, - com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, - com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder>( - getReadTimeWindow(), getParentForChildren(), isClean()); - readTimeWindow_ = null; - } - return readTimeWindowBuilder_; - } - - @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.v1p2beta1.BatchGetAssetsHistoryRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) - private static final com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest(); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchGetAssetsHistoryRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetAssetsHistoryRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryRequestOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryRequestOrBuilder.java deleted file mode 100644 index 3bfb8ec36..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryRequestOrBuilder.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface BatchGetAssetsHistoryRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative name of the root asset. It can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id")", or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1; - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative name of the root asset. It can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id")", or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1; - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * A list of the full names of the assets. 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)
-   * and [Resource Name
-   * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-   * for more info.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * - * @return A list containing the assetNames. - */ - java.util.List getAssetNamesList(); - /** - * - * - *
-   * A list of the full names of the assets. 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)
-   * and [Resource Name
-   * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-   * for more info.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * - * @return The count of assetNames. - */ - int getAssetNamesCount(); - /** - * - * - *
-   * A list of the full names of the assets. 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)
-   * and [Resource Name
-   * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-   * for more info.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - java.lang.String getAssetNames(int index); - /** - * - * - *
-   * A list of the full names of the assets. 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)
-   * and [Resource Name
-   * Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format)
-   * for more info.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - com.google.protobuf.ByteString getAssetNamesBytes(int index); - - /** - * - * - *
-   * Required. The content type.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - * - * - *
-   * Required. The content type.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 3; - * - * @return The contentType. - */ - com.google.cloud.asset.v1p2beta1.ContentType getContentType(); - - /** - * - * - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-   * end_time is not set, it is default to current timestamp. If start_time is
-   * not set, the snapshot of the assets at end_time will be returned. The
-   * returned results contain all temporal assets whose time window overlap with
-   * read_time_window.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - * - * @return Whether the readTimeWindow field is set. - */ - boolean hasReadTimeWindow(); - /** - * - * - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-   * end_time is not set, it is default to current timestamp. If start_time is
-   * not set, the snapshot of the assets at end_time will be returned. The
-   * returned results contain all temporal assets whose time window overlap with
-   * read_time_window.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - * - * @return The readTimeWindow. - */ - com.google.cloud.asset.v1p2beta1.TimeWindow getReadTimeWindow(); - /** - * - * - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after 2018-10-02 UTC. If
-   * end_time is not set, it is default to current timestamp. If start_time is
-   * not set, the snapshot of the assets at end_time will be returned. The
-   * returned results contain all temporal assets whose time window overlap with
-   * read_time_window.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow read_time_window = 4; - */ - com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getReadTimeWindowOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryResponse.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryResponse.java deleted file mode 100644 index 8a59689b1..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryResponse.java +++ /dev/null @@ -1,952 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - * - * - *
- * Batch get assets history response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse} - */ -public final class BatchGetAssetsHistoryResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) - BatchGetAssetsHistoryResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchGetAssetsHistoryResponse.newBuilder() to construct. - private BatchGetAssetsHistoryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchGetAssetsHistoryResponse() { - assets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchGetAssetsHistoryResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchGetAssetsHistoryResponse( - 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)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage( - com.google.cloud.asset.v1p2beta1.TemporalAsset.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse.class, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse.Builder.class); - } - - public static final int ASSETS_FIELD_NUMBER = 1; - private java.util.List assets_; - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public java.util.List getAssetsList() { - return assets_; - } - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public java.util.List - getAssetsOrBuilderList() { - return assets_; - } - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public int getAssetsCount() { - return assets_.size(); - } - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1p2beta1.TemporalAsset getAssets(int index) { - return assets_.get(index); - } - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1p2beta1.TemporalAssetOrBuilder getAssetsOrBuilder(int index) { - return assets_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < assets_.size(); i++) { - output.writeMessage(1, assets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < assets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, assets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse other = - (com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) obj; - - if (!getAssetsList().equals(other.getAssetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAssetsCount() > 0) { - hash = (37 * hash) + ASSETS_FIELD_NUMBER; - hash = (53 * hash) + getAssetsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse 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.v1p2beta1.BatchGetAssetsHistoryResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse 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.v1p2beta1.BatchGetAssetsHistoryResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse 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.v1p2beta1.BatchGetAssetsHistoryResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse 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.v1p2beta1.BatchGetAssetsHistoryResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse 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.v1p2beta1.BatchGetAssetsHistoryResponse 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; - } - /** - * - * - *
-   * Batch get assets history response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse.class, - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAssetsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - assetsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse - getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse build() { - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse buildPartial() { - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse result = - new com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse(this); - int from_bitField0_ = bitField0_; - if (assetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assets_ = assets_; - } else { - result.assets_ = assetsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse other) { - if (other - == com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse.getDefaultInstance()) - return this; - if (assetsBuilder_ == null) { - if (!other.assets_.isEmpty()) { - if (assets_.isEmpty()) { - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetsIsMutable(); - assets_.addAll(other.assets_); - } - onChanged(); - } - } else { - if (!other.assets_.isEmpty()) { - if (assetsBuilder_.isEmpty()) { - assetsBuilder_.dispose(); - assetsBuilder_ = null; - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - assetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAssetsFieldBuilder() - : null; - } else { - assetsBuilder_.addAllMessages(other.assets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List assets_ = - java.util.Collections.emptyList(); - - private void ensureAssetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(assets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TemporalAsset, - com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder, - com.google.cloud.asset.v1p2beta1.TemporalAssetOrBuilder> - assetsBuilder_; - - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public java.util.List getAssetsList() { - if (assetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(assets_); - } else { - return assetsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public int getAssetsCount() { - if (assetsBuilder_ == null) { - return assets_.size(); - } else { - return assetsBuilder_.getCount(); - } - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1p2beta1.TemporalAsset getAssets(int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); - } else { - return assetsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder setAssets(int index, com.google.cloud.asset.v1p2beta1.TemporalAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.set(index, value); - onChanged(); - } else { - assetsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.set(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder addAssets(com.google.cloud.asset.v1p2beta1.TemporalAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(value); - onChanged(); - } else { - assetsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder addAssets(int index, com.google.cloud.asset.v1p2beta1.TemporalAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(index, value); - onChanged(); - } else { - assetsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder addAssets( - com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder addAllAssets( - java.lang.Iterable values) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assets_); - onChanged(); - } else { - assetsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder clearAssets() { - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - assetsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public Builder removeAssets(int index) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.remove(index); - onChanged(); - } else { - assetsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder getAssetsBuilder(int index) { - return getAssetsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1p2beta1.TemporalAssetOrBuilder getAssetsOrBuilder(int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); - } else { - return assetsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public java.util.List - getAssetsOrBuilderList() { - if (assetsBuilder_ != null) { - return assetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(assets_); - } - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder addAssetsBuilder() { - return getAssetsFieldBuilder() - .addBuilder(com.google.cloud.asset.v1p2beta1.TemporalAsset.getDefaultInstance()); - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder addAssetsBuilder(int index) { - return getAssetsFieldBuilder() - .addBuilder(index, com.google.cloud.asset.v1p2beta1.TemporalAsset.getDefaultInstance()); - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - public java.util.List - getAssetsBuilderList() { - return getAssetsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TemporalAsset, - com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder, - com.google.cloud.asset.v1p2beta1.TemporalAssetOrBuilder> - getAssetsFieldBuilder() { - if (assetsBuilder_ == null) { - assetsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TemporalAsset, - com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder, - com.google.cloud.asset.v1p2beta1.TemporalAssetOrBuilder>( - assets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - assets_ = null; - } - return assetsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) - private static final com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse(); - } - - public static com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchGetAssetsHistoryResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetAssetsHistoryResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryResponseOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryResponseOrBuilder.java deleted file mode 100644 index a92bac526..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface BatchGetAssetsHistoryResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.BatchGetAssetsHistoryResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - java.util.List getAssetsList(); - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - com.google.cloud.asset.v1p2beta1.TemporalAsset getAssets(int index); - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - int getAssetsCount(); - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - java.util.List - getAssetsOrBuilderList(); - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.TemporalAsset assets = 1; - */ - com.google.cloud.asset.v1p2beta1.TemporalAssetOrBuilder getAssetsOrBuilder(int index); -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BigQueryDestination.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BigQueryDestination.java deleted file mode 100644 index f12e1ed4b..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BigQueryDestination.java +++ /dev/null @@ -1,946 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - * - * - *
- * A Bigquery destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.BigQueryDestination} - */ -public final class BigQueryDestination extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.BigQueryDestination) - BigQueryDestinationOrBuilder { - private static final long serialVersionUID = 0L; - // Use BigQueryDestination.newBuilder() to construct. - private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BigQueryDestination() { - dataset_ = ""; - table_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BigQueryDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BigQueryDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - table_ = s; - break; - } - case 24: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.BigQueryDestination.class, - com.google.cloud.asset.v1p2beta1.BigQueryDestination.Builder.class); - } - - public static final int DATASET_FIELD_NUMBER = 1; - private volatile java.lang.Object dataset_; - /** - * - * - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an error.
-   * 
- * - * string dataset = 1; - * - * @return The dataset. - */ - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an error.
-   * 
- * - * string dataset = 1; - * - * @return The bytes for dataset. - */ - public com.google.protobuf.ByteString getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_FIELD_NUMBER = 2; - private volatile java.lang.Object table_; - /** - * - * - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2; - * - * @return The table. - */ - public java.lang.String getTable() { - java.lang.Object ref = table_; - 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(); - table_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2; - * - * @return The bytes for table. - */ - public com.google.protobuf.ByteString getTableBytes() { - java.lang.Object ref = table_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - table_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 3; - private boolean force_; - /** - * - * - *
-   * If the destination table already exists and this flag is `TRUE`, the
-   * table will be overwritten by the contents of assets snapshot. If the flag
-   * is not set and the destination table already exists, the export call
-   * returns an error.
-   * 
- * - * bool force = 3; - * - * @return The force. - */ - public boolean getForce() { - return force_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDatasetBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); - } - if (!getTableBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_); - } - if (force_ != false) { - output.writeBool(3, force_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getDatasetBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); - } - if (!getTableBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); - } - 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.v1p2beta1.BigQueryDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.BigQueryDestination other = - (com.google.cloud.asset.v1p2beta1.BigQueryDestination) obj; - - if (!getDataset().equals(other.getDataset())) return false; - if (!getTable().equals(other.getTable())) return false; - if (getForce() != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDataset().hashCode(); - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.BigQueryDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Bigquery destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.BigQueryDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.BigQueryDestination) - com.google.cloud.asset.v1p2beta1.BigQueryDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.BigQueryDestination.class, - com.google.cloud.asset.v1p2beta1.BigQueryDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.BigQueryDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - dataset_ = ""; - - table_ = ""; - - force_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BigQueryDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BigQueryDestination build() { - com.google.cloud.asset.v1p2beta1.BigQueryDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BigQueryDestination buildPartial() { - com.google.cloud.asset.v1p2beta1.BigQueryDestination result = - new com.google.cloud.asset.v1p2beta1.BigQueryDestination(this); - result.dataset_ = dataset_; - result.table_ = table_; - result.force_ = force_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.BigQueryDestination) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.BigQueryDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.BigQueryDestination other) { - if (other == com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance()) - return this; - if (!other.getDataset().isEmpty()) { - dataset_ = other.dataset_; - onChanged(); - } - if (!other.getTable().isEmpty()) { - table_ = other.table_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.BigQueryDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p2beta1.BigQueryDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object dataset_ = ""; - /** - * - * - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an error.
-     * 
- * - * string dataset = 1; - * - * @return The dataset. - */ - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an error.
-     * 
- * - * string dataset = 1; - * - * @return The bytes for dataset. - */ - public com.google.protobuf.ByteString getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an error.
-     * 
- * - * string dataset = 1; - * - * @param value The dataset to set. - * @return This builder for chaining. - */ - public Builder setDataset(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataset_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an error.
-     * 
- * - * string dataset = 1; - * - * @return This builder for chaining. - */ - public Builder clearDataset() { - - dataset_ = getDefaultInstance().getDataset(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an error.
-     * 
- * - * string dataset = 1; - * - * @param value The bytes for dataset to set. - * @return This builder for chaining. - */ - public Builder setDatasetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataset_ = value; - onChanged(); - return this; - } - - private java.lang.Object table_ = ""; - /** - * - * - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2; - * - * @return The table. - */ - public java.lang.String getTable() { - java.lang.Object ref = table_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - table_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2; - * - * @return The bytes for table. - */ - public com.google.protobuf.ByteString getTableBytes() { - java.lang.Object ref = table_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - table_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2; - * - * @param value The table to set. - * @return This builder for chaining. - */ - public Builder setTable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - table_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2; - * - * @return This builder for chaining. - */ - public Builder clearTable() { - - table_ = getDefaultInstance().getTable(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2; - * - * @param value The bytes for table to set. - * @return This builder for chaining. - */ - public Builder setTableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - table_ = value; - onChanged(); - return this; - } - - private boolean force_; - /** - * - * - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is not set and the destination table already exists, the export call
-     * returns an error.
-     * 
- * - * bool force = 3; - * - * @return The force. - */ - public boolean getForce() { - return force_; - } - /** - * - * - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is not set and the destination table already exists, the export call
-     * returns an error.
-     * 
- * - * bool force = 3; - * - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is not set and the destination table already exists, the export call
-     * returns an error.
-     * 
- * - * bool force = 3; - * - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.BigQueryDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.BigQueryDestination) - private static final com.google.cloud.asset.v1p2beta1.BigQueryDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.BigQueryDestination(); - } - - public static com.google.cloud.asset.v1p2beta1.BigQueryDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.BigQueryDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BigQueryDestinationOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BigQueryDestinationOrBuilder.java deleted file mode 100644 index 08f5e980a..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BigQueryDestinationOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface BigQueryDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.BigQueryDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an error.
-   * 
- * - * string dataset = 1; - * - * @return The dataset. - */ - java.lang.String getDataset(); - /** - * - * - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an error.
-   * 
- * - * string dataset = 1; - * - * @return The bytes for dataset. - */ - com.google.protobuf.ByteString getDatasetBytes(); - - /** - * - * - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2; - * - * @return The table. - */ - java.lang.String getTable(); - /** - * - * - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2; - * - * @return The bytes for table. - */ - com.google.protobuf.ByteString getTableBytes(); - - /** - * - * - *
-   * If the destination table already exists and this flag is `TRUE`, the
-   * table will be overwritten by the contents of assets snapshot. If the flag
-   * is not set and the destination table already exists, the export call
-   * returns an error.
-   * 
- * - * bool force = 3; - * - * @return The force. - */ - boolean getForce(); -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java index 3f1233332..f2a88b4c5 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java @@ -58,28 +58,6 @@ public enum ContentType implements com.google.protobuf.ProtocolMessageEnum { * IAM_POLICY = 2; */ IAM_POLICY(2), - /** - * - * - *
-   * The IAM policy name for the IAM policy set on a resource.
-   * 
- * - * IAM_POLICY_NAME = 3; - */ - IAM_POLICY_NAME(3), - /** ORG_POLICY = 4; */ - ORG_POLICY(4), - /** - * - * - *
-   * The Cloud Access context mananger Policy set on an asset.
-   * 
- * - * ACCESS_POLICY = 5; - */ - ACCESS_POLICY(5), UNRECOGNIZED(-1), ; @@ -113,28 +91,6 @@ public enum ContentType implements com.google.protobuf.ProtocolMessageEnum { * IAM_POLICY = 2; */ public static final int IAM_POLICY_VALUE = 2; - /** - * - * - *
-   * The IAM policy name for the IAM policy set on a resource.
-   * 
- * - * IAM_POLICY_NAME = 3; - */ - public static final int IAM_POLICY_NAME_VALUE = 3; - /** ORG_POLICY = 4; */ - public static final int ORG_POLICY_VALUE = 4; - /** - * - * - *
-   * The Cloud Access context mananger Policy set on an asset.
-   * 
- * - * ACCESS_POLICY = 5; - */ - public static final int ACCESS_POLICY_VALUE = 5; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -166,12 +122,6 @@ public static ContentType forNumber(int value) { return RESOURCE; case 2: return IAM_POLICY; - case 3: - return IAM_POLICY_NAME; - case 4: - return ORG_POLICY; - case 5: - return ACCESS_POLICY; default: return null; } diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java index 885561985..ad7f9959e 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java @@ -148,7 +148,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The parent. */ @@ -174,7 +174,7 @@ public java.lang.String getParent() { * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for parent. */ @@ -200,7 +200,7 @@ public com.google.protobuf.ByteString getParentBytes() { * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The feedId. */ @@ -223,7 +223,7 @@ public java.lang.String getFeedId() { * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for feedId. */ @@ -245,14 +245,15 @@ public com.google.protobuf.ByteString getFeedIdBytes() { * * *
-   * The feed details. The field `name` must be empty and it will be generated
+   * Required. The feed details. The field `name` must be empty and it will be generated
    * in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feed field is set. */ @@ -263,14 +264,15 @@ public boolean hasFeed() { * * *
-   * The feed details. The field `name` must be empty and it will be generated
+   * Required. The feed details. The field `name` must be empty and it will be generated
    * in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feed. */ @@ -281,14 +283,15 @@ public com.google.cloud.asset.v1p2beta1.Feed getFeed() { * * *
-   * The feed details. The field `name` must be empty and it will be generated
+   * Required. The feed details. The field `name` must be empty and it will be generated
    * in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { return getFeed(); @@ -668,7 +671,7 @@ public Builder mergeFrom( * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The parent. */ @@ -694,7 +697,7 @@ public java.lang.String getParent() { * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for parent. */ @@ -720,7 +723,7 @@ public com.google.protobuf.ByteString getParentBytes() { * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The parent to set. * @return This builder for chaining. @@ -745,7 +748,7 @@ public Builder setParent(java.lang.String value) { * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -766,7 +769,7 @@ public Builder clearParent() { * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for parent to set. * @return This builder for chaining. @@ -791,7 +794,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The feedId. */ @@ -814,7 +817,7 @@ public java.lang.String getFeedId() { * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for feedId. */ @@ -837,7 +840,7 @@ public com.google.protobuf.ByteString getFeedIdBytes() { * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The feedId to set. * @return This builder for chaining. @@ -859,7 +862,7 @@ public Builder setFeedId(java.lang.String value) { * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -877,7 +880,7 @@ public Builder clearFeedId() { * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for feedId to set. * @return This builder for chaining. @@ -903,14 +906,15 @@ public Builder setFeedIdBytes(com.google.protobuf.ByteString value) { * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feed field is set. */ @@ -921,14 +925,15 @@ public boolean hasFeed() { * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feed. */ @@ -943,14 +948,15 @@ public com.google.cloud.asset.v1p2beta1.Feed getFeed() { * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed value) { if (feedBuilder_ == null) { @@ -969,14 +975,15 @@ public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed value) { * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { if (feedBuilder_ == null) { @@ -992,14 +999,15 @@ public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed.Builder builderForV * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeFeed(com.google.cloud.asset.v1p2beta1.Feed value) { if (feedBuilder_ == null) { @@ -1022,14 +1030,15 @@ public Builder mergeFeed(com.google.cloud.asset.v1p2beta1.Feed value) { * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearFeed() { if (feedBuilder_ == null) { @@ -1046,14 +1055,15 @@ public Builder clearFeed() { * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedBuilder() { @@ -1064,14 +1074,15 @@ public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedBuilder() { * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { if (feedBuilder_ != null) { @@ -1084,14 +1095,15 @@ public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { * * *
-     * The feed details. The field `name` must be empty and it will be generated
+     * Required. The feed details. The field `name` must be empty and it will be generated
      * in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.asset.v1p2beta1.Feed, diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java index 63eab5bd6..559d9f10b 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java @@ -34,7 +34,7 @@ public interface CreateFeedRequestOrBuilder * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The parent. */ @@ -50,7 +50,7 @@ public interface CreateFeedRequestOrBuilder * "projects/12345"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for parent. */ @@ -64,7 +64,7 @@ public interface CreateFeedRequestOrBuilder * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The feedId. */ @@ -77,7 +77,7 @@ public interface CreateFeedRequestOrBuilder * be unique under a specific parent project/folder/organization. * * - * string feed_id = 2; + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for feedId. */ @@ -87,14 +87,15 @@ public interface CreateFeedRequestOrBuilder * * *
-   * The feed details. The field `name` must be empty and it will be generated
+   * Required. The feed details. The field `name` must be empty and it will be generated
    * in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feed field is set. */ @@ -103,14 +104,15 @@ public interface CreateFeedRequestOrBuilder * * *
-   * The feed details. The field `name` must be empty and it will be generated
+   * Required. The feed details. The field `name` must be empty and it will be generated
    * in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feed. */ @@ -119,14 +121,15 @@ public interface CreateFeedRequestOrBuilder * * *
-   * The feed details. The field `name` must be empty and it will be generated
+   * Required. The feed details. The field `name` must be empty and it will be generated
    * in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 3; + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder(); } diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java index e5c015dc9..1d2cba760 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java @@ -18,15 +18,7 @@ package com.google.cloud.asset.v1p2beta1; -/** - * - * - *
- * Delete asset feed request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.DeleteFeedRequest} - */ +/** Protobuf type {@code google.cloud.asset.v1p2beta1.DeleteFeedRequest} */ public final class DeleteFeedRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.DeleteFeedRequest) @@ -117,13 +109,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The name of the feed and it must be in the format of:
+   * Required. The name of the feed and it must be in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -142,13 +136,15 @@ public java.lang.String getName() { * * *
-   * The name of the feed and it must be in the format of:
+   * Required. The name of the feed and it must be in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -323,15 +319,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } - /** - * - * - *
-   * Delete asset feed request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.DeleteFeedRequest} - */ + /** Protobuf type {@code google.cloud.asset.v1p2beta1.DeleteFeedRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.DeleteFeedRequest) @@ -487,13 +475,15 @@ public Builder mergeFrom( * * *
-     * The name of the feed and it must be in the format of:
+     * Required. The name of the feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -512,13 +502,15 @@ public java.lang.String getName() { * * *
-     * The name of the feed and it must be in the format of:
+     * Required. The name of the feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -537,13 +529,15 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The name of the feed and it must be in the format of:
+     * Required. The name of the feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -561,13 +555,15 @@ public Builder setName(java.lang.String value) { * * *
-     * The name of the feed and it must be in the format of:
+     * Required. The name of the feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -581,13 +577,15 @@ public Builder clearName() { * * *
-     * The name of the feed and it must be in the format of:
+     * Required. The name of the feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java index 46312bbef..ee25e690f 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java @@ -27,13 +27,15 @@ public interface DeleteFeedRequestOrBuilder * * *
-   * The name of the feed and it must be in the format of:
+   * Required. The name of the feed and it must be in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -42,13 +44,15 @@ public interface DeleteFeedRequestOrBuilder * * *
-   * The name of the feed and it must be in the format of:
+   * Required. The name of the feed and it must be in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsRequest.java deleted file mode 100644 index 225917f22..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsRequest.java +++ /dev/null @@ -1,1734 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - * - * - *
- * Export asset request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.ExportAssetsRequest} - */ -public final class ExportAssetsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.ExportAssetsRequest) - ExportAssetsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportAssetsRequest.newBuilder() to construct. - private ExportAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportAssetsRequest() { - parent_ = ""; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportAssetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportAssetsRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - 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: - { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: - { - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - 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.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest.class, - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1; - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1; - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp readTime_; - /** - * - * - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTime_ != null; - } - /** - * - * - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - * - * - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - * - * - *
-   * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList getAssetTypesList() { - return assetTypes_; - } - /** - * - * - *
-   * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - * - * - *
-   * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * - * @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); - } - /** - * - * - *
-   * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * - * @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 CONTENT_TYPE_FIELD_NUMBER = 4; - private int contentType_; - /** - * - * - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @return The enum numeric value on the wire for contentType. - */ - public int getContentTypeValue() { - return contentType_; - } - /** - * - * - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @return The contentType. - */ - public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p2beta1.ContentType result = - com.google.cloud.asset.v1p2beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result; - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1p2beta1.OutputConfig outputConfig_; - /** - * - * - *
-   * Required. Output configuration indicating where the results will be output
-   * to. All results will be in newline delimited JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Required. Output configuration indicating where the results will be output
-   * to. All results will be in newline delimited JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - * - * @return The outputConfig. - */ - public com.google.cloud.asset.v1p2beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - /** - * - * - *
-   * Required. Output configuration indicating where the results will be output
-   * to. All results will be in newline delimited JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - public com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (readTime_ != null) { - output.writeMessage(2, getReadTime()); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (contentType_ - != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, contentType_); - } - if (outputConfig_ != null) { - output.writeMessage(5, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadTime()); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (contentType_ - != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, contentType_); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.ExportAssetsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest other = - (com.google.cloud.asset.v1p2beta1.ExportAssetsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime().equals(other.getReadTime())) return false; - } - if (!getAssetTypesList().equals(other.getAssetTypesList())) return false; - if (contentType_ != other.contentType_) return false; - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig().equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest 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.v1p2beta1.ExportAssetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest 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.v1p2beta1.ExportAssetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest 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.v1p2beta1.ExportAssetsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest 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.v1p2beta1.ExportAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest 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.v1p2beta1.ExportAssetsRequest 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; - } - /** - * - * - *
-   * Export asset request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.ExportAssetsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.ExportAssetsRequest) - com.google.cloud.asset.v1p2beta1.ExportAssetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest.class, - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.ExportAssetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - contentType_ = 0; - - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ExportAssetsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.ExportAssetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ExportAssetsRequest build() { - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ExportAssetsRequest buildPartial() { - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest result = - new com.google.cloud.asset.v1p2beta1.ExportAssetsRequest(this); - int from_bitField0_ = bitField0_; - result.parent_ = parent_; - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.contentType_ = contentType_; - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.ExportAssetsRequest) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.ExportAssetsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.ExportAssetsRequest other) { - if (other == com.google.cloud.asset.v1p2beta1.ExportAssetsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.ExportAssetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p2beta1.ExportAssetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1; - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - readTimeBuilder_; - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - * - * - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getReadTime(), getParentForChildren(), isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - 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; - } - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @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); - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @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); - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @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; - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @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; - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes(java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetTypes_); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * - * @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 contentType_ = 0; - /** - * - * - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @return The enum numeric value on the wire for contentType. - */ - public int getContentTypeValue() { - return contentType_; - } - /** - * - * - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - contentType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @return The contentType. - */ - public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p2beta1.ContentType result = - com.google.cloud.asset.v1p2beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1p2beta1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p2beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.OutputConfig, - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder, - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder> - outputConfigBuilder_; - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - * - * @return The outputConfig. - */ - public com.google.cloud.asset.v1p2beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1p2beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1p2beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1p2beta1.OutputConfig.newBuilder(outputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - public com.google.cloud.asset.v1p2beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - public com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.OutputConfig, - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder, - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.OutputConfig, - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder, - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder>( - getOutputConfig(), getParentForChildren(), isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.ExportAssetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.ExportAssetsRequest) - private static final com.google.cloud.asset.v1p2beta1.ExportAssetsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.ExportAssetsRequest(); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportAssetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ExportAssetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsRequestOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsRequestOrBuilder.java deleted file mode 100644 index 543231185..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsRequestOrBuilder.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface ExportAssetsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.ExportAssetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1; - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1; - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - * - * - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - * - * - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - * - * - *
-   * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * - * @return A list containing the assetTypes. - */ - java.util.List getAssetTypesList(); - /** - * - * - *
-   * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - * - * - *
-   * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - * - * - *
-   * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * - * @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); - - /** - * - * - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - * - * - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * - * @return The contentType. - */ - com.google.cloud.asset.v1p2beta1.ContentType getContentType(); - - /** - * - * - *
-   * Required. Output configuration indicating where the results will be output
-   * to. All results will be in newline delimited JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - * - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - * - * - *
-   * Required. Output configuration indicating where the results will be output
-   * to. All results will be in newline delimited JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - * - * @return The outputConfig. - */ - com.google.cloud.asset.v1p2beta1.OutputConfig getOutputConfig(); - /** - * - * - *
-   * Required. Output configuration indicating where the results will be output
-   * to. All results will be in newline delimited JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 5; - */ - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsResponse.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsResponse.java deleted file mode 100644 index 702e4bf23..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsResponse.java +++ /dev/null @@ -1,1013 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - * - * - *
- * The export asset response. This message is returned by the
- * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
- * [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.ExportAssetsResponse} - */ -public final class ExportAssetsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.ExportAssetsResponse) - ExportAssetsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportAssetsResponse.newBuilder() to construct. - private ExportAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportAssetsResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportAssetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportAssetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.ExportAssetsResponse.class, - com.google.cloud.asset.v1p2beta1.ExportAssetsResponse.Builder.class); - } - - public static final int READ_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp readTime_; - /** - * - * - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTime_ != null; - } - /** - * - * - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - * - * - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1p2beta1.OutputConfig outputConfig_; - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - * - * @return The outputConfig. - */ - public com.google.cloud.asset.v1p2beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (readTime_ != null) { - output.writeMessage(1, getReadTime()); - } - if (outputConfig_ != null) { - output.writeMessage(2, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReadTime()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.ExportAssetsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.ExportAssetsResponse other = - (com.google.cloud.asset.v1p2beta1.ExportAssetsResponse) obj; - - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime().equals(other.getReadTime())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig().equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse 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.v1p2beta1.ExportAssetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse 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.v1p2beta1.ExportAssetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse 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.v1p2beta1.ExportAssetsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse 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.v1p2beta1.ExportAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse 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.v1p2beta1.ExportAssetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The export asset response. This message is returned by the
-   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
-   * [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.ExportAssetsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.ExportAssetsResponse) - com.google.cloud.asset.v1p2beta1.ExportAssetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.ExportAssetsResponse.class, - com.google.cloud.asset.v1p2beta1.ExportAssetsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.ExportAssetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1p2beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ExportAssetsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.ExportAssetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ExportAssetsResponse build() { - com.google.cloud.asset.v1p2beta1.ExportAssetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ExportAssetsResponse buildPartial() { - com.google.cloud.asset.v1p2beta1.ExportAssetsResponse result = - new com.google.cloud.asset.v1p2beta1.ExportAssetsResponse(this); - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.ExportAssetsResponse) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.ExportAssetsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.ExportAssetsResponse other) { - if (other == com.google.cloud.asset.v1p2beta1.ExportAssetsResponse.getDefaultInstance()) - return this; - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.ExportAssetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1p2beta1.ExportAssetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - readTimeBuilder_; - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - * - * - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getReadTime(), getParentForChildren(), isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private com.google.cloud.asset.v1p2beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.OutputConfig, - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder, - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder> - outputConfigBuilder_; - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - * - * @return The outputConfig. - */ - public com.google.cloud.asset.v1p2beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1p2beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1p2beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1p2beta1.OutputConfig.newBuilder(outputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1p2beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.OutputConfig, - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder, - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.OutputConfig, - com.google.cloud.asset.v1p2beta1.OutputConfig.Builder, - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder>( - getOutputConfig(), getParentForChildren(), isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.ExportAssetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.ExportAssetsResponse) - private static final com.google.cloud.asset.v1p2beta1.ExportAssetsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.ExportAssetsResponse(); - } - - public static com.google.cloud.asset.v1p2beta1.ExportAssetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportAssetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ExportAssetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsResponseOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsResponseOrBuilder.java deleted file mode 100644 index 17886155e..000000000 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsResponseOrBuilder.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface ExportAssetsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.ExportAssetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - * - * - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - * - * - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - * - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - * - * @return The outputConfig. - */ - com.google.cloud.asset.v1p2beta1.OutputConfig getOutputConfig(); - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1p2beta1.OutputConfig output_config = 2; - */ - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java index b076ca0c8..5ae49f015 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java @@ -183,7 +183,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -210,7 +210,7 @@ public java.lang.String getName() { * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -446,7 +446,9 @@ public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feedOutputConfig field is set. */ @@ -461,7 +463,9 @@ public boolean hasFeedOutputConfig() { * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feedOutputConfig. */ @@ -478,7 +482,9 @@ public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig() { * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { return getFeedOutputConfig(); @@ -929,7 +935,7 @@ public Builder mergeFrom( * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -956,7 +962,7 @@ public java.lang.String getName() { * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -983,7 +989,7 @@ public com.google.protobuf.ByteString getNameBytes() { * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. @@ -1009,7 +1015,7 @@ public Builder setName(java.lang.String value) { * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -1031,7 +1037,7 @@ public Builder clearName() { * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -1607,7 +1613,9 @@ public Builder clearContentType() { * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feedOutputConfig field is set. */ @@ -1622,7 +1630,9 @@ public boolean hasFeedOutputConfig() { * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feedOutputConfig. */ @@ -1643,7 +1653,9 @@ public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig() { * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value) { if (feedOutputConfigBuilder_ == null) { @@ -1666,7 +1678,9 @@ public Builder setFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputCo * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setFeedOutputConfig( com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder builderForValue) { @@ -1687,7 +1701,9 @@ public Builder setFeedOutputConfig( * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value) { if (feedOutputConfigBuilder_ == null) { @@ -1714,7 +1730,9 @@ public Builder mergeFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutput * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearFeedOutputConfig() { if (feedOutputConfigBuilder_ == null) { @@ -1735,7 +1753,9 @@ public Builder clearFeedOutputConfig() { * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder getFeedOutputConfigBuilder() { @@ -1750,7 +1770,9 @@ public com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder getFeedOutputCo * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { @@ -1770,7 +1792,9 @@ public com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder getFeedOutputCo * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.asset.v1p2beta1.FeedOutputConfig, diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java index 81d7caccb..846765f2e 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java @@ -35,7 +35,7 @@ public interface FeedOrBuilder * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @@ -52,7 +52,7 @@ public interface FeedOrBuilder * project/folder/organization. * * - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @@ -247,7 +247,9 @@ public interface FeedOrBuilder * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feedOutputConfig field is set. */ @@ -260,7 +262,9 @@ public interface FeedOrBuilder * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feedOutputConfig. */ @@ -273,7 +277,9 @@ public interface FeedOrBuilder * published to. * * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5; + * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder(); } diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java index d58b0f179..c5e955029 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java @@ -75,13 +75,6 @@ private GcsDestination( objectUri_ = s; break; } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 2; - objectUri_ = s; - break; - } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -124,7 +117,6 @@ public enum ObjectUriCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { URI(1), - URI_PREFIX(2), OBJECTURI_NOT_SET(0); private final int value; @@ -145,8 +137,6 @@ public static ObjectUriCase forNumber(int value) { switch (value) { case 1: return URI; - case 2: - return URI_PREFIX; case 0: return OBJECTURI_NOT_SET; default: @@ -227,78 +217,6 @@ public com.google.protobuf.ByteString getUriBytes() { } } - public static final int URI_PREFIX_FIELD_NUMBER = 2; - /** - * - * - *
-   * The uri prefix of all generated Cloud Storage objects. For example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. For example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * - * @return The uriPrefix. - */ - public java.lang.String getUriPrefix() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 2) { - objectUri_ = s; - } - return s; - } - } - /** - * - * - *
-   * The uri prefix of all generated Cloud Storage objects. For example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. For example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * - * @return The bytes for uriPrefix. - */ - public com.google.protobuf.ByteString getUriPrefixBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (objectUriCase_ == 2) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -316,9 +234,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (objectUriCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); } - if (objectUriCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); - } unknownFields.writeTo(output); } @@ -331,9 +246,6 @@ public int getSerializedSize() { if (objectUriCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); } - if (objectUriCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -355,9 +267,6 @@ public boolean equals(final java.lang.Object obj) { case 1: if (!getUri().equals(other.getUri())) return false; break; - case 2: - if (!getUriPrefix().equals(other.getUriPrefix())) return false; - break; case 0: default: } @@ -377,10 +286,6 @@ public int hashCode() { hash = (37 * hash) + URI_FIELD_NUMBER; hash = (53 * hash) + getUri().hashCode(); break; - case 2: - hash = (37 * hash) + URI_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getUriPrefix().hashCode(); - break; case 0: default: } @@ -561,9 +466,6 @@ public com.google.cloud.asset.v1p2beta1.GcsDestination buildPartial() { if (objectUriCase_ == 1) { result.objectUri_ = objectUri_; } - if (objectUriCase_ == 2) { - result.objectUri_ = objectUri_; - } result.objectUriCase_ = objectUriCase_; onBuilt(); return result; @@ -623,13 +525,6 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.GcsDestination other) onChanged(); break; } - case URI_PREFIX: - { - objectUriCase_ = 2; - objectUri_ = other.objectUri_; - onChanged(); - break; - } case OBJECTURI_NOT_SET: { break; @@ -815,163 +710,6 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { return this; } - /** - * - * - *
-     * The uri prefix of all generated Cloud Storage objects. For example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. For example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * - * @return The uriPrefix. - */ - public java.lang.String getUriPrefix() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 2) { - objectUri_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The uri prefix of all generated Cloud Storage objects. For example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. For example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * - * @return The bytes for uriPrefix. - */ - public com.google.protobuf.ByteString getUriPrefixBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (objectUriCase_ == 2) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The uri prefix of all generated Cloud Storage objects. For example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. For example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * - * @param value The uriPrefix to set. - * @return This builder for chaining. - */ - public Builder setUriPrefix(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectUriCase_ = 2; - objectUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The uri prefix of all generated Cloud Storage objects. For example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. For example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * - * @return This builder for chaining. - */ - public Builder clearUriPrefix() { - if (objectUriCase_ == 2) { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The uri prefix of all generated Cloud Storage objects. For example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. For example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * - * @param value The bytes for uriPrefix to set. - * @return This builder for chaining. - */ - public Builder setUriPrefixBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectUriCase_ = 2; - objectUri_ = value; - onChanged(); - return this; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java index 8186b0c86..5cd2f5294 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java @@ -56,46 +56,5 @@ public interface GcsDestinationOrBuilder */ com.google.protobuf.ByteString getUriBytes(); - /** - * - * - *
-   * The uri prefix of all generated Cloud Storage objects. For example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. For example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * - * @return The uriPrefix. - */ - java.lang.String getUriPrefix(); - /** - * - * - *
-   * The uri prefix of all generated Cloud Storage objects. For example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. For example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * - * @return The bytes for uriPrefix. - */ - com.google.protobuf.ByteString getUriPrefixBytes(); - public com.google.cloud.asset.v1p2beta1.GcsDestination.ObjectUriCase getObjectUriCase(); } diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java index bf3fe0ac7..213638a36 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java @@ -117,13 +117,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The name of the Feed and it must be in the format of:
+   * Required. The name of the Feed and it must be in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -142,13 +144,15 @@ public java.lang.String getName() { * * *
-   * The name of the Feed and it must be in the format of:
+   * Required. The name of the Feed and it must be in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -486,13 +490,15 @@ public Builder mergeFrom( * * *
-     * The name of the Feed and it must be in the format of:
+     * Required. The name of the Feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -511,13 +517,15 @@ public java.lang.String getName() { * * *
-     * The name of the Feed and it must be in the format of:
+     * Required. The name of the Feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -536,13 +544,15 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The name of the Feed and it must be in the format of:
+     * Required. The name of the Feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -560,13 +570,15 @@ public Builder setName(java.lang.String value) { * * *
-     * The name of the Feed and it must be in the format of:
+     * Required. The name of the Feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -580,13 +592,15 @@ public Builder clearName() { * * *
-     * The name of the Feed and it must be in the format of:
+     * Required. The name of the Feed and it must be in the format of:
      * projects/project_number/feeds/feed_id
      * folders/folder_number/feeds/feed_id
      * organizations/organization_number/feeds/feed_id
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java index bbe273240..53061113e 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java @@ -27,13 +27,15 @@ public interface GetFeedRequestOrBuilder * * *
-   * The name of the Feed and it must be in the format of:
+   * Required. The name of the Feed and it must be in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -42,13 +44,15 @@ public interface GetFeedRequestOrBuilder * * *
-   * The name of the Feed and it must be in the format of:
+   * Required. The name of the Feed and it must be in the format of:
    * projects/project_number/feeds/feed_id
    * folders/folder_number/feeds/feed_id
    * organizations/organization_number/feeds/feed_id
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java index c076181e9..44a0bd24f 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java @@ -122,7 +122,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The parent. */ @@ -146,7 +146,7 @@ public java.lang.String getParent() { * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for parent. */ @@ -490,7 +490,7 @@ public Builder mergeFrom( * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The parent. */ @@ -514,7 +514,7 @@ public java.lang.String getParent() { * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for parent. */ @@ -538,7 +538,7 @@ public com.google.protobuf.ByteString getParentBytes() { * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The parent to set. * @return This builder for chaining. @@ -561,7 +561,7 @@ public Builder setParent(java.lang.String value) { * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -580,7 +580,7 @@ public Builder clearParent() { * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java index 1038a6c3d..07ffeb181 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java @@ -32,7 +32,7 @@ public interface ListFeedsRequestOrBuilder * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The parent. */ @@ -46,7 +46,7 @@ public interface ListFeedsRequestOrBuilder * "folders/12345")", or a project ID (such as "projects/my-project-id"). * * - * string parent = 1; + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for parent. */ diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java index 836dd57b3..5202ca5d8 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java @@ -18,15 +18,7 @@ package com.google.cloud.asset.v1p2beta1; -/** - * - * - *
- * List asset feeds response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsResponse} - */ +/** Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsResponse} */ public final class ListFeedsResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.ListFeedsResponse) @@ -344,15 +336,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } - /** - * - * - *
-   * List asset feeds response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsResponse} - */ + /** Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.ListFeedsResponse) diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java index 33ef8972d..723954fff 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java @@ -86,26 +86,6 @@ private OutputConfig( destinationCase_ = 1; break; } - case 18: - { - com.google.cloud.asset.v1p2beta1.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = - ((com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_) - .toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1p2beta1.BigQueryDestination.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - break; - } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -148,7 +128,6 @@ public enum DestinationCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { GCS_DESTINATION(1), - BIGQUERY_DESTINATION(2), DESTINATION_NOT_SET(0); private final int value; @@ -169,8 +148,6 @@ public static DestinationCase forNumber(int value) { switch (value) { case 1: return GCS_DESTINATION; - case 2: - return BIGQUERY_DESTINATION; case 0: return DESTINATION_NOT_SET; default: @@ -235,64 +212,6 @@ public com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinatio return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); } - public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; - /** - * - * - *
-   * Destination on Bigquery. The output table stores the fields in asset
-   * proto as columns in BigQuery. The resource/iam_policy field is converted
-   * to a record with each field to a column, except metadata to a single JSON
-   * string.
-   * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - * - * - *
-   * Destination on Bigquery. The output table stores the fields in asset
-   * proto as columns in BigQuery. The resource/iam_policy field is converted
-   * to a record with each field to a column, except metadata to a single JSON
-   * string.
-   * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.asset.v1p2beta1.BigQueryDestination getBigqueryDestination() { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance(); - } - /** - * - * - *
-   * Destination on Bigquery. The output table stores the fields in asset
-   * proto as columns in BigQuery. The resource/iam_policy field is converted
-   * to a record with each field to a column, except metadata to a single JSON
-   * string.
-   * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.asset.v1p2beta1.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -310,9 +229,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { output.writeMessage(1, (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); } - if (destinationCase_ == 2) { - output.writeMessage(2, (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_); - } unknownFields.writeTo(output); } @@ -327,11 +243,6 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); } - if (destinationCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -353,9 +264,6 @@ public boolean equals(final java.lang.Object obj) { case 1: if (!getGcsDestination().equals(other.getGcsDestination())) return false; break; - case 2: - if (!getBigqueryDestination().equals(other.getBigqueryDestination())) return false; - break; case 0: default: } @@ -375,10 +283,6 @@ public int hashCode() { hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; hash = (53 * hash) + getGcsDestination().hashCode(); break; - case 2: - hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getBigqueryDestination().hashCode(); - break; case 0: default: } @@ -563,13 +467,6 @@ public com.google.cloud.asset.v1p2beta1.OutputConfig buildPartial() { result.destination_ = gcsDestinationBuilder_.build(); } } - if (destinationCase_ == 2) { - if (bigqueryDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = bigqueryDestinationBuilder_.build(); - } - } result.destinationCase_ = destinationCase_; onBuilt(); return result; @@ -626,11 +523,6 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.OutputConfig other) { mergeGcsDestination(other.getGcsDestination()); break; } - case BIGQUERY_DESTINATION: - { - mergeBigqueryDestination(other.getBigqueryDestination()); - break; - } case DESTINATION_NOT_SET: { break; @@ -886,244 +778,6 @@ public com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinatio return gcsDestinationBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.BigQueryDestination, - com.google.cloud.asset.v1p2beta1.BigQueryDestination.Builder, - com.google.cloud.asset.v1p2beta1.BigQueryDestinationOrBuilder> - bigqueryDestinationBuilder_; - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.asset.v1p2beta1.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 2) { - return bigqueryDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.asset.v1p2beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.asset.v1p2beta1.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder mergeBigqueryDestination( - com.google.cloud.asset.v1p2beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2 - && destination_ - != com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.asset.v1p2beta1.BigQueryDestination.newBuilder( - (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 2) { - bigqueryDestinationBuilder_.mergeFrom(value); - } - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder clearBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - } - bigqueryDestinationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.asset.v1p2beta1.BigQueryDestination.Builder - getBigqueryDestinationBuilder() { - return getBigqueryDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.asset.v1p2beta1.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * Destination on Bigquery. The output table stores the fields in asset
-     * proto as columns in BigQuery. The resource/iam_policy field is converted
-     * to a record with each field to a column, except metadata to a single JSON
-     * string.
-     * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.BigQueryDestination, - com.google.cloud.asset.v1p2beta1.BigQueryDestination.Builder, - com.google.cloud.asset.v1p2beta1.BigQueryDestinationOrBuilder> - getBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - if (!(destinationCase_ == 2)) { - destination_ = com.google.cloud.asset.v1p2beta1.BigQueryDestination.getDefaultInstance(); - } - bigqueryDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.BigQueryDestination, - com.google.cloud.asset.v1p2beta1.BigQueryDestination.Builder, - com.google.cloud.asset.v1p2beta1.BigQueryDestinationOrBuilder>( - (com.google.cloud.asset.v1p2beta1.BigQueryDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 2; - onChanged(); - ; - return bigqueryDestinationBuilder_; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java index 16be1c068..2eadb8a87 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java @@ -58,49 +58,5 @@ public interface OutputConfigOrBuilder */ com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - /** - * - * - *
-   * Destination on Bigquery. The output table stores the fields in asset
-   * proto as columns in BigQuery. The resource/iam_policy field is converted
-   * to a record with each field to a column, except metadata to a single JSON
-   * string.
-   * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - /** - * - * - *
-   * Destination on Bigquery. The output table stores the fields in asset
-   * proto as columns in BigQuery. The resource/iam_policy field is converted
-   * to a record with each field to a column, except metadata to a single JSON
-   * string.
-   * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - com.google.cloud.asset.v1p2beta1.BigQueryDestination getBigqueryDestination(); - /** - * - * - *
-   * Destination on Bigquery. The output table stores the fields in asset
-   * proto as columns in BigQuery. The resource/iam_policy field is converted
-   * to a record with each field to a column, except metadata to a single JSON
-   * string.
-   * 
- * - * .google.cloud.asset.v1p2beta1.BigQueryDestination bigquery_destination = 2; - */ - com.google.cloud.asset.v1p2beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); - public com.google.cloud.asset.v1p2beta1.OutputConfig.DestinationCase getDestinationCase(); } diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java index c9f61ca6c..52d520f95 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java @@ -121,21 +121,6 @@ private Resource( data_ = subBuilder.buildPartial(); } - break; - } - case 58: - { - com.google.protobuf.Any.Builder subBuilder = null; - if (internalData_ != null) { - subBuilder = internalData_.toBuilder(); - } - internalData_ = - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(internalData_); - internalData_ = subBuilder.buildPartial(); - } - break; } default: @@ -489,52 +474,6 @@ public com.google.protobuf.StructOrBuilder getDataOrBuilder() { return getData(); } - public static final int INTERNAL_DATA_FIELD_NUMBER = 7; - private com.google.protobuf.Any internalData_; - /** - * - * - *
-   * The actual metadata content for the resource, only visible for internal
-   * users.
-   * 
- * - * .google.protobuf.Any internal_data = 7; - * - * @return Whether the internalData field is set. - */ - public boolean hasInternalData() { - return internalData_ != null; - } - /** - * - * - *
-   * The actual metadata content for the resource, only visible for internal
-   * users.
-   * 
- * - * .google.protobuf.Any internal_data = 7; - * - * @return The internalData. - */ - public com.google.protobuf.Any getInternalData() { - return internalData_ == null ? com.google.protobuf.Any.getDefaultInstance() : internalData_; - } - /** - * - * - *
-   * The actual metadata content for the resource, only visible for internal
-   * users.
-   * 
- * - * .google.protobuf.Any internal_data = 7; - */ - public com.google.protobuf.AnyOrBuilder getInternalDataOrBuilder() { - return getInternalData(); - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -567,9 +506,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (data_ != null) { output.writeMessage(6, getData()); } - if (internalData_ != null) { - output.writeMessage(7, getInternalData()); - } unknownFields.writeTo(output); } @@ -597,9 +533,6 @@ public int getSerializedSize() { if (data_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getData()); } - if (internalData_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getInternalData()); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -625,10 +558,6 @@ public boolean equals(final java.lang.Object obj) { if (hasData()) { if (!getData().equals(other.getData())) return false; } - if (hasInternalData() != other.hasInternalData()) return false; - if (hasInternalData()) { - if (!getInternalData().equals(other.getInternalData())) return false; - } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -654,10 +583,6 @@ public int hashCode() { hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); } - if (hasInternalData()) { - hash = (37 * hash) + INTERNAL_DATA_FIELD_NUMBER; - hash = (53 * hash) + getInternalData().hashCode(); - } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -819,12 +744,6 @@ public Builder clear() { data_ = null; dataBuilder_ = null; } - if (internalDataBuilder_ == null) { - internalData_ = null; - } else { - internalData_ = null; - internalDataBuilder_ = null; - } return this; } @@ -862,11 +781,6 @@ public com.google.cloud.asset.v1p2beta1.Resource buildPartial() { } else { result.data_ = dataBuilder_.build(); } - if (internalDataBuilder_ == null) { - result.internalData_ = internalData_; - } else { - result.internalData_ = internalDataBuilder_.build(); - } onBuilt(); return result; } @@ -939,9 +853,6 @@ public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Resource other) { if (other.hasData()) { mergeData(other.getData()); } - if (other.hasInternalData()) { - mergeInternalData(other.getInternalData()); - } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1777,194 +1688,6 @@ public com.google.protobuf.StructOrBuilder getDataOrBuilder() { return dataBuilder_; } - private com.google.protobuf.Any internalData_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, - com.google.protobuf.Any.Builder, - com.google.protobuf.AnyOrBuilder> - internalDataBuilder_; - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - * - * @return Whether the internalData field is set. - */ - public boolean hasInternalData() { - return internalDataBuilder_ != null || internalData_ != null; - } - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - * - * @return The internalData. - */ - public com.google.protobuf.Any getInternalData() { - if (internalDataBuilder_ == null) { - return internalData_ == null ? com.google.protobuf.Any.getDefaultInstance() : internalData_; - } else { - return internalDataBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - */ - public Builder setInternalData(com.google.protobuf.Any value) { - if (internalDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - internalData_ = value; - onChanged(); - } else { - internalDataBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - */ - public Builder setInternalData(com.google.protobuf.Any.Builder builderForValue) { - if (internalDataBuilder_ == null) { - internalData_ = builderForValue.build(); - onChanged(); - } else { - internalDataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - */ - public Builder mergeInternalData(com.google.protobuf.Any value) { - if (internalDataBuilder_ == null) { - if (internalData_ != null) { - internalData_ = - com.google.protobuf.Any.newBuilder(internalData_).mergeFrom(value).buildPartial(); - } else { - internalData_ = value; - } - onChanged(); - } else { - internalDataBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - */ - public Builder clearInternalData() { - if (internalDataBuilder_ == null) { - internalData_ = null; - onChanged(); - } else { - internalData_ = null; - internalDataBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - */ - public com.google.protobuf.Any.Builder getInternalDataBuilder() { - - onChanged(); - return getInternalDataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - */ - public com.google.protobuf.AnyOrBuilder getInternalDataOrBuilder() { - if (internalDataBuilder_ != null) { - return internalDataBuilder_.getMessageOrBuilder(); - } else { - return internalData_ == null ? com.google.protobuf.Any.getDefaultInstance() : internalData_; - } - } - /** - * - * - *
-     * The actual metadata content for the resource, only visible for internal
-     * users.
-     * 
- * - * .google.protobuf.Any internal_data = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, - com.google.protobuf.Any.Builder, - com.google.protobuf.AnyOrBuilder> - getInternalDataFieldBuilder() { - if (internalDataBuilder_ == null) { - internalDataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, - com.google.protobuf.Any.Builder, - com.google.protobuf.AnyOrBuilder>( - getInternalData(), getParentForChildren(), isClean()); - internalData_ = null; - } - return internalDataBuilder_; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java index dc3b6f9d8..106c7dfff 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java @@ -221,42 +221,4 @@ public interface ResourceOrBuilder * .google.protobuf.Struct data = 6; */ com.google.protobuf.StructOrBuilder getDataOrBuilder(); - - /** - * - * - *
-   * The actual metadata content for the resource, only visible for internal
-   * users.
-   * 
- * - * .google.protobuf.Any internal_data = 7; - * - * @return Whether the internalData field is set. - */ - boolean hasInternalData(); - /** - * - * - *
-   * The actual metadata content for the resource, only visible for internal
-   * users.
-   * 
- * - * .google.protobuf.Any internal_data = 7; - * - * @return The internalData. - */ - com.google.protobuf.Any getInternalData(); - /** - * - * - *
-   * The actual metadata content for the resource, only visible for internal
-   * users.
-   * 
- * - * .google.protobuf.Any internal_data = 7; - */ - com.google.protobuf.AnyOrBuilder getInternalDataOrBuilder(); } diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java index 9cb837806..59f58a96c 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java @@ -139,14 +139,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The new values of feed details. It must match an existing feed and the
+   * Required. The new values of feed details. It must match an existing feed and the
    * field `name` must be in the format of:
    * projects/project_number/feeds/feed_id or
    * folders/folder_number/feeds/feed_id or
    * organizations/organization_number/feeds/feed_id.
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feed field is set. */ @@ -157,14 +158,15 @@ public boolean hasFeed() { * * *
-   * The new values of feed details. It must match an existing feed and the
+   * Required. The new values of feed details. It must match an existing feed and the
    * field `name` must be in the format of:
    * projects/project_number/feeds/feed_id or
    * folders/folder_number/feeds/feed_id or
    * organizations/organization_number/feeds/feed_id.
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feed. */ @@ -175,14 +177,15 @@ public com.google.cloud.asset.v1p2beta1.Feed getFeed() { * * *
-   * The new values of feed details. It must match an existing feed and the
+   * Required. The new values of feed details. It must match an existing feed and the
    * field `name` must be in the format of:
    * projects/project_number/feeds/feed_id or
    * folders/folder_number/feeds/feed_id or
    * organizations/organization_number/feeds/feed_id.
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { return getFeed(); @@ -194,12 +197,13 @@ public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { * * *
-   * Only updates the `feed` fields indicated by this mask.
+   * Required. Only updates the `feed` fields indicated by this mask.
    * The field mask must not be empty, and it must not contain fields that
    * are immutable or only set by the server.
    * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the updateMask field is set. */ @@ -210,12 +214,13 @@ public boolean hasUpdateMask() { * * *
-   * Only updates the `feed` fields indicated by this mask.
+   * Required. Only updates the `feed` fields indicated by this mask.
    * The field mask must not be empty, and it must not contain fields that
    * are immutable or only set by the server.
    * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The updateMask. */ @@ -226,12 +231,13 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-   * Only updates the `feed` fields indicated by this mask.
+   * Required. Only updates the `feed` fields indicated by this mask.
    * The field mask must not be empty, and it must not contain fields that
    * are immutable or only set by the server.
    * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); @@ -605,14 +611,15 @@ public Builder mergeFrom( * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feed field is set. */ @@ -623,14 +630,15 @@ public boolean hasFeed() { * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feed. */ @@ -645,14 +653,15 @@ public com.google.cloud.asset.v1p2beta1.Feed getFeed() { * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed value) { if (feedBuilder_ == null) { @@ -671,14 +680,15 @@ public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed value) { * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { if (feedBuilder_ == null) { @@ -694,14 +704,15 @@ public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed.Builder builderForV * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeFeed(com.google.cloud.asset.v1p2beta1.Feed value) { if (feedBuilder_ == null) { @@ -724,14 +735,15 @@ public Builder mergeFeed(com.google.cloud.asset.v1p2beta1.Feed value) { * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearFeed() { if (feedBuilder_ == null) { @@ -748,14 +760,15 @@ public Builder clearFeed() { * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedBuilder() { @@ -766,14 +779,15 @@ public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedBuilder() { * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { if (feedBuilder_ != null) { @@ -786,14 +800,15 @@ public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { * * *
-     * The new values of feed details. It must match an existing feed and the
+     * Required. The new values of feed details. It must match an existing feed and the
      * field `name` must be in the format of:
      * projects/project_number/feeds/feed_id or
      * folders/folder_number/feeds/feed_id or
      * organizations/organization_number/feeds/feed_id.
      * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.asset.v1p2beta1.Feed, @@ -822,12 +837,13 @@ public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the updateMask field is set. */ @@ -838,12 +854,13 @@ public boolean hasUpdateMask() { * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The updateMask. */ @@ -860,12 +877,13 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -884,12 +902,13 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { if (updateMaskBuilder_ == null) { @@ -905,12 +924,13 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { if (updateMaskBuilder_ == null) { @@ -931,12 +951,13 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearUpdateMask() { if (updateMaskBuilder_ == null) { @@ -953,12 +974,13 @@ public Builder clearUpdateMask() { * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { @@ -969,12 +991,13 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { if (updateMaskBuilder_ != null) { @@ -989,12 +1012,13 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Only updates the `feed` fields indicated by this mask.
+     * Required. Only updates the `feed` fields indicated by this mask.
      * The field mask must not be empty, and it must not contain fields that
      * are immutable or only set by the server.
      * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java index 6ac03ec26..f47a2da67 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java @@ -27,14 +27,15 @@ public interface UpdateFeedRequestOrBuilder * * *
-   * The new values of feed details. It must match an existing feed and the
+   * Required. The new values of feed details. It must match an existing feed and the
    * field `name` must be in the format of:
    * projects/project_number/feeds/feed_id or
    * folders/folder_number/feeds/feed_id or
    * organizations/organization_number/feeds/feed_id.
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the feed field is set. */ @@ -43,14 +44,15 @@ public interface UpdateFeedRequestOrBuilder * * *
-   * The new values of feed details. It must match an existing feed and the
+   * Required. The new values of feed details. It must match an existing feed and the
    * field `name` must be in the format of:
    * projects/project_number/feeds/feed_id or
    * folders/folder_number/feeds/feed_id or
    * organizations/organization_number/feeds/feed_id.
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The feed. */ @@ -59,14 +61,15 @@ public interface UpdateFeedRequestOrBuilder * * *
-   * The new values of feed details. It must match an existing feed and the
+   * Required. The new values of feed details. It must match an existing feed and the
    * field `name` must be in the format of:
    * projects/project_number/feeds/feed_id or
    * folders/folder_number/feeds/feed_id or
    * organizations/organization_number/feeds/feed_id.
    * 
* - * .google.cloud.asset.v1p2beta1.Feed feed = 1; + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder(); @@ -74,12 +77,13 @@ public interface UpdateFeedRequestOrBuilder * * *
-   * Only updates the `feed` fields indicated by this mask.
+   * Required. Only updates the `feed` fields indicated by this mask.
    * The field mask must not be empty, and it must not contain fields that
    * are immutable or only set by the server.
    * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the updateMask field is set. */ @@ -88,12 +92,13 @@ public interface UpdateFeedRequestOrBuilder * * *
-   * Only updates the `feed` fields indicated by this mask.
+   * Required. Only updates the `feed` fields indicated by this mask.
    * The field mask must not be empty, and it must not contain fields that
    * are immutable or only set by the server.
    * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The updateMask. */ @@ -102,12 +107,13 @@ public interface UpdateFeedRequestOrBuilder * * *
-   * Only updates the `feed` fields indicated by this mask.
+   * Required. Only updates the `feed` fields indicated by this mask.
    * The field mask must not be empty, and it must not contain fields that
    * are immutable or only set by the server.
    * 
* - * .google.protobuf.FieldMask update_mask = 2; + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); } diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto b/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto index 0d461d0fa..7925bba68 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto +++ b/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto @@ -18,12 +18,14 @@ syntax = "proto3"; package google.cloud.asset.v1p2beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/asset/v1p2beta1/assets.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Asset.V1p2Beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset"; @@ -37,28 +39,6 @@ service AssetService { option (google.api.default_host) = "cloudasset.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // Exports assets with time and resource types to a given Cloud Storage - // location. The output format is newline-delimited JSON. - // This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you - // to keep track of the export. - rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p2beta1/{parent=*/*}:exportAssets" - body: "*" - }; - } - - // Batch gets the update history of assets that overlap a time window. - // For RESOURCE content, this API outputs history with asset in both - // non-delete or deleted status. - // For IAM_POLICY content, this API outputs history when the asset and its - // attached IAM POLICY both exist. This can create gaps in the output history. - rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) returns (BatchGetAssetsHistoryResponse) { - option (google.api.http) = { - get: "/v1p2beta1/{parent=*/*}:batchGetAssetsHistory" - }; - } - // Creates a feed in a parent project/folder/organization to listen to its // asset updates. rpc CreateFeed(CreateFeedRequest) returns (Feed) { @@ -66,6 +46,7 @@ service AssetService { post: "/v1p2beta1/{parent=*/*}/feeds" body: "*" }; + option (google.api.method_signature) = "parent"; } // Gets details about an asset feed. @@ -73,6 +54,7 @@ service AssetService { option (google.api.http) = { get: "/v1p2beta1/{name=*/*/feeds/*}" }; + option (google.api.method_signature) = "name"; } // Lists all asset feeds in a parent project/folder/organization. @@ -80,6 +62,7 @@ service AssetService { option (google.api.http) = { get: "/v1p2beta1/{parent=*/*}/feeds" }; + option (google.api.method_signature) = "parent"; } // Updates an asset feed configuration. @@ -88,6 +71,7 @@ service AssetService { patch: "/v1p2beta1/{feed.name=*/*/feeds/*}" body: "*" }; + option (google.api.method_signature) = "feed"; } // Deletes an asset feed. @@ -95,88 +79,10 @@ service AssetService { option (google.api.http) = { delete: "/v1p2beta1/{name=*/*/feeds/*}" }; + option (google.api.method_signature) = "name"; } } -// Export asset request. -message ExportAssetsRequest { - // Required. The relative name of the root asset. This can only be an - // organization number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id"), or a project number (such as "projects/12345"). - string parent = 1; - - // Timestamp to take an asset snapshot. This can only be set to a timestamp - // between 2018-10-02 UTC (inclusive) and the current time. If not specified, - // the current time will be used. Due to delays in resource data collection - // and indexing, there is a volatile window during which running the same - // query may get different results. - google.protobuf.Timestamp read_time = 2; - - // A list of asset types of which to take a snapshot for. For example: - // "compute.googleapis.com/Disk". If specified, only matching assets will be - // returned. See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) - // for all supported asset types. - repeated string asset_types = 3; - - // Asset content type. If not specified, no content but the asset name will be - // returned. - ContentType content_type = 4; - - // Required. Output configuration indicating where the results will be output - // to. All results will be in newline delimited JSON format. - OutputConfig output_config = 5; -} - -// The export asset response. This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] field. -message ExportAssetsResponse { - // Time the snapshot was taken. - google.protobuf.Timestamp read_time = 1; - - // Output configuration indicating where the results were output to. - // All results are in JSON format. - OutputConfig output_config = 2; -} - -// Batch get assets history request. -message BatchGetAssetsHistoryRequest { - // Required. The relative name of the root asset. It can only be an - // organization number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id")", or a project number (such as "projects/12345"). - string parent = 1; - - // A list of the full names of the assets. 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) - // and [Resource Name - // Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) - // for more info. - // - // The request becomes a no-op if the asset name list is empty, and the max - // size of the asset name list is 100 in one request. - repeated string asset_names = 2; - - // Required. The content type. - ContentType content_type = 3; - - // Optional. The time window for the asset history. Both start_time and - // end_time are optional and if set, it must be after 2018-10-02 UTC. If - // end_time is not set, it is default to current timestamp. If start_time is - // not set, the snapshot of the assets at end_time will be returned. The - // returned results contain all temporal assets whose time window overlap with - // read_time_window. - TimeWindow read_time_window = 4; -} - -// Batch get assets history response. -message BatchGetAssetsHistoryResponse { - // A list of assets with valid time windows. - repeated TemporalAsset assets = 1; -} - // Create asset feed request. message CreateFeedRequest { // Required. The name of the project/folder/organization where this feed @@ -184,27 +90,32 @@ message CreateFeedRequest { // "organizations/123"), a folder number (such as "folders/123"), a project ID // (such as "projects/my-project-id")", or a project number (such as // "projects/12345"). - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; // Required. This is the client-assigned asset feed identifier and it needs to // be unique under a specific parent project/folder/organization. - string feed_id = 2; + string feed_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The feed details. The field `name` must be empty and it will be generated + // Required. The feed details. The field `name` must be empty and it will be generated // in the format of: // projects/project_number/feeds/feed_id // folders/folder_number/feeds/feed_id // organizations/organization_number/feeds/feed_id - Feed feed = 3; + Feed feed = 3 [(google.api.field_behavior) = REQUIRED]; } // Get asset feed request. message GetFeedRequest { - // The name of the Feed and it must be in the format of: + // Required. The name of the Feed and it must be in the format of: // projects/project_number/feeds/feed_id // folders/folder_number/feeds/feed_id // organizations/organization_number/feeds/feed_id - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Feed" + } + ]; } // List asset feeds request. @@ -212,10 +123,9 @@ message ListFeedsRequest { // Required. The parent project/folder/organization whose feeds are to be // listed. It can only be using project/folder/organization number (such as // "folders/12345")", or a project ID (such as "projects/my-project-id"). - string parent = 1; + string parent = 1 [(google.api.field_behavior) = REQUIRED]; } -// List asset feeds response. message ListFeedsResponse { // A list of feeds. repeated Feed feeds = 1; @@ -223,26 +133,30 @@ message ListFeedsResponse { // Update asset feed request. message UpdateFeedRequest { - // The new values of feed details. It must match an existing feed and the + // Required. The new values of feed details. It must match an existing feed and the // field `name` must be in the format of: // projects/project_number/feeds/feed_id or // folders/folder_number/feeds/feed_id or // organizations/organization_number/feeds/feed_id. - Feed feed = 1; + Feed feed = 1 [(google.api.field_behavior) = REQUIRED]; - // Only updates the `feed` fields indicated by this mask. + // Required. Only updates the `feed` fields indicated by this mask. // The field mask must not be empty, and it must not contain fields that // are immutable or only set by the server. - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } -// Delete asset feed request. message DeleteFeedRequest { - // The name of the feed and it must be in the format of: + // Required. The name of the feed and it must be in the format of: // projects/project_number/feeds/feed_id // folders/folder_number/feeds/feed_id // organizations/organization_number/feeds/feed_id - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Feed" + } + ]; } // Output configuration for export assets destination. @@ -251,12 +165,6 @@ message OutputConfig { oneof destination { // Destination on Cloud Storage. GcsDestination gcs_destination = 1; - - // Destination on Bigquery. The output table stores the fields in asset - // proto as columns in BigQuery. The resource/iam_policy field is converted - // to a record with each field to a column, except metadata to a single JSON - // string. - BigQueryDestination bigquery_destination = 2; } } @@ -270,40 +178,9 @@ message GcsDestination { // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) // for more information. string uri = 1; - - // The uri prefix of all generated Cloud Storage objects. For example: - // "gs://bucket_name/object_name_prefix". Each object uri is in format: - // "gs://bucket_name/object_name_prefix// and only - // contains assets for that type. starts from 0. For example: - // "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is - // the first shard of output objects containing all - // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be - // returned if file with the same name "gs://bucket_name/object_name_prefix" - // already exists. - string uri_prefix = 2; } } -// A Bigquery destination. -message BigQueryDestination { - // Required. The BigQuery dataset in format - // "projects/projectId/datasets/datasetId", to which the snapshot result - // should be exported. If this dataset does not exist, the export call returns - // an error. - string dataset = 1; - - // Required. The BigQuery table to which the snapshot result should be - // written. If this table does not exist, a new table with the given name - // will be created. - string table = 2; - - // If the destination table already exists and this flag is `TRUE`, the - // table will be overwritten by the contents of assets snapshot. If the flag - // is not set and the destination table already exists, the export call - // returns an error. - bool force = 3; -} - // A Cloud Pubsub destination. message PubsubDestination { // The name of the Cloud Pub/Sub topic to publish to. @@ -311,26 +188,6 @@ message PubsubDestination { string topic = 1; } -// Asset content type. -enum ContentType { - // Unspecified content type. - CONTENT_TYPE_UNSPECIFIED = 0; - - // Resource metadata. - RESOURCE = 1; - - // The actual IAM policy set on a resource. - IAM_POLICY = 2; - - // The IAM policy name for the IAM policy set on a resource. - IAM_POLICY_NAME = 3; - - ORG_POLICY = 4; - - // The Cloud Access context mananger Policy set on an asset. - ACCESS_POLICY = 5; -} - // Output configuration for asset feed destination. message FeedOutputConfig { // Asset feed destination. @@ -346,6 +203,14 @@ message FeedOutputConfig { // folder. Supported destinations are: // Cloud Pub/Sub topics. message Feed { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Feed" + pattern: "projects/{project}/feeds/{feed}" + pattern: "folders/{folder}/feeds/{feed}" + pattern: "organizations/{organization}/feeds/{feed}" + history: ORIGINALLY_SINGLE_PATTERN + }; + // Required. The format will be // projects/{project_number}/feeds/{client-assigned_feed_identifier} or // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or @@ -353,7 +218,7 @@ message Feed { // // The client-assigned feed identifier must be unique within the parent // project/folder/organization. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // A list of the full names of the assets to receive updates. You must specify // either or both of asset_names and asset_types. Only asset updates matching @@ -380,5 +245,17 @@ message Feed { // Required. Feed output configuration defining where the asset updates are // published to. - FeedOutputConfig feed_output_config = 5; + FeedOutputConfig feed_output_config = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Asset content type. +enum ContentType { + // Unspecified content type. + CONTENT_TYPE_UNSPECIFIED = 0; + + // Resource metadata. + RESOURCE = 1; + + // The actual IAM policy set on a resource. + IAM_POLICY = 2; } diff --git a/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto b/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto index a9cda898a..8fee229bb 100644 --- a/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto +++ b/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto @@ -74,15 +74,10 @@ message Asset { // each resource, there must be at most one Cloud IAM policy set on it. google.iam.v1.Policy iam_policy = 4; - // Cloud IAM policy name of the Cloud IAM policy set on a cloud resource. For - // each resource, there must be at most one Cloud IAM policy name associated - // with it. - bytes iam_policy_name = 5; - // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, // represented as a list of relative resource names. Ancestry path starts with - // the closest CRM ancestor and ending at a visible root. If the asset is a - // CRM project/ folder/organization, this starts from the asset itself. + // the closest CRM ancestor and ends at root. If the asset is a CRM + // project/folder/organization, this starts from the asset itself. // // Example: ["projects/123456789", "folders/5432", "organizations/1234"] repeated string ancestors = 6; @@ -128,8 +123,4 @@ message Resource { // The content of the resource, in which some sensitive fields are scrubbed // away and may not be present. google.protobuf.Struct data = 6; - - // The actual metadata content for the resource, only visible for internal - // users. - google.protobuf.Any internal_data = 7; } diff --git a/renovate.json b/renovate.json index 268a4669a..fc6412701 100644 --- a/renovate.json +++ b/renovate.json @@ -54,6 +54,13 @@ "semanticCommitType": "build", "semanticCommitScope": "deps" }, + { + "packagePatterns": [ + "^com.google.cloud:libraries-bom" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, { "packagePatterns": [ "^com.google.cloud:google-cloud-"