Skip to content

Commit 65d7b4c

Browse files
feat: allow recommendation users to set user labels in the request (#3458)
* feat: allow recommendation users to set user labels in the request feat: add more long running operation path bindings PiperOrigin-RevId: 483996440 Source-Link: googleapis/googleapis@51fd0bf Source-Link: googleapis/googleapis-gen@21c7fb9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiMjFjN2ZiOWIwN2EzODRiYjRhYWE2MTYzZDMyNDVkMmQ1MzM1NzU5NSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: sofisl <[email protected]>
1 parent acc9d08 commit 65d7b4c

9 files changed

Lines changed: 150 additions & 4 deletions

File tree

packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,25 @@ message RecommendRequest {
137137
// This gives request-level control and adjusts recommendation results
138138
// based on Document category.
139139
map<string, google.protobuf.Value> params = 6;
140+
141+
// The user labels applied to a resource must meet the following requirements:
142+
//
143+
// * Each resource can have multiple labels, up to a maximum of 64.
144+
// * Each label must be a key-value pair.
145+
// * Keys have a minimum length of 1 character and a maximum length of 63
146+
// characters and cannot be empty. Values can be empty and have a maximum
147+
// length of 63 characters.
148+
// * Keys and values can contain only lowercase letters, numeric characters,
149+
// underscores, and dashes. All characters must use UTF-8 encoding, and
150+
// international characters are allowed.
151+
// * The key portion of a label must be unique. However, you can use the same
152+
// key with multiple resources.
153+
// * Keys must start with a lowercase letter or international character.
154+
//
155+
// See [Google Cloud
156+
// Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
157+
// for more details.
158+
map<string, string> user_labels = 8;
140159
}
141160

142161
// Response message for Recommend method.

packages/google-cloud-discoveryengine/protos/protos.d.ts

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-discoveryengine/protos/protos.js

Lines changed: 59 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-discoveryengine/protos/protos.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,24 @@ function main(servingConfig, userEvent) {
108108
* based on Document category.
109109
*/
110110
// const params = 1234
111+
/**
112+
* The user labels applied to a resource must meet the following requirements:
113+
* * Each resource can have multiple labels, up to a maximum of 64.
114+
* * Each label must be a key-value pair.
115+
* * Keys have a minimum length of 1 character and a maximum length of 63
116+
* characters and cannot be empty. Values can be empty and have a maximum
117+
* length of 63 characters.
118+
* * Keys and values can contain only lowercase letters, numeric characters,
119+
* underscores, and dashes. All characters must use UTF-8 encoding, and
120+
* international characters are allowed.
121+
* * The key portion of a label must be unique. However, you can use the same
122+
* key with multiple resources.
123+
* * Keys must start with a lowercase letter or international character.
124+
* See Google Cloud
125+
* Document (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
126+
* for more details.
127+
*/
128+
// const userLabels = 1234
111129

112130
// Imports the Discoveryengine library
113131
const {RecommendationServiceClient} = require('@google-cloud/discoveryengine').v1beta;

packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302
"segments": [
303303
{
304304
"start": 25,
305-
"end": 130,
305+
"end": 148,
306306
"type": "FULL"
307307
}
308308
],
@@ -334,6 +334,10 @@
334334
{
335335
"name": "params",
336336
"type": "TYPE_MESSAGE[]"
337+
},
338+
{
339+
"name": "user_labels",
340+
"type": "TYPE_MESSAGE[]"
337341
}
338342
],
339343
"resultType": ".google.cloud.discoveryengine.v1beta.RecommendResponse",

packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ export class DocumentServiceClient {
214214
selector: 'google.longrunning.Operations.GetOperation',
215215
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
216216
additional_bindings: [
217+
{
218+
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
219+
},
217220
{
218221
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
219222
},
@@ -223,8 +226,14 @@ export class DocumentServiceClient {
223226
},
224227
{
225228
selector: 'google.longrunning.Operations.ListOperations',
226-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
229+
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
227230
additional_bindings: [
231+
{
232+
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
233+
},
234+
{
235+
get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
236+
},
228237
{get: '/v1beta/{name=projects/*/locations/*}/operations'},
229238
{get: '/v1beta/{name=projects/*}/operations'},
230239
],

packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,24 @@ export class RecommendationServiceClient {
397397
* * 'auto-diversity'
398398
* This gives request-level control and adjusts recommendation results
399399
* based on Document category.
400+
* @param {number[]} request.userLabels
401+
* The user labels applied to a resource must meet the following requirements:
402+
*
403+
* * Each resource can have multiple labels, up to a maximum of 64.
404+
* * Each label must be a key-value pair.
405+
* * Keys have a minimum length of 1 character and a maximum length of 63
406+
* characters and cannot be empty. Values can be empty and have a maximum
407+
* length of 63 characters.
408+
* * Keys and values can contain only lowercase letters, numeric characters,
409+
* underscores, and dashes. All characters must use UTF-8 encoding, and
410+
* international characters are allowed.
411+
* * The key portion of a label must be unique. However, you can use the same
412+
* key with multiple resources.
413+
* * Keys must start with a lowercase letter or international character.
414+
*
415+
* See [Google Cloud
416+
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
417+
* for more details.
400418
* @param {object} [options]
401419
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
402420
* @returns {Promise} - The promise which resolves to an array.

packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ export class UserEventServiceClient {
199199
selector: 'google.longrunning.Operations.GetOperation',
200200
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
201201
additional_bindings: [
202+
{
203+
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
204+
},
202205
{
203206
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
204207
},
@@ -208,8 +211,14 @@ export class UserEventServiceClient {
208211
},
209212
{
210213
selector: 'google.longrunning.Operations.ListOperations',
211-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
214+
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
212215
additional_bindings: [
216+
{
217+
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
218+
},
219+
{
220+
get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
221+
},
213222
{get: '/v1beta/{name=projects/*/locations/*}/operations'},
214223
{get: '/v1beta/{name=projects/*}/operations'},
215224
],

0 commit comments

Comments
 (0)