X Tutup
Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-errorreporting</artifactId>
<version>0.126.0-beta</version>
<version>0.134.0-beta</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-errorreporting:0.126.0-beta'
implementation 'com.google.cloud:google-cloud-errorreporting:0.134.0-beta'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-errorreporting" % "0.126.0-beta"
libraryDependencies += "com.google.cloud" % "google-cloud-errorreporting" % "0.134.0-beta"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@
* errorGroupServiceSettingsBuilder
* .getGroupSettings()
* .setRetrySettings(
* errorGroupServiceSettingsBuilder.getGroupSettings().getRetrySettings().toBuilder()
* errorGroupServiceSettingsBuilder
* .getGroupSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ErrorGroupServiceSettings errorGroupServiceSettings = errorGroupServiceSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@
* errorStatsServiceSettingsBuilder
* .deleteEventsSettings()
* .setRetrySettings(
* errorStatsServiceSettingsBuilder.deleteEventsSettings().getRetrySettings().toBuilder()
* errorStatsServiceSettingsBuilder
* .deleteEventsSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ErrorStatsServiceSettings errorStatsServiceSettings = errorStatsServiceSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ public ReportErrorsServiceStub getStub() {
* Cloud Logging and doesn't analyze logs stored in regional log buckets or logs routed to other
* Google Cloud projects.
*
* <p>For more information, see [Using Error Reporting with regionalized
* logs](/error-reporting/docs/regionalization).
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -245,9 +242,6 @@ public final ReportErrorEventResponse reportErrorEvent(
* Cloud Logging and doesn't analyze logs stored in regional log buckets or logs routed to other
* Google Cloud projects.
*
* <p>For more information, see [Using Error Reporting with regionalized
* logs](/error-reporting/docs/regionalization).
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -297,9 +291,6 @@ public final ReportErrorEventResponse reportErrorEvent(
* Cloud Logging and doesn't analyze logs stored in regional log buckets or logs routed to other
* Google Cloud projects.
*
* <p>For more information, see [Using Error Reporting with regionalized
* logs](/error-reporting/docs/regionalization).
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -344,9 +335,6 @@ public final ReportErrorEventResponse reportErrorEvent(ReportErrorEventRequest r
* Cloud Logging and doesn't analyze logs stored in regional log buckets or logs routed to other
* Google Cloud projects.
*
* <p>For more information, see [Using Error Reporting with regionalized
* logs](/error-reporting/docs/regionalization).
*
* <p>Sample code:
*
* <pre>{@code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to Error Reporting API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= ErrorGroupServiceClient =======================
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
* errorGroupServiceSettingsBuilder
* .getGroupSettings()
* .setRetrySettings(
* errorGroupServiceSettingsBuilder.getGroupSettings().getRetrySettings().toBuilder()
* errorGroupServiceSettingsBuilder
* .getGroupSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ErrorGroupServiceStubSettings errorGroupServiceSettings =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@
* errorStatsServiceSettingsBuilder
* .deleteEventsSettings()
* .setRetrySettings(
* errorStatsServiceSettingsBuilder.deleteEventsSettings().getRetrySettings().toBuilder()
* errorStatsServiceSettingsBuilder
* .deleteEventsSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ErrorStatsServiceStubSettings errorStatsServiceSettings =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class HttpJsonErrorGroupServiceStub extends ErrorGroupServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<GetGroupRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(request -> null)
Expand Down Expand Up @@ -108,12 +109,13 @@ public class HttpJsonErrorGroupServiceStub extends ErrorGroupServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<UpdateGroupRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("group", request.getGroup(), false))
.toBody("group", request.getGroup(), true))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ErrorGroup>newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public class HttpJsonErrorStatsServiceStub extends ErrorStatsServiceStub {
serializer.putQueryParam(fields, "timeRange", request.getTimeRange());
serializer.putQueryParam(
fields, "timedCountDuration", request.getTimedCountDuration());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(request -> null)
Expand Down Expand Up @@ -135,6 +136,7 @@ public class HttpJsonErrorStatsServiceStub extends ErrorStatsServiceStub {
serializer.putQueryParam(
fields, "serviceFilter", request.getServiceFilter());
serializer.putQueryParam(fields, "timeRange", request.getTimeRange());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(request -> null)
Expand Down Expand Up @@ -170,6 +172,7 @@ public class HttpJsonErrorStatsServiceStub extends ErrorStatsServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<DeleteEventsRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(request -> null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ public class HttpJsonReportErrorsServiceStub extends ReportErrorsServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<ReportErrorEventRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("event", request.getEvent(), false))
.toBody("event", request.getEvent(), true))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ReportErrorEventResponse>newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public ErrorGroupServiceFutureStub newStub(
* Service for retrieving and updating individual error groups.
* </pre>
*/
public abstract static class ErrorGroupServiceImplBase implements io.grpc.BindableService {
public interface AsyncService {

/**
*
Expand All @@ -187,7 +187,7 @@ public abstract static class ErrorGroupServiceImplBase implements io.grpc.Bindab
* Get the specified group.
* </pre>
*/
public void getGroup(
default void getGroup(
com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest request,
io.grpc.stub.StreamObserver<com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup>
responseObserver) {
Expand All @@ -202,37 +202,33 @@ public void getGroup(
* Fails if the group does not exist.
* </pre>
*/
public void updateGroup(
default void updateGroup(
com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest request,
io.grpc.stub.StreamObserver<com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup>
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getUpdateGroupMethod(), responseObserver);
}
}

/**
* Base class for the server implementation of the service ErrorGroupService.
*
* <pre>
* Service for retrieving and updating individual error groups.
* </pre>
*/
public abstract static class ErrorGroupServiceImplBase
implements io.grpc.BindableService, AsyncService {

@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetGroupMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest,
com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup>(
this, METHODID_GET_GROUP)))
.addMethod(
getUpdateGroupMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest,
com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup>(
this, METHODID_UPDATE_GROUP)))
.build();
return ErrorGroupServiceGrpc.bindService(this);
}
}

/**
*
* A stub to allow clients to do asynchronous rpc calls to service ErrorGroupService.
*
* <pre>
* Service for retrieving and updating individual error groups.
Expand Down Expand Up @@ -285,7 +281,7 @@ public void updateGroup(
}

/**
*
* A stub to allow clients to do synchronous rpc calls to service ErrorGroupService.
*
* <pre>
* Service for retrieving and updating individual error groups.
Expand Down Expand Up @@ -333,7 +329,7 @@ public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup updateGroup(
}

/**
*
* A stub to allow clients to do ListenableFuture-style rpc calls to service ErrorGroupService.
*
* <pre>
* Service for retrieving and updating individual error groups.
Expand Down Expand Up @@ -389,10 +385,10 @@ private static final class MethodHandlers<Req, Resp>
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
private final ErrorGroupServiceImplBase serviceImpl;
private final AsyncService serviceImpl;
private final int methodId;

MethodHandlers(ErrorGroupServiceImplBase serviceImpl, int methodId) {
MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
Expand Down Expand Up @@ -431,6 +427,25 @@ public io.grpc.stub.StreamObserver<Req> invoke(
}
}

public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetGroupMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest,
com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup>(
service, METHODID_GET_GROUP)))
.addMethod(
getUpdateGroupMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest,
com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup>(
service, METHODID_UPDATE_GROUP)))
.build();
}

private abstract static class ErrorGroupServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
Expand Down
Loading
X Tutup