google-cloud-retail-v2 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2.rb +2 -0
  3. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -0
  4. data/lib/google/cloud/retail/v2/catalog_service/client.rb +203 -4
  5. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +21 -0
  6. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +16 -0
  7. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +46 -0
  8. data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
  9. data/lib/google/cloud/retail/v2/completion_service.rb +54 -0
  10. data/lib/google/cloud/retail/v2/completion_service/client.rb +546 -0
  11. data/lib/google/cloud/retail/v2/completion_service/credentials.rb +51 -0
  12. data/lib/google/cloud/retail/v2/completion_service/operations.rb +655 -0
  13. data/lib/google/cloud/retail/v2/completion_service/paths.rb +52 -0
  14. data/lib/google/cloud/retail/v2/completion_service_pb.rb +50 -0
  15. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +61 -0
  16. data/lib/google/cloud/retail/v2/import_config_pb.rb +32 -0
  17. data/lib/google/cloud/retail/v2/prediction_service/client.rb +34 -33
  18. data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
  19. data/lib/google/cloud/retail/v2/product_service/client.rb +632 -4
  20. data/lib/google/cloud/retail/v2/product_service_pb.rb +56 -0
  21. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +75 -0
  22. data/lib/google/cloud/retail/v2/search_service.rb +53 -0
  23. data/lib/google/cloud/retail/v2/search_service/client.rb +541 -0
  24. data/lib/google/cloud/retail/v2/search_service/credentials.rb +51 -0
  25. data/lib/google/cloud/retail/v2/search_service/paths.rb +54 -0
  26. data/lib/google/cloud/retail/v2/search_service_pb.rb +131 -0
  27. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +53 -0
  28. data/lib/google/cloud/retail/v2/user_event_pb.rb +11 -0
  29. data/lib/google/cloud/retail/v2/user_event_service/client.rb +1 -1
  30. data/lib/google/cloud/retail/v2/user_event_service/paths.rb +19 -0
  31. data/lib/google/cloud/retail/v2/version.rb +1 -1
  32. data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
  33. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +53 -4
  34. data/proto_docs/google/cloud/retail/v2/common.rb +272 -4
  35. data/proto_docs/google/cloud/retail/v2/completion_service.rb +162 -0
  36. data/proto_docs/google/cloud/retail/v2/import_config.rb +122 -6
  37. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +32 -31
  38. data/proto_docs/google/cloud/retail/v2/product.rb +266 -10
  39. data/proto_docs/google/cloud/retail/v2/product_service.rb +362 -2
  40. data/proto_docs/google/cloud/retail/v2/purge_config.rb +1 -1
  41. data/proto_docs/google/cloud/retail/v2/search_service.rb +820 -0
  42. data/proto_docs/google/cloud/retail/v2/user_event.rb +95 -3
  43. data/proto_docs/google/type/date.rb +53 -0
  44. metadata +18 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87b9f4c67fc0eb686393793f16351c68da89eabde00f3327d8b1d38efbb6ee37
4
- data.tar.gz: 19537a2c1d8ae67ff434f8f7066c7eb4cc5fd1664883eba0fba0eb5de10c9c95
3
+ metadata.gz: 0c775217886f336442c897f7ab810d219aeb65d75cb5c1af8e31dfb884b68202
4
+ data.tar.gz: bc830f5824438ccfebc31eca687dabfc263c0855c5a17cff264db2b1eb22ba09
5
5
  SHA512:
6
- metadata.gz: fdd2817462eddf5a7e74bba977b47475a04d10e80e6d071cd6ad2776cf4b67db03b19fa8ddfe462a9d1b13f6266f69756307ca841a8d3d87d14cbdad80c93a5b
7
- data.tar.gz: c14247f18a0d53cd5a57f9b73b0bcf7b4c0d6b39dd06f226a70f0a346d9375a5b5b99c8972790a0578e69581fa136fa8ce62102431034df8544565a934714280
6
+ metadata.gz: 38e7ab1b9f161c0bca43f813ad1356f0267459ed35a17dd074f516e181df72284408dfe8ebf67fdd11fc00ce931d04bc862e827aaa4c82cd16c08b6df731ce99
7
+ data.tar.gz: 0625bfe6a8d7e15ab43af987b1946475746f47f47144c20e28fc522052e3554f21904d7651ada0247abc16100dc6a4ddfc1a44b67308bed34640ec0b392628ff
@@ -17,8 +17,10 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/retail/v2/catalog_service"
20
+ require "google/cloud/retail/v2/completion_service"
20
21
  require "google/cloud/retail/v2/prediction_service"
21
22
  require "google/cloud/retail/v2/product_service"
23
+ require "google/cloud/retail/v2/search_service"
22
24
  require "google/cloud/retail/v2/user_event_service"
23
25
  require "google/cloud/retail/v2/version"
24
26
 
@@ -6,6 +6,8 @@ require 'google/protobuf'
6
6
  require 'google/api/annotations_pb'
7
7
  require 'google/api/field_behavior_pb'
8
8
  require 'google/api/resource_pb'
9
+ require 'google/cloud/retail/v2/common_pb'
10
+ require 'google/cloud/retail/v2/import_config_pb'
9
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
12
  add_file("google/cloud/retail/v2/catalog.proto", :syntax => :proto3) do
11
13
  add_message "google.cloud.retail.v2.ProductLevelConfig" do
@@ -274,10 +274,7 @@ module Google
274
274
  # a NOT_FOUND error is returned.
275
275
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
276
276
  # Indicates which fields in the provided
277
- # {::Google::Cloud::Retail::V2::Catalog Catalog} to update. If not set, will only
278
- # update the
279
- # {::Google::Cloud::Retail::V2::Catalog#product_level_config Catalog.product_level_config}
280
- # field, which is also the only currently supported field to update.
277
+ # {::Google::Cloud::Retail::V2::Catalog Catalog} to update.
281
278
  #
282
279
  # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
283
280
  # is returned.
@@ -327,6 +324,194 @@ module Google
327
324
  raise ::Google::Cloud::Error.from_error(e)
328
325
  end
329
326
 
327
+ ##
328
+ # Set a specified branch id as default branch. API methods such as
329
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search},
330
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct},
331
+ # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}
332
+ # will treat requests using "default_branch" to the actual branch id set as
333
+ # default.
334
+ #
335
+ # For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as
336
+ # default, setting
337
+ # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to
338
+ # `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent
339
+ # to setting
340
+ # {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to
341
+ # `projects/*/locations/*/catalogs/*/branches/1`.
342
+ #
343
+ # Using multiple branches can be useful when developers would like
344
+ # to have a staging branch to test and verify for future usage. When it
345
+ # becomes ready, developers switch on the staging branch using this API while
346
+ # keeping using `projects/*/locations/*/catalogs/*/branches/default_branch`
347
+ # as {::Google::Cloud::Retail::V2::SearchRequest#branch SearchRequest.branch} to
348
+ # route the traffic to this staging branch.
349
+ #
350
+ # CAUTION: If you have live predict/search traffic, switching the default
351
+ # branch could potentially cause outages if the ID space of the new branch is
352
+ # very different from the old one.
353
+ #
354
+ # More specifically:
355
+ #
356
+ # * PredictionService will only return product IDs from branch \\{newBranch}.
357
+ # * SearchService will only return product IDs from branch \\{newBranch}
358
+ # (if branch is not explicitly set).
359
+ # * UserEventService will only join events with products from branch
360
+ # \\{newBranch}.
361
+ #
362
+ # This feature is only available for users who have Retail Search enabled.
363
+ # Contact Retail Support (retail-search-support@google.com) if you are
364
+ # interested in using Retail Search.
365
+ #
366
+ # @overload set_default_branch(request, options = nil)
367
+ # Pass arguments to `set_default_branch` via a request object, either of type
368
+ # {::Google::Cloud::Retail::V2::SetDefaultBranchRequest} or an equivalent Hash.
369
+ #
370
+ # @param request [::Google::Cloud::Retail::V2::SetDefaultBranchRequest, ::Hash]
371
+ # A request object representing the call parameters. Required. To specify no
372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
373
+ # @param options [::Gapic::CallOptions, ::Hash]
374
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
375
+ #
376
+ # @overload set_default_branch(catalog: nil, branch_id: nil, note: nil)
377
+ # Pass arguments to `set_default_branch` via keyword arguments. Note that at
378
+ # least one keyword argument is required. To specify no parameters, or to keep all
379
+ # the default parameter values, pass an empty Hash as a request object (see above).
380
+ #
381
+ # @param catalog [::String]
382
+ # Full resource name of the catalog, such as
383
+ # `projects/*/locations/global/catalogs/default_catalog`.
384
+ # @param branch_id [::String]
385
+ # The final component of the resource name of a branch.
386
+ #
387
+ # This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
388
+ # error is returned.
389
+ # @param note [::String]
390
+ # Some note on this request, this can be retrieved by
391
+ # {::Google::Cloud::Retail::V2::CatalogService::Client#get_default_branch CatalogService.GetDefaultBranch}
392
+ # before next valid default branch set occurs.
393
+ #
394
+ # This field must be a UTF-8 encoded string with a length limit of 1,000
395
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
396
+ #
397
+ # @yield [response, operation] Access the result along with the RPC operation
398
+ # @yieldparam response [::Google::Protobuf::Empty]
399
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
400
+ #
401
+ # @return [::Google::Protobuf::Empty]
402
+ #
403
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
404
+ #
405
+ def set_default_branch request, options = nil
406
+ raise ::ArgumentError, "request must be provided" if request.nil?
407
+
408
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::SetDefaultBranchRequest
409
+
410
+ # Converts hash and nil to an options object
411
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
412
+
413
+ # Customize the options with defaults
414
+ metadata = @config.rpcs.set_default_branch.metadata.to_h
415
+
416
+ # Set x-goog-api-client and x-goog-user-project headers
417
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
418
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
419
+ gapic_version: ::Google::Cloud::Retail::V2::VERSION
420
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
421
+
422
+ header_params = {
423
+ "catalog" => request.catalog
424
+ }
425
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
426
+ metadata[:"x-goog-request-params"] ||= request_params_header
427
+
428
+ options.apply_defaults timeout: @config.rpcs.set_default_branch.timeout,
429
+ metadata: metadata,
430
+ retry_policy: @config.rpcs.set_default_branch.retry_policy
431
+ options.apply_defaults metadata: @config.metadata,
432
+ retry_policy: @config.retry_policy
433
+
434
+ @catalog_service_stub.call_rpc :set_default_branch, request, options: options do |response, operation|
435
+ yield response, operation if block_given?
436
+ return response
437
+ end
438
+ rescue ::GRPC::BadStatus => e
439
+ raise ::Google::Cloud::Error.from_error(e)
440
+ end
441
+
442
+ ##
443
+ # Get which branch is currently default branch set by
444
+ # {::Google::Cloud::Retail::V2::CatalogService::Client#set_default_branch CatalogService.SetDefaultBranch}
445
+ # method under a specified parent catalog.
446
+ #
447
+ # This feature is only available for users who have Retail Search enabled.
448
+ # Contact Retail Support (retail-search-support@google.com) if you are
449
+ # interested in using Retail Search.
450
+ #
451
+ # @overload get_default_branch(request, options = nil)
452
+ # Pass arguments to `get_default_branch` via a request object, either of type
453
+ # {::Google::Cloud::Retail::V2::GetDefaultBranchRequest} or an equivalent Hash.
454
+ #
455
+ # @param request [::Google::Cloud::Retail::V2::GetDefaultBranchRequest, ::Hash]
456
+ # A request object representing the call parameters. Required. To specify no
457
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
458
+ # @param options [::Gapic::CallOptions, ::Hash]
459
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
460
+ #
461
+ # @overload get_default_branch(catalog: nil)
462
+ # Pass arguments to `get_default_branch` via keyword arguments. Note that at
463
+ # least one keyword argument is required. To specify no parameters, or to keep all
464
+ # the default parameter values, pass an empty Hash as a request object (see above).
465
+ #
466
+ # @param catalog [::String]
467
+ # The parent catalog resource name, such as
468
+ # `projects/*/locations/global/catalogs/default_catalog`.
469
+ #
470
+ # @yield [response, operation] Access the result along with the RPC operation
471
+ # @yieldparam response [::Google::Cloud::Retail::V2::GetDefaultBranchResponse]
472
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
473
+ #
474
+ # @return [::Google::Cloud::Retail::V2::GetDefaultBranchResponse]
475
+ #
476
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
477
+ #
478
+ def get_default_branch request, options = nil
479
+ raise ::ArgumentError, "request must be provided" if request.nil?
480
+
481
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::GetDefaultBranchRequest
482
+
483
+ # Converts hash and nil to an options object
484
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
485
+
486
+ # Customize the options with defaults
487
+ metadata = @config.rpcs.get_default_branch.metadata.to_h
488
+
489
+ # Set x-goog-api-client and x-goog-user-project headers
490
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
491
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
492
+ gapic_version: ::Google::Cloud::Retail::V2::VERSION
493
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
494
+
495
+ header_params = {
496
+ "catalog" => request.catalog
497
+ }
498
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
499
+ metadata[:"x-goog-request-params"] ||= request_params_header
500
+
501
+ options.apply_defaults timeout: @config.rpcs.get_default_branch.timeout,
502
+ metadata: metadata,
503
+ retry_policy: @config.rpcs.get_default_branch.retry_policy
504
+ options.apply_defaults metadata: @config.metadata,
505
+ retry_policy: @config.retry_policy
506
+
507
+ @catalog_service_stub.call_rpc :get_default_branch, request, options: options do |response, operation|
508
+ yield response, operation if block_given?
509
+ return response
510
+ end
511
+ rescue ::GRPC::BadStatus => e
512
+ raise ::Google::Cloud::Error.from_error(e)
513
+ end
514
+
330
515
  ##
331
516
  # Configuration class for the CatalogService API.
332
517
  #
@@ -473,6 +658,16 @@ module Google
473
658
  # @return [::Gapic::Config::Method]
474
659
  #
475
660
  attr_reader :update_catalog
661
+ ##
662
+ # RPC-specific configuration for `set_default_branch`
663
+ # @return [::Gapic::Config::Method]
664
+ #
665
+ attr_reader :set_default_branch
666
+ ##
667
+ # RPC-specific configuration for `get_default_branch`
668
+ # @return [::Gapic::Config::Method]
669
+ #
670
+ attr_reader :get_default_branch
476
671
 
477
672
  # @private
478
673
  def initialize parent_rpcs = nil
@@ -480,6 +675,10 @@ module Google
480
675
  @list_catalogs = ::Gapic::Config::Method.new list_catalogs_config
481
676
  update_catalog_config = parent_rpcs.update_catalog if parent_rpcs.respond_to? :update_catalog
482
677
  @update_catalog = ::Gapic::Config::Method.new update_catalog_config
678
+ set_default_branch_config = parent_rpcs.set_default_branch if parent_rpcs.respond_to? :set_default_branch
679
+ @set_default_branch = ::Gapic::Config::Method.new set_default_branch_config
680
+ get_default_branch_config = parent_rpcs.get_default_branch if parent_rpcs.respond_to? :get_default_branch
681
+ @get_default_branch = ::Gapic::Config::Method.new get_default_branch_config
483
682
 
484
683
  yield self if block_given?
485
684
  end
@@ -24,6 +24,27 @@ module Google
24
24
  module CatalogService
25
25
  # Path helper methods for the CatalogService API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified Branch resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/catalogs/{catalog}/branches/{branch}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param catalog [String]
37
+ # @param branch [String]
38
+ #
39
+ # @return [::String]
40
+ def branch_path project:, location:, catalog:, branch:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+ raise ::ArgumentError, "catalog cannot contain /" if catalog.to_s.include? "/"
44
+
45
+ "projects/#{project}/locations/#{location}/catalogs/#{catalog}/branches/#{branch}"
46
+ end
47
+
27
48
  ##
28
49
  # Create a fully-qualified Catalog resource string.
29
50
  #
@@ -26,6 +26,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
26
26
  optional :catalog, :message, 1, "google.cloud.retail.v2.Catalog"
27
27
  optional :update_mask, :message, 2, "google.protobuf.FieldMask"
28
28
  end
29
+ add_message "google.cloud.retail.v2.SetDefaultBranchRequest" do
30
+ optional :catalog, :string, 1
31
+ optional :branch_id, :string, 2
32
+ optional :note, :string, 3
33
+ end
34
+ add_message "google.cloud.retail.v2.GetDefaultBranchRequest" do
35
+ optional :catalog, :string, 1
36
+ end
37
+ add_message "google.cloud.retail.v2.GetDefaultBranchResponse" do
38
+ optional :branch, :string, 1
39
+ optional :set_time, :message, 2, "google.protobuf.Timestamp"
40
+ optional :note, :string, 3
41
+ end
29
42
  end
30
43
  end
31
44
 
@@ -36,6 +49,9 @@ module Google
36
49
  ListCatalogsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ListCatalogsRequest").msgclass
37
50
  ListCatalogsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ListCatalogsResponse").msgclass
38
51
  UpdateCatalogRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.UpdateCatalogRequest").msgclass
52
+ SetDefaultBranchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SetDefaultBranchRequest").msgclass
53
+ GetDefaultBranchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.GetDefaultBranchRequest").msgclass
54
+ GetDefaultBranchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.GetDefaultBranchResponse").msgclass
39
55
  end
40
56
  end
41
57
  end
@@ -38,6 +38,52 @@ module Google
38
38
  rpc :ListCatalogs, ::Google::Cloud::Retail::V2::ListCatalogsRequest, ::Google::Cloud::Retail::V2::ListCatalogsResponse
39
39
  # Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
40
40
  rpc :UpdateCatalog, ::Google::Cloud::Retail::V2::UpdateCatalogRequest, ::Google::Cloud::Retail::V2::Catalog
41
+ # Set a specified branch id as default branch. API methods such as
42
+ # [SearchService.Search][google.cloud.retail.v2.SearchService.Search],
43
+ # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct],
44
+ # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]
45
+ # will treat requests using "default_branch" to the actual branch id set as
46
+ # default.
47
+ #
48
+ # For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as
49
+ # default, setting
50
+ # [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
51
+ # `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent
52
+ # to setting
53
+ # [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
54
+ # `projects/*/locations/*/catalogs/*/branches/1`.
55
+ #
56
+ # Using multiple branches can be useful when developers would like
57
+ # to have a staging branch to test and verify for future usage. When it
58
+ # becomes ready, developers switch on the staging branch using this API while
59
+ # keeping using `projects/*/locations/*/catalogs/*/branches/default_branch`
60
+ # as [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
61
+ # route the traffic to this staging branch.
62
+ #
63
+ # CAUTION: If you have live predict/search traffic, switching the default
64
+ # branch could potentially cause outages if the ID space of the new branch is
65
+ # very different from the old one.
66
+ #
67
+ # More specifically:
68
+ #
69
+ # * PredictionService will only return product IDs from branch {newBranch}.
70
+ # * SearchService will only return product IDs from branch {newBranch}
71
+ # (if branch is not explicitly set).
72
+ # * UserEventService will only join events with products from branch
73
+ # {newBranch}.
74
+ #
75
+ # This feature is only available for users who have Retail Search enabled.
76
+ # Contact Retail Support (retail-search-support@google.com) if you are
77
+ # interested in using Retail Search.
78
+ rpc :SetDefaultBranch, ::Google::Cloud::Retail::V2::SetDefaultBranchRequest, ::Google::Protobuf::Empty
79
+ # Get which branch is currently default branch set by
80
+ # [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]
81
+ # method under a specified parent catalog.
82
+ #
83
+ # This feature is only available for users who have Retail Search enabled.
84
+ # Contact Retail Support (retail-search-support@google.com) if you are
85
+ # interested in using Retail Search.
86
+ rpc :GetDefaultBranch, ::Google::Cloud::Retail::V2::GetDefaultBranchRequest, ::Google::Cloud::Retail::V2::GetDefaultBranchResponse
41
87
  end
42
88
 
43
89
  Stub = Service.rpc_stub_class
@@ -8,20 +8,56 @@ require 'google/api/field_behavior_pb'
8
8
  require 'google/protobuf/timestamp_pb'
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/retail/v2/common.proto", :syntax => :proto3) do
11
+ add_message "google.cloud.retail.v2.Audience" do
12
+ repeated :genders, :string, 1
13
+ repeated :age_groups, :string, 2
14
+ end
15
+ add_message "google.cloud.retail.v2.ColorInfo" do
16
+ repeated :color_families, :string, 1
17
+ repeated :colors, :string, 2
18
+ end
11
19
  add_message "google.cloud.retail.v2.CustomAttribute" do
12
20
  repeated :text, :string, 1
13
21
  repeated :numbers, :double, 2
22
+ proto3_optional :searchable, :bool, 3
23
+ proto3_optional :indexable, :bool, 4
24
+ end
25
+ add_message "google.cloud.retail.v2.FulfillmentInfo" do
26
+ optional :type, :string, 1
27
+ repeated :place_ids, :string, 2
14
28
  end
15
29
  add_message "google.cloud.retail.v2.Image" do
16
30
  optional :uri, :string, 1
17
31
  optional :height, :int32, 2
18
32
  optional :width, :int32, 3
19
33
  end
34
+ add_message "google.cloud.retail.v2.Interval" do
35
+ oneof :min do
36
+ optional :minimum, :double, 1
37
+ optional :exclusive_minimum, :double, 2
38
+ end
39
+ oneof :max do
40
+ optional :maximum, :double, 3
41
+ optional :exclusive_maximum, :double, 4
42
+ end
43
+ end
20
44
  add_message "google.cloud.retail.v2.PriceInfo" do
21
45
  optional :currency_code, :string, 1
22
46
  optional :price, :float, 2
23
47
  optional :original_price, :float, 3
24
48
  optional :cost, :float, 4
49
+ optional :price_effective_time, :message, 5, "google.protobuf.Timestamp"
50
+ optional :price_expire_time, :message, 6, "google.protobuf.Timestamp"
51
+ optional :price_range, :message, 7, "google.cloud.retail.v2.PriceInfo.PriceRange"
52
+ end
53
+ add_message "google.cloud.retail.v2.PriceInfo.PriceRange" do
54
+ optional :price, :message, 1, "google.cloud.retail.v2.Interval"
55
+ optional :original_price, :message, 2, "google.cloud.retail.v2.Interval"
56
+ end
57
+ add_message "google.cloud.retail.v2.Rating" do
58
+ optional :rating_count, :int32, 1
59
+ optional :average_rating, :float, 2
60
+ repeated :rating_histogram, :int32, 3
25
61
  end
26
62
  add_message "google.cloud.retail.v2.UserInfo" do
27
63
  optional :user_id, :string, 1
@@ -29,6 +65,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
65
  optional :user_agent, :string, 3
30
66
  optional :direct_user_request, :bool, 4
31
67
  end
68
+ add_message "google.cloud.retail.v2.Promotion" do
69
+ optional :promotion_id, :string, 1
70
+ end
32
71
  end
33
72
  end
34
73
 
@@ -36,10 +75,17 @@ module Google
36
75
  module Cloud
37
76
  module Retail
38
77
  module V2
78
+ Audience = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.Audience").msgclass
79
+ ColorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ColorInfo").msgclass
39
80
  CustomAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.CustomAttribute").msgclass
81
+ FulfillmentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.FulfillmentInfo").msgclass
40
82
  Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.Image").msgclass
83
+ Interval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.Interval").msgclass
41
84
  PriceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PriceInfo").msgclass
85
+ PriceInfo::PriceRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PriceInfo.PriceRange").msgclass
86
+ Rating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.Rating").msgclass
42
87
  UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.UserInfo").msgclass
88
+ Promotion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.Promotion").msgclass
43
89
  end
44
90
  end
45
91
  end