@@ -421,7 +421,7 @@ public DatastoreAdminFutureStub newStub(
421421 * but are accessed via service google.longrunning.Operations.
422422 * </pre>
423423 */
424- public abstract static class DatastoreAdminImplBase implements io . grpc . BindableService {
424+ public interface AsyncService {
425425
426426 /**
427427 *
@@ -437,7 +437,7 @@ public abstract static class DatastoreAdminImplBase implements io.grpc.BindableS
437437 * Cloud Storage.
438438 * </pre>
439439 */
440- public void exportEntities (
440+ default void exportEntities (
441441 com .google .datastore .admin .v1 .ExportEntitiesRequest request ,
442442 io .grpc .stub .StreamObserver <com .google .longrunning .Operation > responseObserver ) {
443443 io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (
@@ -455,7 +455,7 @@ public void exportEntities(
455455 * that a subset of the data has already been imported to Cloud Datastore.
456456 * </pre>
457457 */
458- public void importEntities (
458+ default void importEntities (
459459 com .google .datastore .admin .v1 .ImportEntitiesRequest request ,
460460 io .grpc .stub .StreamObserver <com .google .longrunning .Operation > responseObserver ) {
461461 io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (
@@ -480,7 +480,7 @@ public void importEntities(
480480 * Indexes with a single property cannot be created.
481481 * </pre>
482482 */
483- public void createIndex (
483+ default void createIndex (
484484 com .google .datastore .admin .v1 .CreateIndexRequest request ,
485485 io .grpc .stub .StreamObserver <com .google .longrunning .Operation > responseObserver ) {
486486 io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (
@@ -502,7 +502,7 @@ public void createIndex(
502502 * [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again.
503503 * </pre>
504504 */
505- public void deleteIndex (
505+ default void deleteIndex (
506506 com .google .datastore .admin .v1 .DeleteIndexRequest request ,
507507 io .grpc .stub .StreamObserver <com .google .longrunning .Operation > responseObserver ) {
508508 io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (
@@ -516,7 +516,7 @@ public void deleteIndex(
516516 * Gets an index.
517517 * </pre>
518518 */
519- public void getIndex (
519+ default void getIndex (
520520 com .google .datastore .admin .v1 .GetIndexRequest request ,
521521 io .grpc .stub .StreamObserver <com .google .datastore .admin .v1 .Index > responseObserver ) {
522522 io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (getGetIndexMethod (), responseObserver );
@@ -531,60 +531,72 @@ public void getIndex(
531531 * occasionally return stale results.
532532 * </pre>
533533 */
534- public void listIndexes (
534+ default void listIndexes (
535535 com .google .datastore .admin .v1 .ListIndexesRequest request ,
536536 io .grpc .stub .StreamObserver <com .google .datastore .admin .v1 .ListIndexesResponse >
537537 responseObserver ) {
538538 io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (
539539 getListIndexesMethod (), responseObserver );
540540 }
541+ }
542+
543+ /**
544+ * Base class for the server implementation of the service DatastoreAdmin.
545+ *
546+ * <pre>
547+ * Google Cloud Datastore Admin API
548+ * The Datastore Admin API provides several admin services for Cloud Datastore.
549+ * -----------------------------------------------------------------------------
550+ * ## Concepts
551+ * Project, namespace, kind, and entity as defined in the Google Cloud Datastore
552+ * API.
553+ * Operation: An Operation represents work being performed in the background.
554+ * EntityFilter: Allows specifying a subset of entities in a project. This is
555+ * specified as a combination of kinds and namespaces (either or both of which
556+ * may be all).
557+ * -----------------------------------------------------------------------------
558+ * ## Services
559+ * # Export/Import
560+ * The Export/Import service provides the ability to copy all or a subset of
561+ * entities to/from Google Cloud Storage.
562+ * Exported data may be imported into Cloud Datastore for any Google Cloud
563+ * Platform project. It is not restricted to the export source project. It is
564+ * possible to export from one project and then import into another.
565+ * Exported data can also be loaded into Google BigQuery for analysis.
566+ * Exports and imports are performed asynchronously. An Operation resource is
567+ * created for each export/import. The state (including any errors encountered)
568+ * of the export/import may be queried via the Operation resource.
569+ * # Index
570+ * The index service manages Cloud Datastore composite indexes.
571+ * Index creation and deletion are performed asynchronously.
572+ * An Operation resource is created for each such asynchronous operation.
573+ * The state of the operation (including any errors encountered)
574+ * may be queried via the Operation resource.
575+ * # Operation
576+ * The Operations collection provides a record of actions performed for the
577+ * specified project (including any operations in progress). Operations are not
578+ * created directly but through calls on other collections or resources.
579+ * An operation that is not yet done may be cancelled. The request to cancel is
580+ * asynchronous and the operation may continue to run for some time after the
581+ * request to cancel is made.
582+ * An operation that is done may be deleted so that it is no longer listed as
583+ * part of the Operation collection.
584+ * ListOperations returns all pending operations, but not completed operations.
585+ * Operations are created by service DatastoreAdmin,
586+ * but are accessed via service google.longrunning.Operations.
587+ * </pre>
588+ */
589+ public abstract static class DatastoreAdminImplBase
590+ implements io .grpc .BindableService , AsyncService {
541591
542592 @ java .lang .Override
543593 public final io .grpc .ServerServiceDefinition bindService () {
544- return io .grpc .ServerServiceDefinition .builder (getServiceDescriptor ())
545- .addMethod (
546- getExportEntitiesMethod (),
547- io .grpc .stub .ServerCalls .asyncUnaryCall (
548- new MethodHandlers <
549- com .google .datastore .admin .v1 .ExportEntitiesRequest ,
550- com .google .longrunning .Operation >(this , METHODID_EXPORT_ENTITIES )))
551- .addMethod (
552- getImportEntitiesMethod (),
553- io .grpc .stub .ServerCalls .asyncUnaryCall (
554- new MethodHandlers <
555- com .google .datastore .admin .v1 .ImportEntitiesRequest ,
556- com .google .longrunning .Operation >(this , METHODID_IMPORT_ENTITIES )))
557- .addMethod (
558- getCreateIndexMethod (),
559- io .grpc .stub .ServerCalls .asyncUnaryCall (
560- new MethodHandlers <
561- com .google .datastore .admin .v1 .CreateIndexRequest ,
562- com .google .longrunning .Operation >(this , METHODID_CREATE_INDEX )))
563- .addMethod (
564- getDeleteIndexMethod (),
565- io .grpc .stub .ServerCalls .asyncUnaryCall (
566- new MethodHandlers <
567- com .google .datastore .admin .v1 .DeleteIndexRequest ,
568- com .google .longrunning .Operation >(this , METHODID_DELETE_INDEX )))
569- .addMethod (
570- getGetIndexMethod (),
571- io .grpc .stub .ServerCalls .asyncUnaryCall (
572- new MethodHandlers <
573- com .google .datastore .admin .v1 .GetIndexRequest ,
574- com .google .datastore .admin .v1 .Index >(this , METHODID_GET_INDEX )))
575- .addMethod (
576- getListIndexesMethod (),
577- io .grpc .stub .ServerCalls .asyncUnaryCall (
578- new MethodHandlers <
579- com .google .datastore .admin .v1 .ListIndexesRequest ,
580- com .google .datastore .admin .v1 .ListIndexesResponse >(
581- this , METHODID_LIST_INDEXES )))
582- .build ();
594+ return DatastoreAdminGrpc .bindService (this );
583595 }
584596 }
585597
586598 /**
587- *
599+ * A stub to allow clients to do asynchronous rpc calls to service DatastoreAdmin.
588600 *
589601 * <pre>
590602 * Google Cloud Datastore Admin API
@@ -769,7 +781,7 @@ public void listIndexes(
769781 }
770782
771783 /**
772- *
784+ * A stub to allow clients to do synchronous rpc calls to service DatastoreAdmin.
773785 *
774786 * <pre>
775787 * Google Cloud Datastore Admin API
@@ -938,7 +950,7 @@ public com.google.datastore.admin.v1.ListIndexesResponse listIndexes(
938950 }
939951
940952 /**
941- *
953+ * A stub to allow clients to do ListenableFuture-style rpc calls to service DatastoreAdmin.
942954 *
943955 * <pre>
944956 * Google Cloud Datastore Admin API
@@ -1119,10 +1131,10 @@ private static final class MethodHandlers<Req, Resp>
11191131 io .grpc .stub .ServerCalls .ServerStreamingMethod <Req , Resp >,
11201132 io .grpc .stub .ServerCalls .ClientStreamingMethod <Req , Resp >,
11211133 io .grpc .stub .ServerCalls .BidiStreamingMethod <Req , Resp > {
1122- private final DatastoreAdminImplBase serviceImpl ;
1134+ private final AsyncService serviceImpl ;
11231135 private final int methodId ;
11241136
1125- MethodHandlers (DatastoreAdminImplBase serviceImpl , int methodId ) {
1137+ MethodHandlers (AsyncService serviceImpl , int methodId ) {
11261138 this .serviceImpl = serviceImpl ;
11271139 this .methodId = methodId ;
11281140 }
@@ -1178,6 +1190,48 @@ public io.grpc.stub.StreamObserver<Req> invoke(
11781190 }
11791191 }
11801192
1193+ public static final io .grpc .ServerServiceDefinition bindService (AsyncService service ) {
1194+ return io .grpc .ServerServiceDefinition .builder (getServiceDescriptor ())
1195+ .addMethod (
1196+ getExportEntitiesMethod (),
1197+ io .grpc .stub .ServerCalls .asyncUnaryCall (
1198+ new MethodHandlers <
1199+ com .google .datastore .admin .v1 .ExportEntitiesRequest ,
1200+ com .google .longrunning .Operation >(service , METHODID_EXPORT_ENTITIES )))
1201+ .addMethod (
1202+ getImportEntitiesMethod (),
1203+ io .grpc .stub .ServerCalls .asyncUnaryCall (
1204+ new MethodHandlers <
1205+ com .google .datastore .admin .v1 .ImportEntitiesRequest ,
1206+ com .google .longrunning .Operation >(service , METHODID_IMPORT_ENTITIES )))
1207+ .addMethod (
1208+ getCreateIndexMethod (),
1209+ io .grpc .stub .ServerCalls .asyncUnaryCall (
1210+ new MethodHandlers <
1211+ com .google .datastore .admin .v1 .CreateIndexRequest ,
1212+ com .google .longrunning .Operation >(service , METHODID_CREATE_INDEX )))
1213+ .addMethod (
1214+ getDeleteIndexMethod (),
1215+ io .grpc .stub .ServerCalls .asyncUnaryCall (
1216+ new MethodHandlers <
1217+ com .google .datastore .admin .v1 .DeleteIndexRequest ,
1218+ com .google .longrunning .Operation >(service , METHODID_DELETE_INDEX )))
1219+ .addMethod (
1220+ getGetIndexMethod (),
1221+ io .grpc .stub .ServerCalls .asyncUnaryCall (
1222+ new MethodHandlers <
1223+ com .google .datastore .admin .v1 .GetIndexRequest ,
1224+ com .google .datastore .admin .v1 .Index >(service , METHODID_GET_INDEX )))
1225+ .addMethod (
1226+ getListIndexesMethod (),
1227+ io .grpc .stub .ServerCalls .asyncUnaryCall (
1228+ new MethodHandlers <
1229+ com .google .datastore .admin .v1 .ListIndexesRequest ,
1230+ com .google .datastore .admin .v1 .ListIndexesResponse >(
1231+ service , METHODID_LIST_INDEXES )))
1232+ .build ();
1233+ }
1234+
11811235 private abstract static class DatastoreAdminBaseDescriptorSupplier
11821236 implements io .grpc .protobuf .ProtoFileDescriptorSupplier ,
11831237 io .grpc .protobuf .ProtoServiceDescriptorSupplier {
0 commit comments