Skip to content

Commit

Permalink
feat: update grpc service config settings to reflect correct API dead…
Browse files Browse the repository at this point in the history
…lines (#82)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 392712211

Source-Link: googleapis/googleapis@cb637a6

Source-Link: googleapis/googleapis-gen@4c87ab9

Release-As: 1.0.0
  • Loading branch information
gcf-owl-bot[bot] authored Aug 25, 2021
1 parent 18e52f9 commit ce48016
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,17 @@ async def import_products(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.import_products,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=300.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=300.0,
),
default_timeout=300.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,19 @@ def _prep_wrapped_messages(self, client_info):
self.delete_product, default_timeout=None, client_info=client_info,
),
self.import_products: gapic_v1.method.wrap_method(
self.import_products, default_timeout=None, client_info=client_info,
self.import_products,
default_retry=retries.Retry(
initial=0.1,
maximum=300.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=300.0,
),
default_timeout=300.0,
client_info=client_info,
),
self.set_inventory: gapic_v1.method.wrap_method(
self.set_inventory, default_timeout=None, client_info=client_info,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,17 @@ async def purge_user_events(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.purge_user_events,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=30.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=30.0,
),
default_timeout=30.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -429,7 +439,17 @@ async def import_user_events(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.import_user_events,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=300.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=300.0,
),
default_timeout=300.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,34 @@ def _prep_wrapped_messages(self, client_info):
self.collect_user_event, default_timeout=None, client_info=client_info,
),
self.purge_user_events: gapic_v1.method.wrap_method(
self.purge_user_events, default_timeout=None, client_info=client_info,
self.purge_user_events,
default_retry=retries.Retry(
initial=0.1,
maximum=30.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=30.0,
),
default_timeout=30.0,
client_info=client_info,
),
self.import_user_events: gapic_v1.method.wrap_method(
self.import_user_events, default_timeout=None, client_info=client_info,
self.import_user_events,
default_retry=retries.Retry(
initial=0.1,
maximum=300.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=300.0,
),
default_timeout=300.0,
client_info=client_info,
),
self.rejoin_user_events: gapic_v1.method.wrap_method(
self.rejoin_user_events, default_timeout=None, client_info=client_info,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ class Product(proto.Message):
limit of 128 characters. Otherwise, an INVALID_ARGUMENT
error is returned.
This field must be a Unigram. Otherwise, an INVALID_ARGUMENT
error is returned.
Google Merchant Center property
`gtin <https://support.google.com/merchants/answer/6324461>`__.
Schema.org property
Expand Down Expand Up @@ -376,7 +379,7 @@ class Product(proto.Message):
The pattern or graphic print of the product. For example,
"striped", "polka dot", "paisley".
A maximum of 5 values are allowed per
A maximum of 20 values are allowed per
[Product][google.cloud.retail.v2.Product]. Each value must
be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ class SearchRequest(proto.Message):
The filter syntax consists of an expression language for
constructing a predicate from one or more fields of the
products being filtered. Filter expression is
case-sensitive. See more details at this `user
guide </retail/private/docs/filter-and-order#filter>`__.
case-sensitive.
If this field is unrecognizable, an INVALID_ARGUMENT is
returned.
Expand All @@ -117,8 +116,7 @@ class SearchRequest(proto.Message):
ordered by a field in an
[Product][google.cloud.retail.v2.Product] object. Leave it
unset if ordered by relevance. OrderBy expression is
case-sensitive. See more details at this `user
guide </retail/private/docs/filter-and-order#order>`__.
case-sensitive.
If this field is unrecognizable, an INVALID_ARGUMENT is
returned.
Expand All @@ -136,14 +134,12 @@ class SearchRequest(proto.Message):
Contact Retail Search support team if you are
interested in using dynamic facet feature.
boost_spec (google.cloud.retail_v2.types.SearchRequest.BoostSpec):
Boost specification to boost certain products. See more
details at this `user
guide </retail/private/docs/boosting>`__.
Boost specification to boost certain
products.
query_expansion_spec (google.cloud.retail_v2.types.SearchRequest.QueryExpansionSpec):
The query expansion specification that specifies the
conditions under which query expansion will occur. See more
details at this `user
guide </retail/private/docs/result-size#query_expansion>`__.
The query expansion specification that
specifies the conditions under which query
expansion will occur.
variant_rollup_keys (Sequence[str]):
The keys to fetch and rollup the matching
[variant][google.cloud.retail.v2.Product.Type.VARIANT]
Expand Down Expand Up @@ -501,9 +497,10 @@ class ConditionBoostSpec(proto.Message):
Examples:
- To boost products with product ID "product_1" or
"product_2", and color "Red" or "Blue": *(id:
ANY("product_1", "product_2"))* *AND* *(colorFamilies:
ANY("Red", "Blue"))*
"product_2", and color "Red" or "Blue":
- (id: ANY("product_1", "product_2")) AND
(colorFamilies: ANY("Red","Blue"))
boost (float):
Strength of the condition boost, which should be in [-1, 1].
Negative boost means demotion. Default is 0.0.
Expand Down

0 comments on commit ce48016

Please sign in to comment.