|
16 | 16 |
|
17 | 17 | package com.google.cloud.pubsub.v1.stub;
|
18 | 18 |
|
| 19 | +import static com.google.cloud.pubsub.v1.SchemaServiceClient.ListSchemaRevisionsPagedResponse; |
19 | 20 | import static com.google.cloud.pubsub.v1.SchemaServiceClient.ListSchemasPagedResponse;
|
20 | 21 |
|
21 | 22 | import com.google.api.gax.core.BackgroundResource;
|
|
32 | 33 | import com.google.iam.v1.TestIamPermissionsResponse;
|
33 | 34 | import com.google.longrunning.stub.GrpcOperationsStub;
|
34 | 35 | import com.google.protobuf.Empty;
|
| 36 | +import com.google.pubsub.v1.CommitSchemaRequest; |
35 | 37 | import com.google.pubsub.v1.CreateSchemaRequest;
|
36 | 38 | import com.google.pubsub.v1.DeleteSchemaRequest;
|
| 39 | +import com.google.pubsub.v1.DeleteSchemaRevisionRequest; |
37 | 40 | import com.google.pubsub.v1.GetSchemaRequest;
|
| 41 | +import com.google.pubsub.v1.ListSchemaRevisionsRequest; |
| 42 | +import com.google.pubsub.v1.ListSchemaRevisionsResponse; |
38 | 43 | import com.google.pubsub.v1.ListSchemasRequest;
|
39 | 44 | import com.google.pubsub.v1.ListSchemasResponse;
|
| 45 | +import com.google.pubsub.v1.RollbackSchemaRequest; |
40 | 46 | import com.google.pubsub.v1.Schema;
|
41 | 47 | import com.google.pubsub.v1.ValidateMessageRequest;
|
42 | 48 | import com.google.pubsub.v1.ValidateMessageResponse;
|
@@ -82,6 +88,45 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
|
82 | 88 | ProtoUtils.marshaller(ListSchemasResponse.getDefaultInstance()))
|
83 | 89 | .build();
|
84 | 90 |
|
| 91 | + private static final MethodDescriptor<ListSchemaRevisionsRequest, ListSchemaRevisionsResponse> |
| 92 | + listSchemaRevisionsMethodDescriptor = |
| 93 | + MethodDescriptor.<ListSchemaRevisionsRequest, ListSchemaRevisionsResponse>newBuilder() |
| 94 | + .setType(MethodDescriptor.MethodType.UNARY) |
| 95 | + .setFullMethodName("google.pubsub.v1.SchemaService/ListSchemaRevisions") |
| 96 | + .setRequestMarshaller( |
| 97 | + ProtoUtils.marshaller(ListSchemaRevisionsRequest.getDefaultInstance())) |
| 98 | + .setResponseMarshaller( |
| 99 | + ProtoUtils.marshaller(ListSchemaRevisionsResponse.getDefaultInstance())) |
| 100 | + .build(); |
| 101 | + |
| 102 | + private static final MethodDescriptor<CommitSchemaRequest, Schema> commitSchemaMethodDescriptor = |
| 103 | + MethodDescriptor.<CommitSchemaRequest, Schema>newBuilder() |
| 104 | + .setType(MethodDescriptor.MethodType.UNARY) |
| 105 | + .setFullMethodName("google.pubsub.v1.SchemaService/CommitSchema") |
| 106 | + .setRequestMarshaller(ProtoUtils.marshaller(CommitSchemaRequest.getDefaultInstance())) |
| 107 | + .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) |
| 108 | + .build(); |
| 109 | + |
| 110 | + private static final MethodDescriptor<RollbackSchemaRequest, Schema> |
| 111 | + rollbackSchemaMethodDescriptor = |
| 112 | + MethodDescriptor.<RollbackSchemaRequest, Schema>newBuilder() |
| 113 | + .setType(MethodDescriptor.MethodType.UNARY) |
| 114 | + .setFullMethodName("google.pubsub.v1.SchemaService/RollbackSchema") |
| 115 | + .setRequestMarshaller( |
| 116 | + ProtoUtils.marshaller(RollbackSchemaRequest.getDefaultInstance())) |
| 117 | + .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) |
| 118 | + .build(); |
| 119 | + |
| 120 | + private static final MethodDescriptor<DeleteSchemaRevisionRequest, Schema> |
| 121 | + deleteSchemaRevisionMethodDescriptor = |
| 122 | + MethodDescriptor.<DeleteSchemaRevisionRequest, Schema>newBuilder() |
| 123 | + .setType(MethodDescriptor.MethodType.UNARY) |
| 124 | + .setFullMethodName("google.pubsub.v1.SchemaService/DeleteSchemaRevision") |
| 125 | + .setRequestMarshaller( |
| 126 | + ProtoUtils.marshaller(DeleteSchemaRevisionRequest.getDefaultInstance())) |
| 127 | + .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) |
| 128 | + .build(); |
| 129 | + |
85 | 130 | private static final MethodDescriptor<DeleteSchemaRequest, Empty> deleteSchemaMethodDescriptor =
|
86 | 131 | MethodDescriptor.<DeleteSchemaRequest, Empty>newBuilder()
|
87 | 132 | .setType(MethodDescriptor.MethodType.UNARY)
|
@@ -144,6 +189,13 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub {
|
144 | 189 | private final UnaryCallable<ListSchemasRequest, ListSchemasResponse> listSchemasCallable;
|
145 | 190 | private final UnaryCallable<ListSchemasRequest, ListSchemasPagedResponse>
|
146 | 191 | listSchemasPagedCallable;
|
| 192 | + private final UnaryCallable<ListSchemaRevisionsRequest, ListSchemaRevisionsResponse> |
| 193 | + listSchemaRevisionsCallable; |
| 194 | + private final UnaryCallable<ListSchemaRevisionsRequest, ListSchemaRevisionsPagedResponse> |
| 195 | + listSchemaRevisionsPagedCallable; |
| 196 | + private final UnaryCallable<CommitSchemaRequest, Schema> commitSchemaCallable; |
| 197 | + private final UnaryCallable<RollbackSchemaRequest, Schema> rollbackSchemaCallable; |
| 198 | + private final UnaryCallable<DeleteSchemaRevisionRequest, Schema> deleteSchemaRevisionCallable; |
147 | 199 | private final UnaryCallable<DeleteSchemaRequest, Empty> deleteSchemaCallable;
|
148 | 200 | private final UnaryCallable<ValidateSchemaRequest, ValidateSchemaResponse> validateSchemaCallable;
|
149 | 201 | private final UnaryCallable<ValidateMessageRequest, ValidateMessageResponse>
|
@@ -225,6 +277,47 @@ protected GrpcSchemaServiceStub(
|
225 | 277 | return params.build();
|
226 | 278 | })
|
227 | 279 | .build();
|
| 280 | + GrpcCallSettings<ListSchemaRevisionsRequest, ListSchemaRevisionsResponse> |
| 281 | + listSchemaRevisionsTransportSettings = |
| 282 | + GrpcCallSettings.<ListSchemaRevisionsRequest, ListSchemaRevisionsResponse>newBuilder() |
| 283 | + .setMethodDescriptor(listSchemaRevisionsMethodDescriptor) |
| 284 | + .setParamsExtractor( |
| 285 | + request -> { |
| 286 | + ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
| 287 | + params.put("name", String.valueOf(request.getName())); |
| 288 | + return params.build(); |
| 289 | + }) |
| 290 | + .build(); |
| 291 | + GrpcCallSettings<CommitSchemaRequest, Schema> commitSchemaTransportSettings = |
| 292 | + GrpcCallSettings.<CommitSchemaRequest, Schema>newBuilder() |
| 293 | + .setMethodDescriptor(commitSchemaMethodDescriptor) |
| 294 | + .setParamsExtractor( |
| 295 | + request -> { |
| 296 | + ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
| 297 | + params.put("name", String.valueOf(request.getName())); |
| 298 | + return params.build(); |
| 299 | + }) |
| 300 | + .build(); |
| 301 | + GrpcCallSettings<RollbackSchemaRequest, Schema> rollbackSchemaTransportSettings = |
| 302 | + GrpcCallSettings.<RollbackSchemaRequest, Schema>newBuilder() |
| 303 | + .setMethodDescriptor(rollbackSchemaMethodDescriptor) |
| 304 | + .setParamsExtractor( |
| 305 | + request -> { |
| 306 | + ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
| 307 | + params.put("name", String.valueOf(request.getName())); |
| 308 | + return params.build(); |
| 309 | + }) |
| 310 | + .build(); |
| 311 | + GrpcCallSettings<DeleteSchemaRevisionRequest, Schema> deleteSchemaRevisionTransportSettings = |
| 312 | + GrpcCallSettings.<DeleteSchemaRevisionRequest, Schema>newBuilder() |
| 313 | + .setMethodDescriptor(deleteSchemaRevisionMethodDescriptor) |
| 314 | + .setParamsExtractor( |
| 315 | + request -> { |
| 316 | + ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
| 317 | + params.put("name", String.valueOf(request.getName())); |
| 318 | + return params.build(); |
| 319 | + }) |
| 320 | + .build(); |
228 | 321 | GrpcCallSettings<DeleteSchemaRequest, Empty> deleteSchemaTransportSettings =
|
229 | 322 | GrpcCallSettings.<DeleteSchemaRequest, Empty>newBuilder()
|
230 | 323 | .setMethodDescriptor(deleteSchemaMethodDescriptor)
|
@@ -301,6 +394,27 @@ protected GrpcSchemaServiceStub(
|
301 | 394 | this.listSchemasPagedCallable =
|
302 | 395 | callableFactory.createPagedCallable(
|
303 | 396 | listSchemasTransportSettings, settings.listSchemasSettings(), clientContext);
|
| 397 | + this.listSchemaRevisionsCallable = |
| 398 | + callableFactory.createUnaryCallable( |
| 399 | + listSchemaRevisionsTransportSettings, |
| 400 | + settings.listSchemaRevisionsSettings(), |
| 401 | + clientContext); |
| 402 | + this.listSchemaRevisionsPagedCallable = |
| 403 | + callableFactory.createPagedCallable( |
| 404 | + listSchemaRevisionsTransportSettings, |
| 405 | + settings.listSchemaRevisionsSettings(), |
| 406 | + clientContext); |
| 407 | + this.commitSchemaCallable = |
| 408 | + callableFactory.createUnaryCallable( |
| 409 | + commitSchemaTransportSettings, settings.commitSchemaSettings(), clientContext); |
| 410 | + this.rollbackSchemaCallable = |
| 411 | + callableFactory.createUnaryCallable( |
| 412 | + rollbackSchemaTransportSettings, settings.rollbackSchemaSettings(), clientContext); |
| 413 | + this.deleteSchemaRevisionCallable = |
| 414 | + callableFactory.createUnaryCallable( |
| 415 | + deleteSchemaRevisionTransportSettings, |
| 416 | + settings.deleteSchemaRevisionSettings(), |
| 417 | + clientContext); |
304 | 418 | this.deleteSchemaCallable =
|
305 | 419 | callableFactory.createUnaryCallable(
|
306 | 420 | deleteSchemaTransportSettings, settings.deleteSchemaSettings(), clientContext);
|
@@ -350,6 +464,33 @@ public UnaryCallable<ListSchemasRequest, ListSchemasPagedResponse> listSchemasPa
|
350 | 464 | return listSchemasPagedCallable;
|
351 | 465 | }
|
352 | 466 |
|
| 467 | + @Override |
| 468 | + public UnaryCallable<ListSchemaRevisionsRequest, ListSchemaRevisionsResponse> |
| 469 | + listSchemaRevisionsCallable() { |
| 470 | + return listSchemaRevisionsCallable; |
| 471 | + } |
| 472 | + |
| 473 | + @Override |
| 474 | + public UnaryCallable<ListSchemaRevisionsRequest, ListSchemaRevisionsPagedResponse> |
| 475 | + listSchemaRevisionsPagedCallable() { |
| 476 | + return listSchemaRevisionsPagedCallable; |
| 477 | + } |
| 478 | + |
| 479 | + @Override |
| 480 | + public UnaryCallable<CommitSchemaRequest, Schema> commitSchemaCallable() { |
| 481 | + return commitSchemaCallable; |
| 482 | + } |
| 483 | + |
| 484 | + @Override |
| 485 | + public UnaryCallable<RollbackSchemaRequest, Schema> rollbackSchemaCallable() { |
| 486 | + return rollbackSchemaCallable; |
| 487 | + } |
| 488 | + |
| 489 | + @Override |
| 490 | + public UnaryCallable<DeleteSchemaRevisionRequest, Schema> deleteSchemaRevisionCallable() { |
| 491 | + return deleteSchemaRevisionCallable; |
| 492 | + } |
| 493 | + |
353 | 494 | @Override
|
354 | 495 | public UnaryCallable<DeleteSchemaRequest, Empty> deleteSchemaCallable() {
|
355 | 496 | return deleteSchemaCallable;
|
|
0 commit comments