|
28 | 28 | import com.google.api.gax.rpc.ClientContext; |
29 | 29 | import com.google.api.gax.rpc.ServerStreamingCallable; |
30 | 30 | import com.google.api.gax.rpc.UnaryCallable; |
31 | | -import com.google.common.collect.ImmutableMap; |
32 | 31 | import com.google.firestore.v1.BatchGetDocumentsRequest; |
33 | 32 | import com.google.firestore.v1.BatchGetDocumentsResponse; |
34 | 33 | import com.google.firestore.v1.BatchWriteRequest; |
@@ -298,169 +297,71 @@ protected GrpcFirestoreStub( |
298 | 297 | GrpcCallSettings<GetDocumentRequest, Document> getDocumentTransportSettings = |
299 | 298 | GrpcCallSettings.<GetDocumentRequest, Document>newBuilder() |
300 | 299 | .setMethodDescriptor(getDocumentMethodDescriptor) |
301 | | - .setParamsExtractor( |
302 | | - request -> { |
303 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
304 | | - params.put("name", String.valueOf(request.getName())); |
305 | | - return params.build(); |
306 | | - }) |
307 | 300 | .build(); |
308 | 301 | GrpcCallSettings<ListDocumentsRequest, ListDocumentsResponse> listDocumentsTransportSettings = |
309 | 302 | GrpcCallSettings.<ListDocumentsRequest, ListDocumentsResponse>newBuilder() |
310 | 303 | .setMethodDescriptor(listDocumentsMethodDescriptor) |
311 | | - .setParamsExtractor( |
312 | | - request -> { |
313 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
314 | | - params.put("collection_id", String.valueOf(request.getCollectionId())); |
315 | | - params.put("parent", String.valueOf(request.getParent())); |
316 | | - return params.build(); |
317 | | - }) |
318 | 304 | .build(); |
319 | 305 | GrpcCallSettings<UpdateDocumentRequest, Document> updateDocumentTransportSettings = |
320 | 306 | GrpcCallSettings.<UpdateDocumentRequest, Document>newBuilder() |
321 | 307 | .setMethodDescriptor(updateDocumentMethodDescriptor) |
322 | | - .setParamsExtractor( |
323 | | - request -> { |
324 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
325 | | - params.put("document.name", String.valueOf(request.getDocument().getName())); |
326 | | - return params.build(); |
327 | | - }) |
328 | 308 | .build(); |
329 | 309 | GrpcCallSettings<DeleteDocumentRequest, Empty> deleteDocumentTransportSettings = |
330 | 310 | GrpcCallSettings.<DeleteDocumentRequest, Empty>newBuilder() |
331 | 311 | .setMethodDescriptor(deleteDocumentMethodDescriptor) |
332 | | - .setParamsExtractor( |
333 | | - request -> { |
334 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
335 | | - params.put("name", String.valueOf(request.getName())); |
336 | | - return params.build(); |
337 | | - }) |
338 | 312 | .build(); |
339 | 313 | GrpcCallSettings<BatchGetDocumentsRequest, BatchGetDocumentsResponse> |
340 | 314 | batchGetDocumentsTransportSettings = |
341 | 315 | GrpcCallSettings.<BatchGetDocumentsRequest, BatchGetDocumentsResponse>newBuilder() |
342 | 316 | .setMethodDescriptor(batchGetDocumentsMethodDescriptor) |
343 | | - .setParamsExtractor( |
344 | | - request -> { |
345 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
346 | | - params.put("database", String.valueOf(request.getDatabase())); |
347 | | - return params.build(); |
348 | | - }) |
349 | 317 | .build(); |
350 | 318 | GrpcCallSettings<BeginTransactionRequest, BeginTransactionResponse> |
351 | 319 | beginTransactionTransportSettings = |
352 | 320 | GrpcCallSettings.<BeginTransactionRequest, BeginTransactionResponse>newBuilder() |
353 | 321 | .setMethodDescriptor(beginTransactionMethodDescriptor) |
354 | | - .setParamsExtractor( |
355 | | - request -> { |
356 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
357 | | - params.put("database", String.valueOf(request.getDatabase())); |
358 | | - return params.build(); |
359 | | - }) |
360 | 322 | .build(); |
361 | 323 | GrpcCallSettings<CommitRequest, CommitResponse> commitTransportSettings = |
362 | 324 | GrpcCallSettings.<CommitRequest, CommitResponse>newBuilder() |
363 | 325 | .setMethodDescriptor(commitMethodDescriptor) |
364 | | - .setParamsExtractor( |
365 | | - request -> { |
366 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
367 | | - params.put("database", String.valueOf(request.getDatabase())); |
368 | | - return params.build(); |
369 | | - }) |
370 | 326 | .build(); |
371 | 327 | GrpcCallSettings<RollbackRequest, Empty> rollbackTransportSettings = |
372 | 328 | GrpcCallSettings.<RollbackRequest, Empty>newBuilder() |
373 | 329 | .setMethodDescriptor(rollbackMethodDescriptor) |
374 | | - .setParamsExtractor( |
375 | | - request -> { |
376 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
377 | | - params.put("database", String.valueOf(request.getDatabase())); |
378 | | - return params.build(); |
379 | | - }) |
380 | 330 | .build(); |
381 | 331 | GrpcCallSettings<RunQueryRequest, RunQueryResponse> runQueryTransportSettings = |
382 | 332 | GrpcCallSettings.<RunQueryRequest, RunQueryResponse>newBuilder() |
383 | 333 | .setMethodDescriptor(runQueryMethodDescriptor) |
384 | | - .setParamsExtractor( |
385 | | - request -> { |
386 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
387 | | - params.put("parent", String.valueOf(request.getParent())); |
388 | | - return params.build(); |
389 | | - }) |
390 | 334 | .build(); |
391 | 335 | GrpcCallSettings<RunAggregationQueryRequest, RunAggregationQueryResponse> |
392 | 336 | runAggregationQueryTransportSettings = |
393 | 337 | GrpcCallSettings.<RunAggregationQueryRequest, RunAggregationQueryResponse>newBuilder() |
394 | 338 | .setMethodDescriptor(runAggregationQueryMethodDescriptor) |
395 | | - .setParamsExtractor( |
396 | | - request -> { |
397 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
398 | | - params.put("parent", String.valueOf(request.getParent())); |
399 | | - return params.build(); |
400 | | - }) |
401 | 339 | .build(); |
402 | 340 | GrpcCallSettings<PartitionQueryRequest, PartitionQueryResponse> |
403 | 341 | partitionQueryTransportSettings = |
404 | 342 | GrpcCallSettings.<PartitionQueryRequest, PartitionQueryResponse>newBuilder() |
405 | 343 | .setMethodDescriptor(partitionQueryMethodDescriptor) |
406 | | - .setParamsExtractor( |
407 | | - request -> { |
408 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
409 | | - params.put("parent", String.valueOf(request.getParent())); |
410 | | - return params.build(); |
411 | | - }) |
412 | 344 | .build(); |
413 | 345 | GrpcCallSettings<WriteRequest, WriteResponse> writeTransportSettings = |
414 | 346 | GrpcCallSettings.<WriteRequest, WriteResponse>newBuilder() |
415 | 347 | .setMethodDescriptor(writeMethodDescriptor) |
416 | | - .setParamsExtractor( |
417 | | - request -> { |
418 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
419 | | - params.put("database", String.valueOf(request.getDatabase())); |
420 | | - return params.build(); |
421 | | - }) |
422 | 348 | .build(); |
423 | 349 | GrpcCallSettings<ListenRequest, ListenResponse> listenTransportSettings = |
424 | 350 | GrpcCallSettings.<ListenRequest, ListenResponse>newBuilder() |
425 | 351 | .setMethodDescriptor(listenMethodDescriptor) |
426 | | - .setParamsExtractor( |
427 | | - request -> { |
428 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
429 | | - params.put("database", String.valueOf(request.getDatabase())); |
430 | | - return params.build(); |
431 | | - }) |
432 | 352 | .build(); |
433 | 353 | GrpcCallSettings<ListCollectionIdsRequest, ListCollectionIdsResponse> |
434 | 354 | listCollectionIdsTransportSettings = |
435 | 355 | GrpcCallSettings.<ListCollectionIdsRequest, ListCollectionIdsResponse>newBuilder() |
436 | 356 | .setMethodDescriptor(listCollectionIdsMethodDescriptor) |
437 | | - .setParamsExtractor( |
438 | | - request -> { |
439 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
440 | | - params.put("parent", String.valueOf(request.getParent())); |
441 | | - return params.build(); |
442 | | - }) |
443 | 357 | .build(); |
444 | 358 | GrpcCallSettings<BatchWriteRequest, BatchWriteResponse> batchWriteTransportSettings = |
445 | 359 | GrpcCallSettings.<BatchWriteRequest, BatchWriteResponse>newBuilder() |
446 | 360 | .setMethodDescriptor(batchWriteMethodDescriptor) |
447 | | - .setParamsExtractor( |
448 | | - request -> { |
449 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
450 | | - params.put("database", String.valueOf(request.getDatabase())); |
451 | | - return params.build(); |
452 | | - }) |
453 | 361 | .build(); |
454 | 362 | GrpcCallSettings<CreateDocumentRequest, Document> createDocumentTransportSettings = |
455 | 363 | GrpcCallSettings.<CreateDocumentRequest, Document>newBuilder() |
456 | 364 | .setMethodDescriptor(createDocumentMethodDescriptor) |
457 | | - .setParamsExtractor( |
458 | | - request -> { |
459 | | - ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); |
460 | | - params.put("collection_id", String.valueOf(request.getCollectionId())); |
461 | | - params.put("parent", String.valueOf(request.getParent())); |
462 | | - return params.build(); |
463 | | - }) |
464 | 365 | .build(); |
465 | 366 |
|
466 | 367 | this.getDocumentCallable = |
|
0 commit comments