Skip to content

Commit

Permalink
chore: add comments to showcase grpc library (#1929)
Browse files Browse the repository at this point in the history
* chore: add comments to showcase grpc library

* chore: remove grpc version from annotation

* chore: configure current showcase to include comments

* chore: add include sources argument to verify mvn profiles
  • Loading branch information
diegomarquezp authored Aug 20, 2023
1 parent ca6cd83 commit 933cad5
Show file tree
Hide file tree
Showing 9 changed files with 919 additions and 0 deletions.
2 changes: 2 additions & 0 deletions showcase/gapic-showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<executable>bazel</executable>
<arguments>
<argument>run</argument>
<argument>--experimental_proto_descriptor_sets_include_source_info</argument>
<argument>//showcase:verify_gapic</argument>
</arguments>
</configuration>
Expand Down Expand Up @@ -70,6 +71,7 @@
<executable>bazelisk</executable>
<arguments>
<argument>run</argument>
<argument>--experimental_proto_descriptor_sets_include_source_info</argument>
<argument>//showcase:update_gapic</argument>
</arguments>
</configuration>
Expand Down
2 changes: 2 additions & 0 deletions showcase/grpc-gapic-showcase-v1beta1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<executable>bazel</executable>
<arguments>
<argument>run</argument>
<argument>--experimental_proto_descriptor_sets_include_source_info</argument>
<argument>//showcase:verify_grpc</argument>
</arguments>
</configuration>
Expand Down Expand Up @@ -65,6 +66,7 @@
<executable>bazelisk</executable>
<arguments>
<argument>run</argument>
<argument>--experimental_proto_descriptor_sets_include_source_info</argument>
<argument>//showcase:update_grpc</argument>
</arguments>
</configuration>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
* <pre>
* A simple identity service.
* </pre>
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
Expand Down Expand Up @@ -215,38 +218,56 @@ public IdentityFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions c
}

/**
* <pre>
* A simple identity service.
* </pre>
*/
public interface AsyncService {

/**
* <pre>
* Creates a user.
* </pre>
*/
default void createUser(com.google.showcase.v1beta1.CreateUserRequest request,
io.grpc.stub.StreamObserver<com.google.showcase.v1beta1.User> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateUserMethod(), responseObserver);
}

/**
* <pre>
* Retrieves the User with the given uri.
* </pre>
*/
default void getUser(com.google.showcase.v1beta1.GetUserRequest request,
io.grpc.stub.StreamObserver<com.google.showcase.v1beta1.User> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetUserMethod(), responseObserver);
}

/**
* <pre>
* Updates a user.
* </pre>
*/
default void updateUser(com.google.showcase.v1beta1.UpdateUserRequest request,
io.grpc.stub.StreamObserver<com.google.showcase.v1beta1.User> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateUserMethod(), responseObserver);
}

/**
* <pre>
* Deletes a user, their profile, and all of their authored messages.
* </pre>
*/
default void deleteUser(com.google.showcase.v1beta1.DeleteUserRequest request,
io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteUserMethod(), responseObserver);
}

/**
* <pre>
* Lists all users.
* </pre>
*/
default void listUsers(com.google.showcase.v1beta1.ListUsersRequest request,
io.grpc.stub.StreamObserver<com.google.showcase.v1beta1.ListUsersResponse> responseObserver) {
Expand All @@ -256,6 +277,9 @@ default void listUsers(com.google.showcase.v1beta1.ListUsersRequest request,

/**
* Base class for the server implementation of the service Identity.
* <pre>
* A simple identity service.
* </pre>
*/
public static abstract class IdentityImplBase
implements io.grpc.BindableService, AsyncService {
Expand All @@ -267,6 +291,9 @@ public static abstract class IdentityImplBase

/**
* A stub to allow clients to do asynchronous rpc calls to service Identity.
* <pre>
* A simple identity service.
* </pre>
*/
public static final class IdentityStub
extends io.grpc.stub.AbstractAsyncStub<IdentityStub> {
Expand All @@ -282,6 +309,9 @@ protected IdentityStub build(
}

/**
* <pre>
* Creates a user.
* </pre>
*/
public void createUser(com.google.showcase.v1beta1.CreateUserRequest request,
io.grpc.stub.StreamObserver<com.google.showcase.v1beta1.User> responseObserver) {
Expand All @@ -290,6 +320,9 @@ public void createUser(com.google.showcase.v1beta1.CreateUserRequest request,
}

/**
* <pre>
* Retrieves the User with the given uri.
* </pre>
*/
public void getUser(com.google.showcase.v1beta1.GetUserRequest request,
io.grpc.stub.StreamObserver<com.google.showcase.v1beta1.User> responseObserver) {
Expand All @@ -298,6 +331,9 @@ public void getUser(com.google.showcase.v1beta1.GetUserRequest request,
}

/**
* <pre>
* Updates a user.
* </pre>
*/
public void updateUser(com.google.showcase.v1beta1.UpdateUserRequest request,
io.grpc.stub.StreamObserver<com.google.showcase.v1beta1.User> responseObserver) {
Expand All @@ -306,6 +342,9 @@ public void updateUser(com.google.showcase.v1beta1.UpdateUserRequest request,
}

/**
* <pre>
* Deletes a user, their profile, and all of their authored messages.
* </pre>
*/
public void deleteUser(com.google.showcase.v1beta1.DeleteUserRequest request,
io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
Expand All @@ -314,6 +353,9 @@ public void deleteUser(com.google.showcase.v1beta1.DeleteUserRequest request,
}

/**
* <pre>
* Lists all users.
* </pre>
*/
public void listUsers(com.google.showcase.v1beta1.ListUsersRequest request,
io.grpc.stub.StreamObserver<com.google.showcase.v1beta1.ListUsersResponse> responseObserver) {
Expand All @@ -324,6 +366,9 @@ public void listUsers(com.google.showcase.v1beta1.ListUsersRequest request,

/**
* A stub to allow clients to do synchronous rpc calls to service Identity.
* <pre>
* A simple identity service.
* </pre>
*/
public static final class IdentityBlockingStub
extends io.grpc.stub.AbstractBlockingStub<IdentityBlockingStub> {
Expand All @@ -339,34 +384,49 @@ protected IdentityBlockingStub build(
}

/**
* <pre>
* Creates a user.
* </pre>
*/
public com.google.showcase.v1beta1.User createUser(com.google.showcase.v1beta1.CreateUserRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateUserMethod(), getCallOptions(), request);
}

/**
* <pre>
* Retrieves the User with the given uri.
* </pre>
*/
public com.google.showcase.v1beta1.User getUser(com.google.showcase.v1beta1.GetUserRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetUserMethod(), getCallOptions(), request);
}

/**
* <pre>
* Updates a user.
* </pre>
*/
public com.google.showcase.v1beta1.User updateUser(com.google.showcase.v1beta1.UpdateUserRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateUserMethod(), getCallOptions(), request);
}

/**
* <pre>
* Deletes a user, their profile, and all of their authored messages.
* </pre>
*/
public com.google.protobuf.Empty deleteUser(com.google.showcase.v1beta1.DeleteUserRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteUserMethod(), getCallOptions(), request);
}

/**
* <pre>
* Lists all users.
* </pre>
*/
public com.google.showcase.v1beta1.ListUsersResponse listUsers(com.google.showcase.v1beta1.ListUsersRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
Expand All @@ -376,6 +436,9 @@ public com.google.showcase.v1beta1.ListUsersResponse listUsers(com.google.showca

/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Identity.
* <pre>
* A simple identity service.
* </pre>
*/
public static final class IdentityFutureStub
extends io.grpc.stub.AbstractFutureStub<IdentityFutureStub> {
Expand All @@ -391,6 +454,9 @@ protected IdentityFutureStub build(
}

/**
* <pre>
* Creates a user.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.showcase.v1beta1.User> createUser(
com.google.showcase.v1beta1.CreateUserRequest request) {
Expand All @@ -399,6 +465,9 @@ public com.google.common.util.concurrent.ListenableFuture<com.google.showcase.v1
}

/**
* <pre>
* Retrieves the User with the given uri.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.showcase.v1beta1.User> getUser(
com.google.showcase.v1beta1.GetUserRequest request) {
Expand All @@ -407,6 +476,9 @@ public com.google.common.util.concurrent.ListenableFuture<com.google.showcase.v1
}

/**
* <pre>
* Updates a user.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.showcase.v1beta1.User> updateUser(
com.google.showcase.v1beta1.UpdateUserRequest request) {
Expand All @@ -415,6 +487,9 @@ public com.google.common.util.concurrent.ListenableFuture<com.google.showcase.v1
}

/**
* <pre>
* Deletes a user, their profile, and all of their authored messages.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteUser(
com.google.showcase.v1beta1.DeleteUserRequest request) {
Expand All @@ -423,6 +498,9 @@ public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Em
}

/**
* <pre>
* Lists all users.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.showcase.v1beta1.ListUsersResponse> listUsers(
com.google.showcase.v1beta1.ListUsersRequest request) {
Expand Down
Loading

0 comments on commit 933cad5

Please sign in to comment.