google-apis-retail_v2beta 0.52.0 → 0.55.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -531,7 +531,7 @@ module Google
531
531
  end
532
532
  end
533
533
 
534
- # Metadata for RejoinUserEvents method.
534
+ # Metadata for `RejoinUserEvents` method.
535
535
  class GoogleCloudRetailV2RejoinUserEventsMetadata
536
536
  include Google::Apis::Core::Hashable
537
537
 
@@ -544,7 +544,7 @@ module Google
544
544
  end
545
545
  end
546
546
 
547
- # Response message for RejoinUserEvents method.
547
+ # Response message for `RejoinUserEvents` method.
548
548
  class GoogleCloudRetailV2RejoinUserEventsResponse
549
549
  include Google::Apis::Core::Hashable
550
550
 
@@ -768,8 +768,9 @@ module Google
768
768
  class GoogleCloudRetailV2alphaCreateModelMetadata
769
769
  include Google::Apis::Core::Hashable
770
770
 
771
- # The resource name of the model that this create applies to. Format: projects/`
771
+ # The resource name of the model that this create applies to. Format: `projects/`
772
772
  # project_number`/locations/`location_id`/catalogs/`catalog_id`/models/`model_id`
773
+ # `
773
774
  # Corresponds to the JSON property `model`
774
775
  # @return [String]
775
776
  attr_accessor :model
@@ -805,8 +806,8 @@ module Google
805
806
  end
806
807
  end
807
808
 
808
- # Metadata related to the progress of the Export operation. This will be
809
- # returned by the google.longrunning.Operation.metadata field.
809
+ # Metadata related to the progress of the Export operation. This is returned by
810
+ # the google.longrunning.Operation.metadata field.
810
811
  class GoogleCloudRetailV2alphaExportMetadata
811
812
  include Google::Apis::Core::Hashable
812
813
 
@@ -1111,7 +1112,13 @@ module Google
1111
1112
  # ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on
1112
1113
  # model type. Default depends on type of recommendation: `recommended-for-you` =>
1113
1114
  # `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `
1114
- # revenue_per_order`
1115
+ # revenue_per_order` This field together with optimization_objective describe
1116
+ # model metadata to use to control model training and serving. See https://cloud.
1117
+ # google.com/retail/docs/models for more details on what the model metadata
1118
+ # control and which combination of parameters are valid. For invalid
1119
+ # combinations of parameters (e.g. type = `frequently-bought-together` and
1120
+ # optimization_objective = `ctr`), you receive an error 400 if you try to create/
1121
+ # update a recommendation with this set of knobs.
1115
1122
  # Corresponds to the JSON property `optimizationObjective`
1116
1123
  # @return [String]
1117
1124
  attr_accessor :optimization_objective
@@ -1161,7 +1168,13 @@ module Google
1161
1168
  # Required. The type of model e.g. `home-page`. Currently supported values: `
1162
1169
  # recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `
1163
1170
  # page-optimization`, `similar-items`, `buy-it-again`, and `recently-viewed`(
1164
- # readonly value).
1171
+ # readonly value). This field together with optimization_objective describe
1172
+ # model metadata to use to control model training and serving. See https://cloud.
1173
+ # google.com/retail/docs/models for more details on what the model metadata
1174
+ # control and which combination of parameters are valid. For invalid
1175
+ # combinations of parameters (e.g. type = `frequently-bought-together` and
1176
+ # optimization_objective = `ctr`), you receive an error 400 if you try to create/
1177
+ # update a recommendation with this set of knobs.
1165
1178
  # Corresponds to the JSON property `type`
1166
1179
  # @return [String]
1167
1180
  attr_accessor :type
@@ -1438,7 +1451,7 @@ module Google
1438
1451
  end
1439
1452
  end
1440
1453
 
1441
- # Metadata for RejoinUserEvents method.
1454
+ # Metadata for `RejoinUserEvents` method.
1442
1455
  class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
1443
1456
  include Google::Apis::Core::Hashable
1444
1457
 
@@ -1451,7 +1464,7 @@ module Google
1451
1464
  end
1452
1465
  end
1453
1466
 
1454
- # Response message for RejoinUserEvents method.
1467
+ # Response message for `RejoinUserEvents` method.
1455
1468
  class GoogleCloudRetailV2alphaRejoinUserEventsResponse
1456
1469
  include Google::Apis::Core::Hashable
1457
1470
 
@@ -1589,8 +1602,9 @@ module Google
1589
1602
  class GoogleCloudRetailV2alphaTuneModelMetadata
1590
1603
  include Google::Apis::Core::Hashable
1591
1604
 
1592
- # The resource name of the model that this tune applies to. Format: projects/`
1605
+ # The resource name of the model that this tune applies to. Format: `projects/`
1593
1606
  # project_number`/locations/`location_id`/catalogs/`catalog_id`/models/`model_id`
1607
+ # `
1594
1608
  # Corresponds to the JSON property `model`
1595
1609
  # @return [String]
1596
1610
  attr_accessor :model
@@ -1950,15 +1964,15 @@ module Google
1950
1964
  class GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse
1951
1965
  include Google::Apis::Core::Hashable
1952
1966
 
1953
- # Catalog attributes that were deleted. Only attributes that are not in use by
1954
- # products can be deleted.
1967
+ # Catalog attributes that were deleted. Only pre-loaded catalog attributes that
1968
+ # are neither in use by products nor predefined can be deleted.
1955
1969
  # Corresponds to the JSON property `deletedCatalogAttributes`
1956
1970
  # @return [Array<String>]
1957
1971
  attr_accessor :deleted_catalog_attributes
1958
1972
 
1959
- # Catalog attributes that were reset. Attributes that are in use by products
1960
- # cannot be deleted, however their configuration properties will reset to
1961
- # default values upon removal request.
1973
+ # Catalog attributes that were reset. Catalog attributes that are either in use
1974
+ # by products or are predefined attributes cannot be deleted; however, their
1975
+ # configuration properties will reset to default values upon removal request.
1962
1976
  # Corresponds to the JSON property `resetCatalogAttributes`
1963
1977
  # @return [Array<String>]
1964
1978
  attr_accessor :reset_catalog_attributes
@@ -2137,11 +2151,12 @@ module Google
2137
2151
  # Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using
2138
2152
  # CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or
2139
2153
  # CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-
2140
- # loaded CatalogAttributes. Only pre-loaded CatalogAttributes that are neither
2141
- # in use by products nor predefined can be deleted. CatalogAttributes that are
2142
- # either in use by products or are predefined cannot be deleted; however, their
2143
- # configuration properties will reset to default values upon removal request.
2144
- # After catalog changes, it takes about 10 minutes for this field to update.
2154
+ # loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither
2155
+ # in use by products nor predefined can be deleted. Catalog attributes that are
2156
+ # either in use by products or are predefined attributes cannot be deleted;
2157
+ # however, their configuration properties will reset to default values upon
2158
+ # removal request. After catalog changes, it takes about 10 minutes for this
2159
+ # field to update.
2145
2160
  # Corresponds to the JSON property `inUse`
2146
2161
  # @return [Boolean]
2147
2162
  attr_accessor :in_use
@@ -2528,8 +2543,8 @@ module Google
2528
2543
 
2529
2544
  # The value of the term to match on. Value cannot be empty. Value can have at
2530
2545
  # most 3 terms if specified as a partial match. Each space separated string is
2531
- # considered as one term. Example) "a b c" is 3 terms and allowed, " a b c d" is
2532
- # 4 terms and not allowed for partial match.
2546
+ # considered as one term. For example, "a b c" is 3 terms and allowed, but " a b
2547
+ # c d" is 4 terms and not allowed for a partial match.
2533
2548
  # Corresponds to the JSON property `value`
2534
2549
  # @return [String]
2535
2550
  attr_accessor :value
@@ -2571,14 +2586,14 @@ module Google
2571
2586
  end
2572
2587
  end
2573
2588
 
2574
- # Configures dynamic serving time metadata that is used to pre and post process
2575
- # search/recommendation model results.
2589
+ # Configures dynamic metadata that can be linked to a ServingConfig and affect
2590
+ # search or recommendation results at serving time.
2576
2591
  class GoogleCloudRetailV2betaControl
2577
2592
  include Google::Apis::Core::Hashable
2578
2593
 
2579
- # Output only. List of serving configuration ids that that are associated with
2580
- # this control. Note the association is managed via the ServingConfig, this is
2581
- # an output only denormalizeed view. Assumed to be in the same catalog.
2594
+ # Output only. List of serving configuration ids that are associated with this
2595
+ # control in the same Catalog. Note the association is managed via the
2596
+ # ServingConfig, this is an output only denormalized view.
2582
2597
  # Corresponds to the JSON property `associatedServingConfigIds`
2583
2598
  # @return [Array<String>]
2584
2599
  attr_accessor :associated_serving_config_ids
@@ -2602,13 +2617,21 @@ module Google
2602
2617
  attr_accessor :name
2603
2618
 
2604
2619
  # A rule is a condition-action pair * A condition defines when a rule is to be
2605
- # triggered. * An action specifies what occurs on that trigger. Currently only
2606
- # boost rules are supported. Currently only supported by the search endpoint.
2620
+ # triggered. * An action specifies what occurs on that trigger. Currently rules
2621
+ # only work for controls with SOLUTION_TYPE_SEARCH.
2607
2622
  # Corresponds to the JSON property `rule`
2608
2623
  # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRule]
2609
2624
  attr_accessor :rule
2610
2625
 
2611
- # Required. Immutable. The solution types that the serving config is used for.
2626
+ # Specifies the use case for the control. Affects what condition fields can be
2627
+ # set. Only settable by search controls. Will default to
2628
+ # SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one
2629
+ # search_solution_use_case per control.
2630
+ # Corresponds to the JSON property `searchSolutionUseCase`
2631
+ # @return [Array<String>]
2632
+ attr_accessor :search_solution_use_case
2633
+
2634
+ # Required. Immutable. The solution types that the control is used for.
2612
2635
  # Currently we support setting only one type of solution at creation time. Only `
2613
2636
  # SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is
2614
2637
  # provided at creation time, will default to SOLUTION_TYPE_SEARCH.
@@ -2627,6 +2650,7 @@ module Google
2627
2650
  @facet_spec = args[:facet_spec] if args.key?(:facet_spec)
2628
2651
  @name = args[:name] if args.key?(:name)
2629
2652
  @rule = args[:rule] if args.key?(:rule)
2653
+ @search_solution_use_case = args[:search_solution_use_case] if args.key?(:search_solution_use_case)
2630
2654
  @solution_types = args[:solution_types] if args.key?(:solution_types)
2631
2655
  end
2632
2656
  end
@@ -2709,8 +2733,8 @@ module Google
2709
2733
  end
2710
2734
  end
2711
2735
 
2712
- # Metadata related to the progress of the Export operation. This will be
2713
- # returned by the google.longrunning.Operation.metadata field.
2736
+ # Metadata related to the progress of the Export operation. This is returned by
2737
+ # the google.longrunning.Operation.metadata field.
2714
2738
  class GoogleCloudRetailV2betaExportMetadata
2715
2739
  include Google::Apis::Core::Hashable
2716
2740
 
@@ -3305,6 +3329,31 @@ module Google
3305
3329
  end
3306
3330
  end
3307
3331
 
3332
+ # Response to a ListModelRequest.
3333
+ class GoogleCloudRetailV2betaListModelsResponse
3334
+ include Google::Apis::Core::Hashable
3335
+
3336
+ # List of Models.
3337
+ # Corresponds to the JSON property `models`
3338
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaModel>]
3339
+ attr_accessor :models
3340
+
3341
+ # Pagination token, if not returned indicates the last page.
3342
+ # Corresponds to the JSON property `nextPageToken`
3343
+ # @return [String]
3344
+ attr_accessor :next_page_token
3345
+
3346
+ def initialize(**args)
3347
+ update!(**args)
3348
+ end
3349
+
3350
+ # Update properties of this object
3351
+ def update!(**args)
3352
+ @models = args[:models] if args.key?(:models)
3353
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3354
+ end
3355
+ end
3356
+
3308
3357
  # Response message for ProductService.ListProducts method.
3309
3358
  class GoogleCloudRetailV2betaListProductsResponse
3310
3359
  include Google::Apis::Core::Hashable
@@ -3491,6 +3540,166 @@ module Google
3491
3540
  end
3492
3541
  end
3493
3542
 
3543
+ # Metadata that describes the training and serving parameters of a Model. A
3544
+ # Model can be associated with a ServingConfig and then queried through the
3545
+ # Predict API.
3546
+ class GoogleCloudRetailV2betaModel
3547
+ include Google::Apis::Core::Hashable
3548
+
3549
+ # Output only. Timestamp the Recommendation Model was created at.
3550
+ # Corresponds to the JSON property `createTime`
3551
+ # @return [String]
3552
+ attr_accessor :create_time
3553
+
3554
+ # Output only. The state of data requirements for this model: `DATA_OK` and `
3555
+ # DATA_ERROR`. Recommendation model cannot be trained if the data is in `
3556
+ # DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if
3557
+ # serving state is `ACTIVE`: models were trained successfully before, but cannot
3558
+ # be refreshed because model no longer has sufficient data for training.
3559
+ # Corresponds to the JSON property `dataState`
3560
+ # @return [String]
3561
+ attr_accessor :data_state
3562
+
3563
+ # Required. The display name of the model. Should be human readable, used to
3564
+ # display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8
3565
+ # encoded string with limit of 1024 characters.
3566
+ # Corresponds to the JSON property `displayName`
3567
+ # @return [String]
3568
+ attr_accessor :display_name
3569
+
3570
+ # Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by
3571
+ # attributes is enabled for the model.
3572
+ # Corresponds to the JSON property `filteringOption`
3573
+ # @return [String]
3574
+ attr_accessor :filtering_option
3575
+
3576
+ # Output only. The timestamp when the latest successful tune finished.
3577
+ # Corresponds to the JSON property `lastTuneTime`
3578
+ # @return [String]
3579
+ attr_accessor :last_tune_time
3580
+
3581
+ # Required. The fully qualified resource name of the model. Format: `projects/`
3582
+ # project_number`/locations/`location_id`/catalogs/`catalog_id`/models/`model_id`
3583
+ # ` catalog_id has char limit of 50. recommendation_model_id has char limit of
3584
+ # 40.
3585
+ # Corresponds to the JSON property `name`
3586
+ # @return [String]
3587
+ attr_accessor :name
3588
+
3589
+ # Optional. The optimization objective e.g. `cvr`. Currently supported values: `
3590
+ # ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on
3591
+ # model type. Default depends on type of recommendation: `recommended-for-you` =>
3592
+ # `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `
3593
+ # revenue_per_order` This field together with optimization_objective describe
3594
+ # model metadata to use to control model training and serving. See https://cloud.
3595
+ # google.com/retail/docs/models for more details on what the model metadata
3596
+ # control and which combination of parameters are valid. For invalid
3597
+ # combinations of parameters (e.g. type = `frequently-bought-together` and
3598
+ # optimization_objective = `ctr`), you receive an error 400 if you try to create/
3599
+ # update a recommendation with this set of knobs.
3600
+ # Corresponds to the JSON property `optimizationObjective`
3601
+ # @return [String]
3602
+ attr_accessor :optimization_objective
3603
+
3604
+ # Optional. The state of periodic tuning. The period we use is 3 months - to do
3605
+ # a one-off tune earlier use the `TuneModel` method. Default value is `
3606
+ # PERIODIC_TUNING_ENABLED`.
3607
+ # Corresponds to the JSON property `periodicTuningState`
3608
+ # @return [String]
3609
+ attr_accessor :periodic_tuning_state
3610
+
3611
+ # Output only. The list of valid serving configs associated with the
3612
+ # PageOptimizationConfig.
3613
+ # Corresponds to the JSON property `servingConfigLists`
3614
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaModelServingConfigList>]
3615
+ attr_accessor :serving_config_lists
3616
+
3617
+ # Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
3618
+ # Corresponds to the JSON property `servingState`
3619
+ # @return [String]
3620
+ attr_accessor :serving_state
3621
+
3622
+ # Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`)
3623
+ # . Since part of the cost of running the service is frequency of training -
3624
+ # this can be used to determine when to train model in order to control cost. If
3625
+ # not specified: the default value for `CreateModel` method is `TRAINING`. The
3626
+ # default value for `UpdateModel` method is to keep the state the same as before.
3627
+ # Corresponds to the JSON property `trainingState`
3628
+ # @return [String]
3629
+ attr_accessor :training_state
3630
+
3631
+ # Output only. The tune operation associated with the model. Can be used to
3632
+ # determine if there is an ongoing tune for this recommendation. Empty field
3633
+ # implies no tune is goig on.
3634
+ # Corresponds to the JSON property `tuningOperation`
3635
+ # @return [String]
3636
+ attr_accessor :tuning_operation
3637
+
3638
+ # Required. The type of model e.g. `home-page`. Currently supported values: `
3639
+ # recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `
3640
+ # page-optimization`, `similar-items`, `buy-it-again`, and `recently-viewed`(
3641
+ # readonly value). This field together with optimization_objective describe
3642
+ # model metadata to use to control model training and serving. See https://cloud.
3643
+ # google.com/retail/docs/models for more details on what the model metadata
3644
+ # control and which combination of parameters are valid. For invalid
3645
+ # combinations of parameters (e.g. type = `frequently-bought-together` and
3646
+ # optimization_objective = `ctr`), you receive an error 400 if you try to create/
3647
+ # update a recommendation with this set of knobs.
3648
+ # Corresponds to the JSON property `type`
3649
+ # @return [String]
3650
+ attr_accessor :type
3651
+
3652
+ # Output only. Timestamp the Recommendation Model was last updated. E.g. if a
3653
+ # Recommendation Model was paused - this would be the time the pause was
3654
+ # initiated.
3655
+ # Corresponds to the JSON property `updateTime`
3656
+ # @return [String]
3657
+ attr_accessor :update_time
3658
+
3659
+ def initialize(**args)
3660
+ update!(**args)
3661
+ end
3662
+
3663
+ # Update properties of this object
3664
+ def update!(**args)
3665
+ @create_time = args[:create_time] if args.key?(:create_time)
3666
+ @data_state = args[:data_state] if args.key?(:data_state)
3667
+ @display_name = args[:display_name] if args.key?(:display_name)
3668
+ @filtering_option = args[:filtering_option] if args.key?(:filtering_option)
3669
+ @last_tune_time = args[:last_tune_time] if args.key?(:last_tune_time)
3670
+ @name = args[:name] if args.key?(:name)
3671
+ @optimization_objective = args[:optimization_objective] if args.key?(:optimization_objective)
3672
+ @periodic_tuning_state = args[:periodic_tuning_state] if args.key?(:periodic_tuning_state)
3673
+ @serving_config_lists = args[:serving_config_lists] if args.key?(:serving_config_lists)
3674
+ @serving_state = args[:serving_state] if args.key?(:serving_state)
3675
+ @training_state = args[:training_state] if args.key?(:training_state)
3676
+ @tuning_operation = args[:tuning_operation] if args.key?(:tuning_operation)
3677
+ @type = args[:type] if args.key?(:type)
3678
+ @update_time = args[:update_time] if args.key?(:update_time)
3679
+ end
3680
+ end
3681
+
3682
+ # Represents an ordered combination of valid serving configs, which can be used
3683
+ # for `PAGE_OPTIMIZATION` recommendations.
3684
+ class GoogleCloudRetailV2betaModelServingConfigList
3685
+ include Google::Apis::Core::Hashable
3686
+
3687
+ # Optional. A set of valid serving configs that may be used for `
3688
+ # PAGE_OPTIMIZATION`.
3689
+ # Corresponds to the JSON property `servingConfigIds`
3690
+ # @return [Array<String>]
3691
+ attr_accessor :serving_config_ids
3692
+
3693
+ def initialize(**args)
3694
+ update!(**args)
3695
+ end
3696
+
3697
+ # Update properties of this object
3698
+ def update!(**args)
3699
+ @serving_config_ids = args[:serving_config_ids] if args.key?(:serving_config_ids)
3700
+ end
3701
+ end
3702
+
3494
3703
  # Output result.
3495
3704
  class GoogleCloudRetailV2betaOutputResult
3496
3705
  include Google::Apis::Core::Hashable
@@ -3510,6 +3719,19 @@ module Google
3510
3719
  end
3511
3720
  end
3512
3721
 
3722
+ # Request for pausing training of a model.
3723
+ class GoogleCloudRetailV2betaPauseModelRequest
3724
+ include Google::Apis::Core::Hashable
3725
+
3726
+ def initialize(**args)
3727
+ update!(**args)
3728
+ end
3729
+
3730
+ # Update properties of this object
3731
+ def update!(**args)
3732
+ end
3733
+ end
3734
+
3513
3735
  # Request message for Predict method.
3514
3736
  class GoogleCloudRetailV2betaPredictRequest
3515
3737
  include Google::Apis::Core::Hashable
@@ -3834,6 +4056,8 @@ module Google
3834
4056
  attr_accessor :available_quantity
3835
4057
 
3836
4058
  # The timestamp when this Product becomes available for SearchService.Search.
4059
+ # Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and
4060
+ # ignored for Type.VARIANT.
3837
4061
  # Corresponds to the JSON property `availableTime`
3838
4062
  # @return [String]
3839
4063
  attr_accessor :available_time
@@ -3851,11 +4075,11 @@ module Google
3851
4075
  # belonging to several parallel categories. Strongly recommended using the full
3852
4076
  # path for better search / recommendation quality. To represent full path of
3853
4077
  # category, use '>' sign to separate different hierarchies. If '>' is part of
3854
- # the category name, please replace it with other character(s). For example, if
3855
- # a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["
3856
- # Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented
3857
- # as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness >
3858
- # Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an
4078
+ # the category name, replace it with other character(s). For example, if a shoes
4079
+ # product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports &
4080
+ # Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "
4081
+ # categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic
4082
+ # Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an
3859
4083
  # INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product.
3860
4084
  # Empty values are not allowed. Each value must be a UTF-8 encoded string with
3861
4085
  # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
@@ -3902,7 +4126,10 @@ module Google
3902
4126
  attr_accessor :description
3903
4127
 
3904
4128
  # The timestamp when this product becomes unavailable for SearchService.Search.
3905
- # If it is set, the Product is not available for SearchService.Search after
4129
+ # Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and
4130
+ # ignored for Type.VARIANT. In general, we suggest the users to delete the stale
4131
+ # products explicitly, instead of using this field to determine staleness. If it
4132
+ # is set, the Product is not available for SearchService.Search after
3906
4133
  # expire_time. However, the product can still be retrieved by ProductService.
3907
4134
  # GetProduct and ProductService.ListProducts. expire_time must be later than
3908
4135
  # available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown.
@@ -3963,6 +4190,14 @@ module Google
3963
4190
  # @return [String]
3964
4191
  attr_accessor :language_code
3965
4192
 
4193
+ # Output only. A list of local inventories specific to different places. This is
4194
+ # only available for users who have Retail Search enabled, and it can be managed
4195
+ # by ProductService.AddLocalInventories and ProductService.
4196
+ # RemoveLocalInventories APIs.
4197
+ # Corresponds to the JSON property `localInventories`
4198
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaLocalInventory>]
4199
+ attr_accessor :local_inventories
4200
+
3966
4201
  # The material of the product. For example, "leather", "wooden". A maximum of 20
3967
4202
  # values are allowed. Each value must be a UTF-8 encoded string with a length
3968
4203
  # limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -4081,7 +4316,10 @@ module Google
4081
4316
  # @return [String]
4082
4317
  attr_accessor :title
4083
4318
 
4084
- # Input only. The TTL (time to live) of the product. If it is set, it must be a
4319
+ # Input only. The TTL (time to live) of the product. Note that this is only
4320
+ # applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.
4321
+ # In general, we suggest the users to delete the stale products explicitly,
4322
+ # instead of using this field to determine staleness. If it is set, it must be a
4085
4323
  # non-negative value, and expire_time is set as current timestamp plus ttl. The
4086
4324
  # derived expire_time is returned in the output and ttl is left blank when
4087
4325
  # retrieving the Product. If it is set, the product is not available for
@@ -4141,6 +4379,7 @@ module Google
4141
4379
  @id = args[:id] if args.key?(:id)
4142
4380
  @images = args[:images] if args.key?(:images)
4143
4381
  @language_code = args[:language_code] if args.key?(:language_code)
4382
+ @local_inventories = args[:local_inventories] if args.key?(:local_inventories)
4144
4383
  @materials = args[:materials] if args.key?(:materials)
4145
4384
  @name = args[:name] if args.key?(:name)
4146
4385
  @patterns = args[:patterns] if args.key?(:patterns)
@@ -4467,7 +4706,7 @@ module Google
4467
4706
  end
4468
4707
  end
4469
4708
 
4470
- # Metadata for RejoinUserEvents method.
4709
+ # Metadata for `RejoinUserEvents` method.
4471
4710
  class GoogleCloudRetailV2betaRejoinUserEventsMetadata
4472
4711
  include Google::Apis::Core::Hashable
4473
4712
 
@@ -4485,8 +4724,8 @@ module Google
4485
4724
  include Google::Apis::Core::Hashable
4486
4725
 
4487
4726
  # The type of the user event rejoin to define the scope and range of the user
4488
- # events to be rejoined with the latest product catalog. Defaults to
4489
- # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
4727
+ # events to be rejoined with the latest product catalog. Defaults to `
4728
+ # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to an
4490
4729
  # invalid integer value.
4491
4730
  # Corresponds to the JSON property `userEventRejoinScope`
4492
4731
  # @return [String]
@@ -4502,7 +4741,7 @@ module Google
4502
4741
  end
4503
4742
  end
4504
4743
 
4505
- # Response message for RejoinUserEvents method.
4744
+ # Response message for `RejoinUserEvents` method.
4506
4745
  class GoogleCloudRetailV2betaRejoinUserEventsResponse
4507
4746
  include Google::Apis::Core::Hashable
4508
4747
 
@@ -4740,9 +4979,22 @@ module Google
4740
4979
  end
4741
4980
  end
4742
4981
 
4982
+ # Request for resuming training of a model.
4983
+ class GoogleCloudRetailV2betaResumeModelRequest
4984
+ include Google::Apis::Core::Hashable
4985
+
4986
+ def initialize(**args)
4987
+ update!(**args)
4988
+ end
4989
+
4990
+ # Update properties of this object
4991
+ def update!(**args)
4992
+ end
4993
+ end
4994
+
4743
4995
  # A rule is a condition-action pair * A condition defines when a rule is to be
4744
- # triggered. * An action specifies what occurs on that trigger. Currently only
4745
- # boost rules are supported. Currently only supported by the search endpoint.
4996
+ # triggered. * An action specifies what occurs on that trigger. Currently rules
4997
+ # only work for controls with SOLUTION_TYPE_SEARCH.
4746
4998
  class GoogleCloudRetailV2betaRule
4747
4999
  include Google::Apis::Core::Hashable
4748
5000
 
@@ -5151,9 +5403,9 @@ module Google
5151
5403
  # navigation queries to achieve good search quality. The format should be the
5152
5404
  # same as UserEvent.page_categories; To represent full path of category, use '>'
5153
5405
  # sign to separate different hierarchies. If '>' is part of the category name,
5154
- # please replace it with other character(s). Category pages include special
5155
- # pages such as sales or promotions. For instance, a special sale page may have
5156
- # the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].
5406
+ # replace it with other character(s). Category pages include special pages such
5407
+ # as sales or promotions. For instance, a special sale page may have the
5408
+ # category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].
5157
5409
  # Corresponds to the JSON property `pageCategories`
5158
5410
  # @return [Array<String>]
5159
5411
  attr_accessor :page_categories
@@ -5879,9 +6131,7 @@ module Google
5879
6131
  end
5880
6132
 
5881
6133
  # Configures metadata that is used to generate serving time results (e.g. search
5882
- # results or recommendation predictions). The ServingConfig is passed in the
5883
- # search and predict request and together with the Catalog.default_branch,
5884
- # generates results.
6134
+ # results or recommendation predictions).
5885
6135
  class GoogleCloudRetailV2betaServingConfig
5886
6136
  include Google::Apis::Core::Hashable
5887
6137
 
@@ -5904,16 +6154,21 @@ module Google
5904
6154
  # @return [String]
5905
6155
  attr_accessor :display_name
5906
6156
 
5907
- # How much diversity to use in recommendation model results e.g. 'medium-
5908
- # diversity' or 'high-diversity'. Currently supported values: * 'no-diversity' *
5909
- # 'low-diversity' * 'medium-diversity' * 'high-diversity' * 'auto-diversity' If
6157
+ # How much diversity to use in recommendation model results e.g. `medium-
6158
+ # diversity` or `high-diversity`. Currently supported values: * `no-diversity` *
6159
+ # `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If
5910
6160
  # not specified, we choose default based on recommendation model type. Default
5911
- # value: 'no-diversity'. Can only be set if solution_types is
6161
+ # value: `no-diversity`. Can only be set if solution_types is
5912
6162
  # SOLUTION_TYPE_RECOMMENDATION.
5913
6163
  # Corresponds to the JSON property `diversityLevel`
5914
6164
  # @return [String]
5915
6165
  attr_accessor :diversity_level
5916
6166
 
6167
+ # What kind of diversity to use - data driven or rule based.
6168
+ # Corresponds to the JSON property `diversityType`
6169
+ # @return [String]
6170
+ attr_accessor :diversity_type
6171
+
5917
6172
  # Condition do not associate specifications. If multiple do not associate
5918
6173
  # conditions match, all matching do not associate controls in the list will
5919
6174
  # execute. - Order does not matter. - Maximum number of specifications is 100.
@@ -5927,10 +6182,10 @@ module Google
5927
6182
  # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec]
5928
6183
  attr_accessor :dynamic_facet_spec
5929
6184
 
5930
- # Whether to add additional category filters on the 'similar-items' model. If
5931
- # not specified, we enable it by default. Allowed values are: * 'no-category-
5932
- # match': No additional filtering of original results from the model and the
5933
- # customer's filters. * 'relaxed-category-match': Only keep results with
6185
+ # Whether to add additional category filters on the `similar-items` model. If
6186
+ # not specified, we enable it by default. Allowed values are: * `no-category-
6187
+ # match`: No additional filtering of original results from the model and the
6188
+ # customer's filters. * `relaxed-category-match`: Only keep results with
5934
6189
  # categories that match at least one item categories in the PredictRequests's
5935
6190
  # context item. * If customer also sends filters in the PredictRequest, then the
5936
6191
  # results will satisfy both conditions (user given and category match). Can only
@@ -5964,7 +6219,7 @@ module Google
5964
6219
  # @return [Array<String>]
5965
6220
  attr_accessor :ignore_control_ids
5966
6221
 
5967
- # The id of the model to use at serving time. Currently only
6222
+ # The id of the model in the same Catalog to use at serving time. Currently only
5968
6223
  # RecommendationModels are supported: https://cloud.google.com/retail/
5969
6224
  # recommendations-ai/docs/create-models Can be changed but only to a compatible
5970
6225
  # model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
@@ -5988,13 +6243,18 @@ module Google
5988
6243
  # @return [Array<String>]
5989
6244
  attr_accessor :oneway_synonyms_control_ids
5990
6245
 
6246
+ # The specification for personalization.
6247
+ # Corresponds to the JSON property `personalizationSpec`
6248
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestPersonalizationSpec]
6249
+ attr_accessor :personalization_spec
6250
+
5991
6251
  # How much price ranking we want in serving results. Price reranking causes
5992
6252
  # product items with a similar recommendation probability to be ordered by price,
5993
6253
  # with the highest-priced items first. This setting could result in a decrease
5994
- # in click-through and conversion rates. Allowed values are: * 'no-price-
5995
- # reranking' * 'low-price-raranking' * 'medium-price-reranking' * 'high-price-
5996
- # reranking' If not specified, we choose default based on model type. Default
5997
- # value: 'no-price-reranking'. Can only be set if solution_types is
6254
+ # in click-through and conversion rates. Allowed values are: * `no-price-
6255
+ # reranking` * `low-price-raranking` * `medium-price-reranking` * `high-price-
6256
+ # reranking` If not specified, we choose default based on model type. Default
6257
+ # value: `no-price-reranking`. Can only be set if solution_types is
5998
6258
  # SOLUTION_TYPE_RECOMMENDATION.
5999
6259
  # Corresponds to the JSON property `priceRerankingLevel`
6000
6260
  # @return [String]
@@ -6038,6 +6298,7 @@ module Google
6038
6298
  @boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
6039
6299
  @display_name = args[:display_name] if args.key?(:display_name)
6040
6300
  @diversity_level = args[:diversity_level] if args.key?(:diversity_level)
6301
+ @diversity_type = args[:diversity_type] if args.key?(:diversity_type)
6041
6302
  @do_not_associate_control_ids = args[:do_not_associate_control_ids] if args.key?(:do_not_associate_control_ids)
6042
6303
  @dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec)
6043
6304
  @enable_category_filter_level = args[:enable_category_filter_level] if args.key?(:enable_category_filter_level)
@@ -6047,6 +6308,7 @@ module Google
6047
6308
  @model_id = args[:model_id] if args.key?(:model_id)
6048
6309
  @name = args[:name] if args.key?(:name)
6049
6310
  @oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids)
6311
+ @personalization_spec = args[:personalization_spec] if args.key?(:personalization_spec)
6050
6312
  @price_reranking_level = args[:price_reranking_level] if args.key?(:price_reranking_level)
6051
6313
  @redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids)
6052
6314
  @replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids)
@@ -6169,6 +6431,20 @@ module Google
6169
6431
  end
6170
6432
  end
6171
6433
 
6434
+ # Request to manually start a tuning process now (instead of waiting for the
6435
+ # periodically scheduled tuning to happen).
6436
+ class GoogleCloudRetailV2betaTuneModelRequest
6437
+ include Google::Apis::Core::Hashable
6438
+
6439
+ def initialize(**args)
6440
+ update!(**args)
6441
+ end
6442
+
6443
+ # Update properties of this object
6444
+ def update!(**args)
6445
+ end
6446
+ end
6447
+
6172
6448
  # UserEvent captures all metadata information Retail API needs to know about how
6173
6449
  # end users interact with customers' website.
6174
6450
  class GoogleCloudRetailV2betaUserEvent
@@ -6277,12 +6553,12 @@ module Google
6277
6553
 
6278
6554
  # The categories associated with a category page. To represent full path of
6279
6555
  # category, use '>' sign to separate different hierarchies. If '>' is part of
6280
- # the category name, please replace it with other character(s). Category pages
6281
- # include special pages such as sales or promotions. For instance, a special
6282
- # sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017
6283
- # Black Friday Deals"]. Required for `category-page-view` events. At least one
6284
- # of search_query or page_categories is required for `search` events. Other
6285
- # event types should not set this field. Otherwise, an INVALID_ARGUMENT error is
6556
+ # the category name, replace it with other character(s). Category pages include
6557
+ # special pages such as sales or promotions. For instance, a special sale page
6558
+ # may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black
6559
+ # Friday Deals"]. Required for `category-page-view` events. At least one of
6560
+ # search_query or page_categories is required for `search` events. Other event
6561
+ # types should not set this field. Otherwise, an INVALID_ARGUMENT error is
6286
6562
  # returned.
6287
6563
  # Corresponds to the JSON property `pageCategories`
6288
6564
  # @return [Array<String>]