google-apis-retail_v2beta 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1117,6 +1117,26 @@ module Google
1117
1117
  end
1118
1118
  end
1119
1119
 
1120
+ # Request for AddControl method.
1121
+ class GoogleCloudRetailV2betaAddControlRequest
1122
+ include Google::Apis::Core::Hashable
1123
+
1124
+ # Required. The id of the control to apply. Assumed to be in the same catalog as
1125
+ # the serving config - if id is not found a NOT_FOUND error is returned.
1126
+ # Corresponds to the JSON property `controlId`
1127
+ # @return [String]
1128
+ attr_accessor :control_id
1129
+
1130
+ def initialize(**args)
1131
+ update!(**args)
1132
+ end
1133
+
1134
+ # Update properties of this object
1135
+ def update!(**args)
1136
+ @control_id = args[:control_id] if args.key?(:control_id)
1137
+ end
1138
+ end
1139
+
1120
1140
  # Metadata related to the progress of the AddFulfillmentPlaces operation.
1121
1141
  # Currently empty because there is no meaningful metadata populated from the
1122
1142
  # AddFulfillmentPlaces method.
@@ -1520,6 +1540,153 @@ module Google
1520
1540
  end
1521
1541
  end
1522
1542
 
1543
+ # Metadata that is used to define a condition that triggers an action. A valid
1544
+ # condition must specify at least one of 'query_terms' or 'products_filter'. If
1545
+ # multiple fields are specified, the condition is met if all the fields are
1546
+ # satisfied e.g. if a set of query terms and product_filter are set, then only
1547
+ # items matching the product_filter for requests with a query matching the query
1548
+ # terms wil get boosted.
1549
+ class GoogleCloudRetailV2betaCondition
1550
+ include Google::Apis::Core::Hashable
1551
+
1552
+ # Range of time(s) specifying when Condition is active. Condition true if any
1553
+ # time range matches.
1554
+ # Corresponds to the JSON property `activeTimeRange`
1555
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaConditionTimeRange>]
1556
+ attr_accessor :active_time_range
1557
+
1558
+ # A list (up to 10 entries) of terms to match the query on. If not specified,
1559
+ # match all queries. If many query terms are specified, the condition is matched
1560
+ # if any of the terms is a match (i.e. using the OR operator).
1561
+ # Corresponds to the JSON property `queryTerms`
1562
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaConditionQueryTerm>]
1563
+ attr_accessor :query_terms
1564
+
1565
+ def initialize(**args)
1566
+ update!(**args)
1567
+ end
1568
+
1569
+ # Update properties of this object
1570
+ def update!(**args)
1571
+ @active_time_range = args[:active_time_range] if args.key?(:active_time_range)
1572
+ @query_terms = args[:query_terms] if args.key?(:query_terms)
1573
+ end
1574
+ end
1575
+
1576
+ # Query terms that we want to match on.
1577
+ class GoogleCloudRetailV2betaConditionQueryTerm
1578
+ include Google::Apis::Core::Hashable
1579
+
1580
+ # Whether this is supposed to be a full or partial match.
1581
+ # Corresponds to the JSON property `fullMatch`
1582
+ # @return [Boolean]
1583
+ attr_accessor :full_match
1584
+ alias_method :full_match?, :full_match
1585
+
1586
+ # The value of the term to match on. Value cannot be empty. Value can have at
1587
+ # most 3 terms if specified as a partial match. Each space separated string is
1588
+ # considered as one term. Example) "a b c" is 3 terms and allowed, " a b c d" is
1589
+ # 4 terms and not allowed for partial match.
1590
+ # Corresponds to the JSON property `value`
1591
+ # @return [String]
1592
+ attr_accessor :value
1593
+
1594
+ def initialize(**args)
1595
+ update!(**args)
1596
+ end
1597
+
1598
+ # Update properties of this object
1599
+ def update!(**args)
1600
+ @full_match = args[:full_match] if args.key?(:full_match)
1601
+ @value = args[:value] if args.key?(:value)
1602
+ end
1603
+ end
1604
+
1605
+ # Used for time-dependent conditions. Example: Want to have rule applied for
1606
+ # week long sale.
1607
+ class GoogleCloudRetailV2betaConditionTimeRange
1608
+ include Google::Apis::Core::Hashable
1609
+
1610
+ # End of time range. Range is inclusive.
1611
+ # Corresponds to the JSON property `endTime`
1612
+ # @return [String]
1613
+ attr_accessor :end_time
1614
+
1615
+ # Start of time range. Range is inclusive.
1616
+ # Corresponds to the JSON property `startTime`
1617
+ # @return [String]
1618
+ attr_accessor :start_time
1619
+
1620
+ def initialize(**args)
1621
+ update!(**args)
1622
+ end
1623
+
1624
+ # Update properties of this object
1625
+ def update!(**args)
1626
+ @end_time = args[:end_time] if args.key?(:end_time)
1627
+ @start_time = args[:start_time] if args.key?(:start_time)
1628
+ end
1629
+ end
1630
+
1631
+ # Configures dynamic serving time metadata that is used to pre and post process
1632
+ # search/recommendation model results.
1633
+ class GoogleCloudRetailV2betaControl
1634
+ include Google::Apis::Core::Hashable
1635
+
1636
+ # Output only. List of serving configuration ids that that are associated with
1637
+ # this control. Note the association is managed via the ServingConfig, this is
1638
+ # an output only denormalizeed view. Assumed to be in the same catalog.
1639
+ # Corresponds to the JSON property `associatedServingConfigIds`
1640
+ # @return [Array<String>]
1641
+ attr_accessor :associated_serving_config_ids
1642
+
1643
+ # Required. The human readable control display name. Used in Retail UI. This
1644
+ # field must be a UTF-8 encoded string with a length limit of 128 characters.
1645
+ # Otherwise, an INVALID_ARGUMENT error is thrown.
1646
+ # Corresponds to the JSON property `displayName`
1647
+ # @return [String]
1648
+ attr_accessor :display_name
1649
+
1650
+ # A facet specification to perform faceted search.
1651
+ # Corresponds to the JSON property `facetSpec`
1652
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestFacetSpec]
1653
+ attr_accessor :facet_spec
1654
+
1655
+ # Immutable. Fully qualified name projects/*/locations/global/catalogs/*/
1656
+ # controls/*
1657
+ # Corresponds to the JSON property `name`
1658
+ # @return [String]
1659
+ attr_accessor :name
1660
+
1661
+ # A rule is a condition-action pair * A condition defines when a rule is to be
1662
+ # triggered. * An action specifies what occurs on that trigger. Currently only
1663
+ # boost rules are supported. Currently only supported by the search endpoint.
1664
+ # Corresponds to the JSON property `rule`
1665
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRule]
1666
+ attr_accessor :rule
1667
+
1668
+ # Required. Immutable. The solution types that the serving config is used for.
1669
+ # Currently we support setting only one type of solution at creation time. Only `
1670
+ # SOLUTION_TYPE_SEARCH` value is supported at the moment.
1671
+ # Corresponds to the JSON property `solutionTypes`
1672
+ # @return [Array<String>]
1673
+ attr_accessor :solution_types
1674
+
1675
+ def initialize(**args)
1676
+ update!(**args)
1677
+ end
1678
+
1679
+ # Update properties of this object
1680
+ def update!(**args)
1681
+ @associated_serving_config_ids = args[:associated_serving_config_ids] if args.key?(:associated_serving_config_ids)
1682
+ @display_name = args[:display_name] if args.key?(:display_name)
1683
+ @facet_spec = args[:facet_spec] if args.key?(:facet_spec)
1684
+ @name = args[:name] if args.key?(:name)
1685
+ @rule = args[:rule] if args.key?(:rule)
1686
+ @solution_types = args[:solution_types] if args.key?(:solution_types)
1687
+ end
1688
+ end
1689
+
1523
1690
  # A custom attribute that is not explicitly modeled in Product.
1524
1691
  class GoogleCloudRetailV2betaCustomAttribute
1525
1692
  include Google::Apis::Core::Hashable
@@ -1718,7 +1885,8 @@ module Google
1718
1885
  # imports: * `user_event` (default): One JSON UserEvent per line. * `
1719
1886
  # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719.
1720
1887
  # Supported values for control imports: * 'control' (default): One JSON Control
1721
- # per line.
1888
+ # per line. Supported values for catalog attribute imports: * 'catalog_attribute'
1889
+ # (default): One CSV CatalogAttribute per line.
1722
1890
  # Corresponds to the JSON property `dataSchema`
1723
1891
  # @return [String]
1724
1892
  attr_accessor :data_schema
@@ -2147,6 +2315,31 @@ module Google
2147
2315
  end
2148
2316
  end
2149
2317
 
2318
+ # Response for ListControls method.
2319
+ class GoogleCloudRetailV2betaListControlsResponse
2320
+ include Google::Apis::Core::Hashable
2321
+
2322
+ # All the Controls for a given catalog.
2323
+ # Corresponds to the JSON property `controls`
2324
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaControl>]
2325
+ attr_accessor :controls
2326
+
2327
+ # Pagination token, if not returned indicates the last page.
2328
+ # Corresponds to the JSON property `nextPageToken`
2329
+ # @return [String]
2330
+ attr_accessor :next_page_token
2331
+
2332
+ def initialize(**args)
2333
+ update!(**args)
2334
+ end
2335
+
2336
+ # Update properties of this object
2337
+ def update!(**args)
2338
+ @controls = args[:controls] if args.key?(:controls)
2339
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2340
+ end
2341
+ end
2342
+
2150
2343
  # Response message for ProductService.ListProducts method.
2151
2344
  class GoogleCloudRetailV2betaListProductsResponse
2152
2345
  include Google::Apis::Core::Hashable
@@ -2173,6 +2366,31 @@ module Google
2173
2366
  end
2174
2367
  end
2175
2368
 
2369
+ # Response for ListServingConfigs method.
2370
+ class GoogleCloudRetailV2betaListServingConfigsResponse
2371
+ include Google::Apis::Core::Hashable
2372
+
2373
+ # Pagination token, if not returned indicates the last page.
2374
+ # Corresponds to the JSON property `nextPageToken`
2375
+ # @return [String]
2376
+ attr_accessor :next_page_token
2377
+
2378
+ # All the ServingConfigs for a given catalog.
2379
+ # Corresponds to the JSON property `servingConfigs`
2380
+ # @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaServingConfig>]
2381
+ attr_accessor :serving_configs
2382
+
2383
+ def initialize(**args)
2384
+ update!(**args)
2385
+ end
2386
+
2387
+ # Update properties of this object
2388
+ def update!(**args)
2389
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2390
+ @serving_configs = args[:serving_configs] if args.key?(:serving_configs)
2391
+ end
2392
+ end
2393
+
2176
2394
  # Request message for Predict method.
2177
2395
  class GoogleCloudRetailV2betaPredictRequest
2178
2396
  include Google::Apis::Core::Hashable
@@ -2521,7 +2739,9 @@ module Google
2521
2739
  # @return [Array<String>]
2522
2740
  attr_accessor :categories
2523
2741
 
2524
- # The id of the collection members when type is Type.COLLECTION. Should not set
2742
+ # The id of the collection members when type is Type.COLLECTION. Non-existent
2743
+ # product ids are allowed. The type of the members must be either Type.PRIMARY
2744
+ # or Type.VARIANT otherwise and INVALID_ARGUMENT error is thrown. Should not set
2525
2745
  # it for other types. A maximum of 1000 values are allowed. Otherwise, an
2526
2746
  # INVALID_ARGUMENT error is return.
2527
2747
  # Corresponds to the JSON property `collectionMemberIds`
@@ -3170,6 +3390,26 @@ module Google
3170
3390
  end
3171
3391
  end
3172
3392
 
3393
+ # Request for RemoveControl method.
3394
+ class GoogleCloudRetailV2betaRemoveControlRequest
3395
+ include Google::Apis::Core::Hashable
3396
+
3397
+ # Required. The id of the control to apply. Assumed to be in the same catalog as
3398
+ # the serving config.
3399
+ # Corresponds to the JSON property `controlId`
3400
+ # @return [String]
3401
+ attr_accessor :control_id
3402
+
3403
+ def initialize(**args)
3404
+ update!(**args)
3405
+ end
3406
+
3407
+ # Update properties of this object
3408
+ def update!(**args)
3409
+ @control_id = args[:control_id] if args.key?(:control_id)
3410
+ end
3411
+ end
3412
+
3173
3413
  # Metadata related to the progress of the RemoveFulfillmentPlaces operation.
3174
3414
  # Currently empty because there is no meaningful metadata populated from the
3175
3415
  # RemoveFulfillmentPlaces method.
@@ -3253,6 +3493,333 @@ module Google
3253
3493
  end
3254
3494
  end
3255
3495
 
3496
+ # A rule is a condition-action pair * A condition defines when a rule is to be
3497
+ # triggered. * An action specifies what occurs on that trigger. Currently only
3498
+ # boost rules are supported. Currently only supported by the search endpoint.
3499
+ class GoogleCloudRetailV2betaRule
3500
+ include Google::Apis::Core::Hashable
3501
+
3502
+ # A boost action to apply to results matching condition specified above.
3503
+ # Corresponds to the JSON property `boostAction`
3504
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleBoostAction]
3505
+ attr_accessor :boost_action
3506
+
3507
+ # Metadata that is used to define a condition that triggers an action. A valid
3508
+ # condition must specify at least one of 'query_terms' or 'products_filter'. If
3509
+ # multiple fields are specified, the condition is met if all the fields are
3510
+ # satisfied e.g. if a set of query terms and product_filter are set, then only
3511
+ # items matching the product_filter for requests with a query matching the query
3512
+ # terms wil get boosted.
3513
+ # Corresponds to the JSON property `condition`
3514
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCondition]
3515
+ attr_accessor :condition
3516
+
3517
+ # Prevents `query_term` from being associated with specified terms during search.
3518
+ # Example: Don't associate "gShoe" and "cheap".
3519
+ # Corresponds to the JSON property `doNotAssociateAction`
3520
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleDoNotAssociateAction]
3521
+ attr_accessor :do_not_associate_action
3522
+
3523
+ # * Rule Condition: - No Condition provided is a global match. - 1 or more
3524
+ # Condition provided is combined with OR operator. * Action Input: The request
3525
+ # query and filter that will be applied to the retrieved products, in addition
3526
+ # to any filters already provided with the SearchRequest. The AND operator is
3527
+ # used to combine the query's existing filters with the filter rule(s). NOTE:
3528
+ # May result in 0 results when filters conflict. * Action Result: Filters the
3529
+ # returned objects to be ONLY those that passed the filter.
3530
+ # Corresponds to the JSON property `filterAction`
3531
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleFilterAction]
3532
+ attr_accessor :filter_action
3533
+
3534
+ # Prevents a term in the query from being used in search. Example: Don't search
3535
+ # for "shoddy".
3536
+ # Corresponds to the JSON property `ignoreAction`
3537
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleIgnoreAction]
3538
+ attr_accessor :ignore_action
3539
+
3540
+ # Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
3541
+ # synonyms of each query term only. `query_terms` will not be treated as
3542
+ # synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
3543
+ # shoes" will not use a synonym of "sneakers".
3544
+ # Corresponds to the JSON property `onewaySynonymsAction`
3545
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleOnewaySynonymsAction]
3546
+ attr_accessor :oneway_synonyms_action
3547
+
3548
+ # Redirects a shopper to a specific page. * Rule Condition: - Must specify
3549
+ # Condition. * Action Input: Request Query * Action Result: Redirects shopper to
3550
+ # provided uri.
3551
+ # Corresponds to the JSON property `redirectAction`
3552
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleRedirectAction]
3553
+ attr_accessor :redirect_action
3554
+
3555
+ # Replaces a term in the query. Multiple replacement candidates can be specified.
3556
+ # All `query_terms` will be replaced with the replacement term. Example:
3557
+ # Replace "gShoe" with "google shoe".
3558
+ # Corresponds to the JSON property `replacementAction`
3559
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleReplacementAction]
3560
+ attr_accessor :replacement_action
3561
+
3562
+ # Creates a set of terms that will be treated as synonyms of each other. Example:
3563
+ # synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
3564
+ # . * "shoes" will use a synonym of "sneakers".
3565
+ # Corresponds to the JSON property `twowaySynonymsAction`
3566
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleTwowaySynonymsAction]
3567
+ attr_accessor :twoway_synonyms_action
3568
+
3569
+ def initialize(**args)
3570
+ update!(**args)
3571
+ end
3572
+
3573
+ # Update properties of this object
3574
+ def update!(**args)
3575
+ @boost_action = args[:boost_action] if args.key?(:boost_action)
3576
+ @condition = args[:condition] if args.key?(:condition)
3577
+ @do_not_associate_action = args[:do_not_associate_action] if args.key?(:do_not_associate_action)
3578
+ @filter_action = args[:filter_action] if args.key?(:filter_action)
3579
+ @ignore_action = args[:ignore_action] if args.key?(:ignore_action)
3580
+ @oneway_synonyms_action = args[:oneway_synonyms_action] if args.key?(:oneway_synonyms_action)
3581
+ @redirect_action = args[:redirect_action] if args.key?(:redirect_action)
3582
+ @replacement_action = args[:replacement_action] if args.key?(:replacement_action)
3583
+ @twoway_synonyms_action = args[:twoway_synonyms_action] if args.key?(:twoway_synonyms_action)
3584
+ end
3585
+ end
3586
+
3587
+ # A boost action to apply to results matching condition specified above.
3588
+ class GoogleCloudRetailV2betaRuleBoostAction
3589
+ include Google::Apis::Core::Hashable
3590
+
3591
+ # Strength of the condition boost, which must be in [-1, 1]. Negative boost
3592
+ # means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion.
3593
+ # However, it does not necessarily mean that the boosted item will be the top
3594
+ # result at all times, nor that other items will be excluded. Results could
3595
+ # still be shown even when none of them matches the condition. And results that
3596
+ # are significantly more relevant to the search query can still trump your
3597
+ # heavily favored but irrelevant items. Setting to -1.0 gives the item a big
3598
+ # demotion. However, results that are deeply relevant might still be shown. The
3599
+ # item will have an upstream battle to get a fairly high ranking, but it is not
3600
+ # blocked out completely. Setting to 0.0 means no boost applied. The boosting
3601
+ # condition is ignored.
3602
+ # Corresponds to the JSON property `boost`
3603
+ # @return [Float]
3604
+ attr_accessor :boost
3605
+
3606
+ # The filter can have a max size of 5000 characters. An expression which
3607
+ # specifies which products to apply an action to. The syntax and supported
3608
+ # fields are the same as a filter expression. See SearchRequest.filter for
3609
+ # detail syntax and limitations. Examples: * To boost products with product ID "
3610
+ # product_1" or "product_2", and color "Red" or "Blue": *(id: ANY("product_1", "
3611
+ # product_2")) * *AND * *(colorFamilies: ANY("Red", "Blue")) *
3612
+ # Corresponds to the JSON property `productsFilter`
3613
+ # @return [String]
3614
+ attr_accessor :products_filter
3615
+
3616
+ def initialize(**args)
3617
+ update!(**args)
3618
+ end
3619
+
3620
+ # Update properties of this object
3621
+ def update!(**args)
3622
+ @boost = args[:boost] if args.key?(:boost)
3623
+ @products_filter = args[:products_filter] if args.key?(:products_filter)
3624
+ end
3625
+ end
3626
+
3627
+ # Prevents `query_term` from being associated with specified terms during search.
3628
+ # Example: Don't associate "gShoe" and "cheap".
3629
+ class GoogleCloudRetailV2betaRuleDoNotAssociateAction
3630
+ include Google::Apis::Core::Hashable
3631
+
3632
+ # Cannot contain duplicates or the query term. Can specify up to 100 terms.
3633
+ # Corresponds to the JSON property `doNotAssociateTerms`
3634
+ # @return [Array<String>]
3635
+ attr_accessor :do_not_associate_terms
3636
+
3637
+ # Terms from the search query. Will not consider do_not_associate_terms for
3638
+ # search if in search query. Can specify up to 100 terms.
3639
+ # Corresponds to the JSON property `queryTerms`
3640
+ # @return [Array<String>]
3641
+ attr_accessor :query_terms
3642
+
3643
+ # Will be [deprecated = true] post migration;
3644
+ # Corresponds to the JSON property `terms`
3645
+ # @return [Array<String>]
3646
+ attr_accessor :terms
3647
+
3648
+ def initialize(**args)
3649
+ update!(**args)
3650
+ end
3651
+
3652
+ # Update properties of this object
3653
+ def update!(**args)
3654
+ @do_not_associate_terms = args[:do_not_associate_terms] if args.key?(:do_not_associate_terms)
3655
+ @query_terms = args[:query_terms] if args.key?(:query_terms)
3656
+ @terms = args[:terms] if args.key?(:terms)
3657
+ end
3658
+ end
3659
+
3660
+ # * Rule Condition: - No Condition provided is a global match. - 1 or more
3661
+ # Condition provided is combined with OR operator. * Action Input: The request
3662
+ # query and filter that will be applied to the retrieved products, in addition
3663
+ # to any filters already provided with the SearchRequest. The AND operator is
3664
+ # used to combine the query's existing filters with the filter rule(s). NOTE:
3665
+ # May result in 0 results when filters conflict. * Action Result: Filters the
3666
+ # returned objects to be ONLY those that passed the filter.
3667
+ class GoogleCloudRetailV2betaRuleFilterAction
3668
+ include Google::Apis::Core::Hashable
3669
+
3670
+ # A filter to apply on the matching condition results. Supported features: *
3671
+ # filter must be set. * Filter syntax is identical to SearchRequest.filter. See
3672
+ # more details at the Retail Search [user guide](/retail/search/docs/filter-and-
3673
+ # order#filter). * To filter products with product ID "product_1" or "product_2",
3674
+ # and color "Red" or "Blue": *(id: ANY("product_1", "product_2")) * *AND * *(
3675
+ # colorFamilies: ANY("Red", "Blue")) *
3676
+ # Corresponds to the JSON property `filter`
3677
+ # @return [String]
3678
+ attr_accessor :filter
3679
+
3680
+ def initialize(**args)
3681
+ update!(**args)
3682
+ end
3683
+
3684
+ # Update properties of this object
3685
+ def update!(**args)
3686
+ @filter = args[:filter] if args.key?(:filter)
3687
+ end
3688
+ end
3689
+
3690
+ # Prevents a term in the query from being used in search. Example: Don't search
3691
+ # for "shoddy".
3692
+ class GoogleCloudRetailV2betaRuleIgnoreAction
3693
+ include Google::Apis::Core::Hashable
3694
+
3695
+ # Terms to ignore in the search query.
3696
+ # Corresponds to the JSON property `ignoreTerms`
3697
+ # @return [Array<String>]
3698
+ attr_accessor :ignore_terms
3699
+
3700
+ def initialize(**args)
3701
+ update!(**args)
3702
+ end
3703
+
3704
+ # Update properties of this object
3705
+ def update!(**args)
3706
+ @ignore_terms = args[:ignore_terms] if args.key?(:ignore_terms)
3707
+ end
3708
+ end
3709
+
3710
+ # Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
3711
+ # synonyms of each query term only. `query_terms` will not be treated as
3712
+ # synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
3713
+ # shoes" will not use a synonym of "sneakers".
3714
+ class GoogleCloudRetailV2betaRuleOnewaySynonymsAction
3715
+ include Google::Apis::Core::Hashable
3716
+
3717
+ # Will be [deprecated = true] post migration;
3718
+ # Corresponds to the JSON property `onewayTerms`
3719
+ # @return [Array<String>]
3720
+ attr_accessor :oneway_terms
3721
+
3722
+ # Terms from the search query. Will treat synonyms as their synonyms. Not
3723
+ # themselves synonyms of the synonyms. Can specify up to 100 terms.
3724
+ # Corresponds to the JSON property `queryTerms`
3725
+ # @return [Array<String>]
3726
+ attr_accessor :query_terms
3727
+
3728
+ # Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100
3729
+ # synonyms.
3730
+ # Corresponds to the JSON property `synonyms`
3731
+ # @return [Array<String>]
3732
+ attr_accessor :synonyms
3733
+
3734
+ def initialize(**args)
3735
+ update!(**args)
3736
+ end
3737
+
3738
+ # Update properties of this object
3739
+ def update!(**args)
3740
+ @oneway_terms = args[:oneway_terms] if args.key?(:oneway_terms)
3741
+ @query_terms = args[:query_terms] if args.key?(:query_terms)
3742
+ @synonyms = args[:synonyms] if args.key?(:synonyms)
3743
+ end
3744
+ end
3745
+
3746
+ # Redirects a shopper to a specific page. * Rule Condition: - Must specify
3747
+ # Condition. * Action Input: Request Query * Action Result: Redirects shopper to
3748
+ # provided uri.
3749
+ class GoogleCloudRetailV2betaRuleRedirectAction
3750
+ include Google::Apis::Core::Hashable
3751
+
3752
+ # URL must have length equal or less than 2000 characters.
3753
+ # Corresponds to the JSON property `redirectUri`
3754
+ # @return [String]
3755
+ attr_accessor :redirect_uri
3756
+
3757
+ def initialize(**args)
3758
+ update!(**args)
3759
+ end
3760
+
3761
+ # Update properties of this object
3762
+ def update!(**args)
3763
+ @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
3764
+ end
3765
+ end
3766
+
3767
+ # Replaces a term in the query. Multiple replacement candidates can be specified.
3768
+ # All `query_terms` will be replaced with the replacement term. Example:
3769
+ # Replace "gShoe" with "google shoe".
3770
+ class GoogleCloudRetailV2betaRuleReplacementAction
3771
+ include Google::Apis::Core::Hashable
3772
+
3773
+ # Terms from the search query. Will be replaced by replacement term. Can specify
3774
+ # up to 100 terms.
3775
+ # Corresponds to the JSON property `queryTerms`
3776
+ # @return [Array<String>]
3777
+ attr_accessor :query_terms
3778
+
3779
+ # Term that will be used for replacement.
3780
+ # Corresponds to the JSON property `replacementTerm`
3781
+ # @return [String]
3782
+ attr_accessor :replacement_term
3783
+
3784
+ # Will be [deprecated = true] post migration;
3785
+ # Corresponds to the JSON property `term`
3786
+ # @return [String]
3787
+ attr_accessor :term
3788
+
3789
+ def initialize(**args)
3790
+ update!(**args)
3791
+ end
3792
+
3793
+ # Update properties of this object
3794
+ def update!(**args)
3795
+ @query_terms = args[:query_terms] if args.key?(:query_terms)
3796
+ @replacement_term = args[:replacement_term] if args.key?(:replacement_term)
3797
+ @term = args[:term] if args.key?(:term)
3798
+ end
3799
+ end
3800
+
3801
+ # Creates a set of terms that will be treated as synonyms of each other. Example:
3802
+ # synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
3803
+ # . * "shoes" will use a synonym of "sneakers".
3804
+ class GoogleCloudRetailV2betaRuleTwowaySynonymsAction
3805
+ include Google::Apis::Core::Hashable
3806
+
3807
+ # Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at
3808
+ # least 2 synonyms.
3809
+ # Corresponds to the JSON property `synonyms`
3810
+ # @return [Array<String>]
3811
+ attr_accessor :synonyms
3812
+
3813
+ def initialize(**args)
3814
+ update!(**args)
3815
+ end
3816
+
3817
+ # Update properties of this object
3818
+ def update!(**args)
3819
+ @synonyms = args[:synonyms] if args.key?(:synonyms)
3820
+ end
3821
+ end
3822
+
3256
3823
  # Request message for SearchService.Search method.
3257
3824
  class GoogleCloudRetailV2betaSearchRequest
3258
3825
  include Google::Apis::Core::Hashable
@@ -3927,6 +4494,183 @@ module Google
3927
4494
  end
3928
4495
  end
3929
4496
 
4497
+ # Configures metadata that is used to generate serving time results (e.g. search
4498
+ # results or recommendation predictions). The ServingConfig is passed in the
4499
+ # search and predict request and together with the Catalog.default_branch,
4500
+ # generates results.
4501
+ class GoogleCloudRetailV2betaServingConfig
4502
+ include Google::Apis::Core::Hashable
4503
+
4504
+ # Condition boost specifications. If a product matches multiple conditions in
4505
+ # the specifications, boost scores from these specifications are all applied and
4506
+ # combined in a non-linear way. Maximum number of specifications is 10. Notice
4507
+ # that if both ServingConfig.boost_control_ids and [SearchRequest.boost_spec]
4508
+ # are set, the boost conditions from both places are evaluated. If a search
4509
+ # request matches multiple boost conditions, the final boost score is equal to
4510
+ # the sum of the boost scores from all matched boost conditions. Can only be set
4511
+ # if solution_types is SOLUTION_TYPE_SEARCH.
4512
+ # Corresponds to the JSON property `boostControlIds`
4513
+ # @return [Array<String>]
4514
+ attr_accessor :boost_control_ids
4515
+
4516
+ # Required. The human readable serving config display name. Used in Retail UI.
4517
+ # This field must be a UTF-8 encoded string with a length limit of 128
4518
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
4519
+ # Corresponds to the JSON property `displayName`
4520
+ # @return [String]
4521
+ attr_accessor :display_name
4522
+
4523
+ # How much diversity to use in recommendation model results e.g. 'medium-
4524
+ # diversity' or 'high-diversity'. Currently supported values: * 'no-diversity' *
4525
+ # 'low-diversity' * 'medium-diversity' * 'high-diversity' * 'auto-diversity' If
4526
+ # not specified, we choose default based on recommendation model type. Default
4527
+ # value: 'no-diversity'. Can only be set if solution_types is
4528
+ # SOLUTION_TYPE_RECOMMENDATION.
4529
+ # Corresponds to the JSON property `diversityLevel`
4530
+ # @return [String]
4531
+ attr_accessor :diversity_level
4532
+
4533
+ # Condition do not associate specifications. If multiple do not associate
4534
+ # conditions match, all matching do not associate controls in the list will
4535
+ # execute. - Order does not matter. - Maximum number of specifications is 100.
4536
+ # Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
4537
+ # Corresponds to the JSON property `doNotAssociateControlIds`
4538
+ # @return [Array<String>]
4539
+ attr_accessor :do_not_associate_control_ids
4540
+
4541
+ # The specifications of dynamically generated facets.
4542
+ # Corresponds to the JSON property `dynamicFacetSpec`
4543
+ # @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec]
4544
+ attr_accessor :dynamic_facet_spec
4545
+
4546
+ # Whether to add additional category filters on the 'similar-items' model. If
4547
+ # not specified, we enable it by default. Allowed values are: * 'no-category-
4548
+ # match': No additional filtering of original results from the model and the
4549
+ # customer's filters. * 'relaxed-category-match': Only keep results with
4550
+ # categories that match at least one item categories in the PredictRequests's
4551
+ # context item. * If customer also sends filters in the PredictRequest, then the
4552
+ # results will satisfy both conditions (user given and category match). Can only
4553
+ # be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
4554
+ # Corresponds to the JSON property `enableCategoryFilterLevel`
4555
+ # @return [String]
4556
+ attr_accessor :enable_category_filter_level
4557
+
4558
+ # Facet specifications for faceted search. If empty, no facets are returned. The
4559
+ # ids refer to the ids of Control resources with only the Facet control set.
4560
+ # These controls are assumed to be in the same Catalog as the ServingConfig. A
4561
+ # maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is
4562
+ # returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
4563
+ # Corresponds to the JSON property `facetControlIds`
4564
+ # @return [Array<String>]
4565
+ attr_accessor :facet_control_ids
4566
+
4567
+ # Condition filter specifications. If a product matches multiple conditions in
4568
+ # the specifications, filters from these specifications are all applied and
4569
+ # combined via the AND operator. Maximum number of specifications is 100. Can
4570
+ # only be set if solution_types is SOLUTION_TYPE_SEARCH.
4571
+ # Corresponds to the JSON property `filterControlIds`
4572
+ # @return [Array<String>]
4573
+ attr_accessor :filter_control_ids
4574
+
4575
+ # Condition ignore specifications. If multiple ignore conditions match, all
4576
+ # matching ignore controls in the list will execute. - Order does not matter. -
4577
+ # Maximum number of specifications is 100. Can only be set if solution_types is
4578
+ # SOLUTION_TYPE_SEARCH.
4579
+ # Corresponds to the JSON property `ignoreControlIds`
4580
+ # @return [Array<String>]
4581
+ attr_accessor :ignore_control_ids
4582
+
4583
+ # The id of the model to use at serving time. Currently only
4584
+ # RecommendationModels are supported: https://cloud.google.com/retail/
4585
+ # recommendations-ai/docs/create-models Can be changed but only to a compatible
4586
+ # model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
4587
+ # solution_types is SOLUTION_TYPE_RECOMMENDATION.
4588
+ # Corresponds to the JSON property `modelId`
4589
+ # @return [String]
4590
+ attr_accessor :model_id
4591
+
4592
+ # Immutable. Fully qualified name projects/*/locations/global/catalogs/*/
4593
+ # servingConfig/*
4594
+ # Corresponds to the JSON property `name`
4595
+ # @return [String]
4596
+ attr_accessor :name
4597
+
4598
+ # Condition oneway synonyms specifications. If multiple oneway synonyms
4599
+ # conditions match, all matching oneway synonyms controls in the list will
4600
+ # execute. Order of controls in the list will not matter. Maximum number of
4601
+ # specifications is 100. Can only be set if solution_types is
4602
+ # SOLUTION_TYPE_SEARCH.
4603
+ # Corresponds to the JSON property `onewaySynonymsControlIds`
4604
+ # @return [Array<String>]
4605
+ attr_accessor :oneway_synonyms_control_ids
4606
+
4607
+ # How much price ranking we want in serving results. Price reranking causes
4608
+ # product items with a similar recommendation probability to be ordered by price,
4609
+ # with the highest-priced items first. This setting could result in a decrease
4610
+ # in click-through and conversion rates. Allowed values are: * 'no-price-
4611
+ # reranking' * 'low-price-raranking' * 'medium-price-reranking' * 'high-price-
4612
+ # reranking' If not specified, we choose default based on model type. Default
4613
+ # value: 'no-price-reranking'. Can only be set if solution_types is
4614
+ # SOLUTION_TYPE_RECOMMENDATION.
4615
+ # Corresponds to the JSON property `priceRerankingLevel`
4616
+ # @return [String]
4617
+ attr_accessor :price_reranking_level
4618
+
4619
+ # Condition redirect specifications. Only the first triggered redirect action is
4620
+ # applied, even if multiple apply. Maximum number of specifications is 100. Can
4621
+ # only be set if solution_types is SOLUTION_TYPE_SEARCH.
4622
+ # Corresponds to the JSON property `redirectControlIds`
4623
+ # @return [Array<String>]
4624
+ attr_accessor :redirect_control_ids
4625
+
4626
+ # Condition replacement specifications. - Applied according to the order in the
4627
+ # list. - A previously replaced term can not be re-replaced. - Maximum number of
4628
+ # specifications is 100. Can only be set if solution_types is
4629
+ # SOLUTION_TYPE_SEARCH.
4630
+ # Corresponds to the JSON property `replacementControlIds`
4631
+ # @return [Array<String>]
4632
+ attr_accessor :replacement_control_ids
4633
+
4634
+ # Required. Immutable. Specifies the solution types that a serving config can be
4635
+ # associated with. Currently we support setting only one type of solution.
4636
+ # Corresponds to the JSON property `solutionTypes`
4637
+ # @return [Array<String>]
4638
+ attr_accessor :solution_types
4639
+
4640
+ # Condition synonyms specifications. If multiple syonyms conditions match, all
4641
+ # matching synonyms control in the list will execute. Order of controls in the
4642
+ # list will not matter. Maximum number of specifications is 100. Can only be set
4643
+ # if solution_types is SOLUTION_TYPE_SEARCH.
4644
+ # Corresponds to the JSON property `twowaySynonymsControlIds`
4645
+ # @return [Array<String>]
4646
+ attr_accessor :twoway_synonyms_control_ids
4647
+
4648
+ def initialize(**args)
4649
+ update!(**args)
4650
+ end
4651
+
4652
+ # Update properties of this object
4653
+ def update!(**args)
4654
+ @boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
4655
+ @display_name = args[:display_name] if args.key?(:display_name)
4656
+ @diversity_level = args[:diversity_level] if args.key?(:diversity_level)
4657
+ @do_not_associate_control_ids = args[:do_not_associate_control_ids] if args.key?(:do_not_associate_control_ids)
4658
+ @dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec)
4659
+ @enable_category_filter_level = args[:enable_category_filter_level] if args.key?(:enable_category_filter_level)
4660
+ @facet_control_ids = args[:facet_control_ids] if args.key?(:facet_control_ids)
4661
+ @filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids)
4662
+ @ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids)
4663
+ @model_id = args[:model_id] if args.key?(:model_id)
4664
+ @name = args[:name] if args.key?(:name)
4665
+ @oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids)
4666
+ @price_reranking_level = args[:price_reranking_level] if args.key?(:price_reranking_level)
4667
+ @redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids)
4668
+ @replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids)
4669
+ @solution_types = args[:solution_types] if args.key?(:solution_types)
4670
+ @twoway_synonyms_control_ids = args[:twoway_synonyms_control_ids] if args.key?(:twoway_synonyms_control_ids)
4671
+ end
4672
+ end
4673
+
3930
4674
  # Request message to set a specified branch as new default_branch.
3931
4675
  class GoogleCloudRetailV2betaSetDefaultBranchRequest
3932
4676
  include Google::Apis::Core::Hashable