Skip to content

Commit

Permalink
Integrate Python GAPIC Microgenerator in googleapis. This PR uses usi…
Browse files Browse the repository at this point in the history
…ng documentai as an example. Depends on googleapis/gapic-generator-python#402

PiperOrigin-RevId: 309824146

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon May 4 15:06:44 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: e0f9d9e1f9de890db765be46f45ca8490723e3eb
Source-Link: googleapis/googleapis@e0f9d9e
  • Loading branch information
yoshi-automation committed Jul 21, 2020
1 parent 03b3705 commit 6d21f82
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .kokoro/build.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:: See documentation in type-shell-output.bat

"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh
"C:\Program Files\Git\bin\bash.exe" github/java-firestore/.kokoro/build.sh
11 changes: 1 addition & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,7 @@ mvn -Penable-samples clean verify
```

2. [Activate](#profile-activation) the profile.
3. Define your samples in a normal Maven project in the `samples/` directory.

### Code Formatting

Code in this repo is formatted with
[google-java-format](https://github.com/google/google-java-format).
To run formatting on your project, you can run:
```
mvn com.coveo:fmt-maven-plugin:format
```
3. Define your samples in a normal Maven project in the `samples/` directory

### Profile Activation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,12 @@ public void runQuery(RunQueryRequest request, StreamObserver<RunQueryResponse> r

@Override
public StreamObserver<WriteRequest> write(final StreamObserver<WriteResponse> responseObserver) {
final Object response = responses.remove();
StreamObserver<WriteRequest> requestObserver =
new StreamObserver<WriteRequest>() {
@Override
public void onNext(WriteRequest value) {
requests.add(value);
final Object response = responses.remove();
if (response instanceof WriteResponse) {
responseObserver.onNext((WriteResponse) response);
} else if (response instanceof Exception) {
Expand All @@ -243,11 +244,12 @@ public void onCompleted() {
@Override
public StreamObserver<ListenRequest> listen(
final StreamObserver<ListenResponse> responseObserver) {
final Object response = responses.remove();
StreamObserver<ListenRequest> requestObserver =
new StreamObserver<ListenRequest>() {
@Override
public void onNext(ListenRequest value) {
requests.add(value);
final Object response = responses.remove();
if (response instanceof ListenResponse) {
responseObserver.onNext((ListenResponse) response);
} else if (response instanceof Exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,12 @@ public void runQuery(RunQueryRequest request, StreamObserver<RunQueryResponse> r

@Override
public StreamObserver<WriteRequest> write(final StreamObserver<WriteResponse> responseObserver) {
final Object response = responses.remove();
StreamObserver<WriteRequest> requestObserver =
new StreamObserver<WriteRequest>() {
@Override
public void onNext(WriteRequest value) {
requests.add(value);
final Object response = responses.remove();
if (response instanceof WriteResponse) {
responseObserver.onNext((WriteResponse) response);
} else if (response instanceof Exception) {
Expand All @@ -258,11 +259,12 @@ public void onCompleted() {
@Override
public StreamObserver<ListenRequest> listen(
final StreamObserver<ListenResponse> responseObserver) {
final Object response = responses.remove();
StreamObserver<ListenRequest> requestObserver =
new StreamObserver<ListenRequest>() {
@Override
public void onNext(ListenRequest value) {
requests.add(value);
final Object response = responses.remove();
if (response instanceof ListenResponse) {
responseObserver.onNext((ListenResponse) response);
} else if (response instanceof Exception) {
Expand Down
8 changes: 4 additions & 4 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-firestore.git",
"sha": "495f7f97405fcd2bff4d09e67ddbeb51615ea843"
"sha": "03b37056e1ae8f80373e0acc6bff82b9161f2182"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "d741cd976975c745d0199987aff0e908b8352992",
"internalRef": "305561906"
"sha": "e0f9d9e1f9de890db765be46f45ca8490723e3eb",
"internalRef": "309824146"
}
},
{
Expand Down Expand Up @@ -52,4 +52,4 @@
}
}
]
}
}

0 comments on commit 6d21f82

Please sign in to comment.