Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
chore: update java microgenerator to 1.0.2 Adds request initializatio…
Browse files Browse the repository at this point in the history
…n to sample code (#12)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/d1f7adfa-9dc0-456c-80c3-1380f273e015/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 362856902
Source-Link: googleapis/googleapis@1305ca4
Source-Link: googleapis/googleapis-gen@ebd77e7
  • Loading branch information
yoshi-automation committed Mar 15, 2021
1 parent 7475d6e commit 26b03d5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
Expand Up @@ -268,6 +268,14 @@ public final ListMembershipsPagedResponse listMemberships(ListMembershipsRequest
* <pre>{@code
* try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
* GkeHubMembershipServiceClient.create()) {
* ListMembershipsRequest request =
* ListMembershipsRequest.newBuilder()
* .setParent("parent-995424086")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
* ListMembershipsResponse response =
* gkeHubMembershipServiceClient.listMembershipsCallable().call(request);
Expand Down
Expand Up @@ -62,7 +62,7 @@ public void reset() {
@Override
public void listMemberships(
ListMembershipsRequest request, StreamObserver<ListMembershipsResponse> responseObserver) {
Object response = responses.remove();
Object response = responses.poll();
if (response instanceof ListMembershipsResponse) {
requests.add(request);
responseObserver.onNext(((ListMembershipsResponse) response));
Expand All @@ -74,7 +74,7 @@ public void listMemberships(
new IllegalArgumentException(
String.format(
"Unrecognized response type %s for method ListMemberships, expected %s or %s",
response.getClass().getName(),
response == null ? "null" : response.getClass().getName(),
ListMembershipsResponse.class.getName(),
Exception.class.getName())));
}
Expand All @@ -83,7 +83,7 @@ public void listMemberships(
@Override
public void getMembership(
GetMembershipRequest request, StreamObserver<Membership> responseObserver) {
Object response = responses.remove();
Object response = responses.poll();
if (response instanceof Membership) {
requests.add(request);
responseObserver.onNext(((Membership) response));
Expand All @@ -95,7 +95,7 @@ public void getMembership(
new IllegalArgumentException(
String.format(
"Unrecognized response type %s for method GetMembership, expected %s or %s",
response.getClass().getName(),
response == null ? "null" : response.getClass().getName(),
Membership.class.getName(),
Exception.class.getName())));
}
Expand All @@ -104,7 +104,7 @@ public void getMembership(
@Override
public void createMembership(
CreateMembershipRequest request, StreamObserver<Operation> responseObserver) {
Object response = responses.remove();
Object response = responses.poll();
if (response instanceof Operation) {
requests.add(request);
responseObserver.onNext(((Operation) response));
Expand All @@ -116,7 +116,7 @@ public void createMembership(
new IllegalArgumentException(
String.format(
"Unrecognized response type %s for method CreateMembership, expected %s or %s",
response.getClass().getName(),
response == null ? "null" : response.getClass().getName(),
Operation.class.getName(),
Exception.class.getName())));
}
Expand All @@ -125,7 +125,7 @@ public void createMembership(
@Override
public void deleteMembership(
DeleteMembershipRequest request, StreamObserver<Operation> responseObserver) {
Object response = responses.remove();
Object response = responses.poll();
if (response instanceof Operation) {
requests.add(request);
responseObserver.onNext(((Operation) response));
Expand All @@ -137,7 +137,7 @@ public void deleteMembership(
new IllegalArgumentException(
String.format(
"Unrecognized response type %s for method DeleteMembership, expected %s or %s",
response.getClass().getName(),
response == null ? "null" : response.getClass().getName(),
Operation.class.getName(),
Exception.class.getName())));
}
Expand All @@ -146,7 +146,7 @@ public void deleteMembership(
@Override
public void updateMembership(
UpdateMembershipRequest request, StreamObserver<Operation> responseObserver) {
Object response = responses.remove();
Object response = responses.poll();
if (response instanceof Operation) {
requests.add(request);
responseObserver.onNext(((Operation) response));
Expand All @@ -158,7 +158,7 @@ public void updateMembership(
new IllegalArgumentException(
String.format(
"Unrecognized response type %s for method UpdateMembership, expected %s or %s",
response.getClass().getName(),
response == null ? "null" : response.getClass().getName(),
Operation.class.getName(),
Exception.class.getName())));
}
Expand All @@ -168,7 +168,7 @@ public void updateMembership(
public void generateConnectManifest(
GenerateConnectManifestRequest request,
StreamObserver<GenerateConnectManifestResponse> responseObserver) {
Object response = responses.remove();
Object response = responses.poll();
if (response instanceof GenerateConnectManifestResponse) {
requests.add(request);
responseObserver.onNext(((GenerateConnectManifestResponse) response));
Expand All @@ -180,7 +180,7 @@ public void generateConnectManifest(
new IllegalArgumentException(
String.format(
"Unrecognized response type %s for method GenerateConnectManifest, expected %s or %s",
response.getClass().getName(),
response == null ? "null" : response.getClass().getName(),
GenerateConnectManifestResponse.class.getName(),
Exception.class.getName())));
}
Expand All @@ -190,7 +190,7 @@ public void generateConnectManifest(
public void validateExclusivity(
ValidateExclusivityRequest request,
StreamObserver<ValidateExclusivityResponse> responseObserver) {
Object response = responses.remove();
Object response = responses.poll();
if (response instanceof ValidateExclusivityResponse) {
requests.add(request);
responseObserver.onNext(((ValidateExclusivityResponse) response));
Expand All @@ -202,7 +202,7 @@ public void validateExclusivity(
new IllegalArgumentException(
String.format(
"Unrecognized response type %s for method ValidateExclusivity, expected %s or %s",
response.getClass().getName(),
response == null ? "null" : response.getClass().getName(),
ValidateExclusivityResponse.class.getName(),
Exception.class.getName())));
}
Expand All @@ -212,7 +212,7 @@ public void validateExclusivity(
public void generateExclusivityManifest(
GenerateExclusivityManifestRequest request,
StreamObserver<GenerateExclusivityManifestResponse> responseObserver) {
Object response = responses.remove();
Object response = responses.poll();
if (response instanceof GenerateExclusivityManifestResponse) {
requests.add(request);
responseObserver.onNext(((GenerateExclusivityManifestResponse) response));
Expand All @@ -224,7 +224,7 @@ public void generateExclusivityManifest(
new IllegalArgumentException(
String.format(
"Unrecognized response type %s for method GenerateExclusivityManifest, expected %s or %s",
response.getClass().getName(),
response == null ? "null" : response.getClass().getName(),
GenerateExclusivityManifestResponse.class.getName(),
Exception.class.getName())));
}
Expand Down
6 changes: 3 additions & 3 deletions synth.metadata
Expand Up @@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-gkehub.git",
"sha": "49ce588e52c6112a9cc6c536546e9efb85ec44bd"
"sha": "6a6dc3ab087be554d59d4d0149c03cb59fd991eb"
}
},
{
"git": {
"name": "googleapis-gen",
"remote": "https://github.com/googleapis/googleapis-gen.git",
"sha": "ba5ec70708cd72caa1692a95ce57891e3ade61dd",
"internalRef": "361377784"
"sha": "ebd77e76effb65c4fba8c64f31c15062c250a4c2",
"internalRef": "362856902"
}
},
{
Expand Down

0 comments on commit 26b03d5

Please sign in to comment.