Skip to content

Commit bf6e2f1

Browse files
feat(retail): update the api
#### retail:v2 The following keys were added: - schemas.GoogleCloudRetailV2CompleteQueryResponse.properties.recentSearchResults.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2CustomAttribute.properties.indexable.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2CustomAttribute.properties.searchable.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2ImportMetadata.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2ImportProductsRequest.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2PredictRequest.properties.pageToken.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2Product.properties.retrievableFields.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2SearchRequest.properties.dynamicFacetSpec.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaEnrollSolutionMetadata (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaEnrollSolutionResponse (Total Keys: 4) - schemas.GoogleCloudRetailV2alphaImportMetadata.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaImportMetadata.properties.requestId.deprecated (Total Keys: 1) #### retail:v2alpha The following keys were added: - resources.projects.methods.enrollSolution (Total Keys: 12) - resources.projects.methods.getRetailProject (Total Keys: 11) - resources.projects.methods.listEnrolledSolutions (Total Keys: 11) - resources.projects.resources.retailProject.methods.acceptTerms (Total Keys: 12) - schemas.GoogleCloudRetailV2ImportMetadata.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaAcceptTermsRequest (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaCompleteQueryResponse.properties.recentSearchResults.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaControl.properties.facetSpec.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaCustomAttribute.properties.indexable.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaCustomAttribute.properties.searchable.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaEnrollSolutionMetadata (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaEnrollSolutionRequest (Total Keys: 4) - schemas.GoogleCloudRetailV2alphaEnrollSolutionResponse (Total Keys: 4) - schemas.GoogleCloudRetailV2alphaImportMetadata.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaImportProductsRequest.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaListEnrolledSolutionsResponse (Total Keys: 4) - schemas.GoogleCloudRetailV2alphaPredictRequest.properties.pageToken.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaProduct.properties.retrievableFields.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaProject (Total Keys: 7) - schemas.GoogleCloudRetailV2alphaSearchRequest.properties.dynamicFacetSpec.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaImportMetadata.properties.requestId.deprecated (Total Keys: 1) #### retail:v2beta The following keys were added: - schemas.GoogleCloudRetailV2ImportMetadata.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaEnrollSolutionMetadata (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaEnrollSolutionResponse (Total Keys: 4) - schemas.GoogleCloudRetailV2alphaImportMetadata.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaCompleteQueryResponse.properties.recentSearchResults.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaControl.properties.facetSpec.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaCustomAttribute.properties.indexable.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaCustomAttribute.properties.searchable.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaImportMetadata.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaImportProductsRequest.properties.requestId.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaPredictRequest.properties.pageToken.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaProduct.properties.retrievableFields.deprecated (Total Keys: 1) - schemas.GoogleCloudRetailV2betaSearchRequest.properties.dynamicFacetSpec.deprecated (Total Keys: 1)
1 parent 4521121 commit bf6e2f1

File tree

5 files changed

+585
-3
lines changed

5 files changed

+585
-3
lines changed

docs/dyn/retail_v2alpha.projects.html

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,113 @@ <h2>Instance Methods</h2>
8484
</p>
8585
<p class="firstline">Returns the operations Resource.</p>
8686

87+
<p class="toc_element">
88+
<code><a href="retail_v2alpha.projects.retailProject.html">retailProject()</a></code>
89+
</p>
90+
<p class="firstline">Returns the retailProject Resource.</p>
91+
8792
<p class="toc_element">
8893
<code><a href="#close">close()</a></code></p>
8994
<p class="firstline">Close httplib2 connections.</p>
95+
<p class="toc_element">
96+
<code><a href="#enrollSolution">enrollSolution(project, body=None, x__xgafv=None)</a></code></p>
97+
<p class="firstline">Enrolls retail API solution for the project. Recommendation solution is enrolled by default when your project enables Retail API. You don't need to call this API for the recommendation solution.</p>
98+
<p class="toc_element">
99+
<code><a href="#getRetailProject">getRetailProject(name, x__xgafv=None)</a></code></p>
100+
<p class="firstline">Gets the project. Throws NOT_FOUND if the project wasn't initialized for Retail API Service.</p>
101+
<p class="toc_element">
102+
<code><a href="#listEnrolledSolutions">listEnrolledSolutions(parent, x__xgafv=None)</a></code></p>
103+
<p class="firstline">Lists all the retail API solutions the project has enrolled.</p>
90104
<h3>Method Details</h3>
91105
<div class="method">
92106
<code class="details" id="close">close()</code>
93107
<pre>Close httplib2 connections.</pre>
94108
</div>
95109

110+
<div class="method">
111+
<code class="details" id="enrollSolution">enrollSolution(project, body=None, x__xgafv=None)</code>
112+
<pre>Enrolls retail API solution for the project. Recommendation solution is enrolled by default when your project enables Retail API. You don&#x27;t need to call this API for the recommendation solution.
113+
114+
Args:
115+
project: string, Required. Full resource name of parent. Format: `projects/{project_number_or_id}` (required)
116+
body: object, The request body.
117+
The object takes the form of:
118+
119+
{ # Request for EnrollSolution method.
120+
&quot;searchSolutionUseCase&quot;: &quot;A String&quot;, # Solution use case to enroll. Currently settable for Browse to enroll. It should be only set when [solution] is set as SolutionType.SOLUTION_TYPE_SEARCH or an INVALID_ARGUMENT error is thrown.
121+
&quot;solution&quot;: &quot;A String&quot;, # Required. Solution to enroll.
122+
}
123+
124+
x__xgafv: string, V1 error format.
125+
Allowed values
126+
1 - v1 error format
127+
2 - v2 error format
128+
129+
Returns:
130+
An object of the form:
131+
132+
{ # This resource represents a long-running operation that is the result of a network API call.
133+
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
134+
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
135+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
136+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
137+
{
138+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
139+
},
140+
],
141+
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
142+
},
143+
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
144+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
145+
},
146+
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
147+
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
148+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
149+
},
150+
}</pre>
151+
</div>
152+
153+
<div class="method">
154+
<code class="details" id="getRetailProject">getRetailProject(name, x__xgafv=None)</code>
155+
<pre>Gets the project. Throws NOT_FOUND if the project wasn&#x27;t initialized for Retail API Service.
156+
157+
Args:
158+
name: string, Required. Full resource name of the project. Format: `projects/{project_number_or_id}/retailProject` (required)
159+
x__xgafv: string, V1 error format.
160+
Allowed values
161+
1 - v1 error format
162+
2 - v2 error format
163+
164+
Returns:
165+
An object of the form:
166+
167+
{ # Metadata that describes a Cloud Retail Project.
168+
&quot;enrolledSolutions&quot;: [ # Output only. Retail API solutions that the project has enrolled.
169+
&quot;A String&quot;,
170+
],
171+
&quot;name&quot;: &quot;A String&quot;, # Output only. Full resource name of the retail project, such as `projects/{project_id_or_number}/retailProject`.
172+
}</pre>
173+
</div>
174+
175+
<div class="method">
176+
<code class="details" id="listEnrolledSolutions">listEnrolledSolutions(parent, x__xgafv=None)</code>
177+
<pre>Lists all the retail API solutions the project has enrolled.
178+
179+
Args:
180+
parent: string, Required. Full resource name of parent. Format: `projects/{project_number_or_id}` (required)
181+
x__xgafv: string, V1 error format.
182+
Allowed values
183+
1 - v1 error format
184+
2 - v2 error format
185+
186+
Returns:
187+
An object of the form:
188+
189+
{ # Response for ListEnrolledSolutions method.
190+
&quot;enrolledSolutions&quot;: [ # Retail API solutions that the project has enrolled.
191+
&quot;A String&quot;,
192+
],
193+
}</pre>
194+
</div>
195+
96196
</body></html>
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<html><body>
2+
<style>
3+
4+
body, h1, h2, h3, div, span, p, pre, a {
5+
margin: 0;
6+
padding: 0;
7+
border: 0;
8+
font-weight: inherit;
9+
font-style: inherit;
10+
font-size: 100%;
11+
font-family: inherit;
12+
vertical-align: baseline;
13+
}
14+
15+
body {
16+
font-size: 13px;
17+
padding: 1em;
18+
}
19+
20+
h1 {
21+
font-size: 26px;
22+
margin-bottom: 1em;
23+
}
24+
25+
h2 {
26+
font-size: 24px;
27+
margin-bottom: 1em;
28+
}
29+
30+
h3 {
31+
font-size: 20px;
32+
margin-bottom: 1em;
33+
margin-top: 1em;
34+
}
35+
36+
pre, code {
37+
line-height: 1.5;
38+
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39+
}
40+
41+
pre {
42+
margin-top: 0.5em;
43+
}
44+
45+
h1, h2, h3, p {
46+
font-family: Arial, sans serif;
47+
}
48+
49+
h1, h2, h3 {
50+
border-bottom: solid #CCC 1px;
51+
}
52+
53+
.toc_element {
54+
margin-top: 0.5em;
55+
}
56+
57+
.firstline {
58+
margin-left: 2 em;
59+
}
60+
61+
.method {
62+
margin-top: 1em;
63+
border: solid 1px #CCC;
64+
padding: 1em;
65+
background: #EEE;
66+
}
67+
68+
.details {
69+
font-weight: bold;
70+
font-size: 14px;
71+
}
72+
73+
</style>
74+
75+
<h1><a href="retail_v2alpha.html">Retail API</a> . <a href="retail_v2alpha.projects.html">projects</a> . <a href="retail_v2alpha.projects.retailProject.html">retailProject</a></h1>
76+
<h2>Instance Methods</h2>
77+
<p class="toc_element">
78+
<code><a href="#acceptTerms">acceptTerms(project, body=None, x__xgafv=None)</a></code></p>
79+
<p class="firstline">Accepts service terms for this project. By making requests to this API, you agree to the terms of service linked below. https://cloud.google.com/retail/data-use-terms</p>
80+
<p class="toc_element">
81+
<code><a href="#close">close()</a></code></p>
82+
<p class="firstline">Close httplib2 connections.</p>
83+
<h3>Method Details</h3>
84+
<div class="method">
85+
<code class="details" id="acceptTerms">acceptTerms(project, body=None, x__xgafv=None)</code>
86+
<pre>Accepts service terms for this project. By making requests to this API, you agree to the terms of service linked below. https://cloud.google.com/retail/data-use-terms
87+
88+
Args:
89+
project: string, Required. Full resource name of the project. Format: `projects/{project_number_or_id}/retailProject` (required)
90+
body: object, The request body.
91+
The object takes the form of:
92+
93+
{ # Request for AcceptTerms method.
94+
}
95+
96+
x__xgafv: string, V1 error format.
97+
Allowed values
98+
1 - v1 error format
99+
2 - v2 error format
100+
101+
Returns:
102+
An object of the form:
103+
104+
{ # Metadata that describes a Cloud Retail Project.
105+
&quot;enrolledSolutions&quot;: [ # Output only. Retail API solutions that the project has enrolled.
106+
&quot;A String&quot;,
107+
],
108+
&quot;name&quot;: &quot;A String&quot;, # Output only. Full resource name of the retail project, such as `projects/{project_id_or_number}/retailProject`.
109+
}</pre>
110+
</div>
111+
112+
<div class="method">
113+
<code class="details" id="close">close()</code>
114+
<pre>Close httplib2 connections.</pre>
115+
</div>
116+
117+
</body></html>

googleapiclient/discovery_cache/documents/retail.v2.json

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@
20592059
}
20602060
}
20612061
},
2062-
"revision": "20230622",
2062+
"revision": "20230706",
20632063
"rootUrl": "https://retail.googleapis.com/",
20642064
"schemas": {
20652065
"GoogleApiHttpBody": {
@@ -2555,6 +2555,7 @@
25552555
"type": "array"
25562556
},
25572557
"recentSearchResults": {
2558+
"deprecated": true,
25582559
"description": "Deprecated. Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. If you want to enable it, contact Retail Search support. This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules: * They are ordered from latest to oldest. * They are matched with CompleteQueryRequest.query case insensitively. * They are transformed to lower case. * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens.",
25592560
"items": {
25602561
"$ref": "GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult"
@@ -2583,6 +2584,7 @@
25832584
"type": "object"
25842585
},
25852586
"GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult": {
2587+
"deprecated": true,
25862588
"description": "Recent search of this user.",
25872589
"id": "GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult",
25882590
"properties": {
@@ -2813,6 +2815,7 @@
28132815
"id": "GoogleCloudRetailV2CustomAttribute",
28142816
"properties": {
28152817
"indexable": {
2818+
"deprecated": true,
28162819
"description": "This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.",
28172820
"type": "boolean"
28182821
},
@@ -2825,6 +2828,7 @@
28252828
"type": "array"
28262829
},
28272830
"searchable": {
2831+
"deprecated": true,
28282832
"description": "This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.",
28292833
"type": "boolean"
28302834
},
@@ -3004,6 +3008,7 @@
30043008
"type": "string"
30053009
},
30063010
"requestId": {
3011+
"deprecated": true,
30073012
"description": "Deprecated. This field is never set.",
30083013
"type": "string"
30093014
},
@@ -3051,6 +3056,7 @@
30513056
"type": "string"
30523057
},
30533058
"requestId": {
3059+
"deprecated": true,
30543060
"description": "Deprecated. This field has no effect.",
30553061
"type": "string"
30563062
},
@@ -3470,6 +3476,7 @@
34703476
"type": "integer"
34713477
},
34723478
"pageToken": {
3479+
"deprecated": true,
34733480
"description": "This field is not used; leave it unset.",
34743481
"type": "string"
34753482
},
@@ -3755,6 +3762,7 @@
37553762
"description": "The rating of this product."
37563763
},
37573764
"retrievableFields": {
3765+
"deprecated": true,
37583766
"description": "Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form \"attributes.key\" where \"key\" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.",
37593767
"format": "google-fieldmask",
37603768
"type": "string"
@@ -4399,6 +4407,7 @@
43994407
},
44004408
"dynamicFacetSpec": {
44014409
"$ref": "GoogleCloudRetailV2SearchRequestDynamicFacetSpec",
4410+
"deprecated": true,
44024411
"description": "Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated."
44034412
},
44044413
"entity": {
@@ -5334,6 +5343,47 @@
53345343
},
53355344
"type": "object"
53365345
},
5346+
"GoogleCloudRetailV2alphaEnrollSolutionMetadata": {
5347+
"description": "Metadata related to the EnrollSolution method. This will be returned by the google.longrunning.Operation.metadata field.",
5348+
"id": "GoogleCloudRetailV2alphaEnrollSolutionMetadata",
5349+
"properties": {},
5350+
"type": "object"
5351+
},
5352+
"GoogleCloudRetailV2alphaEnrollSolutionResponse": {
5353+
"description": "Response for EnrollSolution method.",
5354+
"id": "GoogleCloudRetailV2alphaEnrollSolutionResponse",
5355+
"properties": {
5356+
"enrolledSolution": {
5357+
"description": "Retail API solution that the project has enrolled.",
5358+
"enum": [
5359+
"SOLUTION_TYPE_UNSPECIFIED",
5360+
"SOLUTION_TYPE_RECOMMENDATION",
5361+
"SOLUTION_TYPE_SEARCH"
5362+
],
5363+
"enumDescriptions": [
5364+
"Default value.",
5365+
"Used for Recommendations AI.",
5366+
"Used for Retail Search."
5367+
],
5368+
"type": "string"
5369+
},
5370+
"searchSolutionUseCase": {
5371+
"description": "Search solution use case that the project has enrolled.",
5372+
"enum": [
5373+
"SEARCH_SOLUTION_USE_CASE_UNSPECIFIED",
5374+
"SEARCH_SOLUTION_USE_CASE_SEARCH",
5375+
"SEARCH_SOLUTION_USE_CASE_BROWSE"
5376+
],
5377+
"enumDescriptions": [
5378+
"The value when it's unspecified. In this case, server behavior defaults to SEARCH_SOLUTION_USE_CASE_SEARCH.",
5379+
"Search use case. Expects the traffic has a non-empty query.",
5380+
"Browse use case. Expects the traffic has an empty query."
5381+
],
5382+
"type": "string"
5383+
}
5384+
},
5385+
"type": "object"
5386+
},
53375387
"GoogleCloudRetailV2alphaExportErrorsConfig": {
53385388
"description": "Configuration of destination for Export related errors.",
53395389
"id": "GoogleCloudRetailV2alphaExportErrorsConfig",
@@ -5461,6 +5511,7 @@
54615511
"type": "string"
54625512
},
54635513
"requestId": {
5514+
"deprecated": true,
54645515
"description": "Deprecated. This field is never set.",
54655516
"type": "string"
54665517
},
@@ -6241,6 +6292,7 @@
62416292
"type": "string"
62426293
},
62436294
"requestId": {
6295+
"deprecated": true,
62446296
"description": "Deprecated. This field is never set.",
62456297
"type": "string"
62466298
},

0 commit comments

Comments
 (0)