From b9d3bbe6d75c96178c5d747146e1a5f006f0c460 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Jun 2021 19:16:16 +0000 Subject: [PATCH] chore: release gapic-generator-java v1.0.10 (#733) Committer: @miraleung PiperOrigin-RevId: 377081269 Source-Link: https://github.com/googleapis/googleapis/commit/a5f96d06ef57e325761bad010f460d0c5dbeccda Source-Link: https://github.com/googleapis/googleapis-gen/commit/19ed6ced80e406dd4a7e2d0870c629427309d439 feat: remove v1beta1 client --- .github/.OwlBot.yaml | 1 + google-cloud-asset-bom/pom.xml | 10 - .../clirr-ignored-differences.xml | 9 + google-cloud-asset/pom.xml | 10 - .../asset/v1beta1/AssetServiceClient.java | 340 ---- .../asset/v1beta1/AssetServiceSettings.java | 213 -- .../cloud/asset/v1beta1/package-info.java | 44 - .../asset/v1beta1/stub/AssetServiceStub.java | 65 - .../stub/AssetServiceStubSettings.java | 369 ---- .../stub/GrpcAssetServiceCallableFactory.java | 118 -- .../v1beta1/stub/GrpcAssetServiceStub.java | 218 -- .../asset/v1/AssetServiceClientTest.java | 2 +- .../cloud/asset/v1/VPCServiceControlTest.java | 119 -- .../asset/v1beta1/AssetServiceClientTest.java | 184 -- .../cloud/asset/v1beta1/MockAssetService.java | 57 - .../asset/v1beta1/MockAssetServiceImpl.java | 90 - .../v1p1beta1/AssetServiceClientTest.java | 2 +- .../v1p2beta1/AssetServiceClientTest.java | 2 +- .../v1p4beta1/AssetServiceClientTest.java | 2 +- .../v1p5beta1/AssetServiceClientTest.java | 2 +- .../v1p7beta1/AssetServiceClientTest.java | 2 +- grpc-google-cloud-asset-v1beta1/pom.xml | 69 - .../cloud/asset/v1beta1/AssetServiceGrpc.java | 522 ----- pom.xml | 12 - proto-google-cloud-asset-v1beta1/pom.xml | 46 - .../com/google/cloud/asset/v1beta1/Asset.java | 1396 ------------- .../cloud/asset/v1beta1/AssetOrBuilder.java | 156 -- .../cloud/asset/v1beta1/AssetProto.java | 139 -- .../asset/v1beta1/AssetServiceProto.java | 200 -- .../v1beta1/BatchGetAssetsHistoryRequest.java | 1551 -------------- ...BatchGetAssetsHistoryRequestOrBuilder.java | 218 -- .../BatchGetAssetsHistoryResponse.java | 953 --------- ...atchGetAssetsHistoryResponseOrBuilder.java | 77 - .../cloud/asset/v1beta1/ContentType.java | 176 -- .../asset/v1beta1/ExportAssetsRequest.java | 1792 ----------------- .../v1beta1/ExportAssetsRequestOrBuilder.java | 245 --- .../asset/v1beta1/ExportAssetsResponse.java | 1022 ---------- .../ExportAssetsResponseOrBuilder.java | 98 - .../cloud/asset/v1beta1/GcsDestination.java | 1020 ---------- .../v1beta1/GcsDestinationOrBuilder.java | 99 - .../cloud/asset/v1beta1/OutputConfig.java | 834 -------- .../asset/v1beta1/OutputConfigOrBuilder.java | 62 - .../cloud/asset/v1beta1/ProjectName.java | 162 -- .../google/cloud/asset/v1beta1/Resource.java | 1752 ---------------- .../asset/v1beta1/ResourceOrBuilder.java | 224 --- .../cloud/asset/v1beta1/TemporalAsset.java | 1094 ---------- .../asset/v1beta1/TemporalAssetOrBuilder.java | 108 - .../cloud/asset/v1beta1/TimeWindow.java | 1002 --------- .../asset/v1beta1/TimeWindowOrBuilder.java | 98 - .../cloud/asset/v1beta1/asset_service.proto | 215 -- .../google/cloud/asset/v1beta1/assets.proto | 124 -- versions.txt | 2 - 52 files changed, 16 insertions(+), 17311 deletions(-) rename {proto-google-cloud-asset-v1beta1 => google-cloud-asset}/clirr-ignored-differences.xml (67%) delete mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceClient.java delete mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceSettings.java delete mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/package-info.java delete mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStub.java delete mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java delete mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceCallableFactory.java delete mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceStub.java delete mode 100644 google-cloud-asset/src/test/java/com/google/cloud/asset/v1/VPCServiceControlTest.java delete mode 100644 google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/AssetServiceClientTest.java delete mode 100644 google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetService.java delete mode 100644 google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetServiceImpl.java delete mode 100644 grpc-google-cloud-asset-v1beta1/pom.xml delete mode 100644 grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java delete mode 100644 proto-google-cloud-asset-v1beta1/pom.xml delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Asset.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetProto.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceProto.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequest.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequestOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponse.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponseOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ContentType.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequest.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequestOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponse.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponseOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestination.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestinationOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfig.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfigOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ProjectName.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Resource.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ResourceOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAsset.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAssetOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindow.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindowOrBuilder.java delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/asset_service.proto delete mode 100644 proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/assets.proto diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 2ff8ebc85..53704d289 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -23,6 +23,7 @@ deep-remove-regex: deep-preserve-regex: - "google-cloud-.*/src/test/java/com/google/cloud/.*/it" - "google-cloud-asset/src/test/java/com/google/cloud/asset/v1/VPCServiceControlTest.java" +- "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java" deep-copy-regex: - source: "/google/cloud/asset/(v.*)/.*-java/proto-google-.*/src" diff --git a/google-cloud-asset-bom/pom.xml b/google-cloud-asset-bom/pom.xml index 3f273614b..977f5f225 100644 --- a/google-cloud-asset-bom/pom.xml +++ b/google-cloud-asset-bom/pom.xml @@ -70,11 +70,6 @@ grpc-google-cloud-asset-v1 2.4.1-SNAPSHOT - - com.google.api.grpc - grpc-google-cloud-asset-v1beta1 - 0.97.1-SNAPSHOT - com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 @@ -115,11 +110,6 @@ proto-google-cloud-asset-v1p2beta1 0.97.1-SNAPSHOT - - com.google.api.grpc - proto-google-cloud-asset-v1beta1 - 0.97.1-SNAPSHOT - com.google.api.grpc proto-google-cloud-asset-v1p4beta1 diff --git a/proto-google-cloud-asset-v1beta1/clirr-ignored-differences.xml b/google-cloud-asset/clirr-ignored-differences.xml similarity index 67% rename from proto-google-cloud-asset-v1beta1/clirr-ignored-differences.xml rename to google-cloud-asset/clirr-ignored-differences.xml index 61dd57fd3..96a5b1811 100644 --- a/proto-google-cloud-asset-v1beta1/clirr-ignored-differences.xml +++ b/google-cloud-asset/clirr-ignored-differences.xml @@ -16,4 +16,13 @@ com/google/cloud/asset/v1beta1/*OrBuilder boolean has*(*) + + + 8001 + com/google/cloud/asset/v1beta1/AssetService* + + + 8001 + com/google/cloud/asset/v1beta1/stub/*AssetService* + diff --git a/google-cloud-asset/pom.xml b/google-cloud-asset/pom.xml index 15137c285..cc48af427 100644 --- a/google-cloud-asset/pom.xml +++ b/google-cloud-asset/pom.xml @@ -41,7 +41,6 @@ com.google.api.grpc proto-google-common-protos - com.google.api.grpc proto-google-cloud-asset-v1p7beta1 @@ -58,10 +57,6 @@ com.google.api.grpc proto-google-cloud-asset-v1p2beta1 - - com.google.api.grpc - proto-google-cloud-asset-v1beta1 - com.google.api.grpc proto-google-cloud-asset-v1p4beta1 @@ -123,11 +118,6 @@ grpc-google-cloud-asset-v1p7beta1 test - - com.google.api.grpc - grpc-google-cloud-asset-v1beta1 - test - com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceClient.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceClient.java deleted file mode 100644 index e1bb46b5d..000000000 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceClient.java +++ /dev/null @@ -1,340 +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. - */ -package com.google.cloud.asset.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1beta1.stub.AssetServiceStub; -import com.google.cloud.asset.v1beta1.stub.AssetServiceStubSettings; -import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND SERVICE -/** - * Service Description: Asset service definition. - * - *

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

- * 
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   String parent = "";
- *   BatchGetAssetsHistoryRequest request = BatchGetAssetsHistoryRequest.newBuilder()
- *     .setParent(parent.toString())
- *     .build();
- *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
- * }
- * 
- * 
- * - *

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

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

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

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

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

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

To customize credentials: - * - *

- * 
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AssetServiceClient assetServiceClient =
- *     AssetServiceClient.create(assetServiceSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AssetServiceClient assetServiceClient =
- *     AssetServiceClient.create(assetServiceSettings);
- * 
- * 
- * - * @deprecated The v1beta1 endpoint was turned down 2020-09-28. - */ -@Deprecated -@Generated("by gapic-generator") -@BetaApi -public class AssetServiceClient implements BackgroundResource { - private final AssetServiceSettings settings; - private final AssetServiceStub stub; - private final OperationsClient operationsClient; - - /** Constructs an instance of AssetServiceClient with default settings. */ - public static final AssetServiceClient create() throws IOException { - return create(AssetServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { - return new AssetServiceClient(settings); - } - - /** - * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer to use AssetServiceSettings}. - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final AssetServiceClient create(AssetServiceStub stub) { - return new AssetServiceClient(stub); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected AssetServiceClient(AssetServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - protected AssetServiceClient(AssetServiceStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - public final AssetServiceSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public AssetServiceStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * 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.toString())
-   *     .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.toString())
-   *     .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.toString())
-   *     .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. If a specified asset does not exist, this API returns an - * INVALID_ARGUMENT error. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "";
-   *   BatchGetAssetsHistoryRequest request = BatchGetAssetsHistoryRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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. If a specified asset does not exist, this API returns an - * INVALID_ARGUMENT error. - * - *

Sample code: - * - *


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

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

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

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

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

- * 
- * AssetServiceSettings.Builder assetServiceSettingsBuilder =
- *     AssetServiceSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .batchGetAssetsHistorySettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.batchGetAssetsHistorySettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * 
- * 
- * - * @deprecated The v1beta1 endpoint was turned down 2020-09-28. - */ -@Deprecated -@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(); - } - - public static final AssetServiceSettings create(AssetServiceStubSettings stub) - throws IOException { - return new AssetServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return AssetServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return AssetServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return AssetServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return AssetServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for AssetServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - protected Builder() throws IOException { - this((ClientContext) null); - } - - protected Builder(ClientContext clientContext) { - super(AssetServiceStubSettings.newBuilder(clientContext)); - } - - private static Builder createDefault() { - return new Builder(AssetServiceStubSettings.newBuilder()); - } - - protected Builder(AssetServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AssetServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public AssetServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AssetServiceStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to 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(); - } - - @Override - public AssetServiceSettings build() throws IOException { - return new AssetServiceSettings(this); - } - } -} diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/package-info.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/package-info.java deleted file mode 100644 index 99ea1b850..000000000 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/package-info.java +++ /dev/null @@ -1,44 +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. - */ - -/** - * A client to Cloud Asset API. - * - *

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

================== AssetServiceClient ================== - * - *

Service Description: Asset service definition. - * - *

Sample for AssetServiceClient: - * - *

- * 
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   String parent = "";
- *   BatchGetAssetsHistoryRequest request = BatchGetAssetsHistoryRequest.newBuilder()
- *     .setParent(parent.toString())
- *     .build();
- *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
- * }
- * 
- * 
- */ -@Deprecated -@Generated("by gapic-generator") -package com.google.cloud.asset.v1beta1; - -import javax.annotation.Generated; diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStub.java deleted file mode 100644 index bac235ed0..000000000 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStub.java +++ /dev/null @@ -1,65 +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. - */ -package com.google.cloud.asset.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; -import com.google.cloud.asset.v1beta1.ExportAssetsRequest; -import com.google.cloud.asset.v1beta1.ExportAssetsResponse; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * Base stub class for Cloud Asset API. - * - *

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

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

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

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

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

- * 
- * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
- *     AssetServiceStubSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .batchGetAssetsHistorySettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.batchGetAssetsHistorySettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * 
- * 
- * - * @deprecated The v1beta1 endpoint was turned down 2020-09-28. - */ -@Deprecated -@Generated("by gapic-generator") -@BetaApi -public class AssetServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings exportAssetsSettings; - private final OperationCallSettings< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings; - private final UnaryCallSettings - batchGetAssetsHistorySettings; - - /** 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; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public AssetServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAssetServiceStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); - } - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "cloudasset.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - exportAssetsSettings = settingsBuilder.exportAssetsSettings().build(); - exportAssetsOperationSettings = settingsBuilder.exportAssetsOperationSettings().build(); - batchGetAssetsHistorySettings = settingsBuilder.batchGetAssetsHistorySettings().build(); - } - - /** Builder for AssetServiceStubSettings. */ - 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 static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_1_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this((ClientContext) null); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - exportAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - exportAssetsOperationSettings = OperationCallSettings.newBuilder(); - - batchGetAssetsHistorySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - exportAssetsSettings, batchGetAssetsHistorySettings); - - initDefaults(this); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - builder - .exportAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchGetAssetsHistorySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - builder - .exportAssetsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(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; - } - - protected Builder(AssetServiceStubSettings settings) { - super(settings); - - exportAssetsSettings = settings.exportAssetsSettings.toBuilder(); - exportAssetsOperationSettings = settings.exportAssetsOperationSettings.toBuilder(); - batchGetAssetsHistorySettings = settings.batchGetAssetsHistorySettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - exportAssetsSettings, batchGetAssetsHistorySettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to 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; - } - - @Override - public AssetServiceStubSettings build() throws IOException { - return new AssetServiceStubSettings(this); - } - } -} diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceCallableFactory.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceCallableFactory.java deleted file mode 100644 index 7e234e579..000000000 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceCallableFactory.java +++ /dev/null @@ -1,118 +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. - */ -package com.google.cloud.asset.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Asset API. - * - *

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

This class is for advanced usage and reflects the underlying API directly. - * - * @deprecated The v1beta1 endpoint was turned down 2020-09-28. - */ -@Deprecated -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public class GrpcAssetServiceStub extends AssetServiceStub { - - private static final MethodDescriptor - exportAssetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1beta1.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.v1beta1.AssetService/BatchGetAssetsHistory") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchGetAssetsHistoryRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchGetAssetsHistoryResponse.getDefaultInstance())) - .build(); - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - private final UnaryCallable exportAssetsCallable; - private final OperationCallable - exportAssetsOperationCallable; - private final UnaryCallable - batchGetAssetsHistoryCallable; - - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { - return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAssetServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAssetServiceStub( - AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings 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(); - - 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); - - 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; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java index 331ea92d8..095c7940b 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 @@ -54,10 +54,10 @@ @Generated("by gapic-generator-java") public class AssetServiceClientTest { + private static MockAssetService mockAssetService; private static MockServiceHelper mockServiceHelper; private AssetServiceClient client; private LocalChannelProvider channelProvider; - private static MockAssetService mockAssetService; @BeforeClass public static void startStaticServer() { diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/VPCServiceControlTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/VPCServiceControlTest.java deleted file mode 100644 index f3e5bdb92..000000000 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/VPCServiceControlTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.asset.v1; - -import com.google.api.*; -import com.google.protobuf.*; -import org.junit.Assert; -import org.junit.Assume; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by Google") -public class VPCServiceControlTest { - private static void doTest(boolean rejectedInside, boolean rejectedOutside) { - if ((IS_INSIDE_VPCSC != null) && (IS_INSIDE_VPCSC.equalsIgnoreCase("true"))) { - Assert.assertTrue(!rejectedInside); - Assert.assertTrue(rejectedOutside); - } else { - Assert.assertTrue(rejectedInside); - Assert.assertTrue(!rejectedOutside); - } - } - - static final String PROJECT_OUTSIDE = - System.getenv("GOOGLE_CLOUD_TESTS_VPCSC_OUTSIDE_PERIMETER_PROJECT"); - static final String PROJECT_INSIDE = System.getenv("PROJECT_ID"); - static final String IS_INSIDE_VPCSC = System.getenv("GOOGLE_CLOUD_TESTS_IN_VPCSC"); - - @BeforeClass - public static void setUpClass() { - Assume.assumeTrue( - "GOOGLE_CLOUD_TESTS_VPCSC_OUTSIDE_PERIMETER_PROJECT environment variable needs to be set to a GCP project that is outside the VPC perimeter", - PROJECT_OUTSIDE != null && !PROJECT_OUTSIDE.isEmpty()); - Assume.assumeTrue( - "PROJECT_ID environment variable needs to be set to a GCP project that is inside the VPC perimeter", - PROJECT_INSIDE != null && !PROJECT_INSIDE.isEmpty()); - } - - @Test - @SuppressWarnings("all") - public void exportAssetsTest() throws Exception { - final AssetServiceClient client = AssetServiceClient.create(); - final OutputConfig outputConfig = OutputConfig.newBuilder().build(); - final ProjectName nameInside = ProjectName.of(PROJECT_INSIDE); - final ExportAssetsRequest requestInside = - ExportAssetsRequest.newBuilder() - .setParent(nameInside.toString()) - .setOutputConfig(outputConfig) - .build(); - boolean rejectedInside = false; - try { - ExportAssetsResponse response = client.exportAssetsAsync(requestInside).get(); - } catch (Exception e) { - rejectedInside = e.getMessage().contains("Request is prohibited by organization's policy"); - } - final ProjectName nameOutside = ProjectName.of(PROJECT_OUTSIDE); - final ExportAssetsRequest requestOutside = - ExportAssetsRequest.newBuilder() - .setParent(nameOutside.toString()) - .setOutputConfig(outputConfig) - .build(); - boolean rejectedOutside = false; - try { - ExportAssetsResponse response = client.exportAssetsAsync(requestOutside).get(); - } catch (Exception e) { - rejectedOutside = e.getMessage().contains("Request is prohibited by organization's policy"); - } - doTest(rejectedInside, rejectedOutside); - client.close(); - } - - @Test - @SuppressWarnings("all") - public void batchGetAssetsHistoryTest() throws Exception { - final AssetServiceClient client = AssetServiceClient.create(); - final TimeWindow readTimeWindow = TimeWindow.newBuilder().build(); - final ProjectName nameInside = ProjectName.of(PROJECT_INSIDE); - final BatchGetAssetsHistoryRequest requestInside = - BatchGetAssetsHistoryRequest.newBuilder() - .setParent(nameInside.toString()) - .setReadTimeWindow(readTimeWindow) - .build(); - boolean rejectedInside = false; - try { - BatchGetAssetsHistoryResponse response = client.batchGetAssetsHistory(requestInside); - } catch (Exception e) { - rejectedInside = e.getMessage().contains("Request is prohibited by organization's policy"); - } - - final ProjectName nameOutside = ProjectName.of(PROJECT_OUTSIDE); - final BatchGetAssetsHistoryRequest requestOutside = - BatchGetAssetsHistoryRequest.newBuilder() - .setParent(nameOutside.toString()) - .setReadTimeWindow(readTimeWindow) - .build(); - boolean rejectedOutside = false; - try { - BatchGetAssetsHistoryResponse response = client.batchGetAssetsHistory(requestOutside); - } catch (Exception e) { - rejectedOutside = e.getMessage().contains("Request is prohibited by organization's policy"); - } - doTest(rejectedInside, rejectedOutside); - client.close(); - } -} 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 deleted file mode 100644 index 164f52be1..000000000 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/AssetServiceClientTest.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. - */ -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.Objects; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class AssetServiceClientTest { - private static MockAssetService mockAssetService; - private static MockServiceHelper serviceHelper; - private AssetServiceClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAssetService = new MockAssetService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - AssetServiceSettings settings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void exportAssetsTest() throws Exception { - ExportAssetsResponse expectedResponse = ExportAssetsResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportAssetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAssetService.addResponse(resultOperation); - - String parent = "parent-995424086"; - 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(Objects.toString(parent), Objects.toString(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 { - String parent = "parent-995424086"; - 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); - - String parent = "parent-995424086"; - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder().setParent(parent.toString()).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(Objects.toString(parent), Objects.toString(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"; - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder().setParent(parent.toString()).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/v1beta1/MockAssetService.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetService.java deleted file mode 100644 index 88d3dc28d..000000000 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetService.java +++ /dev/null @@ -1,57 +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. - */ -package com.google.cloud.asset.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -public class MockAssetService implements MockGrpcService { - private final MockAssetServiceImpl serviceImpl; - - public MockAssetService() { - serviceImpl = new MockAssetServiceImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetServiceImpl.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetServiceImpl.java deleted file mode 100644 index 692d9b006..000000000 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetServiceImpl.java +++ /dev/null @@ -1,90 +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. - */ -package com.google.cloud.asset.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.asset.v1beta1.AssetServiceGrpc.AssetServiceImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -public class MockAssetServiceImpl extends AssetServiceImplBase { - private List requests; - private Queue responses; - - public MockAssetServiceImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void 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")); - } - } -} 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 7aae7d676..9a8354277 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 @@ -44,10 +44,10 @@ @Generated("by gapic-generator-java") public class AssetServiceClientTest { + private static MockAssetService mockAssetService; private static MockServiceHelper mockServiceHelper; private AssetServiceClient client; private LocalChannelProvider channelProvider; - private static MockAssetService mockAssetService; @BeforeClass public static void startStaticServer() { 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 661cb542a..827969f47 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 @@ -41,10 +41,10 @@ @Generated("by gapic-generator-java") public class AssetServiceClientTest { + private static MockAssetService mockAssetService; private static MockServiceHelper mockServiceHelper; private AssetServiceClient client; private LocalChannelProvider channelProvider; - private static MockAssetService mockAssetService; @BeforeClass public static void startStaticServer() { diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/AssetServiceClientTest.java index bc02f6ef2..cf95e99b0 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/AssetServiceClientTest.java @@ -44,10 +44,10 @@ @Generated("by gapic-generator-java") public class AssetServiceClientTest { + private static MockAssetService mockAssetService; private static MockServiceHelper mockServiceHelper; private AssetServiceClient client; private LocalChannelProvider channelProvider; - private static MockAssetService mockAssetService; @BeforeClass public static void startStaticServer() { diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java index 862e7c0d1..4b7bc8c67 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java @@ -44,10 +44,10 @@ @Generated("by gapic-generator-java") public class AssetServiceClientTest { + private static MockAssetService mockAssetService; private static MockServiceHelper mockServiceHelper; private AssetServiceClient client; private LocalChannelProvider channelProvider; - private static MockAssetService mockAssetService; @BeforeClass public static void startStaticServer() { diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java index f9afc9fa1..69edc0675 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java @@ -45,10 +45,10 @@ @Generated("by gapic-generator-java") public class AssetServiceClientTest { + private static MockAssetService mockAssetService; private static MockServiceHelper mockServiceHelper; private AssetServiceClient client; private LocalChannelProvider channelProvider; - private static MockAssetService mockAssetService; @BeforeClass public static void startStaticServer() { diff --git a/grpc-google-cloud-asset-v1beta1/pom.xml b/grpc-google-cloud-asset-v1beta1/pom.xml deleted file mode 100644 index 1e9c3f656..000000000 --- a/grpc-google-cloud-asset-v1beta1/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-asset-v1beta1 - 0.97.1-SNAPSHOT - grpc-google-cloud-asset-v1beta1 - GRPC library for grpc-google-cloud-asset-v1beta1 - - com.google.cloud - google-cloud-asset-parent - 2.4.1-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-cloud-asset-v1beta1 - - - com.google.api.grpc - proto-google-common-protos - - - com.google.guava - guava - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java b/grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java deleted file mode 100644 index 4005e04cc..000000000 --- a/grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java +++ /dev/null @@ -1,522 +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. - */ -package com.google.cloud.asset.v1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * Asset service definition.
- * 
- * - * @deprecated The v1beta1 endpoint was turned down 2020-09-28. - */ -@Deprecated -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/asset/v1beta1/asset_service.proto") -public final class AssetServiceGrpc { - - private AssetServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.asset.v1beta1.AssetService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.asset.v1beta1.ExportAssetsRequest, com.google.longrunning.Operation> - getExportAssetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ExportAssets", - requestType = com.google.cloud.asset.v1beta1.ExportAssetsRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1beta1.ExportAssetsRequest, com.google.longrunning.Operation> - getExportAssetsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.asset.v1beta1.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(SERVICE_NAME, "ExportAssets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1beta1.ExportAssetsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ExportAssets")) - .build(); - } - } - } - return getExportAssetsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse> - getBatchGetAssetsHistoryMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchGetAssetsHistory", - requestType = com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.class, - responseType = com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse> - getBatchGetAssetsHistoryMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1beta1.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(SERVICE_NAME, "BatchGetAssetsHistory")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AssetServiceMethodDescriptorSupplier("BatchGetAssetsHistory")) - .build(); - } - } - } - return getBatchGetAssetsHistoryMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static AssetServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AssetServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceStub(channel, callOptions); - } - }; - return AssetServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static AssetServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AssetServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceBlockingStub(channel, callOptions); - } - }; - return AssetServiceBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static AssetServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AssetServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceFutureStub(channel, callOptions); - } - }; - return AssetServiceFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Asset service definition.
-   * 
- */ - 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.v1beta1.ExportAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getExportAssetsMethod(), 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.
-     * If a specified asset does not exist, this API returns an INVALID_ARGUMENT
-     * error.
-     * 
- */ - public void batchGetAssetsHistory( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getBatchGetAssetsHistoryMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getExportAssetsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1beta1.ExportAssetsRequest, - com.google.longrunning.Operation>(this, METHODID_EXPORT_ASSETS))) - .addMethod( - getBatchGetAssetsHistoryMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse>( - this, METHODID_BATCH_GET_ASSETS_HISTORY))) - .build(); - } - } - - /** - * - * - *
-   * Asset service definition.
-   * 
- */ - public static final class AssetServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private AssetServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AssetServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * 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.v1beta1.ExportAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getExportAssetsMethod(), 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.
-     * If a specified asset does not exist, this API returns an INVALID_ARGUMENT
-     * error.
-     * 
- */ - public void batchGetAssetsHistory( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getBatchGetAssetsHistoryMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Asset service definition.
-   * 
- */ - public static final class AssetServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private AssetServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AssetServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * 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.v1beta1.ExportAssetsRequest request) { - return blockingUnaryCall(getChannel(), getExportAssetsMethod(), 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.
-     * If a specified asset does not exist, this API returns an INVALID_ARGUMENT
-     * error.
-     * 
- */ - public com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse batchGetAssetsHistory( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest request) { - return blockingUnaryCall( - getChannel(), getBatchGetAssetsHistoryMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Asset service definition.
-   * 
- */ - public static final class AssetServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private AssetServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AssetServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AssetServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * 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.v1beta1.ExportAssetsRequest request) { - return futureUnaryCall( - getChannel().newCall(getExportAssetsMethod(), 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.
-     * If a specified asset does not exist, this API returns an INVALID_ARGUMENT
-     * error.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse> - batchGetAssetsHistory(com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest request) { - return futureUnaryCall( - getChannel().newCall(getBatchGetAssetsHistoryMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_EXPORT_ASSETS = 0; - private static final int METHODID_BATCH_GET_ASSETS_HISTORY = 1; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AssetServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AssetServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_EXPORT_ASSETS: - serviceImpl.exportAssets( - (com.google.cloud.asset.v1beta1.ExportAssetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_GET_ASSETS_HISTORY: - serviceImpl.batchGetAssetsHistory( - (com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse>) - responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class AssetServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - AssetServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("AssetService"); - } - } - - private static final class AssetServiceFileDescriptorSupplier - extends AssetServiceBaseDescriptorSupplier { - AssetServiceFileDescriptorSupplier() {} - } - - private static final class AssetServiceMethodDescriptorSupplier - extends AssetServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - AssetServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (AssetServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) - .addMethod(getExportAssetsMethod()) - .addMethod(getBatchGetAssetsHistoryMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/pom.xml b/pom.xml index 3ef28fc78..6e3bebaa2 100644 --- a/pom.xml +++ b/pom.xml @@ -92,11 +92,6 @@ proto-google-cloud-asset-v1p2beta1 0.97.1-SNAPSHOT - - com.google.api.grpc - proto-google-cloud-asset-v1beta1 - 0.97.1-SNAPSHOT - com.google.api.grpc proto-google-cloud-asset-v1p4beta1 @@ -112,11 +107,6 @@ grpc-google-cloud-asset-v1 2.4.1-SNAPSHOT - - com.google.api.grpc - grpc-google-cloud-asset-v1beta1 - 0.97.1-SNAPSHOT - com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 @@ -213,7 +203,6 @@ google-cloud-asset grpc-google-cloud-asset-v1 - grpc-google-cloud-asset-v1beta1 grpc-google-cloud-asset-v1p1beta1 grpc-google-cloud-asset-v1p2beta1 grpc-google-cloud-asset-v1p4beta1 @@ -222,7 +211,6 @@ proto-google-cloud-asset-v1 proto-google-cloud-asset-v1p1beta1 proto-google-cloud-asset-v1p2beta1 - proto-google-cloud-asset-v1beta1 proto-google-cloud-asset-v1p4beta1 proto-google-cloud-asset-v1p5beta1 proto-google-cloud-asset-v1p7beta1 diff --git a/proto-google-cloud-asset-v1beta1/pom.xml b/proto-google-cloud-asset-v1beta1/pom.xml deleted file mode 100644 index 8629b1f3e..000000000 --- a/proto-google-cloud-asset-v1beta1/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-asset-v1beta1 - 0.97.1-SNAPSHOT - proto-google-cloud-asset-v1beta1 - PROTO library for proto-google-cloud-asset-v1beta1 - - com.google.cloud - google-cloud-asset-parent - 2.4.1-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api - api-common - - - com.google.guava - guava - - - com.google.api.grpc - proto-google-iam-v1 - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Asset.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Asset.java deleted file mode 100644 index c50784ffc..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Asset.java +++ /dev/null @@ -1,1396 +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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * Cloud asset. This includes all Google Cloud Platform resources,
- * Cloud IAM policies, and other non-GCP assets.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.Asset} - */ -public final class Asset extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.Asset) - AssetOrBuilder { - private static final long serialVersionUID = 0L; - // Use Asset.newBuilder() to construct. - private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Asset() { - name_ = ""; - assetType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Asset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Asset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: - { - com.google.cloud.asset.v1beta1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = - input.readMessage( - com.google.cloud.asset.v1beta1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = 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.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.Asset.class, - com.google.cloud.asset.v1beta1.Asset.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - * - * - *
-   * Type of the asset. Example: "google.compute.Disk".
-   * 
- * - * string asset_type = 2; - * - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - * - * - *
-   * Type of the asset. Example: "google.compute.Disk".
-   * 
- * - * string asset_type = 2; - * - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1beta1.Resource resource_; - /** - * - * - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - * - * @return Whether the resource field is set. - */ - @java.lang.Override - public boolean hasResource() { - return resource_ != null; - } - /** - * - * - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - * - * @return The resource. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.Resource getResource() { - return resource_ == null - ? com.google.cloud.asset.v1beta1.Resource.getDefaultInstance() - : resource_; - } - /** - * - * - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.ResourceOrBuilder getResourceOrBuilder() { - return getResource(); - } - - public static final int IAM_POLICY_FIELD_NUMBER = 4; - private com.google.iam.v1.Policy iamPolicy_; - /** - * - * - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * - * @return Whether the iamPolicy field is set. - */ - @java.lang.Override - public boolean hasIamPolicy() { - return iamPolicy_ != null; - } - /** - * - * - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * - * @return The iamPolicy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getIamPolicy() { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - /** - * - * - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - return getIamPolicy(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getAssetTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - if (resource_ != null) { - output.writeMessage(3, getResource()); - } - if (iamPolicy_ != null) { - output.writeMessage(4, getIamPolicy()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getAssetTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - if (resource_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getResource()); - } - if (iamPolicy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getIamPolicy()); - } - 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.v1beta1.Asset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.Asset other = (com.google.cloud.asset.v1beta1.Asset) obj; - - if (!getName().equals(other.getName())) return false; - if (!getAssetType().equals(other.getAssetType())) return false; - if (hasResource() != other.hasResource()) return false; - if (hasResource()) { - if (!getResource().equals(other.getResource())) return false; - } - if (hasIamPolicy() != other.hasIamPolicy()) return false; - if (hasIamPolicy()) { - if (!getIamPolicy().equals(other.getIamPolicy())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - if (hasResource()) { - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - } - if (hasIamPolicy()) { - hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getIamPolicy().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1beta1.Asset parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.Asset 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.v1beta1.Asset parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.Asset 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.v1beta1.Asset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.Asset parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.Asset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.Asset 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.v1beta1.Asset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.Asset 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.v1beta1.Asset parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.Asset 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.v1beta1.Asset 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; - } - /** - * - * - *
-   * Cloud asset. This includes all Google Cloud Platform resources,
-   * Cloud IAM policies, and other non-GCP assets.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.Asset} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.Asset) - com.google.cloud.asset.v1beta1.AssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.Asset.class, - com.google.cloud.asset.v1beta1.Asset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.Asset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - assetType_ = ""; - - if (resourceBuilder_ == null) { - resource_ = null; - } else { - resource_ = null; - resourceBuilder_ = null; - } - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Asset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.Asset getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.Asset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.Asset build() { - com.google.cloud.asset.v1beta1.Asset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.Asset buildPartial() { - com.google.cloud.asset.v1beta1.Asset result = new com.google.cloud.asset.v1beta1.Asset(this); - result.name_ = name_; - result.assetType_ = assetType_; - if (resourceBuilder_ == null) { - result.resource_ = resource_; - } else { - result.resource_ = resourceBuilder_.build(); - } - if (iamPolicyBuilder_ == null) { - result.iamPolicy_ = iamPolicy_; - } else { - result.iamPolicy_ = iamPolicyBuilder_.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.v1beta1.Asset) { - return mergeFrom((com.google.cloud.asset.v1beta1.Asset) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.Asset other) { - if (other == com.google.cloud.asset.v1beta1.Asset.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (other.hasResource()) { - mergeResource(other.getResource()); - } - if (other.hasIamPolicy()) { - mergeIamPolicy(other.getIamPolicy()); - } - 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.v1beta1.Asset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1beta1.Asset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - * - * - *
-     * Type of the asset. Example: "google.compute.Disk".
-     * 
- * - * string asset_type = 2; - * - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Type of the asset. Example: "google.compute.Disk".
-     * 
- * - * string asset_type = 2; - * - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Type of the asset. Example: "google.compute.Disk".
-     * 
- * - * string asset_type = 2; - * - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Type of the asset. Example: "google.compute.Disk".
-     * 
- * - * string asset_type = 2; - * - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Type of the asset. Example: "google.compute.Disk".
-     * 
- * - * string asset_type = 2; - * - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1beta1.Resource resource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.Resource, - com.google.cloud.asset.v1beta1.Resource.Builder, - com.google.cloud.asset.v1beta1.ResourceOrBuilder> - resourceBuilder_; - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - * - * @return Whether the resource field is set. - */ - public boolean hasResource() { - return resourceBuilder_ != null || resource_ != null; - } - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - * - * @return The resource. - */ - public com.google.cloud.asset.v1beta1.Resource getResource() { - if (resourceBuilder_ == null) { - return resource_ == null - ? com.google.cloud.asset.v1beta1.Resource.getDefaultInstance() - : resource_; - } else { - return resourceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - public Builder setResource(com.google.cloud.asset.v1beta1.Resource value) { - if (resourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resource_ = value; - onChanged(); - } else { - resourceBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - public Builder setResource(com.google.cloud.asset.v1beta1.Resource.Builder builderForValue) { - if (resourceBuilder_ == null) { - resource_ = builderForValue.build(); - onChanged(); - } else { - resourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - public Builder mergeResource(com.google.cloud.asset.v1beta1.Resource value) { - if (resourceBuilder_ == null) { - if (resource_ != null) { - resource_ = - com.google.cloud.asset.v1beta1.Resource.newBuilder(resource_) - .mergeFrom(value) - .buildPartial(); - } else { - resource_ = value; - } - onChanged(); - } else { - resourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - public Builder clearResource() { - if (resourceBuilder_ == null) { - resource_ = null; - onChanged(); - } else { - resource_ = null; - resourceBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - public com.google.cloud.asset.v1beta1.Resource.Builder getResourceBuilder() { - - onChanged(); - return getResourceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - public com.google.cloud.asset.v1beta1.ResourceOrBuilder getResourceOrBuilder() { - if (resourceBuilder_ != null) { - return resourceBuilder_.getMessageOrBuilder(); - } else { - return resource_ == null - ? com.google.cloud.asset.v1beta1.Resource.getDefaultInstance() - : resource_; - } - } - /** - * - * - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.Resource, - com.google.cloud.asset.v1beta1.Resource.Builder, - com.google.cloud.asset.v1beta1.ResourceOrBuilder> - getResourceFieldBuilder() { - if (resourceBuilder_ == null) { - resourceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.Resource, - com.google.cloud.asset.v1beta1.Resource.Builder, - com.google.cloud.asset.v1beta1.ResourceOrBuilder>( - getResource(), getParentForChildren(), isClean()); - resource_ = null; - } - return resourceBuilder_; - } - - private com.google.iam.v1.Policy iamPolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, - com.google.iam.v1.Policy.Builder, - com.google.iam.v1.PolicyOrBuilder> - iamPolicyBuilder_; - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * - * @return Whether the iamPolicy field is set. - */ - public boolean hasIamPolicy() { - return iamPolicyBuilder_ != null || iamPolicy_ != null; - } - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * - * @return The iamPolicy. - */ - public com.google.iam.v1.Policy getIamPolicy() { - if (iamPolicyBuilder_ == null) { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } else { - return iamPolicyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - iamPolicy_ = value; - onChanged(); - } else { - iamPolicyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy(com.google.iam.v1.Policy.Builder builderForValue) { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = builderForValue.build(); - onChanged(); - } else { - iamPolicyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (iamPolicy_ != null) { - iamPolicy_ = - com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); - } else { - iamPolicy_ = value; - } - onChanged(); - } else { - iamPolicyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder clearIamPolicy() { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - onChanged(); - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { - - onChanged(); - return getIamPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - if (iamPolicyBuilder_ != null) { - return iamPolicyBuilder_.getMessageOrBuilder(); - } else { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - } - /** - * - * - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, - com.google.iam.v1.Policy.Builder, - com.google.iam.v1.PolicyOrBuilder> - getIamPolicyFieldBuilder() { - if (iamPolicyBuilder_ == null) { - iamPolicyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, - com.google.iam.v1.Policy.Builder, - com.google.iam.v1.PolicyOrBuilder>( - getIamPolicy(), getParentForChildren(), isClean()); - iamPolicy_ = null; - } - return iamPolicyBuilder_; - } - - @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.v1beta1.Asset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.Asset) - private static final com.google.cloud.asset.v1beta1.Asset DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.Asset(); - } - - public static com.google.cloud.asset.v1beta1.Asset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Asset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(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.v1beta1.Asset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetOrBuilder.java deleted file mode 100644 index 9acb3a21f..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetOrBuilder.java +++ /dev/null @@ -1,156 +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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -public interface AssetOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.Asset) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Type of the asset. Example: "google.compute.Disk".
-   * 
- * - * string asset_type = 2; - * - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - * - * - *
-   * Type of the asset. Example: "google.compute.Disk".
-   * 
- * - * string asset_type = 2; - * - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString getAssetTypeBytes(); - - /** - * - * - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - * - * @return Whether the resource field is set. - */ - boolean hasResource(); - /** - * - * - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - * - * @return The resource. - */ - com.google.cloud.asset.v1beta1.Resource getResource(); - /** - * - * - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1beta1.Resource resource = 3; - */ - com.google.cloud.asset.v1beta1.ResourceOrBuilder getResourceOrBuilder(); - - /** - * - * - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * - * @return Whether the iamPolicy field is set. - */ - boolean hasIamPolicy(); - /** - * - * - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * - * @return The iamPolicy. - */ - com.google.iam.v1.Policy getIamPolicy(); - /** - * - * - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetProto.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetProto.java deleted file mode 100644 index 8244ae3f2..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetProto.java +++ /dev/null @@ -1,139 +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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -public final class AssetProto { - private AssetProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_TemporalAsset_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_TemporalAsset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_TimeWindow_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_TimeWindow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_Asset_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_Asset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_Resource_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_Resource_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\'google/cloud/asset/v1beta1/assets.prot" - + "o\022\032google.cloud.asset.v1beta1\032\034google/ap" - + "i/annotations.proto\032\031google/api/resource" - + ".proto\032\032google/iam/v1/policy.proto\032\031goog" - + "le/protobuf/any.proto\032\034google/protobuf/s" - + "truct.proto\032\037google/protobuf/timestamp.p" - + "roto\"\212\001\n\rTemporalAsset\0226\n\006window\030\001 \001(\0132&" - + ".google.cloud.asset.v1beta1.TimeWindow\022\017" - + "\n\007deleted\030\002 \001(\010\0220\n\005asset\030\003 \001(\0132!.google." - + "cloud.asset.v1beta1.Asset\"j\n\nTimeWindow\022" - + ".\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Ti" - + "mestamp\022,\n\010end_time\030\002 \001(\0132\032.google.proto" - + "buf.Timestamp\"\265\001\n\005Asset\022\014\n\004name\030\001 \001(\t\022\022\n" - + "\nasset_type\030\002 \001(\t\0226\n\010resource\030\003 \001(\0132$.go" - + "ogle.cloud.asset.v1beta1.Resource\022)\n\niam" - + "_policy\030\004 \001(\0132\025.google.iam.v1.Policy:\'\352A" - + "$\n\037cloudasset.googleapis.com/Asset\022\001*\"\240\001" - + "\n\010Resource\022\017\n\007version\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\014resource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(" - + "\t\022%\n\004data\030\006 \001(\0132\027.google.protobuf.Struct" - + "B\254\001\n\036com.google.cloud.asset.v1beta1B\nAss" - + "etProtoP\001Z?google.golang.org/genproto/go" - + "ogleapis/cloud/asset/v1beta1;asset\370\001\001\252\002\032" - + "Google.Cloud.Asset.V1Beta1\312\002\032Google\\Clou" - + "d\\Asset\\V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.iam.v1.PolicyProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1beta1_TemporalAsset_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1beta1_TemporalAsset_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_TemporalAsset_descriptor, - new java.lang.String[] { - "Window", "Deleted", "Asset", - }); - internal_static_google_cloud_asset_v1beta1_TimeWindow_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1beta1_TimeWindow_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_TimeWindow_descriptor, - new java.lang.String[] { - "StartTime", "EndTime", - }); - internal_static_google_cloud_asset_v1beta1_Asset_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1beta1_Asset_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_Asset_descriptor, - new java.lang.String[] { - "Name", "AssetType", "Resource", "IamPolicy", - }); - internal_static_google_cloud_asset_v1beta1_Resource_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1beta1_Resource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_Resource_descriptor, - new java.lang.String[] { - "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceProto.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceProto.java deleted file mode 100644 index e7dab8b80..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceProto.java +++ /dev/null @@ -1,200 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -public final class AssetServiceProto { - private AssetServiceProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_OutputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1beta1_GcsDestination_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1beta1_GcsDestination_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n.google/cloud/asset/v1beta1/asset_servi" - + "ce.proto\022\032google.cloud.asset.v1beta1\032\034go" - + "ogle/api/annotations.proto\032\027google/api/c" - + "lient.proto\032\037google/api/field_behavior.p" - + "roto\032\031google/api/resource.proto\032\'google/" - + "cloud/asset/v1beta1/assets.proto\032#google" - + "/longrunning/operations.proto\032\037google/pr" - + "otobuf/timestamp.proto\"\227\002\n\023ExportAssetsR" - + "equest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudass" - + "et.googleapis.com/Asset\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\'.goog" - + "le.cloud.asset.v1beta1.ContentType\022D\n\rou" - + "tput_config\030\005 \001(\0132(.google.cloud.asset.v" - + "1beta1.OutputConfigB\003\340A\002\"\206\001\n\024ExportAsset" - + "sResponse\022-\n\tread_time\030\001 \001(\0132\032.google.pr" - + "otobuf.Timestamp\022?\n\routput_config\030\002 \001(\0132" - + "(.google.cloud.asset.v1beta1.OutputConfi" - + "g\"\367\001\n\034BatchGetAssetsHistoryRequest\0227\n\006pa" - + "rent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.googleapi" - + "s.com/Asset\022\023\n\013asset_names\030\002 \003(\t\022B\n\014cont" - + "ent_type\030\003 \001(\0162\'.google.cloud.asset.v1be" - + "ta1.ContentTypeB\003\340A\001\022E\n\020read_time_window" - + "\030\004 \001(\0132&.google.cloud.asset.v1beta1.Time" - + "WindowB\003\340A\001\"Z\n\035BatchGetAssetsHistoryResp" - + "onse\0229\n\006assets\030\001 \003(\0132).google.cloud.asse" - + "t.v1beta1.TemporalAsset\"d\n\014OutputConfig\022" - + "E\n\017gcs_destination\030\001 \001(\0132*.google.cloud." - + "asset.v1beta1.GcsDestinationH\000B\r\n\013destin" - + "ation\"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*I\n\013Co" - + "ntentType\022\034\n\030CONTENT_TYPE_UNSPECIFIED\020\000\022" - + "\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY\020\0022\304\005\n\014AssetS" - + "ervice\022\336\002\n\014ExportAssets\022/.google.cloud.a" - + "sset.v1beta1.ExportAssetsRequest\032\035.googl" - + "e.longrunning.Operation\"\375\001\202\323\344\223\002\222\001\")/v1be" - + "ta1/{parent=projects/*}:exportAssets:\001*Z" - + "-\"(/v1beta1/{parent=folders/*}:exportAss" - + "ets:\001*Z3\"./v1beta1/{parent=organizations" - + "/*}:exportAssets:\001*\312Aa\n/google.cloud.ass" - + "et.v1beta1.ExportAssetsResponse\022.google." - + "cloud.asset.v1beta1.ExportAssetsRequest\022" - + "\203\002\n\025BatchGetAssetsHistory\0228.google.cloud" - + ".asset.v1beta1.BatchGetAssetsHistoryRequ" - + "est\0329.google.cloud.asset.v1beta1.BatchGe" - + "tAssetsHistoryResponse\"u\202\323\344\223\002o\0222/v1beta1" - + "/{parent=projects/*}:batchGetAssetsHisto" - + "ryZ9\0227/v1beta1/{parent=organizations/*}:" - + "batchGetAssetsHistory\032M\312A\031cloudasset.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformB\260\001\n\036com.google.clou" - + "d.asset.v1beta1B\021AssetServiceProtoP\001Z?go" - + "ogle.golang.org/genproto/googleapis/clou" - + "d/asset/v1beta1;asset\252\002\032Google.Cloud.Ass" - + "et.V1Beta1\312\002\032Google\\Cloud\\Asset\\V1beta1b" - + "\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.v1beta1.AssetProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_descriptor, - new java.lang.String[] { - "Parent", "ReadTime", "AssetTypes", "ContentType", "OutputConfig", - }); - internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_descriptor, - new java.lang.String[] { - "ReadTime", "OutputConfig", - }); - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_descriptor, - new java.lang.String[] { - "Parent", "AssetNames", "ContentType", "ReadTimeWindow", - }); - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_descriptor, - new java.lang.String[] { - "Assets", - }); - internal_static_google_cloud_asset_v1beta1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_asset_v1beta1_OutputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_OutputConfig_descriptor, - new java.lang.String[] { - "GcsDestination", "Destination", - }); - internal_static_google_cloud_asset_v1beta1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_asset_v1beta1_GcsDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1beta1_GcsDestination_descriptor, - new java.lang.String[] { - "Uri", "UriPrefix", "ObjectUri", - }); - 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.oauthScopes); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - 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.v1beta1.AssetProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequest.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequest.java deleted file mode 100644 index 10dcd4268..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequest.java +++ /dev/null @@ -1,1551 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * Batch get assets history request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} - */ -public final class BatchGetAssetsHistoryRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.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.v1beta1.TimeWindow.Builder subBuilder = null; - if (readTimeWindow_ != null) { - subBuilder = readTimeWindow_.toBuilder(); - } - readTimeWindow_ = - input.readMessage( - com.google.cloud.asset.v1beta1.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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.class, - com.google.cloud.asset.v1beta1.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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - 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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - 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)
-   * 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)
-   * 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)
-   * 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)
-   * 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_; - /** - * - * - *
-   * Optional. The content type.
-   * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override - public int getContentTypeValue() { - return contentType_; - } - /** - * - * - *
-   * Optional. The content type.
-   * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1beta1.ContentType result = - com.google.cloud.asset.v1beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1beta1.ContentType.UNRECOGNIZED : result; - } - - public static final int READ_TIME_WINDOW_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the readTimeWindow field is set. - */ - @java.lang.Override - 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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The readTimeWindow. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.TimeWindow getReadTimeWindow() { - return readTimeWindow_ == null - ? com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest other = - (com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest) - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.class, - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest build() { - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest buildPartial() { - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest result = - new com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest) { - return mergeFrom((com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest other) { - if (other == com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1beta1.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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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)
-     * 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)
-     * 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)
-     * 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)
-     * 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)
-     * 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)
-     * 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)
-     * 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)
-     * 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)
-     * 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; - /** - * - * - *
-     * Optional. The content type.
-     * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override - public int getContentTypeValue() { - return contentType_; - } - /** - * - * - *
-     * Optional. The content type.
-     * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @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; - } - /** - * - * - *
-     * Optional. The content type.
-     * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1beta1.ContentType result = - com.google.cloud.asset.v1beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1beta1.ContentType.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Optional. The content type.
-     * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1beta1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The content type.
-     * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1beta1.TimeWindow readTimeWindow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.TimeWindow, - com.google.cloud.asset.v1beta1.TimeWindow.Builder, - com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The readTimeWindow. - */ - public com.google.cloud.asset.v1beta1.TimeWindow getReadTimeWindow() { - if (readTimeWindowBuilder_ == null) { - return readTimeWindow_ == null - ? com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReadTimeWindow(com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReadTimeWindow( - com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeReadTimeWindow(com.google.cloud.asset.v1beta1.TimeWindow value) { - if (readTimeWindowBuilder_ == null) { - if (readTimeWindow_ != null) { - readTimeWindow_ = - com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - 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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.asset.v1beta1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { - if (readTimeWindowBuilder_ != null) { - return readTimeWindowBuilder_.getMessageOrBuilder(); - } else { - return readTimeWindow_ == null - ? com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.TimeWindow, - com.google.cloud.asset.v1beta1.TimeWindow.Builder, - com.google.cloud.asset.v1beta1.TimeWindowOrBuilder> - getReadTimeWindowFieldBuilder() { - if (readTimeWindowBuilder_ == null) { - readTimeWindowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.TimeWindow, - com.google.cloud.asset.v1beta1.TimeWindow.Builder, - com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest) - private static final com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest(); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequestOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequestOrBuilder.java deleted file mode 100644 index 00c60e565..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequestOrBuilder.java +++ /dev/null @@ -1,218 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -public interface BatchGetAssetsHistoryRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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)
-   * 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)
-   * 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)
-   * 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)
-   * 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); - - /** - * - * - *
-   * Optional. The content type.
-   * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - * - * - *
-   * Optional. The content type.
-   * 
- * - * - * .google.cloud.asset.v1beta1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The contentType. - */ - com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The readTimeWindow. - */ - com.google.cloud.asset.v1beta1.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.v1beta1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.asset.v1beta1.TimeWindowOrBuilder getReadTimeWindowOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponse.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponse.java deleted file mode 100644 index c93bfd9f0..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponse.java +++ /dev/null @@ -1,953 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * Batch get assets history response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} - */ -public final class BatchGetAssetsHistoryResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.class, - com.google.cloud.asset.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - @java.lang.Override - public java.util.List getAssetsList() { - return assets_; - } - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - @java.lang.Override - public java.util.List - getAssetsOrBuilderList() { - return assets_; - } - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - @java.lang.Override - public int getAssetsCount() { - return assets_.size(); - } - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.TemporalAsset getAssets(int index) { - return assets_.get(index); - } - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse other = - (com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse) - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.class, - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse - getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse build() { - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse buildPartial() { - com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse result = - new com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse) { - return mergeFrom((com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse other) { - if (other - == com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1beta1.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.v1beta1.TemporalAsset, - com.google.cloud.asset.v1beta1.TemporalAsset.Builder, - com.google.cloud.asset.v1beta1.TemporalAssetOrBuilder> - assetsBuilder_; - - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public Builder setAssets(int index, com.google.cloud.asset.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public Builder addAssets(com.google.cloud.asset.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public Builder addAssets(int index, com.google.cloud.asset.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public Builder addAssets(com.google.cloud.asset.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1beta1.TemporalAsset.Builder getAssetsBuilder(int index) { - return getAssetsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1beta1.TemporalAsset.Builder addAssetsBuilder() { - return getAssetsFieldBuilder() - .addBuilder(com.google.cloud.asset.v1beta1.TemporalAsset.getDefaultInstance()); - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1beta1.TemporalAsset.Builder addAssetsBuilder(int index) { - return getAssetsFieldBuilder() - .addBuilder(index, com.google.cloud.asset.v1beta1.TemporalAsset.getDefaultInstance()); - } - /** - * - * - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - public java.util.List - getAssetsBuilderList() { - return getAssetsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1beta1.TemporalAsset, - com.google.cloud.asset.v1beta1.TemporalAsset.Builder, - com.google.cloud.asset.v1beta1.TemporalAssetOrBuilder> - getAssetsFieldBuilder() { - if (assetsBuilder_ == null) { - assetsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1beta1.TemporalAsset, - com.google.cloud.asset.v1beta1.TemporalAsset.Builder, - com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse) - private static final com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse(); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.BatchGetAssetsHistoryResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponseOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryResponseOrBuilder.java deleted file mode 100644 index 83fa27c4b..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -public interface BatchGetAssetsHistoryResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - java.util.List getAssetsList(); - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - com.google.cloud.asset.v1beta1.TemporalAsset getAssets(int index); - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - int getAssetsCount(); - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - java.util.List - getAssetsOrBuilderList(); - /** - * - * - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1beta1.TemporalAsset assets = 1; - */ - com.google.cloud.asset.v1beta1.TemporalAssetOrBuilder getAssetsOrBuilder(int index); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ContentType.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ContentType.java deleted file mode 100644 index ebc1d4ed2..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ContentType.java +++ /dev/null @@ -1,176 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * Asset content type.
- * 
- * - * Protobuf enum {@code google.cloud.asset.v1beta1.ContentType} - */ -public enum ContentType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - CONTENT_TYPE_UNSPECIFIED(0), - /** - * - * - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - RESOURCE(1), - /** - * - * - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - IAM_POLICY(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - public static final int RESOURCE_VALUE = 1; - /** - * - * - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - public static final int IAM_POLICY_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ContentType forNumber(int value) { - switch (value) { - case 0: - return CONTENT_TYPE_UNSPECIFIED; - case 1: - return RESOURCE; - case 2: - return IAM_POLICY; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ContentType findValueByNumber(int number) { - return ContentType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); - } - - private static final ContentType[] VALUES = values(); - - public static ContentType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ContentType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1beta1.ContentType) -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequest.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequest.java deleted file mode 100644 index d4dd51fe0..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequest.java +++ /dev/null @@ -1,1792 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * Export asset request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.ExportAssetsRequest} - */ -public final class ExportAssetsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.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.v1beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1beta1.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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.ExportAssetsRequest.class, - com.google.cloud.asset.v1beta1.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"), a project number (such as "projects/12345"), or
-   * a folder number (such as "folders/123").
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - 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"), a project number (such as "projects/12345"), or
-   * a folder number (such as "folders/123").
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - 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. - */ - @java.lang.Override - 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. - */ - @java.lang.Override - 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; - */ - @java.lang.Override - 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:
-   * "google.compute.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:
-   * "google.compute.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:
-   * "google.compute.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:
-   * "google.compute.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.v1beta1.ContentType content_type = 4; - * - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override - public int getContentTypeValue() { - return contentType_; - } - /** - * - * - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1beta1.ContentType content_type = 4; - * - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1beta1.ContentType result = - com.google.cloud.asset.v1beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1beta1.ContentType.UNRECOGNIZED : result; - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Required. Output configuration indicating where the results will be output
-   * to. All results will be in newline delimited JSON format.
-   * 
- * - * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.ExportAssetsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.ExportAssetsRequest other = - (com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.ExportAssetsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.ExportAssetsRequest) - com.google.cloud.asset.v1beta1.ExportAssetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.ExportAssetsRequest.class, - com.google.cloud.asset.v1beta1.ExportAssetsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.ExportAssetsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.ExportAssetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.ExportAssetsRequest build() { - com.google.cloud.asset.v1beta1.ExportAssetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.ExportAssetsRequest buildPartial() { - com.google.cloud.asset.v1beta1.ExportAssetsRequest result = - new com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest) { - return mergeFrom((com.google.cloud.asset.v1beta1.ExportAssetsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.ExportAssetsRequest other) { - if (other == com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1beta1.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"), a project number (such as "projects/12345"), or
-     * a folder number (such as "folders/123").
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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"), a project number (such as "projects/12345"), or
-     * a folder number (such as "folders/123").
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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"), a project number (such as "projects/12345"), or
-     * a folder number (such as "folders/123").
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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"), a project number (such as "projects/12345"), or
-     * a folder number (such as "folders/123").
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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"), a project number (such as "projects/12345"), or
-     * a folder number (such as "folders/123").
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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:
-     * "google.compute.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:
-     * "google.compute.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:
-     * "google.compute.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:
-     * "google.compute.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:
-     * "google.compute.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:
-     * "google.compute.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:
-     * "google.compute.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:
-     * "google.compute.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:
-     * "google.compute.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.v1beta1.ContentType content_type = 4; - * - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override - public int getContentTypeValue() { - return contentType_; - } - /** - * - * - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1beta1.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.v1beta1.ContentType content_type = 4; - * - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1beta1.ContentType result = - com.google.cloud.asset.v1beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1beta1.ContentType.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1beta1.ContentType content_type = 4; - * - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1beta1.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.v1beta1.ContentType content_type = 4; - * - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.OutputConfig, - com.google.cloud.asset.v1beta1.OutputConfig.Builder, - com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.asset.v1beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig(com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Output configuration indicating where the results will be output
-     * to. All results will be in newline delimited JSON format.
-     * 
- * - * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.asset.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.OutputConfig, - com.google.cloud.asset.v1beta1.OutputConfig.Builder, - com.google.cloud.asset.v1beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.OutputConfig, - com.google.cloud.asset.v1beta1.OutputConfig.Builder, - com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.ExportAssetsRequest) - private static final com.google.cloud.asset.v1beta1.ExportAssetsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.ExportAssetsRequest(); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequestOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequestOrBuilder.java deleted file mode 100644 index 8c460c775..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequestOrBuilder.java +++ /dev/null @@ -1,245 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -public interface ExportAssetsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.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"), a project number (such as "projects/12345"), or
-   * a folder number (such as "folders/123").
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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"), a project number (such as "projects/12345"), or
-   * a folder number (such as "folders/123").
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @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:
-   * "google.compute.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:
-   * "google.compute.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:
-   * "google.compute.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:
-   * "google.compute.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.v1beta1.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.v1beta1.ContentType content_type = 4; - * - * @return The contentType. - */ - com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - * - * - *
-   * Required. Output configuration indicating where the results will be output
-   * to. All results will be in newline delimited JSON format.
-   * 
- * - * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.asset.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponse.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponse.java deleted file mode 100644 index 11cefb645..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponse.java +++ /dev/null @@ -1,1022 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * 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.v1beta1.ExportAssetsResponse} - */ -public final class ExportAssetsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.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.v1beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.asset.v1beta1.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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.ExportAssetsResponse.class, - com.google.cloud.asset.v1beta1.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. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - * - * - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * - * @return The readTime. - */ - @java.lang.Override - 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; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1beta1.OutputConfig outputConfig_; - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 2; - * - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 2; - * - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.asset.v1beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.ExportAssetsResponse other = - (com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.ExportAssetsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.ExportAssetsResponse) - com.google.cloud.asset.v1beta1.ExportAssetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.ExportAssetsResponse.class, - com.google.cloud.asset.v1beta1.ExportAssetsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.ExportAssetsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.ExportAssetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.ExportAssetsResponse build() { - com.google.cloud.asset.v1beta1.ExportAssetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.ExportAssetsResponse buildPartial() { - com.google.cloud.asset.v1beta1.ExportAssetsResponse result = - new com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse) { - return mergeFrom((com.google.cloud.asset.v1beta1.ExportAssetsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.ExportAssetsResponse other) { - if (other == com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.OutputConfig, - com.google.cloud.asset.v1beta1.OutputConfig.Builder, - com.google.cloud.asset.v1beta1.OutputConfigOrBuilder> - outputConfigBuilder_; - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 2; - * - * @return The outputConfig. - */ - public com.google.cloud.asset.v1beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 2; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 2; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 2; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1beta1.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.v1beta1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.asset.v1beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - } - /** - * - * - *
-     * Output configuration indicating where the results were output to.
-     * All results are in JSON format.
-     * 
- * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.OutputConfig, - com.google.cloud.asset.v1beta1.OutputConfig.Builder, - com.google.cloud.asset.v1beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.OutputConfig, - com.google.cloud.asset.v1beta1.OutputConfig.Builder, - com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.ExportAssetsResponse) - private static final com.google.cloud.asset.v1beta1.ExportAssetsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.ExportAssetsResponse(); - } - - public static com.google.cloud.asset.v1beta1.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.v1beta1.ExportAssetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponseOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponseOrBuilder.java deleted file mode 100644 index 10da99f8d..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -public interface ExportAssetsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.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.v1beta1.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.v1beta1.OutputConfig output_config = 2; - * - * @return The outputConfig. - */ - com.google.cloud.asset.v1beta1.OutputConfig getOutputConfig(); - /** - * - * - *
-   * Output configuration indicating where the results were output to.
-   * All results are in JSON format.
-   * 
- * - * .google.cloud.asset.v1beta1.OutputConfig output_config = 2; - */ - com.google.cloud.asset.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestination.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestination.java deleted file mode 100644 index 132cd65ba..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestination.java +++ /dev/null @@ -1,1020 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * A Cloud Storage location.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.GcsDestination} - */ -public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.GcsDestination) - GcsDestinationOrBuilder { - private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GcsDestination() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 1; - objectUri_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 2; - objectUri_ = 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.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.GcsDestination.class, - com.google.cloud.asset.v1beta1.GcsDestination.Builder.class); - } - - private int objectUriCase_ = 0; - private java.lang.Object objectUri_; - - public enum ObjectUriCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - URI(1), - URI_PREFIX(2), - OBJECTURI_NOT_SET(0); - private final int value; - - private ObjectUriCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ObjectUriCase valueOf(int value) { - return forNumber(value); - } - - public static ObjectUriCase forNumber(int value) { - switch (value) { - case 1: - return URI; - case 2: - return URI_PREFIX; - case 0: - return OBJECTURI_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ObjectUriCase getObjectUriCase() { - return ObjectUriCase.forNumber(objectUriCase_); - } - - public static final int URI_FIELD_NUMBER = 1; - /** - * - * - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - 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_ == 1) { - objectUri_ = s; - } - return s; - } - } - /** - * - * - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (objectUriCase_ == 1) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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/google.compute.disk/0" is the first
-   * shard of output objects containing all google.compute.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/google.compute.disk/0" is the first
-   * shard of output objects containing all google.compute.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 - 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 (objectUriCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); - } - if (objectUriCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1beta1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.GcsDestination other = - (com.google.cloud.asset.v1beta1.GcsDestination) obj; - - if (!getObjectUriCase().equals(other.getObjectUriCase())) return false; - switch (objectUriCase_) { - case 1: - if (!getUri().equals(other.getUri())) return false; - break; - case 2: - if (!getUriPrefix().equals(other.getUriPrefix())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (objectUriCase_) { - case 1: - 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: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.asset.v1beta1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Cloud Storage location.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.GcsDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.GcsDestination) - com.google.cloud.asset.v1beta1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.GcsDestination.class, - com.google.cloud.asset.v1beta1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - objectUriCase_ = 0; - objectUri_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.GcsDestination build() { - com.google.cloud.asset.v1beta1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.GcsDestination buildPartial() { - com.google.cloud.asset.v1beta1.GcsDestination result = - new com.google.cloud.asset.v1beta1.GcsDestination(this); - if (objectUriCase_ == 1) { - result.objectUri_ = objectUri_; - } - if (objectUriCase_ == 2) { - result.objectUri_ = objectUri_; - } - result.objectUriCase_ = objectUriCase_; - 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.v1beta1.GcsDestination) { - return mergeFrom((com.google.cloud.asset.v1beta1.GcsDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.GcsDestination other) { - if (other == com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance()) return this; - switch (other.getObjectUriCase()) { - case URI: - { - objectUriCase_ = 1; - objectUri_ = other.objectUri_; - onChanged(); - break; - } - case URI_PREFIX: - { - objectUriCase_ = 2; - objectUri_ = other.objectUri_; - onChanged(); - break; - } - case OBJECTURI_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1beta1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1beta1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int objectUriCase_ = 0; - private java.lang.Object objectUri_; - - public ObjectUriCase getObjectUriCase() { - return ObjectUriCase.forNumber(objectUriCase_); - } - - public Builder clearObjectUri() { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - return this; - } - - /** - * - * - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - 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_ == 1) { - objectUri_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (objectUriCase_ == 1) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectUriCase_ = 1; - objectUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - if (objectUriCase_ == 1) { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectUriCase_ = 1; - 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/google.compute.disk/0" is the first
-     * shard of output objects containing all google.compute.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.Override - 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/google.compute.disk/0" is the first
-     * shard of output objects containing all google.compute.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. - */ - @java.lang.Override - 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/google.compute.disk/0" is the first
-     * shard of output objects containing all google.compute.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/google.compute.disk/0" is the first
-     * shard of output objects containing all google.compute.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/google.compute.disk/0" is the first
-     * shard of output objects containing all google.compute.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); - } - - @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.v1beta1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.GcsDestination) - private static final com.google.cloud.asset.v1beta1.GcsDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.GcsDestination(); - } - - public static com.google.cloud.asset.v1beta1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestinationOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestinationOrBuilder.java deleted file mode 100644 index 15bd331b8..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,99 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -public interface GcsDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * - * @return The uri. - */ - java.lang.String getUri(); - /** - * - * - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * - * @return The bytes for uri. - */ - 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/google.compute.disk/0" is the first
-   * shard of output objects containing all google.compute.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/google.compute.disk/0" is the first
-   * shard of output objects containing all google.compute.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.v1beta1.GcsDestination.ObjectUriCase getObjectUriCase(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfig.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfig.java deleted file mode 100644 index 12ed83a74..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfig.java +++ /dev/null @@ -1,834 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * Output configuration for export assets destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.OutputConfig} - */ -public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.OutputConfig) - OutputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OutputConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.asset.v1beta1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.asset.v1beta1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.asset.v1beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1beta1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.OutputConfig.class, - com.google.cloud.asset.v1beta1.OutputConfig.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_DESTINATION(1), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 1: - return GCS_DESTINATION; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - /** - * - * - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance(); - } - /** - * - * - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1beta1.GcsDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.asset.v1beta1.GcsDestination) destination_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1beta1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.OutputConfig other = - (com.google.cloud.asset.v1beta1.OutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getGcsDestination().equals(other.getGcsDestination())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1beta1.OutputConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.OutputConfig 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.v1beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.OutputConfig 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.v1beta1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.OutputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.OutputConfig 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.v1beta1.OutputConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.OutputConfig 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.v1beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.OutputConfig 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.v1beta1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Output configuration for export assets destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.OutputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.OutputConfig) - com.google.cloud.asset.v1beta1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.OutputConfig.class, - com.google.cloud.asset.v1beta1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1beta1.AssetServiceProto - .internal_static_google_cloud_asset_v1beta1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.OutputConfig build() { - com.google.cloud.asset.v1beta1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.OutputConfig buildPartial() { - com.google.cloud.asset.v1beta1.OutputConfig result = - new com.google.cloud.asset.v1beta1.OutputConfig(this); - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1beta1.OutputConfig) { - return mergeFrom((com.google.cloud.asset.v1beta1.OutputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.OutputConfig other) { - if (other == com.google.cloud.asset.v1beta1.OutputConfig.getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - case GCS_DESTINATION: - { - mergeGcsDestination(other.getGcsDestination()); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1beta1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1beta1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.GcsDestination, - com.google.cloud.asset.v1beta1.GcsDestination.Builder, - com.google.cloud.asset.v1beta1.GcsDestinationOrBuilder> - gcsDestinationBuilder_; - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.asset.v1beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.asset.v1beta1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.asset.v1beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 - && destination_ != com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.asset.v1beta1.GcsDestination.newBuilder( - (com.google.cloud.asset.v1beta1.GcsDestination) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - gcsDestinationBuilder_.mergeFrom(value); - } - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - gcsDestinationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.asset.v1beta1.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.GcsDestination, - com.google.cloud.asset.v1beta1.GcsDestination.Builder, - com.google.cloud.asset.v1beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.asset.v1beta1.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.GcsDestination, - com.google.cloud.asset.v1beta1.GcsDestination.Builder, - com.google.cloud.asset.v1beta1.GcsDestinationOrBuilder>( - (com.google.cloud.asset.v1beta1.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged(); - ; - return gcsDestinationBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1beta1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.OutputConfig) - private static final com.google.cloud.asset.v1beta1.OutputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.OutputConfig(); - } - - public static com.google.cloud.asset.v1beta1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(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.v1beta1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfigOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfigOrBuilder.java deleted file mode 100644 index 4bf6e1722..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,62 +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/v1beta1/asset_service.proto - -package com.google.cloud.asset.v1beta1; - -public interface OutputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - * - * - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - com.google.cloud.asset.v1beta1.GcsDestination getGcsDestination(); - /** - * - * - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.asset.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - public com.google.cloud.asset.v1beta1.OutputConfig.DestinationCase getDestinationCase(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ProjectName.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ProjectName.java deleted file mode 100644 index cbd22c155..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ProjectName.java +++ /dev/null @@ -1,162 +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. - */ - -package com.google.cloud.asset.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ProjectName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}"); - - private volatile Map fieldValuesMap; - - private final String project; - - public String getProject() { - return project; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ProjectName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - } - - public static ProjectName of(String project) { - return newBuilder().setProject(project).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - public static ProjectName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ProjectName.parse: formattedString not in valid format"); - return of(matchMap.get("project")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ProjectName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project); - } - - /** Builder for ProjectName. */ - public static class Builder { - - private String project; - - public String getProject() { - return project; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - private Builder() {} - - private Builder(ProjectName projectName) { - project = projectName.project; - } - - public ProjectName build() { - return new ProjectName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ProjectName) { - ProjectName that = (ProjectName) o; - return (this.project.equals(that.project)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Resource.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Resource.java deleted file mode 100644 index 26ed6bef1..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Resource.java +++ /dev/null @@ -1,1752 +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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * Representation of a cloud resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.Resource} - */ -public final class Resource extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.Resource) - ResourceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Resource.newBuilder() to construct. - private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Resource() { - version_ = ""; - discoveryDocumentUri_ = ""; - discoveryName_ = ""; - resourceUrl_ = ""; - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Resource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Resource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: - { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = 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.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.Resource.class, - com.google.cloud.asset.v1beta1.Resource.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - * - * - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - 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(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object discoveryDocumentUri_; - /** - * - * - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * - * @return The discoveryDocumentUri. - */ - @java.lang.Override - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - 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(); - discoveryDocumentUri_ = s; - return s; - } - } - /** - * - * - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * - * @return The bytes for discoveryDocumentUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object discoveryName_; - /** - * - * - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * - * @return The discoveryName. - */ - @java.lang.Override - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - 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(); - discoveryName_ = s; - return s; - } - } - /** - * - * - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * - * @return The bytes for discoveryName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URL_FIELD_NUMBER = 4; - private volatile java.lang.Object resourceUrl_; - /** - * - * - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * - * @return The resourceUrl. - */ - @java.lang.Override - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - 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(); - resourceUrl_ = s; - return s; - } - } - /** - * - * - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * - * @return The bytes for resourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARENT_FIELD_NUMBER = 5; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * - * @return The parent. - */ - @java.lang.Override - 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; - } - } - /** - * - * - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * - * @return The bytes for parent. - */ - @java.lang.Override - 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 DATA_FIELD_NUMBER = 6; - private com.google.protobuf.Struct data_; - /** - * - * - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * - * @return Whether the data field is set. - */ - @java.lang.Override - public boolean hasData() { - return data_ != null; - } - /** - * - * - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.Struct getData() { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } - /** - * - * - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - return getData(); - } - - 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 (!getVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (!getDiscoveryDocumentUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); - } - if (!getDiscoveryNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); - } - if (!getResourceUrlBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); - } - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); - } - if (data_ != null) { - output.writeMessage(6, getData()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (!getDiscoveryDocumentUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); - } - if (!getDiscoveryNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); - } - if (!getResourceUrlBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); - } - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); - } - if (data_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getData()); - } - 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.v1beta1.Resource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.Resource other = (com.google.cloud.asset.v1beta1.Resource) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!getDiscoveryDocumentUri().equals(other.getDiscoveryDocumentUri())) return false; - if (!getDiscoveryName().equals(other.getDiscoveryName())) return false; - if (!getResourceUrl().equals(other.getResourceUrl())) return false; - if (!getParent().equals(other.getParent())) return false; - if (hasData() != other.hasData()) return false; - if (hasData()) { - if (!getData().equals(other.getData())) 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) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); - hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryName().hashCode(); - hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getResourceUrl().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasData()) { - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.Resource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.Resource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.Resource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.asset.v1beta1.Resource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Representation of a cloud resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.Resource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.Resource) - com.google.cloud.asset.v1beta1.ResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.Resource.class, - com.google.cloud.asset.v1beta1.Resource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.Resource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = ""; - - discoveryDocumentUri_ = ""; - - discoveryName_ = ""; - - resourceUrl_ = ""; - - parent_ = ""; - - if (dataBuilder_ == null) { - data_ = null; - } else { - data_ = null; - dataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_Resource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.Resource getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.Resource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.Resource build() { - com.google.cloud.asset.v1beta1.Resource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.Resource buildPartial() { - com.google.cloud.asset.v1beta1.Resource result = - new com.google.cloud.asset.v1beta1.Resource(this); - result.version_ = version_; - result.discoveryDocumentUri_ = discoveryDocumentUri_; - result.discoveryName_ = discoveryName_; - result.resourceUrl_ = resourceUrl_; - result.parent_ = parent_; - if (dataBuilder_ == null) { - result.data_ = data_; - } else { - result.data_ = dataBuilder_.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.v1beta1.Resource) { - return mergeFrom((com.google.cloud.asset.v1beta1.Resource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.Resource other) { - if (other == com.google.cloud.asset.v1beta1.Resource.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.getDiscoveryDocumentUri().isEmpty()) { - discoveryDocumentUri_ = other.discoveryDocumentUri_; - onChanged(); - } - if (!other.getDiscoveryName().isEmpty()) { - discoveryName_ = other.discoveryName_; - onChanged(); - } - if (!other.getResourceUrl().isEmpty()) { - resourceUrl_ = other.resourceUrl_; - onChanged(); - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasData()) { - mergeData(other.getData()); - } - 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.v1beta1.Resource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1beta1.Resource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * - * - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryDocumentUri_ = ""; - /** - * - * - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * - * @return The discoveryDocumentUri. - */ - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * - * @return The bytes for discoveryDocumentUri. - */ - public com.google.protobuf.ByteString getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * - * @param value The discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearDiscoveryDocumentUri() { - - discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * - * @param value The bytes for discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryName_ = ""; - /** - * - * - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * - * @return The discoveryName. - */ - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * - * @return The bytes for discoveryName. - */ - public com.google.protobuf.ByteString getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * - * @param value The discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * - * @return This builder for chaining. - */ - public Builder clearDiscoveryName() { - - discoveryName_ = getDefaultInstance().getDiscoveryName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * - * @param value The bytes for discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryName_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceUrl_ = ""; - /** - * - * - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * - * @return The resourceUrl. - */ - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * - * @return The bytes for resourceUrl. - */ - public com.google.protobuf.ByteString getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * - * @param value The resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrl(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceUrl_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * - * @return This builder for chaining. - */ - public Builder clearResourceUrl() { - - resourceUrl_ = getDefaultInstance().getResourceUrl(); - onChanged(); - return this; - } - /** - * - * - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * - * @param value The bytes for resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrlBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceUrl_ = value; - onChanged(); - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * - * @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; - } - } - /** - * - * - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * - * @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; - } - } - /** - * - * - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * - * @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; - } - /** - * - * - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * - * @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.Struct data_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - dataBuilder_; - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * - * @return Whether the data field is set. - */ - public boolean hasData() { - return dataBuilder_ != null || data_ != null; - } - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * - * @return The data. - */ - public com.google.protobuf.Struct getData() { - if (dataBuilder_ == null) { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } else { - return dataBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - dataBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData(com.google.protobuf.Struct.Builder builderForValue) { - if (dataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - dataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder mergeData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (data_ != null) { - data_ = com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - dataBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder clearData() { - if (dataBuilder_ == null) { - data_ = null; - onChanged(); - } else { - data_ = null; - dataBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.Struct.Builder getDataBuilder() { - - onChanged(); - return getDataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - if (dataBuilder_ != null) { - return dataBuilder_.getMessageOrBuilder(); - } else { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } - } - /** - * - * - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - getDataFieldBuilder() { - if (dataBuilder_ == null) { - dataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder>(getData(), getParentForChildren(), isClean()); - data_ = null; - } - return dataBuilder_; - } - - @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.v1beta1.Resource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.Resource) - private static final com.google.cloud.asset.v1beta1.Resource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.Resource(); - } - - public static com.google.cloud.asset.v1beta1.Resource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Resource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.Resource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ResourceOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ResourceOrBuilder.java deleted file mode 100644 index a190ebf23..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ResourceOrBuilder.java +++ /dev/null @@ -1,224 +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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -public interface ResourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.Resource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * - * @return The discoveryDocumentUri. - */ - java.lang.String getDiscoveryDocumentUri(); - /** - * - * - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * - * @return The bytes for discoveryDocumentUri. - */ - com.google.protobuf.ByteString getDiscoveryDocumentUriBytes(); - - /** - * - * - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * - * @return The discoveryName. - */ - java.lang.String getDiscoveryName(); - /** - * - * - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * - * @return The bytes for discoveryName. - */ - com.google.protobuf.ByteString getDiscoveryNameBytes(); - - /** - * - * - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * - * @return The resourceUrl. - */ - java.lang.String getResourceUrl(); - /** - * - * - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * - * @return The bytes for resourceUrl. - */ - com.google.protobuf.ByteString getResourceUrlBytes(); - - /** - * - * - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * - * @return Whether the data field is set. - */ - boolean hasData(); - /** - * - * - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * - * @return The data. - */ - com.google.protobuf.Struct getData(); - /** - * - * - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - com.google.protobuf.StructOrBuilder getDataOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAsset.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAsset.java deleted file mode 100644 index 0157f11df..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAsset.java +++ /dev/null @@ -1,1094 +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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * Temporal asset. In addition to the asset, the temporal asset includes the
- * status of the asset and valid from and to time of it.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.TemporalAsset} - */ -public final class TemporalAsset extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.TemporalAsset) - TemporalAssetOrBuilder { - private static final long serialVersionUID = 0L; - // Use TemporalAsset.newBuilder() to construct. - private TemporalAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TemporalAsset() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TemporalAsset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TemporalAsset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.asset.v1beta1.TimeWindow.Builder subBuilder = null; - if (window_ != null) { - subBuilder = window_.toBuilder(); - } - window_ = - input.readMessage( - com.google.cloud.asset.v1beta1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(window_); - window_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - deleted_ = input.readBool(); - break; - } - case 26: - { - com.google.cloud.asset.v1beta1.Asset.Builder subBuilder = null; - if (asset_ != null) { - subBuilder = asset_.toBuilder(); - } - asset_ = - input.readMessage( - com.google.cloud.asset.v1beta1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(asset_); - asset_ = 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.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TemporalAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TemporalAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.TemporalAsset.class, - com.google.cloud.asset.v1beta1.TemporalAsset.Builder.class); - } - - public static final int WINDOW_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1beta1.TimeWindow window_; - /** - * - * - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - * - * @return Whether the window field is set. - */ - @java.lang.Override - public boolean hasWindow() { - return window_ != null; - } - /** - * - * - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - * - * @return The window. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.TimeWindow getWindow() { - return window_ == null - ? com.google.cloud.asset.v1beta1.TimeWindow.getDefaultInstance() - : window_; - } - /** - * - * - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.TimeWindowOrBuilder getWindowOrBuilder() { - return getWindow(); - } - - public static final int DELETED_FIELD_NUMBER = 2; - private boolean deleted_; - /** - * - * - *
-   * If the asset is deleted or not.
-   * 
- * - * bool deleted = 2; - * - * @return The deleted. - */ - @java.lang.Override - public boolean getDeleted() { - return deleted_; - } - - public static final int ASSET_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1beta1.Asset asset_; - /** - * - * - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - * - * @return Whether the asset field is set. - */ - @java.lang.Override - public boolean hasAsset() { - return asset_ != null; - } - /** - * - * - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - * - * @return The asset. - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.Asset getAsset() { - return asset_ == null ? com.google.cloud.asset.v1beta1.Asset.getDefaultInstance() : asset_; - } - /** - * - * - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1beta1.AssetOrBuilder getAssetOrBuilder() { - return getAsset(); - } - - 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 (window_ != null) { - output.writeMessage(1, getWindow()); - } - if (deleted_ != false) { - output.writeBool(2, deleted_); - } - if (asset_ != null) { - output.writeMessage(3, getAsset()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (window_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getWindow()); - } - if (deleted_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, deleted_); - } - if (asset_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAsset()); - } - 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.v1beta1.TemporalAsset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.TemporalAsset other = - (com.google.cloud.asset.v1beta1.TemporalAsset) obj; - - if (hasWindow() != other.hasWindow()) return false; - if (hasWindow()) { - if (!getWindow().equals(other.getWindow())) return false; - } - if (getDeleted() != other.getDeleted()) return false; - if (hasAsset() != other.hasAsset()) return false; - if (hasAsset()) { - if (!getAsset().equals(other.getAsset())) 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 (hasWindow()) { - hash = (37 * hash) + WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getWindow().hashCode(); - } - hash = (37 * hash) + DELETED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeleted()); - if (hasAsset()) { - hash = (37 * hash) + ASSET_FIELD_NUMBER; - hash = (53 * hash) + getAsset().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset 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.v1beta1.TemporalAsset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset 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.v1beta1.TemporalAsset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset 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.v1beta1.TemporalAsset parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset 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.v1beta1.TemporalAsset parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset 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.v1beta1.TemporalAsset 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; - } - /** - * - * - *
-   * Temporal asset. In addition to the asset, the temporal asset includes the
-   * status of the asset and valid from and to time of it.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.TemporalAsset} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.TemporalAsset) - com.google.cloud.asset.v1beta1.TemporalAssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TemporalAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TemporalAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.TemporalAsset.class, - com.google.cloud.asset.v1beta1.TemporalAsset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.TemporalAsset.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 (windowBuilder_ == null) { - window_ = null; - } else { - window_ = null; - windowBuilder_ = null; - } - deleted_ = false; - - if (assetBuilder_ == null) { - asset_ = null; - } else { - asset_ = null; - assetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TemporalAsset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.TemporalAsset getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.TemporalAsset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.TemporalAsset build() { - com.google.cloud.asset.v1beta1.TemporalAsset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.TemporalAsset buildPartial() { - com.google.cloud.asset.v1beta1.TemporalAsset result = - new com.google.cloud.asset.v1beta1.TemporalAsset(this); - if (windowBuilder_ == null) { - result.window_ = window_; - } else { - result.window_ = windowBuilder_.build(); - } - result.deleted_ = deleted_; - if (assetBuilder_ == null) { - result.asset_ = asset_; - } else { - result.asset_ = assetBuilder_.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.v1beta1.TemporalAsset) { - return mergeFrom((com.google.cloud.asset.v1beta1.TemporalAsset) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.TemporalAsset other) { - if (other == com.google.cloud.asset.v1beta1.TemporalAsset.getDefaultInstance()) return this; - if (other.hasWindow()) { - mergeWindow(other.getWindow()); - } - if (other.getDeleted() != false) { - setDeleted(other.getDeleted()); - } - if (other.hasAsset()) { - mergeAsset(other.getAsset()); - } - 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.v1beta1.TemporalAsset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1beta1.TemporalAsset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1beta1.TimeWindow window_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.TimeWindow, - com.google.cloud.asset.v1beta1.TimeWindow.Builder, - com.google.cloud.asset.v1beta1.TimeWindowOrBuilder> - windowBuilder_; - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - * - * @return Whether the window field is set. - */ - public boolean hasWindow() { - return windowBuilder_ != null || window_ != null; - } - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - * - * @return The window. - */ - public com.google.cloud.asset.v1beta1.TimeWindow getWindow() { - if (windowBuilder_ == null) { - return window_ == null - ? com.google.cloud.asset.v1beta1.TimeWindow.getDefaultInstance() - : window_; - } else { - return windowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - public Builder setWindow(com.google.cloud.asset.v1beta1.TimeWindow value) { - if (windowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - window_ = value; - onChanged(); - } else { - windowBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - public Builder setWindow(com.google.cloud.asset.v1beta1.TimeWindow.Builder builderForValue) { - if (windowBuilder_ == null) { - window_ = builderForValue.build(); - onChanged(); - } else { - windowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - public Builder mergeWindow(com.google.cloud.asset.v1beta1.TimeWindow value) { - if (windowBuilder_ == null) { - if (window_ != null) { - window_ = - com.google.cloud.asset.v1beta1.TimeWindow.newBuilder(window_) - .mergeFrom(value) - .buildPartial(); - } else { - window_ = value; - } - onChanged(); - } else { - windowBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - public Builder clearWindow() { - if (windowBuilder_ == null) { - window_ = null; - onChanged(); - } else { - window_ = null; - windowBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - public com.google.cloud.asset.v1beta1.TimeWindow.Builder getWindowBuilder() { - - onChanged(); - return getWindowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - public com.google.cloud.asset.v1beta1.TimeWindowOrBuilder getWindowOrBuilder() { - if (windowBuilder_ != null) { - return windowBuilder_.getMessageOrBuilder(); - } else { - return window_ == null - ? com.google.cloud.asset.v1beta1.TimeWindow.getDefaultInstance() - : window_; - } - } - /** - * - * - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.TimeWindow, - com.google.cloud.asset.v1beta1.TimeWindow.Builder, - com.google.cloud.asset.v1beta1.TimeWindowOrBuilder> - getWindowFieldBuilder() { - if (windowBuilder_ == null) { - windowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.TimeWindow, - com.google.cloud.asset.v1beta1.TimeWindow.Builder, - com.google.cloud.asset.v1beta1.TimeWindowOrBuilder>( - getWindow(), getParentForChildren(), isClean()); - window_ = null; - } - return windowBuilder_; - } - - private boolean deleted_; - /** - * - * - *
-     * If the asset is deleted or not.
-     * 
- * - * bool deleted = 2; - * - * @return The deleted. - */ - @java.lang.Override - public boolean getDeleted() { - return deleted_; - } - /** - * - * - *
-     * If the asset is deleted or not.
-     * 
- * - * bool deleted = 2; - * - * @param value The deleted to set. - * @return This builder for chaining. - */ - public Builder setDeleted(boolean value) { - - deleted_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * If the asset is deleted or not.
-     * 
- * - * bool deleted = 2; - * - * @return This builder for chaining. - */ - public Builder clearDeleted() { - - deleted_ = false; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1beta1.Asset asset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.Asset, - com.google.cloud.asset.v1beta1.Asset.Builder, - com.google.cloud.asset.v1beta1.AssetOrBuilder> - assetBuilder_; - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - * - * @return Whether the asset field is set. - */ - public boolean hasAsset() { - return assetBuilder_ != null || asset_ != null; - } - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - * - * @return The asset. - */ - public com.google.cloud.asset.v1beta1.Asset getAsset() { - if (assetBuilder_ == null) { - return asset_ == null ? com.google.cloud.asset.v1beta1.Asset.getDefaultInstance() : asset_; - } else { - return assetBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - public Builder setAsset(com.google.cloud.asset.v1beta1.Asset value) { - if (assetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - asset_ = value; - onChanged(); - } else { - assetBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - public Builder setAsset(com.google.cloud.asset.v1beta1.Asset.Builder builderForValue) { - if (assetBuilder_ == null) { - asset_ = builderForValue.build(); - onChanged(); - } else { - assetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - public Builder mergeAsset(com.google.cloud.asset.v1beta1.Asset value) { - if (assetBuilder_ == null) { - if (asset_ != null) { - asset_ = - com.google.cloud.asset.v1beta1.Asset.newBuilder(asset_) - .mergeFrom(value) - .buildPartial(); - } else { - asset_ = value; - } - onChanged(); - } else { - assetBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - public Builder clearAsset() { - if (assetBuilder_ == null) { - asset_ = null; - onChanged(); - } else { - asset_ = null; - assetBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - public com.google.cloud.asset.v1beta1.Asset.Builder getAssetBuilder() { - - onChanged(); - return getAssetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - public com.google.cloud.asset.v1beta1.AssetOrBuilder getAssetOrBuilder() { - if (assetBuilder_ != null) { - return assetBuilder_.getMessageOrBuilder(); - } else { - return asset_ == null ? com.google.cloud.asset.v1beta1.Asset.getDefaultInstance() : asset_; - } - } - /** - * - * - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.Asset, - com.google.cloud.asset.v1beta1.Asset.Builder, - com.google.cloud.asset.v1beta1.AssetOrBuilder> - getAssetFieldBuilder() { - if (assetBuilder_ == null) { - assetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1beta1.Asset, - com.google.cloud.asset.v1beta1.Asset.Builder, - com.google.cloud.asset.v1beta1.AssetOrBuilder>( - getAsset(), getParentForChildren(), isClean()); - asset_ = null; - } - return assetBuilder_; - } - - @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.v1beta1.TemporalAsset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.TemporalAsset) - private static final com.google.cloud.asset.v1beta1.TemporalAsset DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.TemporalAsset(); - } - - public static com.google.cloud.asset.v1beta1.TemporalAsset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TemporalAsset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TemporalAsset(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.v1beta1.TemporalAsset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAssetOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAssetOrBuilder.java deleted file mode 100644 index c77d80965..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAssetOrBuilder.java +++ /dev/null @@ -1,108 +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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -public interface TemporalAssetOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.TemporalAsset) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - * - * @return Whether the window field is set. - */ - boolean hasWindow(); - /** - * - * - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - * - * @return The window. - */ - com.google.cloud.asset.v1beta1.TimeWindow getWindow(); - /** - * - * - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1beta1.TimeWindow window = 1; - */ - com.google.cloud.asset.v1beta1.TimeWindowOrBuilder getWindowOrBuilder(); - - /** - * - * - *
-   * If the asset is deleted or not.
-   * 
- * - * bool deleted = 2; - * - * @return The deleted. - */ - boolean getDeleted(); - - /** - * - * - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - * - * @return Whether the asset field is set. - */ - boolean hasAsset(); - /** - * - * - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - * - * @return The asset. - */ - com.google.cloud.asset.v1beta1.Asset getAsset(); - /** - * - * - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1beta1.Asset asset = 3; - */ - com.google.cloud.asset.v1beta1.AssetOrBuilder getAssetOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindow.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindow.java deleted file mode 100644 index d032cd297..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindow.java +++ /dev/null @@ -1,1002 +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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -/** - * - * - *
- * A time window of (start_time, end_time].
- * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.TimeWindow} - */ -public final class TimeWindow extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1beta1.TimeWindow) - TimeWindowOrBuilder { - private static final long serialVersionUID = 0L; - // Use TimeWindow.newBuilder() to construct. - private TimeWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TimeWindow() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TimeWindow(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TimeWindow( - 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 (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = 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.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TimeWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TimeWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.TimeWindow.class, - com.google.cloud.asset.v1beta1.TimeWindow.Builder.class); - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - 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 (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - 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.v1beta1.TimeWindow)) { - return super.equals(obj); - } - com.google.cloud.asset.v1beta1.TimeWindow other = - (com.google.cloud.asset.v1beta1.TimeWindow) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) 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 (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1beta1.TimeWindow parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.TimeWindow 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.v1beta1.TimeWindow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.TimeWindow 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.v1beta1.TimeWindow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.asset.v1beta1.TimeWindow parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.asset.v1beta1.TimeWindow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.TimeWindow 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.v1beta1.TimeWindow parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.TimeWindow 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.v1beta1.TimeWindow parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.asset.v1beta1.TimeWindow 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.v1beta1.TimeWindow 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 time window of (start_time, end_time].
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1beta1.TimeWindow} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1beta1.TimeWindow) - com.google.cloud.asset.v1beta1.TimeWindowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TimeWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TimeWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1beta1.TimeWindow.class, - com.google.cloud.asset.v1beta1.TimeWindow.Builder.class); - } - - // Construct using com.google.cloud.asset.v1beta1.TimeWindow.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 (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.asset.v1beta1.AssetProto - .internal_static_google_cloud_asset_v1beta1_TimeWindow_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.TimeWindow getDefaultInstanceForType() { - return com.google.cloud.asset.v1beta1.TimeWindow.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.TimeWindow build() { - com.google.cloud.asset.v1beta1.TimeWindow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1beta1.TimeWindow buildPartial() { - com.google.cloud.asset.v1beta1.TimeWindow result = - new com.google.cloud.asset.v1beta1.TimeWindow(this); - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.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.v1beta1.TimeWindow) { - return mergeFrom((com.google.cloud.asset.v1beta1.TimeWindow) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1beta1.TimeWindow other) { - if (other == com.google.cloud.asset.v1beta1.TimeWindow.getDefaultInstance()) return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - 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.v1beta1.TimeWindow parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1beta1.TimeWindow) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - @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.v1beta1.TimeWindow) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1beta1.TimeWindow) - private static final com.google.cloud.asset.v1beta1.TimeWindow DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1beta1.TimeWindow(); - } - - public static com.google.cloud.asset.v1beta1.TimeWindow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimeWindow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeWindow(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.v1beta1.TimeWindow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindowOrBuilder.java b/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindowOrBuilder.java deleted file mode 100644 index fcb770331..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindowOrBuilder.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/v1beta1/assets.proto - -package com.google.cloud.asset.v1beta1; - -public interface TimeWindowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1beta1.TimeWindow) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); -} diff --git a/proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/asset_service.proto b/proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/asset_service.proto deleted file mode 100644 index 956c6a767..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/asset_service.proto +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.asset.v1beta1; - -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/v1beta1/assets.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Asset.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetServiceProto"; -option java_package = "com.google.cloud.asset.v1beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1beta1"; - -// Asset service definition. -service AssetService { - option (google.api.default_host) = "cloudasset.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // 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: "/v1beta1/{parent=projects/*}:exportAssets" - body: "*" - additional_bindings { - post: "/v1beta1/{parent=folders/*}:exportAssets" - body: "*" - } - additional_bindings { - post: "/v1beta1/{parent=organizations/*}:exportAssets" - body: "*" - } - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.asset.v1beta1.ExportAssetsResponse" - metadata_type: "google.cloud.asset.v1beta1.ExportAssetsRequest" - }; - } - - // 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. - // If a specified asset does not exist, this API returns an INVALID_ARGUMENT - // error. - rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) - returns (BatchGetAssetsHistoryResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*}:batchGetAssetsHistory" - additional_bindings { - get: "/v1beta1/{parent=organizations/*}:batchGetAssetsHistory" - } - }; - } -} - -// 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"), a project number (such as "projects/12345"), or - // a folder number (such as "folders/123"). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/Asset" - } - ]; - - // 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: - // "google.compute.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 [(google.api.field_behavior) = REQUIRED]; -} - -// 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 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/Asset" - } - ]; - - // 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) - // 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; - - // Optional. The content type. - ContentType content_type = 3 [(google.api.field_behavior) = OPTIONAL]; - - // 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 [(google.api.field_behavior) = OPTIONAL]; -} - -// Batch get assets history response. -message BatchGetAssetsHistoryResponse { - // A list of assets with valid time windows. - repeated TemporalAsset assets = 1; -} - -// Output configuration for export assets destination. -message OutputConfig { - // Asset export destination. - oneof destination { - // Destination on Cloud Storage. - GcsDestination gcs_destination = 1; - } -} - -// A Cloud Storage location. -message GcsDestination { - // Required. - oneof object_uri { - // The uri of the Cloud Storage object. It's the same uri that is used by - // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and - // Editing Object - // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) - // for more information. - string uri = 1; - - // 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/google.compute.disk/0" is the first - // shard of output objects containing all google.compute.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; - } -} - -// 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-v1beta1/src/main/proto/google/cloud/asset/v1beta1/assets.proto b/proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/assets.proto deleted file mode 100644 index 4bb1438c8..000000000 --- a/proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/assets.proto +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.asset.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/resource.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Asset.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetProto"; -option java_package = "com.google.cloud.asset.v1beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1beta1"; - -// Temporal asset. In addition to the asset, the temporal asset includes the -// status of the asset and valid from and to time of it. -message TemporalAsset { - // The time window when the asset data and state was observed. - TimeWindow window = 1; - - // If the asset is deleted or not. - bool deleted = 2; - - // Asset. - Asset asset = 3; -} - -// A time window of (start_time, end_time]. -message TimeWindow { - // Start time of the time window (exclusive). - google.protobuf.Timestamp start_time = 1; - - // End time of the time window (inclusive). - // Current timestamp if not specified. - google.protobuf.Timestamp end_time = 2; -} - -// Cloud asset. This includes all Google Cloud Platform resources, -// Cloud IAM policies, and other non-GCP assets. -message Asset { - option (google.api.resource) = { - type: "cloudasset.googleapis.com/Asset" - pattern: "*" - }; - - // The full name of the asset. For example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // See [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - string name = 1; - - // Type of the asset. Example: "google.compute.Disk". - string asset_type = 2; - - // Representation of the resource. - Resource resource = 3; - - // Representation of the actual Cloud IAM policy set on a cloud resource. For - // each resource, there must be at most one Cloud IAM policy set on it. - google.iam.v1.Policy iam_policy = 4; -} - -// Representation of a cloud resource. -message Resource { - // The API version. Example: "v1". - string version = 1; - - // The URL of the discovery document containing the resource's JSON schema. - // For example: - // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. - // It will be left unspecified for resources without a discovery-based API, - // such as Cloud Bigtable. - string discovery_document_uri = 2; - - // The JSON schema name listed in the discovery document. - // Example: "Project". It will be left unspecified for resources (such as - // Cloud Bigtable) without a discovery-based API. - string discovery_name = 3; - - // The REST URL for accessing the resource. An HTTP GET operation using this - // URL returns the resource itself. - // Example: - // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. - // It will be left unspecified for resources without a REST API. - string resource_url = 4; - - // The full name of the immediate parent of this resource. See - // [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - // - // For GCP assets, it is the parent resource defined in the [Cloud IAM policy - // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). - // For example: - // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. - // - // For third-party assets, it is up to the users to define. - string parent = 5; - - // The content of the resource, in which some sensitive fields are scrubbed - // away and may not be present. - google.protobuf.Struct data = 6; -} diff --git a/versions.txt b/versions.txt index 49889b324..d70259073 100644 --- a/versions.txt +++ b/versions.txt @@ -3,7 +3,6 @@ google-cloud-asset:2.4.0:2.4.1-SNAPSHOT grpc-google-cloud-asset-v1:2.4.0:2.4.1-SNAPSHOT -grpc-google-cloud-asset-v1beta1:0.97.0:0.97.1-SNAPSHOT grpc-google-cloud-asset-v1p1beta1:0.97.0:0.97.1-SNAPSHOT grpc-google-cloud-asset-v1p2beta1:0.97.0:0.97.1-SNAPSHOT grpc-google-cloud-asset-v1p4beta1:0.97.0:0.97.1-SNAPSHOT @@ -12,7 +11,6 @@ grpc-google-cloud-asset-v1p7beta1:2.4.0:2.4.1-SNAPSHOT proto-google-cloud-asset-v1:2.4.0:2.4.1-SNAPSHOT proto-google-cloud-asset-v1p1beta1:0.97.0:0.97.1-SNAPSHOT proto-google-cloud-asset-v1p2beta1:0.97.0:0.97.1-SNAPSHOT -proto-google-cloud-asset-v1beta1:0.97.0:0.97.1-SNAPSHOT proto-google-cloud-asset-v1p4beta1:0.97.0:0.97.1-SNAPSHOT proto-google-cloud-asset-v1p5beta1:0.97.0:0.97.1-SNAPSHOT proto-google-cloud-asset-v1p7beta1:2.4.0:2.4.1-SNAPSHOT