Skip to content

Commit 7479758

Browse files
feat: [common-protos] Log Analytics features of the Cloud Logging API (#1573)
- [ ] Regenerate this pull request now. feat: Add ConfigServiceV2.CreateBucketAsync method for creating Log Buckets asynchronously feat: Add ConfigServiceV2.UpdateBucketAsync method for creating Log Buckets asynchronously feat: Add ConfigServiceV2.CreateLink method for creating linked datasets for Log Analytics Buckets feat: Add ConfigServiceV2.DeleteLink method for deleting linked datasets feat: Add ConfigServiceV2.ListLinks method for listing linked datasets feat: Add ConfigServiceV2.GetLink methods for describing linked datasets feat: Add LogBucket.analytics_enabled field that specifies whether Log Bucket's Analytics features are enabled feat: Add LogBucket.index_configs field that contains a list of Log Bucket's indexed fields and related configuration data docs: Documentation for the Log Analytics features of the Cloud Logging API PiperOrigin-RevId: 529851525 Source-Link: https://togithub.com/googleapis/googleapis/commit/1c7ee99d19adf8e444e2d73c5dd52884eab9862d Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4a2a3a05b91804333a1b39b635d8fe2243d4b4fd Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiI0YTJhM2EwNWI5MTgwNDMzM2ExYjM5YjYzNWQ4ZmUyMjQzZDRiNGZkIn0= BEGIN_NESTED_COMMIT feat: [common-protos] add GEO, SHOPPING, GENERATIVE_AI client orgs docs: fix new_issue_uri comment PiperOrigin-RevId: 527926860 Source-Link: https://togithub.com/googleapis/googleapis/commit/2f4668caa329c6dd67c14a5864076a48f0c17841 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/fa34096a242426ee1f714dc1249cd28814439e3e Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiJmYTM0MDk2YTI0MjQyNmVlMWY3MTRkYzEyNDljZDI4ODE0NDM5ZTNlIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT docs: [common-protos] use deprecated=true for deprecated fields PiperOrigin-RevId: 521675703 Source-Link: https://togithub.com/googleapis/googleapis/commit/8bc5a83d9759f2153f2e62d79dc2a024bcf7a3ac Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/3a4cf08318827b8ce36d2e6471ca24ae88c0900f Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiIzYTRjZjA4MzE4ODI3YjhjZTM2ZDJlNjQ3MWNhMjRhZTg4YzA5MDBmIn0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT docs: [common-protos] mark ReservationResourceUsage field as deprecated PiperOrigin-RevId: 521058593 Source-Link: https://togithub.com/googleapis/googleapis/commit/4c3b682f501bb965d34c3d4fc3461edfccf962db Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/9d3275bce3ee4c6b2f6a4529d3cff7e7cdff1ce5 Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiI5ZDMyNzViY2UzZWU0YzZiMmY2YTQ1MjlkM2NmZjdlN2NkZmYxY2U1In0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT chore(deps): [common-protos] Update gapic-generator-java to 2.16.0 PiperOrigin-RevId: 520153493 Source-Link: https://togithub.com/googleapis/googleapis/commit/26a424a2e4190c3103ab6f5d00c3144c89161b20 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/78f1567661df07bea7425e4341012e7b77c11254 Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiI3OGYxNTY3NjYxZGYwN2JlYTc0MjVlNDM0MTAxMmU3Yjc3YzExMjU0In0= END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: [common-protos] .NET library settings (for generator behavior tweaks) docs: separate paragraphs in linear/exponential distributions PiperOrigin-RevId: 520041337 Source-Link: https://togithub.com/googleapis/googleapis/commit/ed78055479a002e3c8c5f1f12c2e6bed52360428 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/a0b9e45d4e9ce213972593f62924242991087209 Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiJhMGI5ZTQ1ZDRlOWNlMjEzOTcyNTkzZjYyOTI0MjQyOTkxMDg3MjA5In0= END_NESTED_COMMIT
1 parent d2fe520 commit 7479758

File tree

14 files changed

+2302
-122
lines changed

14 files changed

+2302
-122
lines changed

java-common-protos/grpc-google-common-protos/src/main/java/com/google/cloud/location/LocationsGrpc.java

+39-23
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public LocationsFutureStub newStub(
171171
* [Location.metadata][google.cloud.location.Location.metadata] field.
172172
* </pre>
173173
*/
174-
public abstract static class LocationsImplBase implements io.grpc.BindableService {
174+
public interface AsyncService {
175175

176176
/**
177177
*
@@ -180,7 +180,7 @@ public abstract static class LocationsImplBase implements io.grpc.BindableServic
180180
* Lists information about the supported locations for this service.
181181
* </pre>
182182
*/
183-
public void listLocations(
183+
default void listLocations(
184184
com.google.cloud.location.ListLocationsRequest request,
185185
io.grpc.stub.StreamObserver<com.google.cloud.location.ListLocationsResponse>
186186
responseObserver) {
@@ -195,35 +195,33 @@ public void listLocations(
195195
* Gets information about a location.
196196
* </pre>
197197
*/
198-
public void getLocation(
198+
default void getLocation(
199199
com.google.cloud.location.GetLocationRequest request,
200200
io.grpc.stub.StreamObserver<com.google.cloud.location.Location> responseObserver) {
201201
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
202202
getGetLocationMethod(), responseObserver);
203203
}
204+
}
205+
206+
/**
207+
* Base class for the server implementation of the service Locations.
208+
*
209+
* <pre>
210+
* An abstract interface that provides location-related information for
211+
* a service. Service-specific metadata is provided through the
212+
* [Location.metadata][google.cloud.location.Location.metadata] field.
213+
* </pre>
214+
*/
215+
public abstract static class LocationsImplBase implements io.grpc.BindableService, AsyncService {
204216

205217
@java.lang.Override
206218
public final io.grpc.ServerServiceDefinition bindService() {
207-
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
208-
.addMethod(
209-
getListLocationsMethod(),
210-
io.grpc.stub.ServerCalls.asyncUnaryCall(
211-
new MethodHandlers<
212-
com.google.cloud.location.ListLocationsRequest,
213-
com.google.cloud.location.ListLocationsResponse>(
214-
this, METHODID_LIST_LOCATIONS)))
215-
.addMethod(
216-
getGetLocationMethod(),
217-
io.grpc.stub.ServerCalls.asyncUnaryCall(
218-
new MethodHandlers<
219-
com.google.cloud.location.GetLocationRequest,
220-
com.google.cloud.location.Location>(this, METHODID_GET_LOCATION)))
221-
.build();
219+
return LocationsGrpc.bindService(this);
222220
}
223221
}
224222

225223
/**
226-
*
224+
* A stub to allow clients to do asynchronous rpc calls to service Locations.
227225
*
228226
* <pre>
229227
* An abstract interface that provides location-related information for
@@ -276,7 +274,7 @@ public void getLocation(
276274
}
277275

278276
/**
279-
*
277+
* A stub to allow clients to do synchronous rpc calls to service Locations.
280278
*
281279
* <pre>
282280
* An abstract interface that provides location-related information for
@@ -324,7 +322,7 @@ public com.google.cloud.location.Location getLocation(
324322
}
325323

326324
/**
327-
*
325+
* A stub to allow clients to do ListenableFuture-style rpc calls to service Locations.
328326
*
329327
* <pre>
330328
* An abstract interface that provides location-related information for
@@ -379,10 +377,10 @@ private static final class MethodHandlers<Req, Resp>
379377
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
380378
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
381379
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
382-
private final LocationsImplBase serviceImpl;
380+
private final AsyncService serviceImpl;
383381
private final int methodId;
384382

385-
MethodHandlers(LocationsImplBase serviceImpl, int methodId) {
383+
MethodHandlers(AsyncService serviceImpl, int methodId) {
386384
this.serviceImpl = serviceImpl;
387385
this.methodId = methodId;
388386
}
@@ -418,6 +416,24 @@ public io.grpc.stub.StreamObserver<Req> invoke(
418416
}
419417
}
420418

419+
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
420+
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
421+
.addMethod(
422+
getListLocationsMethod(),
423+
io.grpc.stub.ServerCalls.asyncUnaryCall(
424+
new MethodHandlers<
425+
com.google.cloud.location.ListLocationsRequest,
426+
com.google.cloud.location.ListLocationsResponse>(
427+
service, METHODID_LIST_LOCATIONS)))
428+
.addMethod(
429+
getGetLocationMethod(),
430+
io.grpc.stub.ServerCalls.asyncUnaryCall(
431+
new MethodHandlers<
432+
com.google.cloud.location.GetLocationRequest,
433+
com.google.cloud.location.Location>(service, METHODID_GET_LOCATION)))
434+
.build();
435+
}
436+
421437
private abstract static class LocationsBaseDescriptorSupplier
422438
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
423439
io.grpc.protobuf.ProtoServiceDescriptorSupplier {

java-common-protos/grpc-google-common-protos/src/main/java/com/google/longrunning/OperationsGrpc.java

+65-44
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public OperationsFutureStub newStub(
304304
* so developers can have a consistent client experience.
305305
* </pre>
306306
*/
307-
public abstract static class OperationsImplBase implements io.grpc.BindableService {
307+
public interface AsyncService {
308308

309309
/**
310310
*
@@ -321,7 +321,7 @@ public abstract static class OperationsImplBase implements io.grpc.BindableServi
321321
* is the parent resource, without the operations collection id.
322322
* </pre>
323323
*/
324-
public void listOperations(
324+
default void listOperations(
325325
com.google.longrunning.ListOperationsRequest request,
326326
io.grpc.stub.StreamObserver<com.google.longrunning.ListOperationsResponse>
327327
responseObserver) {
@@ -338,7 +338,7 @@ public void listOperations(
338338
* service.
339339
* </pre>
340340
*/
341-
public void getOperation(
341+
default void getOperation(
342342
com.google.longrunning.GetOperationRequest request,
343343
io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
344344
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
@@ -355,7 +355,7 @@ public void getOperation(
355355
* `google.rpc.Code.UNIMPLEMENTED`.
356356
* </pre>
357357
*/
358-
public void deleteOperation(
358+
default void deleteOperation(
359359
com.google.longrunning.DeleteOperationRequest request,
360360
io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
361361
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
@@ -378,7 +378,7 @@ public void deleteOperation(
378378
* corresponding to `Code.CANCELLED`.
379379
* </pre>
380380
*/
381-
public void cancelOperation(
381+
default void cancelOperation(
382382
com.google.longrunning.CancelOperationRequest request,
383383
io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
384384
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
@@ -400,53 +400,38 @@ public void cancelOperation(
400400
* immediate response is no guarantee that the operation is done.
401401
* </pre>
402402
*/
403-
public void waitOperation(
403+
default void waitOperation(
404404
com.google.longrunning.WaitOperationRequest request,
405405
io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
406406
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
407407
getWaitOperationMethod(), responseObserver);
408408
}
409+
}
410+
411+
/**
412+
* Base class for the server implementation of the service Operations.
413+
*
414+
* <pre>
415+
* Manages long-running operations with an API service.
416+
* When an API method normally takes long time to complete, it can be designed
417+
* to return [Operation][google.longrunning.Operation] to the client, and the client can use this
418+
* interface to receive the real response asynchronously by polling the
419+
* operation resource, or pass the operation resource to another API (such as
420+
* Google Cloud Pub/Sub API) to receive the response. Any API service that
421+
* returns long-running operations should implement the `Operations` interface
422+
* so developers can have a consistent client experience.
423+
* </pre>
424+
*/
425+
public abstract static class OperationsImplBase implements io.grpc.BindableService, AsyncService {
409426

410427
@java.lang.Override
411428
public final io.grpc.ServerServiceDefinition bindService() {
412-
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
413-
.addMethod(
414-
getListOperationsMethod(),
415-
io.grpc.stub.ServerCalls.asyncUnaryCall(
416-
new MethodHandlers<
417-
com.google.longrunning.ListOperationsRequest,
418-
com.google.longrunning.ListOperationsResponse>(
419-
this, METHODID_LIST_OPERATIONS)))
420-
.addMethod(
421-
getGetOperationMethod(),
422-
io.grpc.stub.ServerCalls.asyncUnaryCall(
423-
new MethodHandlers<
424-
com.google.longrunning.GetOperationRequest, com.google.longrunning.Operation>(
425-
this, METHODID_GET_OPERATION)))
426-
.addMethod(
427-
getDeleteOperationMethod(),
428-
io.grpc.stub.ServerCalls.asyncUnaryCall(
429-
new MethodHandlers<
430-
com.google.longrunning.DeleteOperationRequest, com.google.protobuf.Empty>(
431-
this, METHODID_DELETE_OPERATION)))
432-
.addMethod(
433-
getCancelOperationMethod(),
434-
io.grpc.stub.ServerCalls.asyncUnaryCall(
435-
new MethodHandlers<
436-
com.google.longrunning.CancelOperationRequest, com.google.protobuf.Empty>(
437-
this, METHODID_CANCEL_OPERATION)))
438-
.addMethod(
439-
getWaitOperationMethod(),
440-
io.grpc.stub.ServerCalls.asyncUnaryCall(
441-
new MethodHandlers<
442-
com.google.longrunning.WaitOperationRequest,
443-
com.google.longrunning.Operation>(this, METHODID_WAIT_OPERATION)))
444-
.build();
429+
return OperationsGrpc.bindService(this);
445430
}
446431
}
447432

448433
/**
449-
*
434+
* A stub to allow clients to do asynchronous rpc calls to service Operations.
450435
*
451436
* <pre>
452437
* Manages long-running operations with an API service.
@@ -582,7 +567,7 @@ public void waitOperation(
582567
}
583568

584569
/**
585-
*
570+
* A stub to allow clients to do synchronous rpc calls to service Operations.
586571
*
587572
* <pre>
588573
* Manages long-running operations with an API service.
@@ -704,7 +689,7 @@ public com.google.longrunning.Operation waitOperation(
704689
}
705690

706691
/**
707-
*
692+
* A stub to allow clients to do ListenableFuture-style rpc calls to service Operations.
708693
*
709694
* <pre>
710695
* Manages long-running operations with an API service.
@@ -836,10 +821,10 @@ private static final class MethodHandlers<Req, Resp>
836821
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
837822
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
838823
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
839-
private final OperationsImplBase serviceImpl;
824+
private final AsyncService serviceImpl;
840825
private final int methodId;
841826

842-
MethodHandlers(OperationsImplBase serviceImpl, int methodId) {
827+
MethodHandlers(AsyncService serviceImpl, int methodId) {
843828
this.serviceImpl = serviceImpl;
844829
this.methodId = methodId;
845830
}
@@ -890,6 +875,42 @@ public io.grpc.stub.StreamObserver<Req> invoke(
890875
}
891876
}
892877

878+
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
879+
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
880+
.addMethod(
881+
getListOperationsMethod(),
882+
io.grpc.stub.ServerCalls.asyncUnaryCall(
883+
new MethodHandlers<
884+
com.google.longrunning.ListOperationsRequest,
885+
com.google.longrunning.ListOperationsResponse>(
886+
service, METHODID_LIST_OPERATIONS)))
887+
.addMethod(
888+
getGetOperationMethod(),
889+
io.grpc.stub.ServerCalls.asyncUnaryCall(
890+
new MethodHandlers<
891+
com.google.longrunning.GetOperationRequest, com.google.longrunning.Operation>(
892+
service, METHODID_GET_OPERATION)))
893+
.addMethod(
894+
getDeleteOperationMethod(),
895+
io.grpc.stub.ServerCalls.asyncUnaryCall(
896+
new MethodHandlers<
897+
com.google.longrunning.DeleteOperationRequest, com.google.protobuf.Empty>(
898+
service, METHODID_DELETE_OPERATION)))
899+
.addMethod(
900+
getCancelOperationMethod(),
901+
io.grpc.stub.ServerCalls.asyncUnaryCall(
902+
new MethodHandlers<
903+
com.google.longrunning.CancelOperationRequest, com.google.protobuf.Empty>(
904+
service, METHODID_CANCEL_OPERATION)))
905+
.addMethod(
906+
getWaitOperationMethod(),
907+
io.grpc.stub.ServerCalls.asyncUnaryCall(
908+
new MethodHandlers<
909+
com.google.longrunning.WaitOperationRequest, com.google.longrunning.Operation>(
910+
service, METHODID_WAIT_OPERATION)))
911+
.build();
912+
}
913+
893914
private abstract static class OperationsBaseDescriptorSupplier
894915
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
895916
io.grpc.protobuf.ProtoServiceDescriptorSupplier {

0 commit comments

Comments
 (0)