From 69ecc64893cc9734b5fb7711691ac3d23650322f Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 22 Jan 2025 14:44:28 -0800 Subject: [PATCH 1/4] chore: Running pull-gapic-grpc to refresh Gapic layer for datastore gapic upgrade --- .../cloud/datastore/v1/DatastoreClient.java | 2 +- .../cloud/datastore/v1/DatastoreSettings.java | 3 +- .../cloud/datastore/v1/package-info.java | 2 +- .../datastore/v1/stub/DatastoreStub.java | 2 +- .../v1/stub/DatastoreStubSettings.java | 2 +- .../v1/stub/GrpcDatastoreCallableFactory.java | 2 +- .../datastore/v1/stub/GrpcDatastoreStub.java | 3 +- .../HttpJsonDatastoreCallableFactory.java | 2 +- .../v1/stub/HttpJsonDatastoreStub.java | 2 +- .../v1/DatastoreClientHttpJsonTest.java | 2 +- .../datastore/v1/DatastoreClientTest.java | 2 +- .../cloud/datastore/v1/MockDatastore.java | 2 +- .../cloud/datastore/v1/MockDatastoreImpl.java | 2 +- .../google/datastore/v1/DatastoreGrpc.java | 833 +++++++----------- pull-gapic-grpc.sh | 0 15 files changed, 318 insertions(+), 543 deletions(-) mode change 100644 => 100755 pull-gapic-grpc.sh diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreClient.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreClient.java index e88ad91b6..e8bea055f 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreClient.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java index a92b88450..c0c36162c 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ 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.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.datastore.v1.stub.DatastoreStubSettings; diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/package-info.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/package-info.java index 6513a68de..0484a7c04 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/package-info.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStub.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStub.java index b3b802986..231289f18 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStub.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStubSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStubSettings.java index 12a1b177e..a4554339d 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStubSettings.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/DatastoreStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreCallableFactory.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreCallableFactory.java index 0945ac1bc..ffe225259 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreCallableFactory.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java index fd75892ae..f9df58032 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,7 @@ 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; diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/HttpJsonDatastoreCallableFactory.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/HttpJsonDatastoreCallableFactory.java index 323a00282..b12560ab1 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/HttpJsonDatastoreCallableFactory.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/HttpJsonDatastoreCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/HttpJsonDatastoreStub.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/HttpJsonDatastoreStub.java index 2d6634828..4d77fcac2 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/HttpJsonDatastoreStub.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/HttpJsonDatastoreStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/DatastoreClientHttpJsonTest.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/DatastoreClientHttpJsonTest.java index 541f3b603..293c904b9 100644 --- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/DatastoreClientHttpJsonTest.java +++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/DatastoreClientHttpJsonTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/DatastoreClientTest.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/DatastoreClientTest.java index 1dc96c5d1..909330b51 100644 --- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/DatastoreClientTest.java +++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/DatastoreClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/MockDatastore.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/MockDatastore.java index ecdbcd2e9..e64c68018 100644 --- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/MockDatastore.java +++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/MockDatastore.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/MockDatastoreImpl.java b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/MockDatastoreImpl.java index c7e0ded1f..e37eac6c0 100644 --- a/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/MockDatastoreImpl.java +++ b/google-cloud-datastore/src/test/java/com/google/cloud/datastore/v1/MockDatastoreImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java b/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java index d10d42190..dac852f6e 100644 --- a/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java +++ b/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java @@ -1,25 +1,8 @@ -/* - * Copyright 2024 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.datastore.v1; import static io.grpc.MethodDescriptor.generateFullMethodName; /** - * - * *
* Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -40,389 +23,299 @@ private DatastoreGrpc() {} public static final java.lang.String SERVICE_NAME = "google.datastore.v1.Datastore"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> - getLookupMethod; + private static volatile io.grpc.MethodDescriptorgetLookupMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Lookup", requestType = com.google.datastore.v1.LookupRequest.class, responseType = com.google.datastore.v1.LookupResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> - getLookupMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> - getLookupMethod; + public static io.grpc.MethodDescriptor getLookupMethod() { + io.grpc.MethodDescriptor getLookupMethod; if ((getLookupMethod = DatastoreGrpc.getLookupMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getLookupMethod = DatastoreGrpc.getLookupMethod) == null) { - DatastoreGrpc.getLookupMethod = - getLookupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Lookup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.LookupRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.LookupResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Lookup")) - .build(); + DatastoreGrpc.getLookupMethod = getLookupMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Lookup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.LookupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.LookupResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Lookup")) + .build(); } } } return getLookupMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> - getRunQueryMethod; + private static volatile io.grpc.MethodDescriptor getRunQueryMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RunQuery", requestType = com.google.datastore.v1.RunQueryRequest.class, responseType = com.google.datastore.v1.RunQueryResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> - getRunQueryMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> - getRunQueryMethod; + public static io.grpc.MethodDescriptor getRunQueryMethod() { + io.grpc.MethodDescriptor getRunQueryMethod; if ((getRunQueryMethod = DatastoreGrpc.getRunQueryMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getRunQueryMethod = DatastoreGrpc.getRunQueryMethod) == null) { - DatastoreGrpc.getRunQueryMethod = - getRunQueryMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunQueryRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunQueryResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunQuery")) - .build(); + DatastoreGrpc.getRunQueryMethod = getRunQueryMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunQueryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunQueryResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunQuery")) + .build(); } } } return getRunQueryMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.RunAggregationQueryRequest, - com.google.datastore.v1.RunAggregationQueryResponse> - getRunAggregationQueryMethod; + private static volatile io.grpc.MethodDescriptor getRunAggregationQueryMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RunAggregationQuery", requestType = com.google.datastore.v1.RunAggregationQueryRequest.class, responseType = com.google.datastore.v1.RunAggregationQueryResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.RunAggregationQueryRequest, - com.google.datastore.v1.RunAggregationQueryResponse> - getRunAggregationQueryMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.RunAggregationQueryRequest, - com.google.datastore.v1.RunAggregationQueryResponse> - getRunAggregationQueryMethod; + public static io.grpc.MethodDescriptor getRunAggregationQueryMethod() { + io.grpc.MethodDescriptor getRunAggregationQueryMethod; if ((getRunAggregationQueryMethod = DatastoreGrpc.getRunAggregationQueryMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getRunAggregationQueryMethod = DatastoreGrpc.getRunAggregationQueryMethod) == null) { - DatastoreGrpc.getRunAggregationQueryMethod = - getRunAggregationQueryMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "RunAggregationQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunAggregationQueryRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunAggregationQueryResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DatastoreMethodDescriptorSupplier("RunAggregationQuery")) - .build(); + DatastoreGrpc.getRunAggregationQueryMethod = getRunAggregationQueryMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunAggregationQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunAggregationQueryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunAggregationQueryResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunAggregationQuery")) + .build(); } } } return getRunAggregationQueryMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.BeginTransactionRequest, - com.google.datastore.v1.BeginTransactionResponse> - getBeginTransactionMethod; + private static volatile io.grpc.MethodDescriptor getBeginTransactionMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "BeginTransaction", requestType = com.google.datastore.v1.BeginTransactionRequest.class, responseType = com.google.datastore.v1.BeginTransactionResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.BeginTransactionRequest, - com.google.datastore.v1.BeginTransactionResponse> - getBeginTransactionMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.BeginTransactionRequest, - com.google.datastore.v1.BeginTransactionResponse> - getBeginTransactionMethod; + public static io.grpc.MethodDescriptor getBeginTransactionMethod() { + io.grpc.MethodDescriptor getBeginTransactionMethod; if ((getBeginTransactionMethod = DatastoreGrpc.getBeginTransactionMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getBeginTransactionMethod = DatastoreGrpc.getBeginTransactionMethod) == null) { - DatastoreGrpc.getBeginTransactionMethod = - getBeginTransactionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BeginTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.BeginTransactionRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.BeginTransactionResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DatastoreMethodDescriptorSupplier("BeginTransaction")) - .build(); + DatastoreGrpc.getBeginTransactionMethod = getBeginTransactionMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BeginTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.BeginTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.BeginTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("BeginTransaction")) + .build(); } } } return getBeginTransactionMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> - getCommitMethod; + private static volatile io.grpc.MethodDescriptor getCommitMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Commit", requestType = com.google.datastore.v1.CommitRequest.class, responseType = com.google.datastore.v1.CommitResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> - getCommitMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> - getCommitMethod; + public static io.grpc.MethodDescriptor getCommitMethod() { + io.grpc.MethodDescriptor getCommitMethod; if ((getCommitMethod = DatastoreGrpc.getCommitMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getCommitMethod = DatastoreGrpc.getCommitMethod) == null) { - DatastoreGrpc.getCommitMethod = - getCommitMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Commit")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.CommitRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.CommitResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Commit")) - .build(); + DatastoreGrpc.getCommitMethod = getCommitMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Commit")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.CommitRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.CommitResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Commit")) + .build(); } } } return getCommitMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> - getRollbackMethod; + private static volatile io.grpc.MethodDescriptor getRollbackMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Rollback", requestType = com.google.datastore.v1.RollbackRequest.class, responseType = com.google.datastore.v1.RollbackResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> - getRollbackMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> - getRollbackMethod; + public static io.grpc.MethodDescriptor getRollbackMethod() { + io.grpc.MethodDescriptor getRollbackMethod; if ((getRollbackMethod = DatastoreGrpc.getRollbackMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getRollbackMethod = DatastoreGrpc.getRollbackMethod) == null) { - DatastoreGrpc.getRollbackMethod = - getRollbackMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Rollback")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RollbackRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RollbackResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Rollback")) - .build(); + DatastoreGrpc.getRollbackMethod = getRollbackMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Rollback")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RollbackRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RollbackResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Rollback")) + .build(); } } } return getRollbackMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.AllocateIdsRequest, com.google.datastore.v1.AllocateIdsResponse> - getAllocateIdsMethod; + private static volatile io.grpc.MethodDescriptor getAllocateIdsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "AllocateIds", requestType = com.google.datastore.v1.AllocateIdsRequest.class, responseType = com.google.datastore.v1.AllocateIdsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.AllocateIdsRequest, com.google.datastore.v1.AllocateIdsResponse> - getAllocateIdsMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.AllocateIdsRequest, com.google.datastore.v1.AllocateIdsResponse> - getAllocateIdsMethod; + public static io.grpc.MethodDescriptor getAllocateIdsMethod() { + io.grpc.MethodDescriptor getAllocateIdsMethod; if ((getAllocateIdsMethod = DatastoreGrpc.getAllocateIdsMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getAllocateIdsMethod = DatastoreGrpc.getAllocateIdsMethod) == null) { - DatastoreGrpc.getAllocateIdsMethod = - getAllocateIdsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AllocateIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.AllocateIdsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.AllocateIdsResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("AllocateIds")) - .build(); + DatastoreGrpc.getAllocateIdsMethod = getAllocateIdsMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AllocateIds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.AllocateIdsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.AllocateIdsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("AllocateIds")) + .build(); } } } return getAllocateIdsMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.ReserveIdsRequest, com.google.datastore.v1.ReserveIdsResponse> - getReserveIdsMethod; + private static volatile io.grpc.MethodDescriptor getReserveIdsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ReserveIds", requestType = com.google.datastore.v1.ReserveIdsRequest.class, responseType = com.google.datastore.v1.ReserveIdsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.ReserveIdsRequest, com.google.datastore.v1.ReserveIdsResponse> - getReserveIdsMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.ReserveIdsRequest, com.google.datastore.v1.ReserveIdsResponse> - getReserveIdsMethod; + public static io.grpc.MethodDescriptor getReserveIdsMethod() { + io.grpc.MethodDescriptor getReserveIdsMethod; if ((getReserveIdsMethod = DatastoreGrpc.getReserveIdsMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getReserveIdsMethod = DatastoreGrpc.getReserveIdsMethod) == null) { - DatastoreGrpc.getReserveIdsMethod = - getReserveIdsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReserveIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.ReserveIdsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.ReserveIdsResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("ReserveIds")) - .build(); + DatastoreGrpc.getReserveIdsMethod = getReserveIdsMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReserveIds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.ReserveIdsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.ReserveIdsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("ReserveIds")) + .build(); } } } return getReserveIdsMethod; } - /** Creates a new async stub that supports all call types for the service */ + /** + * Creates a new async stub that supports all call types for the service + */ public static DatastoreStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public DatastoreStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DatastoreStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public DatastoreStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatastoreStub(channel, callOptions); + } + }; return DatastoreStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public static DatastoreBlockingStub newBlockingStub(io.grpc.Channel channel) { + public static DatastoreBlockingStub newBlockingStub( + io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public DatastoreBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DatastoreBlockingStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public DatastoreBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatastoreBlockingStub(channel, callOptions); + } + }; return DatastoreBlockingStub.newStub(factory, channel); } - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static DatastoreFutureStub newFutureStub(io.grpc.Channel channel) { + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DatastoreFutureStub newFutureStub( + io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public DatastoreFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DatastoreFutureStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public DatastoreFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatastoreFutureStub(channel, callOptions); + } + }; return DatastoreFutureStub.newStub(factory, channel); } /** - * - * * * Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -435,113 +328,84 @@ public DatastoreFutureStub newStub( public interface AsyncService { /** - * - * ** Looks up entities by key. **/ - default void lookup( - com.google.datastore.v1.LookupRequest request, + default void lookup(com.google.datastore.v1.LookupRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLookupMethod(), responseObserver); } /** - * - * * * Queries for entities. **/ - default void runQuery( - com.google.datastore.v1.RunQueryRequest request, + default void runQuery(com.google.datastore.v1.RunQueryRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunQueryMethod(), responseObserver); } /** - * - * * * Runs an aggregation query. **/ - default void runAggregationQuery( - com.google.datastore.v1.RunAggregationQueryRequest request, - io.grpc.stub.StreamObserver- responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRunAggregationQueryMethod(), responseObserver); + default void runAggregationQuery(com.google.datastore.v1.RunAggregationQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunAggregationQueryMethod(), responseObserver); } /** - * - * * * Begins a new transaction. **/ - default void beginTransaction( - com.google.datastore.v1.BeginTransactionRequest request, - io.grpc.stub.StreamObserver- responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getBeginTransactionMethod(), responseObserver); + default void beginTransaction(com.google.datastore.v1.BeginTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBeginTransactionMethod(), responseObserver); } /** - * - * * * Commits a transaction, optionally creating, deleting or modifying some * entities. **/ - default void commit( - com.google.datastore.v1.CommitRequest request, + default void commit(com.google.datastore.v1.CommitRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCommitMethod(), responseObserver); } /** - * - * * * Rolls back a transaction. **/ - default void rollback( - com.google.datastore.v1.RollbackRequest request, + default void rollback(com.google.datastore.v1.RollbackRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackMethod(), responseObserver); } /** - * - * * * Allocates IDs for the given keys, which is useful for referencing an entity * before it is inserted. **/ - default void allocateIds( - com.google.datastore.v1.AllocateIdsRequest request, + default void allocateIds(com.google.datastore.v1.AllocateIdsRequest request, io.grpc.stub.StreamObserverresponseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getAllocateIdsMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAllocateIdsMethod(), responseObserver); } /** - * - * * * Prevents the supplied keys' IDs from being auto-allocated by Cloud * Datastore. **/ - default void reserveIds( - com.google.datastore.v1.ReserveIdsRequest request, + default void reserveIds(com.google.datastore.v1.ReserveIdsRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReserveIdsMethod(), responseObserver); } @@ -549,7 +413,6 @@ default void reserveIds( /** * Base class for the server implementation of the service Datastore. - * * * Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -559,17 +422,16 @@ default void reserveIds( * the request. **/ - public abstract static class DatastoreImplBase implements io.grpc.BindableService, AsyncService { + public static abstract class DatastoreImplBase + implements io.grpc.BindableService, AsyncService { - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return DatastoreGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Datastore. - * ** Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -579,134 +441,105 @@ public final io.grpc.ServerServiceDefinition bindService() { * the request. **/ - public static final class DatastoreStub extends io.grpc.stub.AbstractAsyncStub{ - private DatastoreStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + public static final class DatastoreStub + extends io.grpc.stub.AbstractAsyncStub { + private DatastoreStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected DatastoreStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected DatastoreStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DatastoreStub(channel, callOptions); } /** - * - * * * Looks up entities by key. **/ - public void lookup( - com.google.datastore.v1.LookupRequest request, + public void lookup(com.google.datastore.v1.LookupRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getLookupMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Queries for entities. **/ - public void runQuery( - com.google.datastore.v1.RunQueryRequest request, + public void runQuery(com.google.datastore.v1.RunQueryRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRunQueryMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Runs an aggregation query. **/ - public void runAggregationQuery( - com.google.datastore.v1.RunAggregationQueryRequest request, - io.grpc.stub.StreamObserver- responseObserver) { + public void runAggregationQuery(com.google.datastore.v1.RunAggregationQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRunAggregationQueryMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getRunAggregationQueryMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Begins a new transaction. **/ - public void beginTransaction( - com.google.datastore.v1.BeginTransactionRequest request, - io.grpc.stub.StreamObserver- responseObserver) { + public void beginTransaction(com.google.datastore.v1.BeginTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBeginTransactionMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getBeginTransactionMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Commits a transaction, optionally creating, deleting or modifying some * entities. **/ - public void commit( - com.google.datastore.v1.CommitRequest request, + public void commit(com.google.datastore.v1.CommitRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCommitMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Rolls back a transaction. **/ - public void rollback( - com.google.datastore.v1.RollbackRequest request, + public void rollback(com.google.datastore.v1.RollbackRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRollbackMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Allocates IDs for the given keys, which is useful for referencing an entity * before it is inserted. **/ - public void allocateIds( - com.google.datastore.v1.AllocateIdsRequest request, + public void allocateIds(com.google.datastore.v1.AllocateIdsRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAllocateIdsMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getAllocateIdsMethod(), getCallOptions()), request, responseObserver); } /** - * - * * * Prevents the supplied keys' IDs from being auto-allocated by Cloud * Datastore. **/ - public void reserveIds( - com.google.datastore.v1.ReserveIdsRequest request, + public void reserveIds(com.google.datastore.v1.ReserveIdsRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getReserveIdsMethod(), getCallOptions()), request, responseObserver); @@ -715,7 +548,6 @@ public void reserveIds( /** * A stub to allow clients to do synchronous rpc calls to service Datastore. - * * * Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -727,7 +559,8 @@ public void reserveIds( */ public static final class DatastoreBlockingStub extends io.grpc.stub.AbstractBlockingStub{ - private DatastoreBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private DatastoreBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -738,108 +571,84 @@ protected DatastoreBlockingStub build( } /** - * - * * * Looks up entities by key. **/ - public com.google.datastore.v1.LookupResponse lookup( - com.google.datastore.v1.LookupRequest request) { + public com.google.datastore.v1.LookupResponse lookup(com.google.datastore.v1.LookupRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getLookupMethod(), getCallOptions(), request); } /** - * - * ** Queries for entities. **/ - public com.google.datastore.v1.RunQueryResponse runQuery( - com.google.datastore.v1.RunQueryRequest request) { + public com.google.datastore.v1.RunQueryResponse runQuery(com.google.datastore.v1.RunQueryRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRunQueryMethod(), getCallOptions(), request); } /** - * - * ** Runs an aggregation query. **/ - public com.google.datastore.v1.RunAggregationQueryResponse runAggregationQuery( - com.google.datastore.v1.RunAggregationQueryRequest request) { + public com.google.datastore.v1.RunAggregationQueryResponse runAggregationQuery(com.google.datastore.v1.RunAggregationQueryRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRunAggregationQueryMethod(), getCallOptions(), request); } /** - * - * ** Begins a new transaction. **/ - public com.google.datastore.v1.BeginTransactionResponse beginTransaction( - com.google.datastore.v1.BeginTransactionRequest request) { + public com.google.datastore.v1.BeginTransactionResponse beginTransaction(com.google.datastore.v1.BeginTransactionRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getBeginTransactionMethod(), getCallOptions(), request); } /** - * - * ** Commits a transaction, optionally creating, deleting or modifying some * entities. **/ - public com.google.datastore.v1.CommitResponse commit( - com.google.datastore.v1.CommitRequest request) { + public com.google.datastore.v1.CommitResponse commit(com.google.datastore.v1.CommitRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCommitMethod(), getCallOptions(), request); } /** - * - * ** Rolls back a transaction. **/ - public com.google.datastore.v1.RollbackResponse rollback( - com.google.datastore.v1.RollbackRequest request) { + public com.google.datastore.v1.RollbackResponse rollback(com.google.datastore.v1.RollbackRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRollbackMethod(), getCallOptions(), request); } /** - * - * ** Allocates IDs for the given keys, which is useful for referencing an entity * before it is inserted. **/ - public com.google.datastore.v1.AllocateIdsResponse allocateIds( - com.google.datastore.v1.AllocateIdsRequest request) { + public com.google.datastore.v1.AllocateIdsResponse allocateIds(com.google.datastore.v1.AllocateIdsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getAllocateIdsMethod(), getCallOptions(), request); } /** - * - * ** Prevents the supplied keys' IDs from being auto-allocated by Cloud * Datastore. **/ - public com.google.datastore.v1.ReserveIdsResponse reserveIds( - com.google.datastore.v1.ReserveIdsRequest request) { + public com.google.datastore.v1.ReserveIdsResponse reserveIds(com.google.datastore.v1.ReserveIdsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getReserveIdsMethod(), getCallOptions(), request); } @@ -847,7 +656,6 @@ public com.google.datastore.v1.ReserveIdsResponse reserveIds( /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Datastore. - * ** Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -859,126 +667,104 @@ public com.google.datastore.v1.ReserveIdsResponse reserveIds( */ public static final class DatastoreFutureStub extends io.grpc.stub.AbstractFutureStub{ - private DatastoreFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private DatastoreFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected DatastoreFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected DatastoreFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DatastoreFutureStub(channel, callOptions); } /** - * - * * * Looks up entities by key. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.datastore.v1.LookupResponse> - lookup(com.google.datastore.v1.LookupRequest request) { + public com.google.common.util.concurrent.ListenableFuturelookup( + com.google.datastore.v1.LookupRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getLookupMethod(), getCallOptions()), request); } /** - * - * * * Queries for entities. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.datastore.v1.RunQueryResponse> - runQuery(com.google.datastore.v1.RunQueryRequest request) { + public com.google.common.util.concurrent.ListenableFuturerunQuery( + com.google.datastore.v1.RunQueryRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRunQueryMethod(), getCallOptions()), request); } /** - * - * * * Runs an aggregation query. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.datastore.v1.RunAggregationQueryResponse> - runAggregationQuery(com.google.datastore.v1.RunAggregationQueryRequest request) { + public com.google.common.util.concurrent.ListenableFuturerunAggregationQuery( + com.google.datastore.v1.RunAggregationQueryRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRunAggregationQueryMethod(), getCallOptions()), request); } /** - * - * * * Begins a new transaction. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.datastore.v1.BeginTransactionResponse> - beginTransaction(com.google.datastore.v1.BeginTransactionRequest request) { + public com.google.common.util.concurrent.ListenableFuturebeginTransaction( + com.google.datastore.v1.BeginTransactionRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getBeginTransactionMethod(), getCallOptions()), request); } /** - * - * * * Commits a transaction, optionally creating, deleting or modifying some * entities. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.datastore.v1.CommitResponse> - commit(com.google.datastore.v1.CommitRequest request) { + public com.google.common.util.concurrent.ListenableFuturecommit( + com.google.datastore.v1.CommitRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCommitMethod(), getCallOptions()), request); } /** - * - * * * Rolls back a transaction. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.datastore.v1.RollbackResponse> - rollback(com.google.datastore.v1.RollbackRequest request) { + public com.google.common.util.concurrent.ListenableFuturerollback( + com.google.datastore.v1.RollbackRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRollbackMethod(), getCallOptions()), request); } /** - * - * * * Allocates IDs for the given keys, which is useful for referencing an entity * before it is inserted. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.datastore.v1.AllocateIdsResponse> - allocateIds(com.google.datastore.v1.AllocateIdsRequest request) { + public com.google.common.util.concurrent.ListenableFutureallocateIds( + com.google.datastore.v1.AllocateIdsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getAllocateIdsMethod(), getCallOptions()), request); } /** - * - * * * Prevents the supplied keys' IDs from being auto-allocated by Cloud * Datastore. **/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.datastore.v1.ReserveIdsResponse> - reserveIds(com.google.datastore.v1.ReserveIdsRequest request) { + public com.google.common.util.concurrent.ListenableFuturereserveIds( + com.google.datastore.v1.ReserveIdsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReserveIdsMethod(), getCallOptions()), request); } @@ -993,11 +779,11 @@ protected DatastoreFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions private static final int METHODID_ALLOCATE_IDS = 6; private static final int METHODID_RESERVE_IDS = 7; - 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 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 AsyncService serviceImpl; private final int methodId; @@ -1011,52 +797,36 @@ private static final class MethodHandlers public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_LOOKUP: - serviceImpl.lookup( - (com.google.datastore.v1.LookupRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.lookup((com.google.datastore.v1.LookupRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_RUN_QUERY: - serviceImpl.runQuery( - (com.google.datastore.v1.RunQueryRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.runQuery((com.google.datastore.v1.RunQueryRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_RUN_AGGREGATION_QUERY: - serviceImpl.runAggregationQuery( - (com.google.datastore.v1.RunAggregationQueryRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.runAggregationQuery((com.google.datastore.v1.RunAggregationQueryRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_BEGIN_TRANSACTION: - serviceImpl.beginTransaction( - (com.google.datastore.v1.BeginTransactionRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.beginTransaction((com.google.datastore.v1.BeginTransactionRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_COMMIT: - serviceImpl.commit( - (com.google.datastore.v1.CommitRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.commit((com.google.datastore.v1.CommitRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_ROLLBACK: - serviceImpl.rollback( - (com.google.datastore.v1.RollbackRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.rollback((com.google.datastore.v1.RollbackRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_ALLOCATE_IDS: - serviceImpl.allocateIds( - (com.google.datastore.v1.AllocateIdsRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.allocateIds((com.google.datastore.v1.AllocateIdsRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; case METHODID_RESERVE_IDS: - serviceImpl.reserveIds( - (com.google.datastore.v1.ReserveIdsRequest) request, - (io.grpc.stub.StreamObserver ) - responseObserver); + serviceImpl.reserveIds((com.google.datastore.v1.ReserveIdsRequest) request, + (io.grpc.stub.StreamObserver ) responseObserver); break; default: throw new AssertionError(); @@ -1077,61 +847,66 @@ public io.grpc.stub.StreamObserver invoke( public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getLookupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse>( - service, METHODID_LOOKUP))) + getLookupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.LookupRequest, + com.google.datastore.v1.LookupResponse>( + service, METHODID_LOOKUP))) .addMethod( - getRunQueryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.RunQueryRequest, - com.google.datastore.v1.RunQueryResponse>(service, METHODID_RUN_QUERY))) + getRunQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.RunQueryRequest, + com.google.datastore.v1.RunQueryResponse>( + service, METHODID_RUN_QUERY))) .addMethod( - getRunAggregationQueryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.RunAggregationQueryRequest, - com.google.datastore.v1.RunAggregationQueryResponse>( - service, METHODID_RUN_AGGREGATION_QUERY))) + getRunAggregationQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.RunAggregationQueryRequest, + com.google.datastore.v1.RunAggregationQueryResponse>( + service, METHODID_RUN_AGGREGATION_QUERY))) .addMethod( - getBeginTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.BeginTransactionRequest, - com.google.datastore.v1.BeginTransactionResponse>( - service, METHODID_BEGIN_TRANSACTION))) + getBeginTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.BeginTransactionRequest, + com.google.datastore.v1.BeginTransactionResponse>( + service, METHODID_BEGIN_TRANSACTION))) .addMethod( - getCommitMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse>( - service, METHODID_COMMIT))) + getCommitMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.CommitRequest, + com.google.datastore.v1.CommitResponse>( + service, METHODID_COMMIT))) .addMethod( - getRollbackMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.RollbackRequest, - com.google.datastore.v1.RollbackResponse>(service, METHODID_ROLLBACK))) + getRollbackMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.RollbackRequest, + com.google.datastore.v1.RollbackResponse>( + service, METHODID_ROLLBACK))) .addMethod( - getAllocateIdsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.AllocateIdsRequest, - com.google.datastore.v1.AllocateIdsResponse>(service, METHODID_ALLOCATE_IDS))) + getAllocateIdsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.AllocateIdsRequest, + com.google.datastore.v1.AllocateIdsResponse>( + service, METHODID_ALLOCATE_IDS))) .addMethod( - getReserveIdsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.ReserveIdsRequest, - com.google.datastore.v1.ReserveIdsResponse>(service, METHODID_RESERVE_IDS))) + getReserveIdsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.ReserveIdsRequest, + com.google.datastore.v1.ReserveIdsResponse>( + service, METHODID_RESERVE_IDS))) .build(); } - private abstract static class DatastoreBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { + private static abstract class DatastoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DatastoreBaseDescriptorSupplier() {} @java.lang.Override @@ -1173,19 +948,17 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { synchronized (DatastoreGrpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DatastoreFileDescriptorSupplier()) - .addMethod(getLookupMethod()) - .addMethod(getRunQueryMethod()) - .addMethod(getRunAggregationQueryMethod()) - .addMethod(getBeginTransactionMethod()) - .addMethod(getCommitMethod()) - .addMethod(getRollbackMethod()) - .addMethod(getAllocateIdsMethod()) - .addMethod(getReserveIdsMethod()) - .build(); + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DatastoreFileDescriptorSupplier()) + .addMethod(getLookupMethod()) + .addMethod(getRunQueryMethod()) + .addMethod(getRunAggregationQueryMethod()) + .addMethod(getBeginTransactionMethod()) + .addMethod(getCommitMethod()) + .addMethod(getRollbackMethod()) + .addMethod(getAllocateIdsMethod()) + .addMethod(getReserveIdsMethod()) + .build(); } } } diff --git a/pull-gapic-grpc.sh b/pull-gapic-grpc.sh old mode 100644 new mode 100755 From b571631e7c405ce65fec2c61ecc4432d236163d8 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Thu, 23 Jan 2025 10:54:10 -0800 Subject: [PATCH 2/4] chore: Running pull-gapic-grpc to refresh Gapic layer for datastore gapic upgrade --- .../com/google/datastore/v1/DatastoreGrpc.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java b/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java index dac852f6e..e1c694e3a 100644 --- a/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java +++ b/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java @@ -1,3 +1,18 @@ +/* + * Copyright 2025 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.datastore.v1; import static io.grpc.MethodDescriptor.generateFullMethodName; From fb3e7fe3609988e3f2d94311ca40d22a0336228f Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Thu, 23 Jan 2025 10:58:06 -0800 Subject: [PATCH 3/4] chore: Running pull-gapic-grpc to refresh Gapic layer for datastore gapic upgrade --- .../cloud/datastore/v1/DatastoreSettings.java | 1 - .../datastore/v1/stub/GrpcDatastoreStub.java | 1 - .../google/datastore/v1/DatastoreGrpc.java | 818 +++++++++++------- 3 files changed, 515 insertions(+), 305 deletions(-) diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java index c0c36162c..74054341e 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java @@ -25,7 +25,6 @@ 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.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.datastore.v1.stub.DatastoreStubSettings; diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java index f9df58032..487413816 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java @@ -44,7 +44,6 @@ 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; diff --git a/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java b/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java index e1c694e3a..6ff5c41a5 100644 --- a/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java +++ b/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java @@ -18,6 +18,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** + * + * * * Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -38,299 +40,389 @@ private DatastoreGrpc() {} public static final java.lang.String SERVICE_NAME = "google.datastore.v1.Datastore"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptorgetLookupMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> + getLookupMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Lookup", requestType = com.google.datastore.v1.LookupRequest.class, responseType = com.google.datastore.v1.LookupResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getLookupMethod() { - io.grpc.MethodDescriptor getLookupMethod; + public static io.grpc.MethodDescriptor< + com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> + getLookupMethod() { + io.grpc.MethodDescriptor< + com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> + getLookupMethod; if ((getLookupMethod = DatastoreGrpc.getLookupMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getLookupMethod = DatastoreGrpc.getLookupMethod) == null) { - DatastoreGrpc.getLookupMethod = getLookupMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Lookup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.LookupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.LookupResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Lookup")) - .build(); + DatastoreGrpc.getLookupMethod = + getLookupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Lookup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.LookupRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.LookupResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Lookup")) + .build(); } } } return getLookupMethod; } - private static volatile io.grpc.MethodDescriptor getRunQueryMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> + getRunQueryMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RunQuery", requestType = com.google.datastore.v1.RunQueryRequest.class, responseType = com.google.datastore.v1.RunQueryResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRunQueryMethod() { - io.grpc.MethodDescriptor getRunQueryMethod; + public static io.grpc.MethodDescriptor< + com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> + getRunQueryMethod() { + io.grpc.MethodDescriptor< + com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> + getRunQueryMethod; if ((getRunQueryMethod = DatastoreGrpc.getRunQueryMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getRunQueryMethod = DatastoreGrpc.getRunQueryMethod) == null) { - DatastoreGrpc.getRunQueryMethod = getRunQueryMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunQueryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunQueryResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunQuery")) - .build(); + DatastoreGrpc.getRunQueryMethod = + getRunQueryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunQueryResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunQuery")) + .build(); } } } return getRunQueryMethod; } - private static volatile io.grpc.MethodDescriptor getRunAggregationQueryMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.datastore.v1.RunAggregationQueryRequest, + com.google.datastore.v1.RunAggregationQueryResponse> + getRunAggregationQueryMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RunAggregationQuery", requestType = com.google.datastore.v1.RunAggregationQueryRequest.class, responseType = com.google.datastore.v1.RunAggregationQueryResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRunAggregationQueryMethod() { - io.grpc.MethodDescriptor getRunAggregationQueryMethod; + public static io.grpc.MethodDescriptor< + com.google.datastore.v1.RunAggregationQueryRequest, + com.google.datastore.v1.RunAggregationQueryResponse> + getRunAggregationQueryMethod() { + io.grpc.MethodDescriptor< + com.google.datastore.v1.RunAggregationQueryRequest, + com.google.datastore.v1.RunAggregationQueryResponse> + getRunAggregationQueryMethod; if ((getRunAggregationQueryMethod = DatastoreGrpc.getRunAggregationQueryMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getRunAggregationQueryMethod = DatastoreGrpc.getRunAggregationQueryMethod) == null) { - DatastoreGrpc.getRunAggregationQueryMethod = getRunAggregationQueryMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunAggregationQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunAggregationQueryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunAggregationQueryResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunAggregationQuery")) - .build(); + DatastoreGrpc.getRunAggregationQueryMethod = + getRunAggregationQueryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RunAggregationQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunAggregationQueryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunAggregationQueryResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DatastoreMethodDescriptorSupplier("RunAggregationQuery")) + .build(); } } } return getRunAggregationQueryMethod; } - private static volatile io.grpc.MethodDescriptor getBeginTransactionMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.datastore.v1.BeginTransactionRequest, + com.google.datastore.v1.BeginTransactionResponse> + getBeginTransactionMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "BeginTransaction", requestType = com.google.datastore.v1.BeginTransactionRequest.class, responseType = com.google.datastore.v1.BeginTransactionResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBeginTransactionMethod() { - io.grpc.MethodDescriptor getBeginTransactionMethod; + public static io.grpc.MethodDescriptor< + com.google.datastore.v1.BeginTransactionRequest, + com.google.datastore.v1.BeginTransactionResponse> + getBeginTransactionMethod() { + io.grpc.MethodDescriptor< + com.google.datastore.v1.BeginTransactionRequest, + com.google.datastore.v1.BeginTransactionResponse> + getBeginTransactionMethod; if ((getBeginTransactionMethod = DatastoreGrpc.getBeginTransactionMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getBeginTransactionMethod = DatastoreGrpc.getBeginTransactionMethod) == null) { - DatastoreGrpc.getBeginTransactionMethod = getBeginTransactionMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BeginTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.BeginTransactionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.BeginTransactionResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("BeginTransaction")) - .build(); + DatastoreGrpc.getBeginTransactionMethod = + getBeginTransactionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BeginTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.BeginTransactionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.BeginTransactionResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DatastoreMethodDescriptorSupplier("BeginTransaction")) + .build(); } } } return getBeginTransactionMethod; } - private static volatile io.grpc.MethodDescriptor getCommitMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> + getCommitMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Commit", requestType = com.google.datastore.v1.CommitRequest.class, responseType = com.google.datastore.v1.CommitResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCommitMethod() { - io.grpc.MethodDescriptor getCommitMethod; + public static io.grpc.MethodDescriptor< + com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> + getCommitMethod() { + io.grpc.MethodDescriptor< + com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> + getCommitMethod; if ((getCommitMethod = DatastoreGrpc.getCommitMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getCommitMethod = DatastoreGrpc.getCommitMethod) == null) { - DatastoreGrpc.getCommitMethod = getCommitMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Commit")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.CommitRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.CommitResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Commit")) - .build(); + DatastoreGrpc.getCommitMethod = + getCommitMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Commit")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.CommitRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.CommitResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Commit")) + .build(); } } } return getCommitMethod; } - private static volatile io.grpc.MethodDescriptor getRollbackMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> + getRollbackMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Rollback", requestType = com.google.datastore.v1.RollbackRequest.class, responseType = com.google.datastore.v1.RollbackResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRollbackMethod() { - io.grpc.MethodDescriptor getRollbackMethod; + public static io.grpc.MethodDescriptor< + com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> + getRollbackMethod() { + io.grpc.MethodDescriptor< + com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> + getRollbackMethod; if ((getRollbackMethod = DatastoreGrpc.getRollbackMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getRollbackMethod = DatastoreGrpc.getRollbackMethod) == null) { - DatastoreGrpc.getRollbackMethod = getRollbackMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Rollback")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RollbackRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RollbackResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Rollback")) - .build(); + DatastoreGrpc.getRollbackMethod = + getRollbackMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Rollback")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RollbackRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RollbackResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Rollback")) + .build(); } } } return getRollbackMethod; } - private static volatile io.grpc.MethodDescriptor getAllocateIdsMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.datastore.v1.AllocateIdsRequest, com.google.datastore.v1.AllocateIdsResponse> + getAllocateIdsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "AllocateIds", requestType = com.google.datastore.v1.AllocateIdsRequest.class, responseType = com.google.datastore.v1.AllocateIdsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAllocateIdsMethod() { - io.grpc.MethodDescriptor getAllocateIdsMethod; + public static io.grpc.MethodDescriptor< + com.google.datastore.v1.AllocateIdsRequest, com.google.datastore.v1.AllocateIdsResponse> + getAllocateIdsMethod() { + io.grpc.MethodDescriptor< + com.google.datastore.v1.AllocateIdsRequest, com.google.datastore.v1.AllocateIdsResponse> + getAllocateIdsMethod; if ((getAllocateIdsMethod = DatastoreGrpc.getAllocateIdsMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getAllocateIdsMethod = DatastoreGrpc.getAllocateIdsMethod) == null) { - DatastoreGrpc.getAllocateIdsMethod = getAllocateIdsMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AllocateIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.AllocateIdsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.AllocateIdsResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("AllocateIds")) - .build(); + DatastoreGrpc.getAllocateIdsMethod = + getAllocateIdsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AllocateIds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.AllocateIdsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.AllocateIdsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("AllocateIds")) + .build(); } } } return getAllocateIdsMethod; } - private static volatile io.grpc.MethodDescriptor getReserveIdsMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.datastore.v1.ReserveIdsRequest, com.google.datastore.v1.ReserveIdsResponse> + getReserveIdsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ReserveIds", requestType = com.google.datastore.v1.ReserveIdsRequest.class, responseType = com.google.datastore.v1.ReserveIdsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getReserveIdsMethod() { - io.grpc.MethodDescriptor getReserveIdsMethod; + public static io.grpc.MethodDescriptor< + com.google.datastore.v1.ReserveIdsRequest, com.google.datastore.v1.ReserveIdsResponse> + getReserveIdsMethod() { + io.grpc.MethodDescriptor< + com.google.datastore.v1.ReserveIdsRequest, com.google.datastore.v1.ReserveIdsResponse> + getReserveIdsMethod; if ((getReserveIdsMethod = DatastoreGrpc.getReserveIdsMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getReserveIdsMethod = DatastoreGrpc.getReserveIdsMethod) == null) { - DatastoreGrpc.getReserveIdsMethod = getReserveIdsMethod = - io.grpc.MethodDescriptor. newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReserveIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.ReserveIdsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.ReserveIdsResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("ReserveIds")) - .build(); + DatastoreGrpc.getReserveIdsMethod = + getReserveIdsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReserveIds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.ReserveIdsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.ReserveIdsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("ReserveIds")) + .build(); } } } return getReserveIdsMethod; } - /** - * Creates a new async stub that supports all call types for the service - */ + /** Creates a new async stub that supports all call types for the service */ public static DatastoreStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public DatastoreStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DatastoreStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public DatastoreStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatastoreStub(channel, callOptions); + } + }; return DatastoreStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public static DatastoreBlockingStub newBlockingStub( - io.grpc.Channel channel) { + public static DatastoreBlockingStub newBlockingStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public DatastoreBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DatastoreBlockingStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public DatastoreBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatastoreBlockingStub(channel, callOptions); + } + }; return DatastoreBlockingStub.newStub(factory, channel); } - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static DatastoreFutureStub newFutureStub( - io.grpc.Channel channel) { + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DatastoreFutureStub newFutureStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory () { - @java.lang.Override - public DatastoreFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DatastoreFutureStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory () { + @java.lang.Override + public DatastoreFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DatastoreFutureStub(channel, callOptions); + } + }; return DatastoreFutureStub.newStub(factory, channel); } /** + * + * * * Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -343,84 +435,113 @@ public DatastoreFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions public interface AsyncService { /** + * + * ** Looks up entities by key. **/ - default void lookup(com.google.datastore.v1.LookupRequest request, + default void lookup( + com.google.datastore.v1.LookupRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLookupMethod(), responseObserver); } /** + * + * * * Queries for entities. **/ - default void runQuery(com.google.datastore.v1.RunQueryRequest request, + default void runQuery( + com.google.datastore.v1.RunQueryRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunQueryMethod(), responseObserver); } /** + * + * * * Runs an aggregation query. **/ - default void runAggregationQuery(com.google.datastore.v1.RunAggregationQueryRequest request, - io.grpc.stub.StreamObserverresponseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunAggregationQueryMethod(), responseObserver); + default void runAggregationQuery( + com.google.datastore.v1.RunAggregationQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRunAggregationQueryMethod(), responseObserver); } /** + * + * * * Begins a new transaction. **/ - default void beginTransaction(com.google.datastore.v1.BeginTransactionRequest request, - io.grpc.stub.StreamObserverresponseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBeginTransactionMethod(), responseObserver); + default void beginTransaction( + com.google.datastore.v1.BeginTransactionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBeginTransactionMethod(), responseObserver); } /** + * + * * * Commits a transaction, optionally creating, deleting or modifying some * entities. **/ - default void commit(com.google.datastore.v1.CommitRequest request, + default void commit( + com.google.datastore.v1.CommitRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCommitMethod(), responseObserver); } /** + * + * * * Rolls back a transaction. **/ - default void rollback(com.google.datastore.v1.RollbackRequest request, + default void rollback( + com.google.datastore.v1.RollbackRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackMethod(), responseObserver); } /** + * + * * * Allocates IDs for the given keys, which is useful for referencing an entity * before it is inserted. **/ - default void allocateIds(com.google.datastore.v1.AllocateIdsRequest request, + default void allocateIds( + com.google.datastore.v1.AllocateIdsRequest request, io.grpc.stub.StreamObserverresponseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAllocateIdsMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAllocateIdsMethod(), responseObserver); } /** + * + * * * Prevents the supplied keys' IDs from being auto-allocated by Cloud * Datastore. **/ - default void reserveIds(com.google.datastore.v1.ReserveIdsRequest request, + default void reserveIds( + com.google.datastore.v1.ReserveIdsRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReserveIdsMethod(), responseObserver); } @@ -428,6 +549,7 @@ default void reserveIds(com.google.datastore.v1.ReserveIdsRequest request, /** * Base class for the server implementation of the service Datastore. + * * * Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -437,16 +559,17 @@ default void reserveIds(com.google.datastore.v1.ReserveIdsRequest request, * the request. **/ - public static abstract class DatastoreImplBase - implements io.grpc.BindableService, AsyncService { + public abstract static class DatastoreImplBase implements io.grpc.BindableService, AsyncService { - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { return DatastoreGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Datastore. + * ** Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -456,105 +579,134 @@ public static abstract class DatastoreImplBase * the request. **/ - public static final class DatastoreStub - extends io.grpc.stub.AbstractAsyncStub{ - private DatastoreStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + public static final class DatastoreStub extends io.grpc.stub.AbstractAsyncStub { + private DatastoreStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected DatastoreStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected DatastoreStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DatastoreStub(channel, callOptions); } /** + * + * * * Looks up entities by key. **/ - public void lookup(com.google.datastore.v1.LookupRequest request, + public void lookup( + com.google.datastore.v1.LookupRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getLookupMethod(), getCallOptions()), request, responseObserver); } /** + * + * * * Queries for entities. **/ - public void runQuery(com.google.datastore.v1.RunQueryRequest request, + public void runQuery( + com.google.datastore.v1.RunQueryRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRunQueryMethod(), getCallOptions()), request, responseObserver); } /** + * + * * * Runs an aggregation query. **/ - public void runAggregationQuery(com.google.datastore.v1.RunAggregationQueryRequest request, - io.grpc.stub.StreamObserverresponseObserver) { + public void runAggregationQuery( + com.google.datastore.v1.RunAggregationQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRunAggregationQueryMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getRunAggregationQueryMethod(), getCallOptions()), + request, + responseObserver); } /** + * + * * * Begins a new transaction. **/ - public void beginTransaction(com.google.datastore.v1.BeginTransactionRequest request, - io.grpc.stub.StreamObserverresponseObserver) { + public void beginTransaction( + com.google.datastore.v1.BeginTransactionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBeginTransactionMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getBeginTransactionMethod(), getCallOptions()), + request, + responseObserver); } /** + * + * * * Commits a transaction, optionally creating, deleting or modifying some * entities. **/ - public void commit(com.google.datastore.v1.CommitRequest request, + public void commit( + com.google.datastore.v1.CommitRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCommitMethod(), getCallOptions()), request, responseObserver); } /** + * + * * * Rolls back a transaction. **/ - public void rollback(com.google.datastore.v1.RollbackRequest request, + public void rollback( + com.google.datastore.v1.RollbackRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRollbackMethod(), getCallOptions()), request, responseObserver); } /** + * + * * * Allocates IDs for the given keys, which is useful for referencing an entity * before it is inserted. **/ - public void allocateIds(com.google.datastore.v1.AllocateIdsRequest request, + public void allocateIds( + com.google.datastore.v1.AllocateIdsRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAllocateIdsMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getAllocateIdsMethod(), getCallOptions()), + request, + responseObserver); } /** + * + * * * Prevents the supplied keys' IDs from being auto-allocated by Cloud * Datastore. **/ - public void reserveIds(com.google.datastore.v1.ReserveIdsRequest request, + public void reserveIds( + com.google.datastore.v1.ReserveIdsRequest request, io.grpc.stub.StreamObserverresponseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getReserveIdsMethod(), getCallOptions()), request, responseObserver); @@ -563,6 +715,7 @@ public void reserveIds(com.google.datastore.v1.ReserveIdsRequest request, /** * A stub to allow clients to do synchronous rpc calls to service Datastore. + * * * Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -574,8 +727,7 @@ public void reserveIds(com.google.datastore.v1.ReserveIdsRequest request, */ public static final class DatastoreBlockingStub extends io.grpc.stub.AbstractBlockingStub{ - private DatastoreBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private DatastoreBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @@ -586,84 +738,108 @@ protected DatastoreBlockingStub build( } /** + * + * * * Looks up entities by key. **/ - public com.google.datastore.v1.LookupResponse lookup(com.google.datastore.v1.LookupRequest request) { + public com.google.datastore.v1.LookupResponse lookup( + com.google.datastore.v1.LookupRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getLookupMethod(), getCallOptions(), request); } /** + * + * ** Queries for entities. **/ - public com.google.datastore.v1.RunQueryResponse runQuery(com.google.datastore.v1.RunQueryRequest request) { + public com.google.datastore.v1.RunQueryResponse runQuery( + com.google.datastore.v1.RunQueryRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRunQueryMethod(), getCallOptions(), request); } /** + * + * ** Runs an aggregation query. **/ - public com.google.datastore.v1.RunAggregationQueryResponse runAggregationQuery(com.google.datastore.v1.RunAggregationQueryRequest request) { + public com.google.datastore.v1.RunAggregationQueryResponse runAggregationQuery( + com.google.datastore.v1.RunAggregationQueryRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRunAggregationQueryMethod(), getCallOptions(), request); } /** + * + * ** Begins a new transaction. **/ - public com.google.datastore.v1.BeginTransactionResponse beginTransaction(com.google.datastore.v1.BeginTransactionRequest request) { + public com.google.datastore.v1.BeginTransactionResponse beginTransaction( + com.google.datastore.v1.BeginTransactionRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getBeginTransactionMethod(), getCallOptions(), request); } /** + * + * ** Commits a transaction, optionally creating, deleting or modifying some * entities. **/ - public com.google.datastore.v1.CommitResponse commit(com.google.datastore.v1.CommitRequest request) { + public com.google.datastore.v1.CommitResponse commit( + com.google.datastore.v1.CommitRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCommitMethod(), getCallOptions(), request); } /** + * + * ** Rolls back a transaction. **/ - public com.google.datastore.v1.RollbackResponse rollback(com.google.datastore.v1.RollbackRequest request) { + public com.google.datastore.v1.RollbackResponse rollback( + com.google.datastore.v1.RollbackRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRollbackMethod(), getCallOptions(), request); } /** + * + * ** Allocates IDs for the given keys, which is useful for referencing an entity * before it is inserted. **/ - public com.google.datastore.v1.AllocateIdsResponse allocateIds(com.google.datastore.v1.AllocateIdsRequest request) { + public com.google.datastore.v1.AllocateIdsResponse allocateIds( + com.google.datastore.v1.AllocateIdsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getAllocateIdsMethod(), getCallOptions(), request); } /** + * + * ** Prevents the supplied keys' IDs from being auto-allocated by Cloud * Datastore. **/ - public com.google.datastore.v1.ReserveIdsResponse reserveIds(com.google.datastore.v1.ReserveIdsRequest request) { + public com.google.datastore.v1.ReserveIdsResponse reserveIds( + com.google.datastore.v1.ReserveIdsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getReserveIdsMethod(), getCallOptions(), request); } @@ -671,6 +847,7 @@ public com.google.datastore.v1.ReserveIdsResponse reserveIds(com.google.datastor /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Datastore. + * ** Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -682,104 +859,126 @@ public com.google.datastore.v1.ReserveIdsResponse reserveIds(com.google.datastor */ public static final class DatastoreFutureStub extends io.grpc.stub.AbstractFutureStub{ - private DatastoreFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private DatastoreFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected DatastoreFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + protected DatastoreFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DatastoreFutureStub(channel, callOptions); } /** + * + * * * Looks up entities by key. **/ - public com.google.common.util.concurrent.ListenableFuturelookup( - com.google.datastore.v1.LookupRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.datastore.v1.LookupResponse> + lookup(com.google.datastore.v1.LookupRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getLookupMethod(), getCallOptions()), request); } /** + * + * * * Queries for entities. **/ - public com.google.common.util.concurrent.ListenableFuturerunQuery( - com.google.datastore.v1.RunQueryRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.datastore.v1.RunQueryResponse> + runQuery(com.google.datastore.v1.RunQueryRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRunQueryMethod(), getCallOptions()), request); } /** + * + * * * Runs an aggregation query. **/ - public com.google.common.util.concurrent.ListenableFuturerunAggregationQuery( - com.google.datastore.v1.RunAggregationQueryRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.datastore.v1.RunAggregationQueryResponse> + runAggregationQuery(com.google.datastore.v1.RunAggregationQueryRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRunAggregationQueryMethod(), getCallOptions()), request); } /** + * + * * * Begins a new transaction. **/ - public com.google.common.util.concurrent.ListenableFuturebeginTransaction( - com.google.datastore.v1.BeginTransactionRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.datastore.v1.BeginTransactionResponse> + beginTransaction(com.google.datastore.v1.BeginTransactionRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getBeginTransactionMethod(), getCallOptions()), request); } /** + * + * * * Commits a transaction, optionally creating, deleting or modifying some * entities. **/ - public com.google.common.util.concurrent.ListenableFuturecommit( - com.google.datastore.v1.CommitRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.datastore.v1.CommitResponse> + commit(com.google.datastore.v1.CommitRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCommitMethod(), getCallOptions()), request); } /** + * + * * * Rolls back a transaction. **/ - public com.google.common.util.concurrent.ListenableFuturerollback( - com.google.datastore.v1.RollbackRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.datastore.v1.RollbackResponse> + rollback(com.google.datastore.v1.RollbackRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRollbackMethod(), getCallOptions()), request); } /** + * + * * * Allocates IDs for the given keys, which is useful for referencing an entity * before it is inserted. **/ - public com.google.common.util.concurrent.ListenableFutureallocateIds( - com.google.datastore.v1.AllocateIdsRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.datastore.v1.AllocateIdsResponse> + allocateIds(com.google.datastore.v1.AllocateIdsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getAllocateIdsMethod(), getCallOptions()), request); } /** + * + * * * Prevents the supplied keys' IDs from being auto-allocated by Cloud * Datastore. **/ - public com.google.common.util.concurrent.ListenableFuturereserveIds( - com.google.datastore.v1.ReserveIdsRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.datastore.v1.ReserveIdsResponse> + reserveIds(com.google.datastore.v1.ReserveIdsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReserveIdsMethod(), getCallOptions()), request); } @@ -794,11 +993,11 @@ public com.google.common.util.concurrent.ListenableFuture implements - io.grpc.stub.ServerCalls.UnaryMethod , - io.grpc.stub.ServerCalls.ServerStreamingMethod , - io.grpc.stub.ServerCalls.ClientStreamingMethod , - io.grpc.stub.ServerCalls.BidiStreamingMethod { + 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 AsyncService serviceImpl; private final int methodId; @@ -812,36 +1011,52 @@ private static final class MethodHandlers implements public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_LOOKUP: - serviceImpl.lookup((com.google.datastore.v1.LookupRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.lookup( + (com.google.datastore.v1.LookupRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; case METHODID_RUN_QUERY: - serviceImpl.runQuery((com.google.datastore.v1.RunQueryRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.runQuery( + (com.google.datastore.v1.RunQueryRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; case METHODID_RUN_AGGREGATION_QUERY: - serviceImpl.runAggregationQuery((com.google.datastore.v1.RunAggregationQueryRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.runAggregationQuery( + (com.google.datastore.v1.RunAggregationQueryRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; case METHODID_BEGIN_TRANSACTION: - serviceImpl.beginTransaction((com.google.datastore.v1.BeginTransactionRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.beginTransaction( + (com.google.datastore.v1.BeginTransactionRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; case METHODID_COMMIT: - serviceImpl.commit((com.google.datastore.v1.CommitRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.commit( + (com.google.datastore.v1.CommitRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; case METHODID_ROLLBACK: - serviceImpl.rollback((com.google.datastore.v1.RollbackRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.rollback( + (com.google.datastore.v1.RollbackRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; case METHODID_ALLOCATE_IDS: - serviceImpl.allocateIds((com.google.datastore.v1.AllocateIdsRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.allocateIds( + (com.google.datastore.v1.AllocateIdsRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; case METHODID_RESERVE_IDS: - serviceImpl.reserveIds((com.google.datastore.v1.ReserveIdsRequest) request, - (io.grpc.stub.StreamObserver ) responseObserver); + serviceImpl.reserveIds( + (com.google.datastore.v1.ReserveIdsRequest) request, + (io.grpc.stub.StreamObserver ) + responseObserver); break; default: throw new AssertionError(); @@ -862,66 +1077,61 @@ public io.grpc.stub.StreamObserver invoke( public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getLookupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.LookupRequest, - com.google.datastore.v1.LookupResponse>( - service, METHODID_LOOKUP))) + getLookupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse>( + service, METHODID_LOOKUP))) .addMethod( - getRunQueryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.RunQueryRequest, - com.google.datastore.v1.RunQueryResponse>( - service, METHODID_RUN_QUERY))) + getRunQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.RunQueryRequest, + com.google.datastore.v1.RunQueryResponse>(service, METHODID_RUN_QUERY))) .addMethod( - getRunAggregationQueryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.RunAggregationQueryRequest, - com.google.datastore.v1.RunAggregationQueryResponse>( - service, METHODID_RUN_AGGREGATION_QUERY))) + getRunAggregationQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.RunAggregationQueryRequest, + com.google.datastore.v1.RunAggregationQueryResponse>( + service, METHODID_RUN_AGGREGATION_QUERY))) .addMethod( - getBeginTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.BeginTransactionRequest, - com.google.datastore.v1.BeginTransactionResponse>( - service, METHODID_BEGIN_TRANSACTION))) + getBeginTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.BeginTransactionRequest, + com.google.datastore.v1.BeginTransactionResponse>( + service, METHODID_BEGIN_TRANSACTION))) .addMethod( - getCommitMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.CommitRequest, - com.google.datastore.v1.CommitResponse>( - service, METHODID_COMMIT))) + getCommitMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse>( + service, METHODID_COMMIT))) .addMethod( - getRollbackMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.RollbackRequest, - com.google.datastore.v1.RollbackResponse>( - service, METHODID_ROLLBACK))) + getRollbackMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.RollbackRequest, + com.google.datastore.v1.RollbackResponse>(service, METHODID_ROLLBACK))) .addMethod( - getAllocateIdsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.AllocateIdsRequest, - com.google.datastore.v1.AllocateIdsResponse>( - service, METHODID_ALLOCATE_IDS))) + getAllocateIdsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.AllocateIdsRequest, + com.google.datastore.v1.AllocateIdsResponse>(service, METHODID_ALLOCATE_IDS))) .addMethod( - getReserveIdsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.datastore.v1.ReserveIdsRequest, - com.google.datastore.v1.ReserveIdsResponse>( - service, METHODID_RESERVE_IDS))) + getReserveIdsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.datastore.v1.ReserveIdsRequest, + com.google.datastore.v1.ReserveIdsResponse>(service, METHODID_RESERVE_IDS))) .build(); } - private static abstract class DatastoreBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + private abstract static class DatastoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { DatastoreBaseDescriptorSupplier() {} @java.lang.Override @@ -963,17 +1173,19 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { synchronized (DatastoreGrpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DatastoreFileDescriptorSupplier()) - .addMethod(getLookupMethod()) - .addMethod(getRunQueryMethod()) - .addMethod(getRunAggregationQueryMethod()) - .addMethod(getBeginTransactionMethod()) - .addMethod(getCommitMethod()) - .addMethod(getRollbackMethod()) - .addMethod(getAllocateIdsMethod()) - .addMethod(getReserveIdsMethod()) - .build(); + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DatastoreFileDescriptorSupplier()) + .addMethod(getLookupMethod()) + .addMethod(getRunQueryMethod()) + .addMethod(getRunAggregationQueryMethod()) + .addMethod(getBeginTransactionMethod()) + .addMethod(getCommitMethod()) + .addMethod(getRollbackMethod()) + .addMethod(getAllocateIdsMethod()) + .addMethod(getReserveIdsMethod()) + .build(); } } } From 2da6b013d543a3f47a49f1a4598497a2326141aa Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:04:00 -0800 Subject: [PATCH 4/4] revert chore: Running pull-gapic-grpc to refresh Gapic layer for datastore gapic upgrade --- .../cloud/datastore/v1/DatastoreSettings.java | 1 + .../datastore/v1/stub/GrpcDatastoreStub.java | 1 + .../google/datastore/v1/DatastoreGrpc.java | 818 +++++++----------- 3 files changed, 305 insertions(+), 515 deletions(-) diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java index 74054341e..c0c36162c 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/DatastoreSettings.java @@ -25,6 +25,7 @@ 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.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.datastore.v1.stub.DatastoreStubSettings; diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java index 487413816..f9df58032 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/v1/stub/GrpcDatastoreStub.java @@ -44,6 +44,7 @@ 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; diff --git a/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java b/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java index 6ff5c41a5..e1c694e3a 100644 --- a/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java +++ b/grpc-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreGrpc.java @@ -18,8 +18,6 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** - * - * * * Each RPC normalizes the partition IDs of the keys in its input entities, * and always returns entities with keys with normalized partition IDs. @@ -40,389 +38,299 @@ private DatastoreGrpc() {} public static final java.lang.String SERVICE_NAME = "google.datastore.v1.Datastore"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> - getLookupMethod; + private static volatile io.grpc.MethodDescriptorgetLookupMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Lookup", requestType = com.google.datastore.v1.LookupRequest.class, responseType = com.google.datastore.v1.LookupResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> - getLookupMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.LookupRequest, com.google.datastore.v1.LookupResponse> - getLookupMethod; + public static io.grpc.MethodDescriptor getLookupMethod() { + io.grpc.MethodDescriptor getLookupMethod; if ((getLookupMethod = DatastoreGrpc.getLookupMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getLookupMethod = DatastoreGrpc.getLookupMethod) == null) { - DatastoreGrpc.getLookupMethod = - getLookupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Lookup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.LookupRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.LookupResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Lookup")) - .build(); + DatastoreGrpc.getLookupMethod = getLookupMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Lookup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.LookupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.LookupResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Lookup")) + .build(); } } } return getLookupMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> - getRunQueryMethod; + private static volatile io.grpc.MethodDescriptor getRunQueryMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RunQuery", requestType = com.google.datastore.v1.RunQueryRequest.class, responseType = com.google.datastore.v1.RunQueryResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> - getRunQueryMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.RunQueryRequest, com.google.datastore.v1.RunQueryResponse> - getRunQueryMethod; + public static io.grpc.MethodDescriptor getRunQueryMethod() { + io.grpc.MethodDescriptor getRunQueryMethod; if ((getRunQueryMethod = DatastoreGrpc.getRunQueryMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getRunQueryMethod = DatastoreGrpc.getRunQueryMethod) == null) { - DatastoreGrpc.getRunQueryMethod = - getRunQueryMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunQueryRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunQueryResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunQuery")) - .build(); + DatastoreGrpc.getRunQueryMethod = getRunQueryMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunQueryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunQueryResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunQuery")) + .build(); } } } return getRunQueryMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.RunAggregationQueryRequest, - com.google.datastore.v1.RunAggregationQueryResponse> - getRunAggregationQueryMethod; + private static volatile io.grpc.MethodDescriptor getRunAggregationQueryMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RunAggregationQuery", requestType = com.google.datastore.v1.RunAggregationQueryRequest.class, responseType = com.google.datastore.v1.RunAggregationQueryResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.RunAggregationQueryRequest, - com.google.datastore.v1.RunAggregationQueryResponse> - getRunAggregationQueryMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.RunAggregationQueryRequest, - com.google.datastore.v1.RunAggregationQueryResponse> - getRunAggregationQueryMethod; + public static io.grpc.MethodDescriptor getRunAggregationQueryMethod() { + io.grpc.MethodDescriptor getRunAggregationQueryMethod; if ((getRunAggregationQueryMethod = DatastoreGrpc.getRunAggregationQueryMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getRunAggregationQueryMethod = DatastoreGrpc.getRunAggregationQueryMethod) == null) { - DatastoreGrpc.getRunAggregationQueryMethod = - getRunAggregationQueryMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "RunAggregationQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunAggregationQueryRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.RunAggregationQueryResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DatastoreMethodDescriptorSupplier("RunAggregationQuery")) - .build(); + DatastoreGrpc.getRunAggregationQueryMethod = getRunAggregationQueryMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunAggregationQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunAggregationQueryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.RunAggregationQueryResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("RunAggregationQuery")) + .build(); } } } return getRunAggregationQueryMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.BeginTransactionRequest, - com.google.datastore.v1.BeginTransactionResponse> - getBeginTransactionMethod; + private static volatile io.grpc.MethodDescriptor getBeginTransactionMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "BeginTransaction", requestType = com.google.datastore.v1.BeginTransactionRequest.class, responseType = com.google.datastore.v1.BeginTransactionResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.BeginTransactionRequest, - com.google.datastore.v1.BeginTransactionResponse> - getBeginTransactionMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.BeginTransactionRequest, - com.google.datastore.v1.BeginTransactionResponse> - getBeginTransactionMethod; + public static io.grpc.MethodDescriptor getBeginTransactionMethod() { + io.grpc.MethodDescriptor getBeginTransactionMethod; if ((getBeginTransactionMethod = DatastoreGrpc.getBeginTransactionMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getBeginTransactionMethod = DatastoreGrpc.getBeginTransactionMethod) == null) { - DatastoreGrpc.getBeginTransactionMethod = - getBeginTransactionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BeginTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.BeginTransactionRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.BeginTransactionResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DatastoreMethodDescriptorSupplier("BeginTransaction")) - .build(); + DatastoreGrpc.getBeginTransactionMethod = getBeginTransactionMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BeginTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.BeginTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.BeginTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("BeginTransaction")) + .build(); } } } return getBeginTransactionMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> - getCommitMethod; + private static volatile io.grpc.MethodDescriptor getCommitMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Commit", requestType = com.google.datastore.v1.CommitRequest.class, responseType = com.google.datastore.v1.CommitResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> - getCommitMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.CommitRequest, com.google.datastore.v1.CommitResponse> - getCommitMethod; + public static io.grpc.MethodDescriptor getCommitMethod() { + io.grpc.MethodDescriptor getCommitMethod; if ((getCommitMethod = DatastoreGrpc.getCommitMethod) == null) { synchronized (DatastoreGrpc.class) { if ((getCommitMethod = DatastoreGrpc.getCommitMethod) == null) { - DatastoreGrpc.getCommitMethod = - getCommitMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Commit")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.CommitRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.datastore.v1.CommitResponse.getDefaultInstance())) - .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Commit")) - .build(); + DatastoreGrpc.getCommitMethod = getCommitMethod = + io.grpc.MethodDescriptor. newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Commit")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.CommitRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.datastore.v1.CommitResponse.getDefaultInstance())) + .setSchemaDescriptor(new DatastoreMethodDescriptorSupplier("Commit")) + .build(); } } } return getCommitMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> - getRollbackMethod; + private static volatile io.grpc.MethodDescriptor getRollbackMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Rollback", requestType = com.google.datastore.v1.RollbackRequest.class, responseType = com.google.datastore.v1.RollbackResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> - getRollbackMethod() { - io.grpc.MethodDescriptor< - com.google.datastore.v1.RollbackRequest, com.google.datastore.v1.RollbackResponse> - getRollbackMethod; + public static io.grpc.MethodDescriptor