Skip to content

Commit 195684e

Browse files
feat: [google-cloud-retail] add experiment_id in the SearchRequest proto (googleapis#14127)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 785888459 Source-Link: googleapis/googleapis@96f8c6f Source-Link: https://github.com/googleapis/googleapis-gen/commit/793e8add2c36af317b94d951b0e870e50e896ade Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiNzkzZThhZGQyYzM2YWYzMTdiOTRkOTUxYjBlODcwZTUwZTg5NmFkZSJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b74ec0e commit 195684e

File tree

10 files changed

+23
-13
lines changed

10 files changed

+23
-13
lines changed

packages/google-cloud-retail/google/cloud/retail/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.3.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-retail/google/cloud/retail_v2/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.3.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-retail/google/cloud/retail_v2alpha/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.3.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-retail/google/cloud/retail_v2alpha/types/search_service.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ class SearchRequest(proto.Message):
359359
360360
If this field is set to an invalid value other than these,
361361
an INVALID_ARGUMENT error is returned.
362+
experiment_id (str):
363+
Optional. An ID for the experiment group this
364+
search belongs to.
362365
page_categories (MutableSequence[str]):
363366
The categories associated with a category page. Must be set
364367
for category navigation queries to achieve good search
@@ -459,7 +462,7 @@ class SearchRequest(proto.Message):
459462
460463
- Populate at most 100 key-value pairs per query.
461464
- Only supports string keys and repeated string values.
462-
- Duplcate keys are not allowed within a single query.
465+
- Duplicate keys are not allowed within a single query.
463466
464467
Example: user_attributes: [ { key: "pets" value { values:
465468
"dog" values: "cat" } }, { key: "state" value { values: "CA"
@@ -961,10 +964,11 @@ class QueryExpansionSpec(proto.Message):
961964
Default to
962965
[Condition.DISABLED][google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
963966
pin_unexpanded_results (bool):
964-
Whether to pin unexpanded results. If this
965-
field is set to true, unexpanded products are
966-
always at the top of the search results,
967-
followed by the expanded results.
967+
Whether to pin unexpanded results. The
968+
default value is false. If this field is set to
969+
true, unexpanded products are always at the top
970+
of the search results, followed by the expanded
971+
results.
968972
"""
969973

970974
class Condition(proto.Enum):
@@ -1279,6 +1283,10 @@ class TileNavigationSpec(proto.Message):
12791283
proto.STRING,
12801284
number=17,
12811285
)
1286+
experiment_id: str = proto.Field(
1287+
proto.STRING,
1288+
number=18,
1289+
)
12821290
page_categories: MutableSequence[str] = proto.RepeatedField(
12831291
proto.STRING,
12841292
number=23,

packages/google-cloud-retail/google/cloud/retail_v2beta/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.3.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-retail/samples/generated_samples/snippet_metadata_google.cloud.retail.v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-retail",
11-
"version": "2.3.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-retail/samples/generated_samples/snippet_metadata_google.cloud.retail.v2alpha.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-retail",
11-
"version": "2.3.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-retail/samples/generated_samples/snippet_metadata_google.cloud.retail.v2beta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-retail",
11-
"version": "2.3.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-retail/scripts/fixup_retail_v2alpha_keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class retailCallTransformer(cst.CSTTransformer):
9898
'remove_local_inventories': ('product', 'place_ids', 'remove_time', 'allow_missing', ),
9999
'replace_catalog_attribute': ('attributes_config', 'catalog_attribute', 'update_mask', ),
100100
'resume_model': ('name', ),
101-
'search': ('placement', 'visitor_id', 'branch', 'query', 'user_info', 'page_size', 'page_token', 'offset', 'filter', 'canonical_filter', 'order_by', 'facet_specs', 'dynamic_facet_spec', 'boost_spec', 'query_expansion_spec', 'relevance_threshold', 'variant_rollup_keys', 'page_categories', 'search_mode', 'personalization_spec', 'labels', 'spell_correction_spec', 'entity', 'conversational_search_spec', 'tile_navigation_spec', 'language_code', 'region_code', 'place_id', 'user_attributes', ),
101+
'search': ('placement', 'visitor_id', 'branch', 'query', 'user_info', 'page_size', 'page_token', 'offset', 'filter', 'canonical_filter', 'order_by', 'facet_specs', 'dynamic_facet_spec', 'boost_spec', 'query_expansion_spec', 'relevance_threshold', 'variant_rollup_keys', 'experiment_id', 'page_categories', 'search_mode', 'personalization_spec', 'labels', 'spell_correction_spec', 'entity', 'conversational_search_spec', 'tile_navigation_spec', 'language_code', 'region_code', 'place_id', 'user_attributes', ),
102102
'set_default_branch': ('catalog', 'branch_id', 'note', 'force', ),
103103
'set_inventory': ('inventory', 'set_mask', 'set_time', 'allow_missing', ),
104104
'tune_model': ('name', ),

packages/google-cloud-retail/tests/unit/gapic/retail_v2alpha/test_search_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,7 @@ def test_search_non_empty_request_with_auto_populated_field():
11741174
filter="filter_value",
11751175
canonical_filter="canonical_filter_value",
11761176
order_by="order_by_value",
1177+
experiment_id="experiment_id_value",
11771178
entity="entity_value",
11781179
language_code="language_code_value",
11791180
region_code="region_code_value",
@@ -1197,6 +1198,7 @@ def test_search_non_empty_request_with_auto_populated_field():
11971198
filter="filter_value",
11981199
canonical_filter="canonical_filter_value",
11991200
order_by="order_by_value",
1201+
experiment_id="experiment_id_value",
12001202
entity="entity_value",
12011203
language_code="language_code_value",
12021204
region_code="region_code_value",

0 commit comments

Comments
 (0)