@googleapis/discoveryengine 27.0.0 → 27.1.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.
- package/CHANGELOG.md +8 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1.d.ts +1600 -118
- package/build/v1.js +271 -0
- package/build/v1.js.map +1 -1
- package/build/v1alpha.d.ts +1039 -28
- package/build/v1alpha.js +274 -0
- package/build/v1alpha.js.map +1 -1
- package/build/v1beta.d.ts +156 -2
- package/build/v1beta.js +43 -0
- package/build/v1beta.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +2387 -266
- package/v1alpha.ts +1779 -65
- package/v1beta.ts +247 -2
package/v1alpha.ts
CHANGED
|
@@ -1304,6 +1304,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
1304
1304
|
* Output only. The reason why the agent was rejected. Only set if the state is PRIVATE, and got there via rejection.
|
|
1305
1305
|
*/
|
|
1306
1306
|
rejectionReason?: string | null;
|
|
1307
|
+
/**
|
|
1308
|
+
* Optional. The sharing config of the agent.
|
|
1309
|
+
*/
|
|
1310
|
+
sharingConfig?: Schema$GoogleCloudDiscoveryengineV1alphaAgentSharingConfig;
|
|
1307
1311
|
/**
|
|
1308
1312
|
* Optional. The starter prompt suggestions to show the user on the landing page of the agent.
|
|
1309
1313
|
*/
|
|
@@ -1351,6 +1355,15 @@ export namespace discoveryengine_v1alpha {
|
|
|
1351
1355
|
*/
|
|
1352
1356
|
uri?: string | null;
|
|
1353
1357
|
}
|
|
1358
|
+
/**
|
|
1359
|
+
* Sharing related configuration.
|
|
1360
|
+
*/
|
|
1361
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaAgentSharingConfig {
|
|
1362
|
+
/**
|
|
1363
|
+
* Optional. The sharing scope of the agent.
|
|
1364
|
+
*/
|
|
1365
|
+
scope?: string | null;
|
|
1366
|
+
}
|
|
1354
1367
|
/**
|
|
1355
1368
|
* The starter prompt suggestion to show the user on the landing page of the agent.
|
|
1356
1369
|
*/
|
|
@@ -1360,6 +1373,113 @@ export namespace discoveryengine_v1alpha {
|
|
|
1360
1373
|
*/
|
|
1361
1374
|
text?: string | null;
|
|
1362
1375
|
}
|
|
1376
|
+
/**
|
|
1377
|
+
* The data for displaying an Agent.
|
|
1378
|
+
*/
|
|
1379
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaAgentView {
|
|
1380
|
+
/**
|
|
1381
|
+
* Immutable. The origin of the Agent.
|
|
1382
|
+
*/
|
|
1383
|
+
agentOrigin?: string | null;
|
|
1384
|
+
/**
|
|
1385
|
+
* Output only. The sharing state of the agent.
|
|
1386
|
+
*/
|
|
1387
|
+
agentSharingState?: string | null;
|
|
1388
|
+
/**
|
|
1389
|
+
* Output only. The type of the agent.
|
|
1390
|
+
*/
|
|
1391
|
+
agentType?: string | null;
|
|
1392
|
+
/**
|
|
1393
|
+
* The custom placeholder text that appears in the text box before the user enters any text.
|
|
1394
|
+
*/
|
|
1395
|
+
customPlaceholderText?: string | null;
|
|
1396
|
+
/**
|
|
1397
|
+
* The reason why the agent deployment failed. Only set if the state is DEPLOYMENT_FAILED.
|
|
1398
|
+
*/
|
|
1399
|
+
deploymentFailureReason?: string | null;
|
|
1400
|
+
/**
|
|
1401
|
+
* Required. Human-readable description of the agent. This might be used by an LLM to automatically select an agent to respond to a user query and to generate the first version of the steps for the agent that can be modified by the user. The language of this is either Agent.language_code, or ListAvailableAgentViewsRequest.language_code if translations are enabled.
|
|
1402
|
+
*/
|
|
1403
|
+
description?: string | null;
|
|
1404
|
+
/**
|
|
1405
|
+
* Required. Display name of the agent. The language of this is either Agent.language_code, or ListAvailableAgentViewsRequest.language_code if translations are enabled.
|
|
1406
|
+
*/
|
|
1407
|
+
displayName?: string | null;
|
|
1408
|
+
/**
|
|
1409
|
+
* Optional. The icon that represents the agent on the UI.
|
|
1410
|
+
*/
|
|
1411
|
+
icon?: Schema$GoogleCloudDiscoveryengineV1alphaAgentImage;
|
|
1412
|
+
/**
|
|
1413
|
+
* Resource name of the agent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
1414
|
+
*/
|
|
1415
|
+
name?: string | null;
|
|
1416
|
+
/**
|
|
1417
|
+
* The reason why the agent was rejected. Only set if the state is PRIVATE, and got there via rejection.
|
|
1418
|
+
*/
|
|
1419
|
+
rejectionReason?: string | null;
|
|
1420
|
+
/**
|
|
1421
|
+
* Output only. The state of the Agent.
|
|
1422
|
+
*/
|
|
1423
|
+
state?: string | null;
|
|
1424
|
+
/**
|
|
1425
|
+
* Optional. The suggested prompts for the agent, to be shown on the agent landing page.
|
|
1426
|
+
*/
|
|
1427
|
+
suggestedPrompts?: Schema$GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt[];
|
|
1428
|
+
/**
|
|
1429
|
+
* The reason why the agent was suspended. Only set if the state is SUSPENDED.
|
|
1430
|
+
*/
|
|
1431
|
+
suspensionReason?: string | null;
|
|
1432
|
+
/**
|
|
1433
|
+
* Optional. Per-user annotations of the current caller for the agent.
|
|
1434
|
+
*/
|
|
1435
|
+
userAnnotations?: Schema$GoogleCloudDiscoveryengineV1alphaUserAnnotations;
|
|
1436
|
+
/**
|
|
1437
|
+
* The permissions of the user for this Agent.
|
|
1438
|
+
*/
|
|
1439
|
+
userPermissions?: Schema$GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions;
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
* A suggested prompt for the agent, to be shown on the agent landing page.
|
|
1443
|
+
*/
|
|
1444
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaAgentViewSuggestedPrompt {
|
|
1445
|
+
/**
|
|
1446
|
+
* Required. The text of the suggested prompt. The language of this is either Agent.language_code, or ListAvailableAgentViewsRequest.language_code if translations are enabled.
|
|
1447
|
+
*/
|
|
1448
|
+
text?: string | null;
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* The permissions of the user on an Agent.
|
|
1452
|
+
*/
|
|
1453
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaAgentViewUserPermissions {
|
|
1454
|
+
/**
|
|
1455
|
+
* If the user can delete this Agent.
|
|
1456
|
+
*/
|
|
1457
|
+
canDelete?: boolean | null;
|
|
1458
|
+
/**
|
|
1459
|
+
* If the user can edit this Agent.
|
|
1460
|
+
*/
|
|
1461
|
+
canEdit?: boolean | null;
|
|
1462
|
+
/**
|
|
1463
|
+
* If the user can propose other users to share the Agent with.
|
|
1464
|
+
*/
|
|
1465
|
+
canProposeUsers?: boolean | null;
|
|
1466
|
+
/**
|
|
1467
|
+
* If the user can request a review for this Agent.
|
|
1468
|
+
*/
|
|
1469
|
+
canRequestReview?: boolean | null;
|
|
1470
|
+
/**
|
|
1471
|
+
* If the user can run this Agent.
|
|
1472
|
+
*/
|
|
1473
|
+
canRun?: boolean | null;
|
|
1474
|
+
/**
|
|
1475
|
+
* If the user can view the source of this Agent.
|
|
1476
|
+
*/
|
|
1477
|
+
canView?: boolean | null;
|
|
1478
|
+
/**
|
|
1479
|
+
* If the user can withdraw this Agent.
|
|
1480
|
+
*/
|
|
1481
|
+
canWithdraw?: boolean | null;
|
|
1482
|
+
}
|
|
1363
1483
|
/**
|
|
1364
1484
|
* The connector level alert config.
|
|
1365
1485
|
*/
|
|
@@ -5225,6 +5345,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
5225
5345
|
* Optional. If true, the LLM based annotation is added to the image during parsing.
|
|
5226
5346
|
*/
|
|
5227
5347
|
enableImageAnnotation?: boolean | null;
|
|
5348
|
+
/**
|
|
5349
|
+
* Optional. If true, the pdf layout will be refined using an LLM.
|
|
5350
|
+
*/
|
|
5351
|
+
enableLlmLayoutParsing?: boolean | null;
|
|
5228
5352
|
/**
|
|
5229
5353
|
* Optional. If true, the LLM based annotation is added to the table during parsing.
|
|
5230
5354
|
*/
|
|
@@ -5314,6 +5438,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
5314
5438
|
* Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.
|
|
5315
5439
|
*/
|
|
5316
5440
|
chatEngineMetadata?: Schema$GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata;
|
|
5441
|
+
/**
|
|
5442
|
+
* Output only. CMEK-related information for the Engine.
|
|
5443
|
+
*/
|
|
5444
|
+
cmekConfig?: Schema$GoogleCloudDiscoveryengineV1alphaCmekConfig;
|
|
5317
5445
|
/**
|
|
5318
5446
|
* Common config spec that specifies the metadata of the engine.
|
|
5319
5447
|
*/
|
|
@@ -5350,6 +5478,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
5350
5478
|
* Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical.
|
|
5351
5479
|
*/
|
|
5352
5480
|
mediaRecommendationEngineConfig?: Schema$GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig;
|
|
5481
|
+
/**
|
|
5482
|
+
* Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.
|
|
5483
|
+
*/
|
|
5484
|
+
modelConfigs?: {[key: string]: string} | null;
|
|
5353
5485
|
/**
|
|
5354
5486
|
* Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}` engine should be 1-63 characters, and valid characters are /a-z0-9x/. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
5355
5487
|
*/
|
|
@@ -5978,6 +6110,15 @@ export namespace discoveryengine_v1alpha {
|
|
|
5978
6110
|
*/
|
|
5979
6111
|
inputUris?: string[] | null;
|
|
5980
6112
|
}
|
|
6113
|
+
/**
|
|
6114
|
+
* Response message for the AgentService.GetAgentView method.
|
|
6115
|
+
*/
|
|
6116
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse {
|
|
6117
|
+
/**
|
|
6118
|
+
* The data for displaying an Agent.
|
|
6119
|
+
*/
|
|
6120
|
+
agentView?: Schema$GoogleCloudDiscoveryengineV1alphaAgentView;
|
|
6121
|
+
}
|
|
5981
6122
|
/**
|
|
5982
6123
|
* Response message for DataConnectorService.GetConnectorSecret.
|
|
5983
6124
|
*/
|
|
@@ -6700,6 +6841,19 @@ export namespace discoveryengine_v1alpha {
|
|
|
6700
6841
|
*/
|
|
6701
6842
|
subscriptionTier?: string | null;
|
|
6702
6843
|
}
|
|
6844
|
+
/**
|
|
6845
|
+
* Stats about users' licenses.
|
|
6846
|
+
*/
|
|
6847
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats {
|
|
6848
|
+
/**
|
|
6849
|
+
* Required. The LicenseConfig name.
|
|
6850
|
+
*/
|
|
6851
|
+
licenseConfig?: string | null;
|
|
6852
|
+
/**
|
|
6853
|
+
* Required. The number of licenses used.
|
|
6854
|
+
*/
|
|
6855
|
+
usedLicenseCount?: string | null;
|
|
6856
|
+
}
|
|
6703
6857
|
/**
|
|
6704
6858
|
* Response message for the AgentService.ListAgents method.
|
|
6705
6859
|
*/
|
|
@@ -6726,6 +6880,19 @@ export namespace discoveryengine_v1alpha {
|
|
|
6726
6880
|
*/
|
|
6727
6881
|
nextPageToken?: string | null;
|
|
6728
6882
|
}
|
|
6883
|
+
/**
|
|
6884
|
+
* Response message for the AgentService.ListAvailableAgentViews method.
|
|
6885
|
+
*/
|
|
6886
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse {
|
|
6887
|
+
/**
|
|
6888
|
+
* The agent sources visible to the caller under the parent Assistant.
|
|
6889
|
+
*/
|
|
6890
|
+
agentViews?: Schema$GoogleCloudDiscoveryengineV1alphaAgentView[];
|
|
6891
|
+
/**
|
|
6892
|
+
* A token that can be sent as ListAvailableAgentViewsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
6893
|
+
*/
|
|
6894
|
+
nextPageToken?: string | null;
|
|
6895
|
+
}
|
|
6729
6896
|
/**
|
|
6730
6897
|
* Response message for LicenseConfigService.ListBillingAccountLicenseConfigs method.
|
|
6731
6898
|
*/
|
|
@@ -6961,6 +7128,15 @@ export namespace discoveryengine_v1alpha {
|
|
|
6961
7128
|
*/
|
|
6962
7129
|
nextPageToken?: string | null;
|
|
6963
7130
|
}
|
|
7131
|
+
/**
|
|
7132
|
+
* Response message for UserLicenseService.ListLicenseConfigUsageStats method.
|
|
7133
|
+
*/
|
|
7134
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse {
|
|
7135
|
+
/**
|
|
7136
|
+
* All the customer's LicenseConfigUsageStats.
|
|
7137
|
+
*/
|
|
7138
|
+
licenseConfigUsageStats?: Schema$GoogleCloudDiscoveryengineV1alphaLicenseConfigUsageStats[];
|
|
7139
|
+
}
|
|
6964
7140
|
/**
|
|
6965
7141
|
* Response message for SampleQueryService.ListSampleQueries method.
|
|
6966
7142
|
*/
|
|
@@ -10311,6 +10487,19 @@ export namespace discoveryengine_v1alpha {
|
|
|
10311
10487
|
*/
|
|
10312
10488
|
mediaResponseInfo?: Schema$ApiservingMediaResponseInfo;
|
|
10313
10489
|
}
|
|
10490
|
+
/**
|
|
10491
|
+
* Per-user annotations for an Agent, based on UserAnnotation.
|
|
10492
|
+
*/
|
|
10493
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaUserAnnotations {
|
|
10494
|
+
/**
|
|
10495
|
+
* Optional. Whether the agent is pinned, pinned agent will be displayed on the top of the agent list.
|
|
10496
|
+
*/
|
|
10497
|
+
pinned?: boolean | null;
|
|
10498
|
+
/**
|
|
10499
|
+
* Optional. Whether the agent has been viewed by the user.
|
|
10500
|
+
*/
|
|
10501
|
+
viewed?: boolean | null;
|
|
10502
|
+
}
|
|
10314
10503
|
/**
|
|
10315
10504
|
* UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with your website.
|
|
10316
10505
|
*/
|
|
@@ -10947,6 +11136,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
10947
11136
|
* Describes widget (or web app) interaction type
|
|
10948
11137
|
*/
|
|
10949
11138
|
interactionType?: string | null;
|
|
11139
|
+
/**
|
|
11140
|
+
* Output only. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.
|
|
11141
|
+
*/
|
|
11142
|
+
modelConfigs?: {[key: string]: string} | null;
|
|
10950
11143
|
/**
|
|
10951
11144
|
* Controls whether result extract is display and how (snippet or extractive answer). Default to no result if unspecified.
|
|
10952
11145
|
*/
|
|
@@ -12004,6 +12197,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
12004
12197
|
* Optional. If true, the LLM based annotation is added to the image during parsing.
|
|
12005
12198
|
*/
|
|
12006
12199
|
enableImageAnnotation?: boolean | null;
|
|
12200
|
+
/**
|
|
12201
|
+
* Optional. If true, the pdf layout will be refined using an LLM.
|
|
12202
|
+
*/
|
|
12203
|
+
enableLlmLayoutParsing?: boolean | null;
|
|
12007
12204
|
/**
|
|
12008
12205
|
* Optional. If true, the LLM based annotation is added to the table during parsing.
|
|
12009
12206
|
*/
|
|
@@ -12071,6 +12268,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
12071
12268
|
* Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.
|
|
12072
12269
|
*/
|
|
12073
12270
|
chatEngineMetadata?: Schema$GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata;
|
|
12271
|
+
/**
|
|
12272
|
+
* Output only. CMEK-related information for the Engine.
|
|
12273
|
+
*/
|
|
12274
|
+
cmekConfig?: Schema$GoogleCloudDiscoveryengineV1betaCmekConfig;
|
|
12074
12275
|
/**
|
|
12075
12276
|
* Common config spec that specifies the metadata of the engine.
|
|
12076
12277
|
*/
|
|
@@ -12107,6 +12308,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
12107
12308
|
* Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical.
|
|
12108
12309
|
*/
|
|
12109
12310
|
mediaRecommendationEngineConfig?: Schema$GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig;
|
|
12311
|
+
/**
|
|
12312
|
+
* Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.
|
|
12313
|
+
*/
|
|
12314
|
+
modelConfigs?: {[key: string]: string} | null;
|
|
12110
12315
|
/**
|
|
12111
12316
|
* Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}` engine should be 1-63 characters, and valid characters are /a-z0-9x/. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
12112
12317
|
*/
|
|
@@ -14816,6 +15021,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
14816
15021
|
* Optional. If true, the LLM based annotation is added to the image during parsing.
|
|
14817
15022
|
*/
|
|
14818
15023
|
enableImageAnnotation?: boolean | null;
|
|
15024
|
+
/**
|
|
15025
|
+
* Optional. If true, the pdf layout will be refined using an LLM.
|
|
15026
|
+
*/
|
|
15027
|
+
enableLlmLayoutParsing?: boolean | null;
|
|
14819
15028
|
/**
|
|
14820
15029
|
* Optional. If true, the LLM based annotation is added to the table during parsing.
|
|
14821
15030
|
*/
|
|
@@ -14883,6 +15092,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
14883
15092
|
* Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.
|
|
14884
15093
|
*/
|
|
14885
15094
|
chatEngineMetadata?: Schema$GoogleCloudDiscoveryengineV1EngineChatEngineMetadata;
|
|
15095
|
+
/**
|
|
15096
|
+
* Output only. CMEK-related information for the Engine.
|
|
15097
|
+
*/
|
|
15098
|
+
cmekConfig?: Schema$GoogleCloudDiscoveryengineV1CmekConfig;
|
|
14886
15099
|
/**
|
|
14887
15100
|
* Common config spec that specifies the metadata of the engine.
|
|
14888
15101
|
*/
|
|
@@ -14919,6 +15132,10 @@ export namespace discoveryengine_v1alpha {
|
|
|
14919
15132
|
* Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical.
|
|
14920
15133
|
*/
|
|
14921
15134
|
mediaRecommendationEngineConfig?: Schema$GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig;
|
|
15135
|
+
/**
|
|
15136
|
+
* Optional. Maps a model name to its specific configuration for this engine. This allows admin users to turn on/off individual models. This only stores models whose states are overridden by the admin. When the state is unspecified, or model_configs is empty for this model, the system will decide if this model should be available or not based on the default configuration. For example, a preview model should be disabled by default if the admin has not chosen to enable it.
|
|
15137
|
+
*/
|
|
15138
|
+
modelConfigs?: {[key: string]: string} | null;
|
|
14922
15139
|
/**
|
|
14923
15140
|
* Immutable. Identifier. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}` engine should be 1-63 characters, and valid characters are /a-z0-9x/. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
14924
15141
|
*/
|
|
@@ -16730,6 +16947,49 @@ export namespace discoveryengine_v1alpha {
|
|
|
16730
16947
|
*/
|
|
16731
16948
|
videoId?: string | null;
|
|
16732
16949
|
}
|
|
16950
|
+
/**
|
|
16951
|
+
* Associates `members`, or principals, with a `role`.
|
|
16952
|
+
*/
|
|
16953
|
+
export interface Schema$GoogleIamV1Binding {
|
|
16954
|
+
/**
|
|
16955
|
+
* The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
|
16956
|
+
*/
|
|
16957
|
+
condition?: Schema$GoogleTypeExpr;
|
|
16958
|
+
/**
|
|
16959
|
+
* Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid\}.svc.id.goog[{namespace\}/{kubernetes-sa\}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/subject/{subject_attribute_value\}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/group/{group_id\}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/attribute.{attribute_name\}/{attribute_value\}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/x`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/subject/{subject_attribute_value\}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/group/{group_id\}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/attribute.{attribute_name\}/{attribute_value\}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number\}/locations/global/workloadIdentityPools/{pool_id\}/x`: All identities in a workload identity pool. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id\}/subject/{subject_attribute_value\}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
|
|
16960
|
+
*/
|
|
16961
|
+
members?: string[] | null;
|
|
16962
|
+
/**
|
|
16963
|
+
* Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
|
|
16964
|
+
*/
|
|
16965
|
+
role?: string | null;
|
|
16966
|
+
}
|
|
16967
|
+
/**
|
|
16968
|
+
* An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
|
|
16969
|
+
*/
|
|
16970
|
+
export interface Schema$GoogleIamV1Policy {
|
|
16971
|
+
/**
|
|
16972
|
+
* Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
|
|
16973
|
+
*/
|
|
16974
|
+
bindings?: Schema$GoogleIamV1Binding[];
|
|
16975
|
+
/**
|
|
16976
|
+
* `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
|
|
16977
|
+
*/
|
|
16978
|
+
etag?: string | null;
|
|
16979
|
+
/**
|
|
16980
|
+
* Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
|
16981
|
+
*/
|
|
16982
|
+
version?: number | null;
|
|
16983
|
+
}
|
|
16984
|
+
/**
|
|
16985
|
+
* Request message for `SetIamPolicy` method.
|
|
16986
|
+
*/
|
|
16987
|
+
export interface Schema$GoogleIamV1SetIamPolicyRequest {
|
|
16988
|
+
/**
|
|
16989
|
+
* REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them.
|
|
16990
|
+
*/
|
|
16991
|
+
policy?: Schema$GoogleIamV1Policy;
|
|
16992
|
+
}
|
|
16733
16993
|
/**
|
|
16734
16994
|
* The request message for Operations.CancelOperation.
|
|
16735
16995
|
*/
|
|
@@ -41967,6 +42227,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
41967
42227
|
* // "appType": "my_appType",
|
|
41968
42228
|
* // "chatEngineConfig": {},
|
|
41969
42229
|
* // "chatEngineMetadata": {},
|
|
42230
|
+
* // "cmekConfig": {},
|
|
41970
42231
|
* // "commonConfig": {},
|
|
41971
42232
|
* // "configurableBillingApproach": "my_configurableBillingApproach",
|
|
41972
42233
|
* // "createTime": "my_createTime",
|
|
@@ -41976,6 +42237,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
41976
42237
|
* // "features": {},
|
|
41977
42238
|
* // "industryVertical": "my_industryVertical",
|
|
41978
42239
|
* // "mediaRecommendationEngineConfig": {},
|
|
42240
|
+
* // "modelConfigs": {},
|
|
41979
42241
|
* // "name": "my_name",
|
|
41980
42242
|
* // "recommendationMetadata": {},
|
|
41981
42243
|
* // "searchEngineConfig": {},
|
|
@@ -42290,6 +42552,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
42290
42552
|
* // "appType": "my_appType",
|
|
42291
42553
|
* // "chatEngineConfig": {},
|
|
42292
42554
|
* // "chatEngineMetadata": {},
|
|
42555
|
+
* // "cmekConfig": {},
|
|
42293
42556
|
* // "commonConfig": {},
|
|
42294
42557
|
* // "configurableBillingApproach": "my_configurableBillingApproach",
|
|
42295
42558
|
* // "createTime": "my_createTime",
|
|
@@ -42299,6 +42562,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
42299
42562
|
* // "features": {},
|
|
42300
42563
|
* // "industryVertical": "my_industryVertical",
|
|
42301
42564
|
* // "mediaRecommendationEngineConfig": {},
|
|
42565
|
+
* // "modelConfigs": {},
|
|
42302
42566
|
* // "name": "my_name",
|
|
42303
42567
|
* // "recommendationMetadata": {},
|
|
42304
42568
|
* // "searchEngineConfig": {},
|
|
@@ -42776,6 +43040,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
42776
43040
|
* // "appType": "my_appType",
|
|
42777
43041
|
* // "chatEngineConfig": {},
|
|
42778
43042
|
* // "chatEngineMetadata": {},
|
|
43043
|
+
* // "cmekConfig": {},
|
|
42779
43044
|
* // "commonConfig": {},
|
|
42780
43045
|
* // "configurableBillingApproach": "my_configurableBillingApproach",
|
|
42781
43046
|
* // "createTime": "my_createTime",
|
|
@@ -42785,6 +43050,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
42785
43050
|
* // "features": {},
|
|
42786
43051
|
* // "industryVertical": "my_industryVertical",
|
|
42787
43052
|
* // "mediaRecommendationEngineConfig": {},
|
|
43053
|
+
* // "modelConfigs": {},
|
|
42788
43054
|
* // "name": "my_name",
|
|
42789
43055
|
* // "recommendationMetadata": {},
|
|
42790
43056
|
* // "searchEngineConfig": {},
|
|
@@ -42801,6 +43067,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
42801
43067
|
* // "appType": "my_appType",
|
|
42802
43068
|
* // "chatEngineConfig": {},
|
|
42803
43069
|
* // "chatEngineMetadata": {},
|
|
43070
|
+
* // "cmekConfig": {},
|
|
42804
43071
|
* // "commonConfig": {},
|
|
42805
43072
|
* // "configurableBillingApproach": "my_configurableBillingApproach",
|
|
42806
43073
|
* // "createTime": "my_createTime",
|
|
@@ -42810,6 +43077,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
42810
43077
|
* // "features": {},
|
|
42811
43078
|
* // "industryVertical": "my_industryVertical",
|
|
42812
43079
|
* // "mediaRecommendationEngineConfig": {},
|
|
43080
|
+
* // "modelConfigs": {},
|
|
42813
43081
|
* // "name": "my_name",
|
|
42814
43082
|
* // "recommendationMetadata": {},
|
|
42815
43083
|
* // "searchEngineConfig": {},
|
|
@@ -42974,6 +43242,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
42974
43242
|
* // "appType": "my_appType",
|
|
42975
43243
|
* // "chatEngineConfig": {},
|
|
42976
43244
|
* // "chatEngineMetadata": {},
|
|
43245
|
+
* // "cmekConfig": {},
|
|
42977
43246
|
* // "commonConfig": {},
|
|
42978
43247
|
* // "configurableBillingApproach": "my_configurableBillingApproach",
|
|
42979
43248
|
* // "createTime": "my_createTime",
|
|
@@ -42983,6 +43252,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
42983
43252
|
* // "features": {},
|
|
42984
43253
|
* // "industryVertical": "my_industryVertical",
|
|
42985
43254
|
* // "mediaRecommendationEngineConfig": {},
|
|
43255
|
+
* // "modelConfigs": {},
|
|
42986
43256
|
* // "name": "my_name",
|
|
42987
43257
|
* // "recommendationMetadata": {},
|
|
42988
43258
|
* // "searchEngineConfig": {},
|
|
@@ -43150,6 +43420,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
43150
43420
|
* // "appType": "my_appType",
|
|
43151
43421
|
* // "chatEngineConfig": {},
|
|
43152
43422
|
* // "chatEngineMetadata": {},
|
|
43423
|
+
* // "cmekConfig": {},
|
|
43153
43424
|
* // "commonConfig": {},
|
|
43154
43425
|
* // "configurableBillingApproach": "my_configurableBillingApproach",
|
|
43155
43426
|
* // "createTime": "my_createTime",
|
|
@@ -43159,6 +43430,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
43159
43430
|
* // "features": {},
|
|
43160
43431
|
* // "industryVertical": "my_industryVertical",
|
|
43161
43432
|
* // "mediaRecommendationEngineConfig": {},
|
|
43433
|
+
* // "modelConfigs": {},
|
|
43162
43434
|
* // "name": "my_name",
|
|
43163
43435
|
* // "recommendationMetadata": {},
|
|
43164
43436
|
* // "searchEngineConfig": {},
|
|
@@ -43898,6 +44170,177 @@ export namespace discoveryengine_v1alpha {
|
|
|
43898
44170
|
}
|
|
43899
44171
|
}
|
|
43900
44172
|
|
|
44173
|
+
/**
|
|
44174
|
+
* Lists the data for displaying the Agents under an Assistant which are available to the caller.
|
|
44175
|
+
* @example
|
|
44176
|
+
* ```js
|
|
44177
|
+
* // Before running the sample:
|
|
44178
|
+
* // - Enable the API at:
|
|
44179
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
44180
|
+
* // - Login into gcloud by running:
|
|
44181
|
+
* // ```sh
|
|
44182
|
+
* // $ gcloud auth application-default login
|
|
44183
|
+
* // ```
|
|
44184
|
+
* // - Install the npm module by running:
|
|
44185
|
+
* // ```sh
|
|
44186
|
+
* // $ npm install googleapis
|
|
44187
|
+
* // ```
|
|
44188
|
+
*
|
|
44189
|
+
* const {google} = require('googleapis');
|
|
44190
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
44191
|
+
*
|
|
44192
|
+
* async function main() {
|
|
44193
|
+
* const auth = new google.auth.GoogleAuth({
|
|
44194
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
44195
|
+
* scopes: [
|
|
44196
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
44197
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
44198
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
44199
|
+
* ],
|
|
44200
|
+
* });
|
|
44201
|
+
*
|
|
44202
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
44203
|
+
* const authClient = await auth.getClient();
|
|
44204
|
+
* google.options({auth: authClient});
|
|
44205
|
+
*
|
|
44206
|
+
* // Do the magic
|
|
44207
|
+
* const res =
|
|
44208
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.listAvailableAgentViews(
|
|
44209
|
+
* {
|
|
44210
|
+
* // Optional. The origin of the Agent.
|
|
44211
|
+
* agentOrigin: 'placeholder-value',
|
|
44212
|
+
* // Optional. The filter syntax consists of an expression language for constructing a predicate from one or more fields of the files being filtered. Filter expression is case-sensitive. Allowed fields are: * `display_name` * `state` Some examples of filters would be: * `display_name = 'agent_1'` * `display_name = 'agent_1' AND state = ENABLED` For a full description of the filter format, please see https://google.aip.dev/160.
|
|
44213
|
+
* filter: 'placeholder-value',
|
|
44214
|
+
* // Optional. The UI language currently shown to the user. Specifying this field request that the texts in the AgentViews in the response should be translated to this language.
|
|
44215
|
+
* languageCode: 'placeholder-value',
|
|
44216
|
+
* // Optional. The maximum number of suggested prompts to return per agent.
|
|
44217
|
+
* maxSuggestedPrompts: 'placeholder-value',
|
|
44218
|
+
* // Optional. Maximum number of AgentViewss to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000.
|
|
44219
|
+
* pageSize: 'placeholder-value',
|
|
44220
|
+
* // Optional. A page token ListAvailableAgentViewsResponse.next_page_token, received from a previous AgentService.ListAvailableAgentViews call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAvailableAgentViews must match the call that provided the page token.
|
|
44221
|
+
* pageToken: 'placeholder-value',
|
|
44222
|
+
* // Required. The parent resource name. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}`
|
|
44223
|
+
* parent:
|
|
44224
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant',
|
|
44225
|
+
* // Optional. The field to sort by. Can have the following values: - display-name: The display name of the agent. - description: The description of the agent. - create-time: The creation time of the agent. - state: The state of the agent.
|
|
44226
|
+
* sortBy: 'placeholder-value',
|
|
44227
|
+
* },
|
|
44228
|
+
* );
|
|
44229
|
+
* console.log(res.data);
|
|
44230
|
+
*
|
|
44231
|
+
* // Example response
|
|
44232
|
+
* // {
|
|
44233
|
+
* // "agentViews": [],
|
|
44234
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
44235
|
+
* // }
|
|
44236
|
+
* }
|
|
44237
|
+
*
|
|
44238
|
+
* main().catch(e => {
|
|
44239
|
+
* console.error(e);
|
|
44240
|
+
* throw e;
|
|
44241
|
+
* });
|
|
44242
|
+
*
|
|
44243
|
+
* ```
|
|
44244
|
+
*
|
|
44245
|
+
* @param params - Parameters for request
|
|
44246
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
44247
|
+
* @param callback - Optional callback that handles the response.
|
|
44248
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
44249
|
+
*/
|
|
44250
|
+
listAvailableAgentViews(
|
|
44251
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews,
|
|
44252
|
+
options: StreamMethodOptions
|
|
44253
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
44254
|
+
listAvailableAgentViews(
|
|
44255
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews,
|
|
44256
|
+
options?: MethodOptions
|
|
44257
|
+
): Promise<
|
|
44258
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>
|
|
44259
|
+
>;
|
|
44260
|
+
listAvailableAgentViews(
|
|
44261
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews,
|
|
44262
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
44263
|
+
callback: BodyResponseCallback<Readable>
|
|
44264
|
+
): void;
|
|
44265
|
+
listAvailableAgentViews(
|
|
44266
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews,
|
|
44267
|
+
options:
|
|
44268
|
+
| MethodOptions
|
|
44269
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>,
|
|
44270
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>
|
|
44271
|
+
): void;
|
|
44272
|
+
listAvailableAgentViews(
|
|
44273
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews,
|
|
44274
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>
|
|
44275
|
+
): void;
|
|
44276
|
+
listAvailableAgentViews(
|
|
44277
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>
|
|
44278
|
+
): void;
|
|
44279
|
+
listAvailableAgentViews(
|
|
44280
|
+
paramsOrCallback?:
|
|
44281
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews
|
|
44282
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>
|
|
44283
|
+
| BodyResponseCallback<Readable>,
|
|
44284
|
+
optionsOrCallback?:
|
|
44285
|
+
| MethodOptions
|
|
44286
|
+
| StreamMethodOptions
|
|
44287
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>
|
|
44288
|
+
| BodyResponseCallback<Readable>,
|
|
44289
|
+
callback?:
|
|
44290
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>
|
|
44291
|
+
| BodyResponseCallback<Readable>
|
|
44292
|
+
):
|
|
44293
|
+
| void
|
|
44294
|
+
| Promise<
|
|
44295
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>
|
|
44296
|
+
>
|
|
44297
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
44298
|
+
let params = (paramsOrCallback ||
|
|
44299
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews;
|
|
44300
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
44301
|
+
|
|
44302
|
+
if (typeof paramsOrCallback === 'function') {
|
|
44303
|
+
callback = paramsOrCallback;
|
|
44304
|
+
params =
|
|
44305
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews;
|
|
44306
|
+
options = {};
|
|
44307
|
+
}
|
|
44308
|
+
|
|
44309
|
+
if (typeof optionsOrCallback === 'function') {
|
|
44310
|
+
callback = optionsOrCallback;
|
|
44311
|
+
options = {};
|
|
44312
|
+
}
|
|
44313
|
+
|
|
44314
|
+
const rootUrl =
|
|
44315
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
44316
|
+
const parameters = {
|
|
44317
|
+
options: Object.assign(
|
|
44318
|
+
{
|
|
44319
|
+
url: (
|
|
44320
|
+
rootUrl + '/v1alpha/{+parent}:listAvailableAgentViews'
|
|
44321
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
44322
|
+
method: 'POST',
|
|
44323
|
+
apiVersion: '',
|
|
44324
|
+
},
|
|
44325
|
+
options
|
|
44326
|
+
),
|
|
44327
|
+
params,
|
|
44328
|
+
requiredParams: ['parent'],
|
|
44329
|
+
pathParams: ['parent'],
|
|
44330
|
+
context: this.context,
|
|
44331
|
+
};
|
|
44332
|
+
if (callback) {
|
|
44333
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>(
|
|
44334
|
+
parameters,
|
|
44335
|
+
callback as BodyResponseCallback<unknown>
|
|
44336
|
+
);
|
|
44337
|
+
} else {
|
|
44338
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaListAvailableAgentViewsResponse>(
|
|
44339
|
+
parameters
|
|
44340
|
+
);
|
|
44341
|
+
}
|
|
44342
|
+
}
|
|
44343
|
+
|
|
43901
44344
|
/**
|
|
43902
44345
|
* Updates an Assistant
|
|
43903
44346
|
* @example
|
|
@@ -44247,6 +44690,41 @@ export namespace discoveryengine_v1alpha {
|
|
|
44247
44690
|
*/
|
|
44248
44691
|
name?: string;
|
|
44249
44692
|
}
|
|
44693
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Listavailableagentviews
|
|
44694
|
+
extends StandardParameters {
|
|
44695
|
+
/**
|
|
44696
|
+
* Optional. The origin of the Agent.
|
|
44697
|
+
*/
|
|
44698
|
+
agentOrigin?: string;
|
|
44699
|
+
/**
|
|
44700
|
+
* Optional. The filter syntax consists of an expression language for constructing a predicate from one or more fields of the files being filtered. Filter expression is case-sensitive. Allowed fields are: * `display_name` * `state` Some examples of filters would be: * `display_name = 'agent_1'` * `display_name = 'agent_1' AND state = ENABLED` For a full description of the filter format, please see https://google.aip.dev/160.
|
|
44701
|
+
*/
|
|
44702
|
+
filter?: string;
|
|
44703
|
+
/**
|
|
44704
|
+
* Optional. The UI language currently shown to the user. Specifying this field request that the texts in the AgentViews in the response should be translated to this language.
|
|
44705
|
+
*/
|
|
44706
|
+
languageCode?: string;
|
|
44707
|
+
/**
|
|
44708
|
+
* Optional. The maximum number of suggested prompts to return per agent.
|
|
44709
|
+
*/
|
|
44710
|
+
maxSuggestedPrompts?: number;
|
|
44711
|
+
/**
|
|
44712
|
+
* Optional. Maximum number of AgentViewss to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000.
|
|
44713
|
+
*/
|
|
44714
|
+
pageSize?: number;
|
|
44715
|
+
/**
|
|
44716
|
+
* Optional. A page token ListAvailableAgentViewsResponse.next_page_token, received from a previous AgentService.ListAvailableAgentViews call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAvailableAgentViews must match the call that provided the page token.
|
|
44717
|
+
*/
|
|
44718
|
+
pageToken?: string;
|
|
44719
|
+
/**
|
|
44720
|
+
* Required. The parent resource name. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}`
|
|
44721
|
+
*/
|
|
44722
|
+
parent?: string;
|
|
44723
|
+
/**
|
|
44724
|
+
* Optional. The field to sort by. Can have the following values: - display-name: The display name of the agent. - description: The description of the agent. - create-time: The creation time of the agent. - state: The state of the agent.
|
|
44725
|
+
*/
|
|
44726
|
+
sortBy?: string;
|
|
44727
|
+
}
|
|
44250
44728
|
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Patch
|
|
44251
44729
|
extends StandardParameters {
|
|
44252
44730
|
/**
|
|
@@ -44345,6 +44823,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44345
44823
|
* // "languageCode": "my_languageCode",
|
|
44346
44824
|
* // "name": "my_name",
|
|
44347
44825
|
* // "rejectionReason": "my_rejectionReason",
|
|
44826
|
+
* // "sharingConfig": {},
|
|
44348
44827
|
* // "starterPrompts": [],
|
|
44349
44828
|
* // "state": "my_state",
|
|
44350
44829
|
* // "suspensionReason": "my_suspensionReason",
|
|
@@ -44370,6 +44849,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44370
44849
|
* // "languageCode": "my_languageCode",
|
|
44371
44850
|
* // "name": "my_name",
|
|
44372
44851
|
* // "rejectionReason": "my_rejectionReason",
|
|
44852
|
+
* // "sharingConfig": {},
|
|
44373
44853
|
* // "starterPrompts": [],
|
|
44374
44854
|
* // "state": "my_state",
|
|
44375
44855
|
* // "suspensionReason": "my_suspensionReason",
|
|
@@ -44636,7 +45116,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44636
45116
|
}
|
|
44637
45117
|
|
|
44638
45118
|
/**
|
|
44639
|
-
*
|
|
45119
|
+
* Disables an Agent. The `state` of the Agent becomes `DISABLED`. Can be called on an Agent in the state `ENABLED` or`SUSPENDED`, otherwise it returns an error.
|
|
44640
45120
|
* @example
|
|
44641
45121
|
* ```js
|
|
44642
45122
|
* // Before running the sample:
|
|
@@ -44670,9 +45150,9 @@ export namespace discoveryengine_v1alpha {
|
|
|
44670
45150
|
*
|
|
44671
45151
|
* // Do the magic
|
|
44672
45152
|
* const res =
|
|
44673
|
-
* await discoveryengine.projects.locations.collections.engines.assistants.agents.
|
|
45153
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.agents.disableAgent(
|
|
44674
45154
|
* {
|
|
44675
|
-
* // Required.
|
|
45155
|
+
* // Required. The name of the Agent to disable. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
44676
45156
|
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant/agents/my-agent',
|
|
44677
45157
|
* },
|
|
44678
45158
|
* );
|
|
@@ -44693,6 +45173,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44693
45173
|
* // "languageCode": "my_languageCode",
|
|
44694
45174
|
* // "name": "my_name",
|
|
44695
45175
|
* // "rejectionReason": "my_rejectionReason",
|
|
45176
|
+
* // "sharingConfig": {},
|
|
44696
45177
|
* // "starterPrompts": [],
|
|
44697
45178
|
* // "state": "my_state",
|
|
44698
45179
|
* // "suspensionReason": "my_suspensionReason",
|
|
@@ -44712,38 +45193,38 @@ export namespace discoveryengine_v1alpha {
|
|
|
44712
45193
|
* @param callback - Optional callback that handles the response.
|
|
44713
45194
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
44714
45195
|
*/
|
|
44715
|
-
|
|
44716
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45196
|
+
disableAgent(
|
|
45197
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent,
|
|
44717
45198
|
options: StreamMethodOptions
|
|
44718
45199
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
44719
|
-
|
|
44720
|
-
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45200
|
+
disableAgent(
|
|
45201
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent,
|
|
44721
45202
|
options?: MethodOptions
|
|
44722
45203
|
): Promise<
|
|
44723
45204
|
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44724
45205
|
>;
|
|
44725
|
-
|
|
44726
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45206
|
+
disableAgent(
|
|
45207
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent,
|
|
44727
45208
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
44728
45209
|
callback: BodyResponseCallback<Readable>
|
|
44729
45210
|
): void;
|
|
44730
|
-
|
|
44731
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45211
|
+
disableAgent(
|
|
45212
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent,
|
|
44732
45213
|
options:
|
|
44733
45214
|
| MethodOptions
|
|
44734
45215
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>,
|
|
44735
45216
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44736
45217
|
): void;
|
|
44737
|
-
|
|
44738
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45218
|
+
disableAgent(
|
|
45219
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent,
|
|
44739
45220
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44740
45221
|
): void;
|
|
44741
|
-
|
|
45222
|
+
disableAgent(
|
|
44742
45223
|
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44743
45224
|
): void;
|
|
44744
|
-
|
|
45225
|
+
disableAgent(
|
|
44745
45226
|
paramsOrCallback?:
|
|
44746
|
-
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45227
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent
|
|
44747
45228
|
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44748
45229
|
| BodyResponseCallback<Readable>,
|
|
44749
45230
|
optionsOrCallback?:
|
|
@@ -44761,13 +45242,13 @@ export namespace discoveryengine_v1alpha {
|
|
|
44761
45242
|
>
|
|
44762
45243
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
44763
45244
|
let params = (paramsOrCallback ||
|
|
44764
|
-
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45245
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent;
|
|
44765
45246
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
44766
45247
|
|
|
44767
45248
|
if (typeof paramsOrCallback === 'function') {
|
|
44768
45249
|
callback = paramsOrCallback;
|
|
44769
45250
|
params =
|
|
44770
|
-
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45251
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent;
|
|
44771
45252
|
options = {};
|
|
44772
45253
|
}
|
|
44773
45254
|
|
|
@@ -44781,8 +45262,11 @@ export namespace discoveryengine_v1alpha {
|
|
|
44781
45262
|
const parameters = {
|
|
44782
45263
|
options: Object.assign(
|
|
44783
45264
|
{
|
|
44784
|
-
url: (rootUrl + '/v1alpha/{+name}').replace(
|
|
44785
|
-
|
|
45265
|
+
url: (rootUrl + '/v1alpha/{+name}:disableAgent').replace(
|
|
45266
|
+
/([^:]\/)\/+/g,
|
|
45267
|
+
'$1'
|
|
45268
|
+
),
|
|
45269
|
+
method: 'POST',
|
|
44786
45270
|
apiVersion: '',
|
|
44787
45271
|
},
|
|
44788
45272
|
options
|
|
@@ -44805,7 +45289,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
44805
45289
|
}
|
|
44806
45290
|
|
|
44807
45291
|
/**
|
|
44808
|
-
*
|
|
45292
|
+
* Enables an Agent. The `state` of the Agent becomes `ENABLED`. Can be called on an Agent in the state `DISABLED` or 'SUSPENDED', otherwise it returns an error.
|
|
44809
45293
|
* @example
|
|
44810
45294
|
* ```js
|
|
44811
45295
|
* // Before running the sample:
|
|
@@ -44839,25 +45323,34 @@ export namespace discoveryengine_v1alpha {
|
|
|
44839
45323
|
*
|
|
44840
45324
|
* // Do the magic
|
|
44841
45325
|
* const res =
|
|
44842
|
-
* await discoveryengine.projects.locations.collections.engines.assistants.agents.
|
|
45326
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.agents.enableAgent(
|
|
44843
45327
|
* {
|
|
44844
|
-
* //
|
|
44845
|
-
*
|
|
44846
|
-
* // Optional. Maximum number of Agents to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000.
|
|
44847
|
-
* pageSize: 'placeholder-value',
|
|
44848
|
-
* // Optional. A page token ListAgentsResponse.next_page_token, received from a previous AgentService.ListAgents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAgents must match the call that provided the page token.
|
|
44849
|
-
* pageToken: 'placeholder-value',
|
|
44850
|
-
* // Required. The parent resource name. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}`
|
|
44851
|
-
* parent:
|
|
44852
|
-
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant',
|
|
45328
|
+
* // Required. The name of the Agent to enable. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
45329
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant/agents/my-agent',
|
|
44853
45330
|
* },
|
|
44854
45331
|
* );
|
|
44855
45332
|
* console.log(res.data);
|
|
44856
45333
|
*
|
|
44857
45334
|
* // Example response
|
|
44858
45335
|
* // {
|
|
44859
|
-
* // "
|
|
44860
|
-
* // "
|
|
45336
|
+
* // "a2aAgentDefinition": {},
|
|
45337
|
+
* // "adkAgentDefinition": {},
|
|
45338
|
+
* // "authorizationConfig": {},
|
|
45339
|
+
* // "createTime": "my_createTime",
|
|
45340
|
+
* // "customPlaceholderText": "my_customPlaceholderText",
|
|
45341
|
+
* // "deploymentFailureReason": "my_deploymentFailureReason",
|
|
45342
|
+
* // "description": "my_description",
|
|
45343
|
+
* // "dialogflowAgentDefinition": {},
|
|
45344
|
+
* // "displayName": "my_displayName",
|
|
45345
|
+
* // "icon": {},
|
|
45346
|
+
* // "languageCode": "my_languageCode",
|
|
45347
|
+
* // "name": "my_name",
|
|
45348
|
+
* // "rejectionReason": "my_rejectionReason",
|
|
45349
|
+
* // "sharingConfig": {},
|
|
45350
|
+
* // "starterPrompts": [],
|
|
45351
|
+
* // "state": "my_state",
|
|
45352
|
+
* // "suspensionReason": "my_suspensionReason",
|
|
45353
|
+
* // "updateTime": "my_updateTime"
|
|
44861
45354
|
* // }
|
|
44862
45355
|
* }
|
|
44863
45356
|
*
|
|
@@ -44873,62 +45366,62 @@ export namespace discoveryengine_v1alpha {
|
|
|
44873
45366
|
* @param callback - Optional callback that handles the response.
|
|
44874
45367
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
44875
45368
|
*/
|
|
44876
|
-
|
|
44877
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45369
|
+
enableAgent(
|
|
45370
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent,
|
|
44878
45371
|
options: StreamMethodOptions
|
|
44879
45372
|
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
44880
|
-
|
|
44881
|
-
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45373
|
+
enableAgent(
|
|
45374
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent,
|
|
44882
45375
|
options?: MethodOptions
|
|
44883
45376
|
): Promise<
|
|
44884
|
-
GaxiosResponseWithHTTP2<Schema$
|
|
45377
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44885
45378
|
>;
|
|
44886
|
-
|
|
44887
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45379
|
+
enableAgent(
|
|
45380
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent,
|
|
44888
45381
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
44889
45382
|
callback: BodyResponseCallback<Readable>
|
|
44890
45383
|
): void;
|
|
44891
|
-
|
|
44892
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45384
|
+
enableAgent(
|
|
45385
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent,
|
|
44893
45386
|
options:
|
|
44894
45387
|
| MethodOptions
|
|
44895
|
-
| BodyResponseCallback<Schema$
|
|
44896
|
-
callback: BodyResponseCallback<Schema$
|
|
45388
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>,
|
|
45389
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44897
45390
|
): void;
|
|
44898
|
-
|
|
44899
|
-
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
44900
|
-
callback: BodyResponseCallback<Schema$
|
|
45391
|
+
enableAgent(
|
|
45392
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent,
|
|
45393
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44901
45394
|
): void;
|
|
44902
|
-
|
|
44903
|
-
callback: BodyResponseCallback<Schema$
|
|
45395
|
+
enableAgent(
|
|
45396
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44904
45397
|
): void;
|
|
44905
|
-
|
|
45398
|
+
enableAgent(
|
|
44906
45399
|
paramsOrCallback?:
|
|
44907
|
-
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
44908
|
-
| BodyResponseCallback<Schema$
|
|
45400
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent
|
|
45401
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44909
45402
|
| BodyResponseCallback<Readable>,
|
|
44910
45403
|
optionsOrCallback?:
|
|
44911
45404
|
| MethodOptions
|
|
44912
45405
|
| StreamMethodOptions
|
|
44913
|
-
| BodyResponseCallback<Schema$
|
|
45406
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44914
45407
|
| BodyResponseCallback<Readable>,
|
|
44915
45408
|
callback?:
|
|
44916
|
-
| BodyResponseCallback<Schema$
|
|
45409
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44917
45410
|
| BodyResponseCallback<Readable>
|
|
44918
45411
|
):
|
|
44919
45412
|
| void
|
|
44920
45413
|
| Promise<
|
|
44921
|
-
GaxiosResponseWithHTTP2<Schema$
|
|
45414
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
44922
45415
|
>
|
|
44923
45416
|
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
44924
45417
|
let params = (paramsOrCallback ||
|
|
44925
|
-
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45418
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent;
|
|
44926
45419
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
44927
45420
|
|
|
44928
45421
|
if (typeof paramsOrCallback === 'function') {
|
|
44929
45422
|
callback = paramsOrCallback;
|
|
44930
45423
|
params =
|
|
44931
|
-
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$
|
|
45424
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent;
|
|
44932
45425
|
options = {};
|
|
44933
45426
|
}
|
|
44934
45427
|
|
|
@@ -44942,34 +45435,681 @@ export namespace discoveryengine_v1alpha {
|
|
|
44942
45435
|
const parameters = {
|
|
44943
45436
|
options: Object.assign(
|
|
44944
45437
|
{
|
|
44945
|
-
url: (rootUrl + '/v1alpha/{+
|
|
45438
|
+
url: (rootUrl + '/v1alpha/{+name}:enableAgent').replace(
|
|
44946
45439
|
/([^:]\/)\/+/g,
|
|
44947
45440
|
'$1'
|
|
44948
45441
|
),
|
|
45442
|
+
method: 'POST',
|
|
45443
|
+
apiVersion: '',
|
|
45444
|
+
},
|
|
45445
|
+
options
|
|
45446
|
+
),
|
|
45447
|
+
params,
|
|
45448
|
+
requiredParams: ['name'],
|
|
45449
|
+
pathParams: ['name'],
|
|
45450
|
+
context: this.context,
|
|
45451
|
+
};
|
|
45452
|
+
if (callback) {
|
|
45453
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAgent>(
|
|
45454
|
+
parameters,
|
|
45455
|
+
callback as BodyResponseCallback<unknown>
|
|
45456
|
+
);
|
|
45457
|
+
} else {
|
|
45458
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAgent>(
|
|
45459
|
+
parameters
|
|
45460
|
+
);
|
|
45461
|
+
}
|
|
45462
|
+
}
|
|
45463
|
+
|
|
45464
|
+
/**
|
|
45465
|
+
* Gets an Agent.
|
|
45466
|
+
* @example
|
|
45467
|
+
* ```js
|
|
45468
|
+
* // Before running the sample:
|
|
45469
|
+
* // - Enable the API at:
|
|
45470
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
45471
|
+
* // - Login into gcloud by running:
|
|
45472
|
+
* // ```sh
|
|
45473
|
+
* // $ gcloud auth application-default login
|
|
45474
|
+
* // ```
|
|
45475
|
+
* // - Install the npm module by running:
|
|
45476
|
+
* // ```sh
|
|
45477
|
+
* // $ npm install googleapis
|
|
45478
|
+
* // ```
|
|
45479
|
+
*
|
|
45480
|
+
* const {google} = require('googleapis');
|
|
45481
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
45482
|
+
*
|
|
45483
|
+
* async function main() {
|
|
45484
|
+
* const auth = new google.auth.GoogleAuth({
|
|
45485
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
45486
|
+
* scopes: [
|
|
45487
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
45488
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
45489
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
45490
|
+
* ],
|
|
45491
|
+
* });
|
|
45492
|
+
*
|
|
45493
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
45494
|
+
* const authClient = await auth.getClient();
|
|
45495
|
+
* google.options({auth: authClient});
|
|
45496
|
+
*
|
|
45497
|
+
* // Do the magic
|
|
45498
|
+
* const res =
|
|
45499
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.agents.get(
|
|
45500
|
+
* {
|
|
45501
|
+
* // Required. Resource name of Agent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
45502
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant/agents/my-agent',
|
|
45503
|
+
* },
|
|
45504
|
+
* );
|
|
45505
|
+
* console.log(res.data);
|
|
45506
|
+
*
|
|
45507
|
+
* // Example response
|
|
45508
|
+
* // {
|
|
45509
|
+
* // "a2aAgentDefinition": {},
|
|
45510
|
+
* // "adkAgentDefinition": {},
|
|
45511
|
+
* // "authorizationConfig": {},
|
|
45512
|
+
* // "createTime": "my_createTime",
|
|
45513
|
+
* // "customPlaceholderText": "my_customPlaceholderText",
|
|
45514
|
+
* // "deploymentFailureReason": "my_deploymentFailureReason",
|
|
45515
|
+
* // "description": "my_description",
|
|
45516
|
+
* // "dialogflowAgentDefinition": {},
|
|
45517
|
+
* // "displayName": "my_displayName",
|
|
45518
|
+
* // "icon": {},
|
|
45519
|
+
* // "languageCode": "my_languageCode",
|
|
45520
|
+
* // "name": "my_name",
|
|
45521
|
+
* // "rejectionReason": "my_rejectionReason",
|
|
45522
|
+
* // "sharingConfig": {},
|
|
45523
|
+
* // "starterPrompts": [],
|
|
45524
|
+
* // "state": "my_state",
|
|
45525
|
+
* // "suspensionReason": "my_suspensionReason",
|
|
45526
|
+
* // "updateTime": "my_updateTime"
|
|
45527
|
+
* // }
|
|
45528
|
+
* }
|
|
45529
|
+
*
|
|
45530
|
+
* main().catch(e => {
|
|
45531
|
+
* console.error(e);
|
|
45532
|
+
* throw e;
|
|
45533
|
+
* });
|
|
45534
|
+
*
|
|
45535
|
+
* ```
|
|
45536
|
+
*
|
|
45537
|
+
* @param params - Parameters for request
|
|
45538
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
45539
|
+
* @param callback - Optional callback that handles the response.
|
|
45540
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
45541
|
+
*/
|
|
45542
|
+
get(
|
|
45543
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get,
|
|
45544
|
+
options: StreamMethodOptions
|
|
45545
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
45546
|
+
get(
|
|
45547
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get,
|
|
45548
|
+
options?: MethodOptions
|
|
45549
|
+
): Promise<
|
|
45550
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
45551
|
+
>;
|
|
45552
|
+
get(
|
|
45553
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get,
|
|
45554
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
45555
|
+
callback: BodyResponseCallback<Readable>
|
|
45556
|
+
): void;
|
|
45557
|
+
get(
|
|
45558
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get,
|
|
45559
|
+
options:
|
|
45560
|
+
| MethodOptions
|
|
45561
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>,
|
|
45562
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
45563
|
+
): void;
|
|
45564
|
+
get(
|
|
45565
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get,
|
|
45566
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
45567
|
+
): void;
|
|
45568
|
+
get(
|
|
45569
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
45570
|
+
): void;
|
|
45571
|
+
get(
|
|
45572
|
+
paramsOrCallback?:
|
|
45573
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get
|
|
45574
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
45575
|
+
| BodyResponseCallback<Readable>,
|
|
45576
|
+
optionsOrCallback?:
|
|
45577
|
+
| MethodOptions
|
|
45578
|
+
| StreamMethodOptions
|
|
45579
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
45580
|
+
| BodyResponseCallback<Readable>,
|
|
45581
|
+
callback?:
|
|
45582
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
45583
|
+
| BodyResponseCallback<Readable>
|
|
45584
|
+
):
|
|
45585
|
+
| void
|
|
45586
|
+
| Promise<
|
|
45587
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
45588
|
+
>
|
|
45589
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
45590
|
+
let params = (paramsOrCallback ||
|
|
45591
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get;
|
|
45592
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
45593
|
+
|
|
45594
|
+
if (typeof paramsOrCallback === 'function') {
|
|
45595
|
+
callback = paramsOrCallback;
|
|
45596
|
+
params =
|
|
45597
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get;
|
|
45598
|
+
options = {};
|
|
45599
|
+
}
|
|
45600
|
+
|
|
45601
|
+
if (typeof optionsOrCallback === 'function') {
|
|
45602
|
+
callback = optionsOrCallback;
|
|
45603
|
+
options = {};
|
|
45604
|
+
}
|
|
45605
|
+
|
|
45606
|
+
const rootUrl =
|
|
45607
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
45608
|
+
const parameters = {
|
|
45609
|
+
options: Object.assign(
|
|
45610
|
+
{
|
|
45611
|
+
url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
|
|
44949
45612
|
method: 'GET',
|
|
44950
45613
|
apiVersion: '',
|
|
44951
45614
|
},
|
|
44952
45615
|
options
|
|
44953
45616
|
),
|
|
44954
45617
|
params,
|
|
44955
|
-
requiredParams: ['
|
|
44956
|
-
pathParams: ['
|
|
45618
|
+
requiredParams: ['name'],
|
|
45619
|
+
pathParams: ['name'],
|
|
44957
45620
|
context: this.context,
|
|
44958
45621
|
};
|
|
44959
45622
|
if (callback) {
|
|
44960
|
-
createAPIRequest<Schema$
|
|
45623
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAgent>(
|
|
44961
45624
|
parameters,
|
|
44962
45625
|
callback as BodyResponseCallback<unknown>
|
|
44963
45626
|
);
|
|
44964
45627
|
} else {
|
|
44965
|
-
return createAPIRequest<Schema$
|
|
45628
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAgent>(
|
|
44966
45629
|
parameters
|
|
44967
45630
|
);
|
|
44968
45631
|
}
|
|
44969
45632
|
}
|
|
44970
45633
|
|
|
44971
45634
|
/**
|
|
44972
|
-
*
|
|
45635
|
+
* Returns a AgentView for a given Agent, which contains additional information about the Agent.
|
|
45636
|
+
* @example
|
|
45637
|
+
* ```js
|
|
45638
|
+
* // Before running the sample:
|
|
45639
|
+
* // - Enable the API at:
|
|
45640
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
45641
|
+
* // - Login into gcloud by running:
|
|
45642
|
+
* // ```sh
|
|
45643
|
+
* // $ gcloud auth application-default login
|
|
45644
|
+
* // ```
|
|
45645
|
+
* // - Install the npm module by running:
|
|
45646
|
+
* // ```sh
|
|
45647
|
+
* // $ npm install googleapis
|
|
45648
|
+
* // ```
|
|
45649
|
+
*
|
|
45650
|
+
* const {google} = require('googleapis');
|
|
45651
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
45652
|
+
*
|
|
45653
|
+
* async function main() {
|
|
45654
|
+
* const auth = new google.auth.GoogleAuth({
|
|
45655
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
45656
|
+
* scopes: [
|
|
45657
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
45658
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
45659
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
45660
|
+
* ],
|
|
45661
|
+
* });
|
|
45662
|
+
*
|
|
45663
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
45664
|
+
* const authClient = await auth.getClient();
|
|
45665
|
+
* google.options({auth: authClient});
|
|
45666
|
+
*
|
|
45667
|
+
* // Do the magic
|
|
45668
|
+
* const res =
|
|
45669
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.agents.getAgentView(
|
|
45670
|
+
* {
|
|
45671
|
+
* // Optional. The UI language currently shown to the user. Specifying this field request that the texts in the AgentView in the response should be translated to this language.
|
|
45672
|
+
* languageCode: 'placeholder-value',
|
|
45673
|
+
* // Optional. The maximum number of suggested prompts to return per agent.
|
|
45674
|
+
* maxSuggestedPrompts: 'placeholder-value',
|
|
45675
|
+
* // Required. The name of the Agent to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
45676
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant/agents/my-agent',
|
|
45677
|
+
* },
|
|
45678
|
+
* );
|
|
45679
|
+
* console.log(res.data);
|
|
45680
|
+
*
|
|
45681
|
+
* // Example response
|
|
45682
|
+
* // {
|
|
45683
|
+
* // "agentView": {}
|
|
45684
|
+
* // }
|
|
45685
|
+
* }
|
|
45686
|
+
*
|
|
45687
|
+
* main().catch(e => {
|
|
45688
|
+
* console.error(e);
|
|
45689
|
+
* throw e;
|
|
45690
|
+
* });
|
|
45691
|
+
*
|
|
45692
|
+
* ```
|
|
45693
|
+
*
|
|
45694
|
+
* @param params - Parameters for request
|
|
45695
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
45696
|
+
* @param callback - Optional callback that handles the response.
|
|
45697
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
45698
|
+
*/
|
|
45699
|
+
getAgentView(
|
|
45700
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview,
|
|
45701
|
+
options: StreamMethodOptions
|
|
45702
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
45703
|
+
getAgentView(
|
|
45704
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview,
|
|
45705
|
+
options?: MethodOptions
|
|
45706
|
+
): Promise<
|
|
45707
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>
|
|
45708
|
+
>;
|
|
45709
|
+
getAgentView(
|
|
45710
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview,
|
|
45711
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
45712
|
+
callback: BodyResponseCallback<Readable>
|
|
45713
|
+
): void;
|
|
45714
|
+
getAgentView(
|
|
45715
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview,
|
|
45716
|
+
options:
|
|
45717
|
+
| MethodOptions
|
|
45718
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>,
|
|
45719
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>
|
|
45720
|
+
): void;
|
|
45721
|
+
getAgentView(
|
|
45722
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview,
|
|
45723
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>
|
|
45724
|
+
): void;
|
|
45725
|
+
getAgentView(
|
|
45726
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>
|
|
45727
|
+
): void;
|
|
45728
|
+
getAgentView(
|
|
45729
|
+
paramsOrCallback?:
|
|
45730
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview
|
|
45731
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>
|
|
45732
|
+
| BodyResponseCallback<Readable>,
|
|
45733
|
+
optionsOrCallback?:
|
|
45734
|
+
| MethodOptions
|
|
45735
|
+
| StreamMethodOptions
|
|
45736
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>
|
|
45737
|
+
| BodyResponseCallback<Readable>,
|
|
45738
|
+
callback?:
|
|
45739
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>
|
|
45740
|
+
| BodyResponseCallback<Readable>
|
|
45741
|
+
):
|
|
45742
|
+
| void
|
|
45743
|
+
| Promise<
|
|
45744
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>
|
|
45745
|
+
>
|
|
45746
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
45747
|
+
let params = (paramsOrCallback ||
|
|
45748
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview;
|
|
45749
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
45750
|
+
|
|
45751
|
+
if (typeof paramsOrCallback === 'function') {
|
|
45752
|
+
callback = paramsOrCallback;
|
|
45753
|
+
params =
|
|
45754
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview;
|
|
45755
|
+
options = {};
|
|
45756
|
+
}
|
|
45757
|
+
|
|
45758
|
+
if (typeof optionsOrCallback === 'function') {
|
|
45759
|
+
callback = optionsOrCallback;
|
|
45760
|
+
options = {};
|
|
45761
|
+
}
|
|
45762
|
+
|
|
45763
|
+
const rootUrl =
|
|
45764
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
45765
|
+
const parameters = {
|
|
45766
|
+
options: Object.assign(
|
|
45767
|
+
{
|
|
45768
|
+
url: (rootUrl + '/v1alpha/{+name}:getAgentView').replace(
|
|
45769
|
+
/([^:]\/)\/+/g,
|
|
45770
|
+
'$1'
|
|
45771
|
+
),
|
|
45772
|
+
method: 'GET',
|
|
45773
|
+
apiVersion: '',
|
|
45774
|
+
},
|
|
45775
|
+
options
|
|
45776
|
+
),
|
|
45777
|
+
params,
|
|
45778
|
+
requiredParams: ['name'],
|
|
45779
|
+
pathParams: ['name'],
|
|
45780
|
+
context: this.context,
|
|
45781
|
+
};
|
|
45782
|
+
if (callback) {
|
|
45783
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>(
|
|
45784
|
+
parameters,
|
|
45785
|
+
callback as BodyResponseCallback<unknown>
|
|
45786
|
+
);
|
|
45787
|
+
} else {
|
|
45788
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaGetAgentViewResponse>(
|
|
45789
|
+
parameters
|
|
45790
|
+
);
|
|
45791
|
+
}
|
|
45792
|
+
}
|
|
45793
|
+
|
|
45794
|
+
/**
|
|
45795
|
+
* Gets the access control policy for an agent resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it.
|
|
45796
|
+
* @example
|
|
45797
|
+
* ```js
|
|
45798
|
+
* // Before running the sample:
|
|
45799
|
+
* // - Enable the API at:
|
|
45800
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
45801
|
+
* // - Login into gcloud by running:
|
|
45802
|
+
* // ```sh
|
|
45803
|
+
* // $ gcloud auth application-default login
|
|
45804
|
+
* // ```
|
|
45805
|
+
* // - Install the npm module by running:
|
|
45806
|
+
* // ```sh
|
|
45807
|
+
* // $ npm install googleapis
|
|
45808
|
+
* // ```
|
|
45809
|
+
*
|
|
45810
|
+
* const {google} = require('googleapis');
|
|
45811
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
45812
|
+
*
|
|
45813
|
+
* async function main() {
|
|
45814
|
+
* const auth = new google.auth.GoogleAuth({
|
|
45815
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
45816
|
+
* scopes: [
|
|
45817
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
45818
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
45819
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
45820
|
+
* ],
|
|
45821
|
+
* });
|
|
45822
|
+
*
|
|
45823
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
45824
|
+
* const authClient = await auth.getClient();
|
|
45825
|
+
* google.options({auth: authClient});
|
|
45826
|
+
*
|
|
45827
|
+
* // Do the magic
|
|
45828
|
+
* const res =
|
|
45829
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.agents.getIamPolicy(
|
|
45830
|
+
* {
|
|
45831
|
+
* // Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
|
45832
|
+
* 'options.requestedPolicyVersion': 'placeholder-value',
|
|
45833
|
+
* // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
45834
|
+
* resource:
|
|
45835
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant/agents/my-agent',
|
|
45836
|
+
* },
|
|
45837
|
+
* );
|
|
45838
|
+
* console.log(res.data);
|
|
45839
|
+
*
|
|
45840
|
+
* // Example response
|
|
45841
|
+
* // {
|
|
45842
|
+
* // "bindings": [],
|
|
45843
|
+
* // "etag": "my_etag",
|
|
45844
|
+
* // "version": 0
|
|
45845
|
+
* // }
|
|
45846
|
+
* }
|
|
45847
|
+
*
|
|
45848
|
+
* main().catch(e => {
|
|
45849
|
+
* console.error(e);
|
|
45850
|
+
* throw e;
|
|
45851
|
+
* });
|
|
45852
|
+
*
|
|
45853
|
+
* ```
|
|
45854
|
+
*
|
|
45855
|
+
* @param params - Parameters for request
|
|
45856
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
45857
|
+
* @param callback - Optional callback that handles the response.
|
|
45858
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
45859
|
+
*/
|
|
45860
|
+
getIamPolicy(
|
|
45861
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy,
|
|
45862
|
+
options: StreamMethodOptions
|
|
45863
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
45864
|
+
getIamPolicy(
|
|
45865
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy,
|
|
45866
|
+
options?: MethodOptions
|
|
45867
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>;
|
|
45868
|
+
getIamPolicy(
|
|
45869
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy,
|
|
45870
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
45871
|
+
callback: BodyResponseCallback<Readable>
|
|
45872
|
+
): void;
|
|
45873
|
+
getIamPolicy(
|
|
45874
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy,
|
|
45875
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1Policy>,
|
|
45876
|
+
callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
45877
|
+
): void;
|
|
45878
|
+
getIamPolicy(
|
|
45879
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy,
|
|
45880
|
+
callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
45881
|
+
): void;
|
|
45882
|
+
getIamPolicy(
|
|
45883
|
+
callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
45884
|
+
): void;
|
|
45885
|
+
getIamPolicy(
|
|
45886
|
+
paramsOrCallback?:
|
|
45887
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy
|
|
45888
|
+
| BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
45889
|
+
| BodyResponseCallback<Readable>,
|
|
45890
|
+
optionsOrCallback?:
|
|
45891
|
+
| MethodOptions
|
|
45892
|
+
| StreamMethodOptions
|
|
45893
|
+
| BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
45894
|
+
| BodyResponseCallback<Readable>,
|
|
45895
|
+
callback?:
|
|
45896
|
+
| BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
45897
|
+
| BodyResponseCallback<Readable>
|
|
45898
|
+
):
|
|
45899
|
+
| void
|
|
45900
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>
|
|
45901
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
45902
|
+
let params = (paramsOrCallback ||
|
|
45903
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy;
|
|
45904
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
45905
|
+
|
|
45906
|
+
if (typeof paramsOrCallback === 'function') {
|
|
45907
|
+
callback = paramsOrCallback;
|
|
45908
|
+
params =
|
|
45909
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy;
|
|
45910
|
+
options = {};
|
|
45911
|
+
}
|
|
45912
|
+
|
|
45913
|
+
if (typeof optionsOrCallback === 'function') {
|
|
45914
|
+
callback = optionsOrCallback;
|
|
45915
|
+
options = {};
|
|
45916
|
+
}
|
|
45917
|
+
|
|
45918
|
+
const rootUrl =
|
|
45919
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
45920
|
+
const parameters = {
|
|
45921
|
+
options: Object.assign(
|
|
45922
|
+
{
|
|
45923
|
+
url: (rootUrl + '/v1alpha/{+resource}:getIamPolicy').replace(
|
|
45924
|
+
/([^:]\/)\/+/g,
|
|
45925
|
+
'$1'
|
|
45926
|
+
),
|
|
45927
|
+
method: 'GET',
|
|
45928
|
+
apiVersion: '',
|
|
45929
|
+
},
|
|
45930
|
+
options
|
|
45931
|
+
),
|
|
45932
|
+
params,
|
|
45933
|
+
requiredParams: ['resource'],
|
|
45934
|
+
pathParams: ['resource'],
|
|
45935
|
+
context: this.context,
|
|
45936
|
+
};
|
|
45937
|
+
if (callback) {
|
|
45938
|
+
createAPIRequest<Schema$GoogleIamV1Policy>(
|
|
45939
|
+
parameters,
|
|
45940
|
+
callback as BodyResponseCallback<unknown>
|
|
45941
|
+
);
|
|
45942
|
+
} else {
|
|
45943
|
+
return createAPIRequest<Schema$GoogleIamV1Policy>(parameters);
|
|
45944
|
+
}
|
|
45945
|
+
}
|
|
45946
|
+
|
|
45947
|
+
/**
|
|
45948
|
+
* Lists all Agents under an Assistant which were created by the caller.
|
|
45949
|
+
* @example
|
|
45950
|
+
* ```js
|
|
45951
|
+
* // Before running the sample:
|
|
45952
|
+
* // - Enable the API at:
|
|
45953
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
45954
|
+
* // - Login into gcloud by running:
|
|
45955
|
+
* // ```sh
|
|
45956
|
+
* // $ gcloud auth application-default login
|
|
45957
|
+
* // ```
|
|
45958
|
+
* // - Install the npm module by running:
|
|
45959
|
+
* // ```sh
|
|
45960
|
+
* // $ npm install googleapis
|
|
45961
|
+
* // ```
|
|
45962
|
+
*
|
|
45963
|
+
* const {google} = require('googleapis');
|
|
45964
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
45965
|
+
*
|
|
45966
|
+
* async function main() {
|
|
45967
|
+
* const auth = new google.auth.GoogleAuth({
|
|
45968
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
45969
|
+
* scopes: [
|
|
45970
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
45971
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
45972
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
45973
|
+
* ],
|
|
45974
|
+
* });
|
|
45975
|
+
*
|
|
45976
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
45977
|
+
* const authClient = await auth.getClient();
|
|
45978
|
+
* google.options({auth: authClient});
|
|
45979
|
+
*
|
|
45980
|
+
* // Do the magic
|
|
45981
|
+
* const res =
|
|
45982
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.agents.list(
|
|
45983
|
+
* {
|
|
45984
|
+
* // Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `is_pinned` Example: * "update_time desc" * "is_pinned desc,update_time desc": list agents by is_pinned first, then by update_time.
|
|
45985
|
+
* orderBy: 'placeholder-value',
|
|
45986
|
+
* // Optional. Maximum number of Agents to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000.
|
|
45987
|
+
* pageSize: 'placeholder-value',
|
|
45988
|
+
* // Optional. A page token ListAgentsResponse.next_page_token, received from a previous AgentService.ListAgents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAgents must match the call that provided the page token.
|
|
45989
|
+
* pageToken: 'placeholder-value',
|
|
45990
|
+
* // Required. The parent resource name. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}`
|
|
45991
|
+
* parent:
|
|
45992
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant',
|
|
45993
|
+
* },
|
|
45994
|
+
* );
|
|
45995
|
+
* console.log(res.data);
|
|
45996
|
+
*
|
|
45997
|
+
* // Example response
|
|
45998
|
+
* // {
|
|
45999
|
+
* // "agents": [],
|
|
46000
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
46001
|
+
* // }
|
|
46002
|
+
* }
|
|
46003
|
+
*
|
|
46004
|
+
* main().catch(e => {
|
|
46005
|
+
* console.error(e);
|
|
46006
|
+
* throw e;
|
|
46007
|
+
* });
|
|
46008
|
+
*
|
|
46009
|
+
* ```
|
|
46010
|
+
*
|
|
46011
|
+
* @param params - Parameters for request
|
|
46012
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
46013
|
+
* @param callback - Optional callback that handles the response.
|
|
46014
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
46015
|
+
*/
|
|
46016
|
+
list(
|
|
46017
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List,
|
|
46018
|
+
options: StreamMethodOptions
|
|
46019
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
46020
|
+
list(
|
|
46021
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List,
|
|
46022
|
+
options?: MethodOptions
|
|
46023
|
+
): Promise<
|
|
46024
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>
|
|
46025
|
+
>;
|
|
46026
|
+
list(
|
|
46027
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List,
|
|
46028
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
46029
|
+
callback: BodyResponseCallback<Readable>
|
|
46030
|
+
): void;
|
|
46031
|
+
list(
|
|
46032
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List,
|
|
46033
|
+
options:
|
|
46034
|
+
| MethodOptions
|
|
46035
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>,
|
|
46036
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>
|
|
46037
|
+
): void;
|
|
46038
|
+
list(
|
|
46039
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List,
|
|
46040
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>
|
|
46041
|
+
): void;
|
|
46042
|
+
list(
|
|
46043
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>
|
|
46044
|
+
): void;
|
|
46045
|
+
list(
|
|
46046
|
+
paramsOrCallback?:
|
|
46047
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List
|
|
46048
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>
|
|
46049
|
+
| BodyResponseCallback<Readable>,
|
|
46050
|
+
optionsOrCallback?:
|
|
46051
|
+
| MethodOptions
|
|
46052
|
+
| StreamMethodOptions
|
|
46053
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>
|
|
46054
|
+
| BodyResponseCallback<Readable>,
|
|
46055
|
+
callback?:
|
|
46056
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>
|
|
46057
|
+
| BodyResponseCallback<Readable>
|
|
46058
|
+
):
|
|
46059
|
+
| void
|
|
46060
|
+
| Promise<
|
|
46061
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>
|
|
46062
|
+
>
|
|
46063
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
46064
|
+
let params = (paramsOrCallback ||
|
|
46065
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List;
|
|
46066
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
46067
|
+
|
|
46068
|
+
if (typeof paramsOrCallback === 'function') {
|
|
46069
|
+
callback = paramsOrCallback;
|
|
46070
|
+
params =
|
|
46071
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List;
|
|
46072
|
+
options = {};
|
|
46073
|
+
}
|
|
46074
|
+
|
|
46075
|
+
if (typeof optionsOrCallback === 'function') {
|
|
46076
|
+
callback = optionsOrCallback;
|
|
46077
|
+
options = {};
|
|
46078
|
+
}
|
|
46079
|
+
|
|
46080
|
+
const rootUrl =
|
|
46081
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
46082
|
+
const parameters = {
|
|
46083
|
+
options: Object.assign(
|
|
46084
|
+
{
|
|
46085
|
+
url: (rootUrl + '/v1alpha/{+parent}/agents').replace(
|
|
46086
|
+
/([^:]\/)\/+/g,
|
|
46087
|
+
'$1'
|
|
46088
|
+
),
|
|
46089
|
+
method: 'GET',
|
|
46090
|
+
apiVersion: '',
|
|
46091
|
+
},
|
|
46092
|
+
options
|
|
46093
|
+
),
|
|
46094
|
+
params,
|
|
46095
|
+
requiredParams: ['parent'],
|
|
46096
|
+
pathParams: ['parent'],
|
|
46097
|
+
context: this.context,
|
|
46098
|
+
};
|
|
46099
|
+
if (callback) {
|
|
46100
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>(
|
|
46101
|
+
parameters,
|
|
46102
|
+
callback as BodyResponseCallback<unknown>
|
|
46103
|
+
);
|
|
46104
|
+
} else {
|
|
46105
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaListAgentsResponse>(
|
|
46106
|
+
parameters
|
|
46107
|
+
);
|
|
46108
|
+
}
|
|
46109
|
+
}
|
|
46110
|
+
|
|
46111
|
+
/**
|
|
46112
|
+
* Updates an Agent
|
|
44973
46113
|
* @example
|
|
44974
46114
|
* ```js
|
|
44975
46115
|
* // Before running the sample:
|
|
@@ -45027,6 +46167,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
45027
46167
|
* // "languageCode": "my_languageCode",
|
|
45028
46168
|
* // "name": "my_name",
|
|
45029
46169
|
* // "rejectionReason": "my_rejectionReason",
|
|
46170
|
+
* // "sharingConfig": {},
|
|
45030
46171
|
* // "starterPrompts": [],
|
|
45031
46172
|
* // "state": "my_state",
|
|
45032
46173
|
* // "suspensionReason": "my_suspensionReason",
|
|
@@ -45052,6 +46193,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
45052
46193
|
* // "languageCode": "my_languageCode",
|
|
45053
46194
|
* // "name": "my_name",
|
|
45054
46195
|
* // "rejectionReason": "my_rejectionReason",
|
|
46196
|
+
* // "sharingConfig": {},
|
|
45055
46197
|
* // "starterPrompts": [],
|
|
45056
46198
|
* // "state": "my_state",
|
|
45057
46199
|
* // "suspensionReason": "my_suspensionReason",
|
|
@@ -45162,6 +46304,340 @@ export namespace discoveryengine_v1alpha {
|
|
|
45162
46304
|
);
|
|
45163
46305
|
}
|
|
45164
46306
|
}
|
|
46307
|
+
|
|
46308
|
+
/**
|
|
46309
|
+
* Sets the access control policy for an agent resource. A `NOT_FOUND` error is returned if the resource does not exist. Policy can only contain `roles/discoveryengine.agentUser`, `roles/discoveryengine.agentViewer` and `roles/discoveryengine.agentEditor` roles.
|
|
46310
|
+
* @example
|
|
46311
|
+
* ```js
|
|
46312
|
+
* // Before running the sample:
|
|
46313
|
+
* // - Enable the API at:
|
|
46314
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
46315
|
+
* // - Login into gcloud by running:
|
|
46316
|
+
* // ```sh
|
|
46317
|
+
* // $ gcloud auth application-default login
|
|
46318
|
+
* // ```
|
|
46319
|
+
* // - Install the npm module by running:
|
|
46320
|
+
* // ```sh
|
|
46321
|
+
* // $ npm install googleapis
|
|
46322
|
+
* // ```
|
|
46323
|
+
*
|
|
46324
|
+
* const {google} = require('googleapis');
|
|
46325
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
46326
|
+
*
|
|
46327
|
+
* async function main() {
|
|
46328
|
+
* const auth = new google.auth.GoogleAuth({
|
|
46329
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
46330
|
+
* scopes: [
|
|
46331
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
46332
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
46333
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
46334
|
+
* ],
|
|
46335
|
+
* });
|
|
46336
|
+
*
|
|
46337
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
46338
|
+
* const authClient = await auth.getClient();
|
|
46339
|
+
* google.options({auth: authClient});
|
|
46340
|
+
*
|
|
46341
|
+
* // Do the magic
|
|
46342
|
+
* const res =
|
|
46343
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.agents.setIamPolicy(
|
|
46344
|
+
* {
|
|
46345
|
+
* // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
46346
|
+
* resource:
|
|
46347
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant/agents/my-agent',
|
|
46348
|
+
*
|
|
46349
|
+
* // Request body metadata
|
|
46350
|
+
* requestBody: {
|
|
46351
|
+
* // request body parameters
|
|
46352
|
+
* // {
|
|
46353
|
+
* // "policy": {}
|
|
46354
|
+
* // }
|
|
46355
|
+
* },
|
|
46356
|
+
* },
|
|
46357
|
+
* );
|
|
46358
|
+
* console.log(res.data);
|
|
46359
|
+
*
|
|
46360
|
+
* // Example response
|
|
46361
|
+
* // {
|
|
46362
|
+
* // "bindings": [],
|
|
46363
|
+
* // "etag": "my_etag",
|
|
46364
|
+
* // "version": 0
|
|
46365
|
+
* // }
|
|
46366
|
+
* }
|
|
46367
|
+
*
|
|
46368
|
+
* main().catch(e => {
|
|
46369
|
+
* console.error(e);
|
|
46370
|
+
* throw e;
|
|
46371
|
+
* });
|
|
46372
|
+
*
|
|
46373
|
+
* ```
|
|
46374
|
+
*
|
|
46375
|
+
* @param params - Parameters for request
|
|
46376
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
46377
|
+
* @param callback - Optional callback that handles the response.
|
|
46378
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
46379
|
+
*/
|
|
46380
|
+
setIamPolicy(
|
|
46381
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy,
|
|
46382
|
+
options: StreamMethodOptions
|
|
46383
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
46384
|
+
setIamPolicy(
|
|
46385
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy,
|
|
46386
|
+
options?: MethodOptions
|
|
46387
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>;
|
|
46388
|
+
setIamPolicy(
|
|
46389
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy,
|
|
46390
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
46391
|
+
callback: BodyResponseCallback<Readable>
|
|
46392
|
+
): void;
|
|
46393
|
+
setIamPolicy(
|
|
46394
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy,
|
|
46395
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1Policy>,
|
|
46396
|
+
callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
46397
|
+
): void;
|
|
46398
|
+
setIamPolicy(
|
|
46399
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy,
|
|
46400
|
+
callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
46401
|
+
): void;
|
|
46402
|
+
setIamPolicy(
|
|
46403
|
+
callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
46404
|
+
): void;
|
|
46405
|
+
setIamPolicy(
|
|
46406
|
+
paramsOrCallback?:
|
|
46407
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy
|
|
46408
|
+
| BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
46409
|
+
| BodyResponseCallback<Readable>,
|
|
46410
|
+
optionsOrCallback?:
|
|
46411
|
+
| MethodOptions
|
|
46412
|
+
| StreamMethodOptions
|
|
46413
|
+
| BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
46414
|
+
| BodyResponseCallback<Readable>,
|
|
46415
|
+
callback?:
|
|
46416
|
+
| BodyResponseCallback<Schema$GoogleIamV1Policy>
|
|
46417
|
+
| BodyResponseCallback<Readable>
|
|
46418
|
+
):
|
|
46419
|
+
| void
|
|
46420
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>
|
|
46421
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
46422
|
+
let params = (paramsOrCallback ||
|
|
46423
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy;
|
|
46424
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
46425
|
+
|
|
46426
|
+
if (typeof paramsOrCallback === 'function') {
|
|
46427
|
+
callback = paramsOrCallback;
|
|
46428
|
+
params =
|
|
46429
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy;
|
|
46430
|
+
options = {};
|
|
46431
|
+
}
|
|
46432
|
+
|
|
46433
|
+
if (typeof optionsOrCallback === 'function') {
|
|
46434
|
+
callback = optionsOrCallback;
|
|
46435
|
+
options = {};
|
|
46436
|
+
}
|
|
46437
|
+
|
|
46438
|
+
const rootUrl =
|
|
46439
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
46440
|
+
const parameters = {
|
|
46441
|
+
options: Object.assign(
|
|
46442
|
+
{
|
|
46443
|
+
url: (rootUrl + '/v1alpha/{+resource}:setIamPolicy').replace(
|
|
46444
|
+
/([^:]\/)\/+/g,
|
|
46445
|
+
'$1'
|
|
46446
|
+
),
|
|
46447
|
+
method: 'POST',
|
|
46448
|
+
apiVersion: '',
|
|
46449
|
+
},
|
|
46450
|
+
options
|
|
46451
|
+
),
|
|
46452
|
+
params,
|
|
46453
|
+
requiredParams: ['resource'],
|
|
46454
|
+
pathParams: ['resource'],
|
|
46455
|
+
context: this.context,
|
|
46456
|
+
};
|
|
46457
|
+
if (callback) {
|
|
46458
|
+
createAPIRequest<Schema$GoogleIamV1Policy>(
|
|
46459
|
+
parameters,
|
|
46460
|
+
callback as BodyResponseCallback<unknown>
|
|
46461
|
+
);
|
|
46462
|
+
} else {
|
|
46463
|
+
return createAPIRequest<Schema$GoogleIamV1Policy>(parameters);
|
|
46464
|
+
}
|
|
46465
|
+
}
|
|
46466
|
+
|
|
46467
|
+
/**
|
|
46468
|
+
* Suspends an Agent. It is still available for viewing but not for use. The `state` of the Agent becomes `SUSPENDED`. Can be called on an Agent in the state `ENABLED`, otherwise it returns an error.
|
|
46469
|
+
* @example
|
|
46470
|
+
* ```js
|
|
46471
|
+
* // Before running the sample:
|
|
46472
|
+
* // - Enable the API at:
|
|
46473
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
46474
|
+
* // - Login into gcloud by running:
|
|
46475
|
+
* // ```sh
|
|
46476
|
+
* // $ gcloud auth application-default login
|
|
46477
|
+
* // ```
|
|
46478
|
+
* // - Install the npm module by running:
|
|
46479
|
+
* // ```sh
|
|
46480
|
+
* // $ npm install googleapis
|
|
46481
|
+
* // ```
|
|
46482
|
+
*
|
|
46483
|
+
* const {google} = require('googleapis');
|
|
46484
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
46485
|
+
*
|
|
46486
|
+
* async function main() {
|
|
46487
|
+
* const auth = new google.auth.GoogleAuth({
|
|
46488
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
46489
|
+
* scopes: [
|
|
46490
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
46491
|
+
* 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
46492
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
46493
|
+
* ],
|
|
46494
|
+
* });
|
|
46495
|
+
*
|
|
46496
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
46497
|
+
* const authClient = await auth.getClient();
|
|
46498
|
+
* google.options({auth: authClient});
|
|
46499
|
+
*
|
|
46500
|
+
* // Do the magic
|
|
46501
|
+
* const res =
|
|
46502
|
+
* await discoveryengine.projects.locations.collections.engines.assistants.agents.suspendAgent(
|
|
46503
|
+
* {
|
|
46504
|
+
* // Required. The name of the Agent to suspend. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
46505
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/assistants/my-assistant/agents/my-agent',
|
|
46506
|
+
* // Required. The reason for suspending the Agent. This will be shown to the users of the Agent.
|
|
46507
|
+
* suspensionReason: 'placeholder-value',
|
|
46508
|
+
* },
|
|
46509
|
+
* );
|
|
46510
|
+
* console.log(res.data);
|
|
46511
|
+
*
|
|
46512
|
+
* // Example response
|
|
46513
|
+
* // {
|
|
46514
|
+
* // "a2aAgentDefinition": {},
|
|
46515
|
+
* // "adkAgentDefinition": {},
|
|
46516
|
+
* // "authorizationConfig": {},
|
|
46517
|
+
* // "createTime": "my_createTime",
|
|
46518
|
+
* // "customPlaceholderText": "my_customPlaceholderText",
|
|
46519
|
+
* // "deploymentFailureReason": "my_deploymentFailureReason",
|
|
46520
|
+
* // "description": "my_description",
|
|
46521
|
+
* // "dialogflowAgentDefinition": {},
|
|
46522
|
+
* // "displayName": "my_displayName",
|
|
46523
|
+
* // "icon": {},
|
|
46524
|
+
* // "languageCode": "my_languageCode",
|
|
46525
|
+
* // "name": "my_name",
|
|
46526
|
+
* // "rejectionReason": "my_rejectionReason",
|
|
46527
|
+
* // "sharingConfig": {},
|
|
46528
|
+
* // "starterPrompts": [],
|
|
46529
|
+
* // "state": "my_state",
|
|
46530
|
+
* // "suspensionReason": "my_suspensionReason",
|
|
46531
|
+
* // "updateTime": "my_updateTime"
|
|
46532
|
+
* // }
|
|
46533
|
+
* }
|
|
46534
|
+
*
|
|
46535
|
+
* main().catch(e => {
|
|
46536
|
+
* console.error(e);
|
|
46537
|
+
* throw e;
|
|
46538
|
+
* });
|
|
46539
|
+
*
|
|
46540
|
+
* ```
|
|
46541
|
+
*
|
|
46542
|
+
* @param params - Parameters for request
|
|
46543
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
46544
|
+
* @param callback - Optional callback that handles the response.
|
|
46545
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
46546
|
+
*/
|
|
46547
|
+
suspendAgent(
|
|
46548
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent,
|
|
46549
|
+
options: StreamMethodOptions
|
|
46550
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
46551
|
+
suspendAgent(
|
|
46552
|
+
params?: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent,
|
|
46553
|
+
options?: MethodOptions
|
|
46554
|
+
): Promise<
|
|
46555
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
46556
|
+
>;
|
|
46557
|
+
suspendAgent(
|
|
46558
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent,
|
|
46559
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
46560
|
+
callback: BodyResponseCallback<Readable>
|
|
46561
|
+
): void;
|
|
46562
|
+
suspendAgent(
|
|
46563
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent,
|
|
46564
|
+
options:
|
|
46565
|
+
| MethodOptions
|
|
46566
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>,
|
|
46567
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
46568
|
+
): void;
|
|
46569
|
+
suspendAgent(
|
|
46570
|
+
params: Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent,
|
|
46571
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
46572
|
+
): void;
|
|
46573
|
+
suspendAgent(
|
|
46574
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
46575
|
+
): void;
|
|
46576
|
+
suspendAgent(
|
|
46577
|
+
paramsOrCallback?:
|
|
46578
|
+
| Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent
|
|
46579
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
46580
|
+
| BodyResponseCallback<Readable>,
|
|
46581
|
+
optionsOrCallback?:
|
|
46582
|
+
| MethodOptions
|
|
46583
|
+
| StreamMethodOptions
|
|
46584
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
46585
|
+
| BodyResponseCallback<Readable>,
|
|
46586
|
+
callback?:
|
|
46587
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
46588
|
+
| BodyResponseCallback<Readable>
|
|
46589
|
+
):
|
|
46590
|
+
| void
|
|
46591
|
+
| Promise<
|
|
46592
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaAgent>
|
|
46593
|
+
>
|
|
46594
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
46595
|
+
let params = (paramsOrCallback ||
|
|
46596
|
+
{}) as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent;
|
|
46597
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
46598
|
+
|
|
46599
|
+
if (typeof paramsOrCallback === 'function') {
|
|
46600
|
+
callback = paramsOrCallback;
|
|
46601
|
+
params =
|
|
46602
|
+
{} as Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent;
|
|
46603
|
+
options = {};
|
|
46604
|
+
}
|
|
46605
|
+
|
|
46606
|
+
if (typeof optionsOrCallback === 'function') {
|
|
46607
|
+
callback = optionsOrCallback;
|
|
46608
|
+
options = {};
|
|
46609
|
+
}
|
|
46610
|
+
|
|
46611
|
+
const rootUrl =
|
|
46612
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
46613
|
+
const parameters = {
|
|
46614
|
+
options: Object.assign(
|
|
46615
|
+
{
|
|
46616
|
+
url: (rootUrl + '/v1alpha/{+name}:suspendAgent').replace(
|
|
46617
|
+
/([^:]\/)\/+/g,
|
|
46618
|
+
'$1'
|
|
46619
|
+
),
|
|
46620
|
+
method: 'POST',
|
|
46621
|
+
apiVersion: '',
|
|
46622
|
+
},
|
|
46623
|
+
options
|
|
46624
|
+
),
|
|
46625
|
+
params,
|
|
46626
|
+
requiredParams: ['name'],
|
|
46627
|
+
pathParams: ['name'],
|
|
46628
|
+
context: this.context,
|
|
46629
|
+
};
|
|
46630
|
+
if (callback) {
|
|
46631
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAgent>(
|
|
46632
|
+
parameters,
|
|
46633
|
+
callback as BodyResponseCallback<unknown>
|
|
46634
|
+
);
|
|
46635
|
+
} else {
|
|
46636
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaAgent>(
|
|
46637
|
+
parameters
|
|
46638
|
+
);
|
|
46639
|
+
}
|
|
46640
|
+
}
|
|
45165
46641
|
}
|
|
45166
46642
|
|
|
45167
46643
|
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Create
|
|
@@ -45183,6 +46659,20 @@ export namespace discoveryengine_v1alpha {
|
|
|
45183
46659
|
*/
|
|
45184
46660
|
name?: string;
|
|
45185
46661
|
}
|
|
46662
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Disableagent
|
|
46663
|
+
extends StandardParameters {
|
|
46664
|
+
/**
|
|
46665
|
+
* Required. The name of the Agent to disable. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
46666
|
+
*/
|
|
46667
|
+
name?: string;
|
|
46668
|
+
}
|
|
46669
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Enableagent
|
|
46670
|
+
extends StandardParameters {
|
|
46671
|
+
/**
|
|
46672
|
+
* Required. The name of the Agent to enable. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
46673
|
+
*/
|
|
46674
|
+
name?: string;
|
|
46675
|
+
}
|
|
45186
46676
|
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Get
|
|
45187
46677
|
extends StandardParameters {
|
|
45188
46678
|
/**
|
|
@@ -45190,6 +46680,32 @@ export namespace discoveryengine_v1alpha {
|
|
|
45190
46680
|
*/
|
|
45191
46681
|
name?: string;
|
|
45192
46682
|
}
|
|
46683
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getagentview
|
|
46684
|
+
extends StandardParameters {
|
|
46685
|
+
/**
|
|
46686
|
+
* Optional. The UI language currently shown to the user. Specifying this field request that the texts in the AgentView in the response should be translated to this language.
|
|
46687
|
+
*/
|
|
46688
|
+
languageCode?: string;
|
|
46689
|
+
/**
|
|
46690
|
+
* Optional. The maximum number of suggested prompts to return per agent.
|
|
46691
|
+
*/
|
|
46692
|
+
maxSuggestedPrompts?: number;
|
|
46693
|
+
/**
|
|
46694
|
+
* Required. The name of the Agent to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
46695
|
+
*/
|
|
46696
|
+
name?: string;
|
|
46697
|
+
}
|
|
46698
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Getiampolicy
|
|
46699
|
+
extends StandardParameters {
|
|
46700
|
+
/**
|
|
46701
|
+
* Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
|
46702
|
+
*/
|
|
46703
|
+
'options.requestedPolicyVersion'?: number;
|
|
46704
|
+
/**
|
|
46705
|
+
* REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
46706
|
+
*/
|
|
46707
|
+
resource?: string;
|
|
46708
|
+
}
|
|
45193
46709
|
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$List
|
|
45194
46710
|
extends StandardParameters {
|
|
45195
46711
|
/**
|
|
@@ -45225,6 +46741,29 @@ export namespace discoveryengine_v1alpha {
|
|
|
45225
46741
|
*/
|
|
45226
46742
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1alphaAgent;
|
|
45227
46743
|
}
|
|
46744
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Setiampolicy
|
|
46745
|
+
extends StandardParameters {
|
|
46746
|
+
/**
|
|
46747
|
+
* REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
46748
|
+
*/
|
|
46749
|
+
resource?: string;
|
|
46750
|
+
|
|
46751
|
+
/**
|
|
46752
|
+
* Request body metadata
|
|
46753
|
+
*/
|
|
46754
|
+
requestBody?: Schema$GoogleIamV1SetIamPolicyRequest;
|
|
46755
|
+
}
|
|
46756
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Suspendagent
|
|
46757
|
+
extends StandardParameters {
|
|
46758
|
+
/**
|
|
46759
|
+
* Required. The name of the Agent to suspend. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/assistants/{assistant\}/agents/{agent\}`
|
|
46760
|
+
*/
|
|
46761
|
+
name?: string;
|
|
46762
|
+
/**
|
|
46763
|
+
* Required. The reason for suspending the Agent. This will be shown to the users of the Agent.
|
|
46764
|
+
*/
|
|
46765
|
+
suspensionReason?: string;
|
|
46766
|
+
}
|
|
45228
46767
|
|
|
45229
46768
|
export class Resource$Projects$Locations$Collections$Engines$Assistants$Agents$Files {
|
|
45230
46769
|
context: APIRequestContext;
|
|
@@ -76247,10 +77786,15 @@ export namespace discoveryengine_v1alpha {
|
|
|
76247
77786
|
|
|
76248
77787
|
export class Resource$Projects$Locations$Userstores {
|
|
76249
77788
|
context: APIRequestContext;
|
|
77789
|
+
licenseConfigsUsageStats: Resource$Projects$Locations$Userstores$Licenseconfigsusagestats;
|
|
76250
77790
|
operations: Resource$Projects$Locations$Userstores$Operations;
|
|
76251
77791
|
userLicenses: Resource$Projects$Locations$Userstores$Userlicenses;
|
|
76252
77792
|
constructor(context: APIRequestContext) {
|
|
76253
77793
|
this.context = context;
|
|
77794
|
+
this.licenseConfigsUsageStats =
|
|
77795
|
+
new Resource$Projects$Locations$Userstores$Licenseconfigsusagestats(
|
|
77796
|
+
this.context
|
|
77797
|
+
);
|
|
76254
77798
|
this.operations = new Resource$Projects$Locations$Userstores$Operations(
|
|
76255
77799
|
this.context
|
|
76256
77800
|
);
|
|
@@ -77113,6 +78657,176 @@ export namespace discoveryengine_v1alpha {
|
|
|
77113
78657
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1alphaUserStore;
|
|
77114
78658
|
}
|
|
77115
78659
|
|
|
78660
|
+
export class Resource$Projects$Locations$Userstores$Licenseconfigsusagestats {
|
|
78661
|
+
context: APIRequestContext;
|
|
78662
|
+
constructor(context: APIRequestContext) {
|
|
78663
|
+
this.context = context;
|
|
78664
|
+
}
|
|
78665
|
+
|
|
78666
|
+
/**
|
|
78667
|
+
* Lists all the LicenseConfigUsageStatss associated with the project.
|
|
78668
|
+
* @example
|
|
78669
|
+
* ```js
|
|
78670
|
+
* // Before running the sample:
|
|
78671
|
+
* // - Enable the API at:
|
|
78672
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
78673
|
+
* // - Login into gcloud by running:
|
|
78674
|
+
* // ```sh
|
|
78675
|
+
* // $ gcloud auth application-default login
|
|
78676
|
+
* // ```
|
|
78677
|
+
* // - Install the npm module by running:
|
|
78678
|
+
* // ```sh
|
|
78679
|
+
* // $ npm install googleapis
|
|
78680
|
+
* // ```
|
|
78681
|
+
*
|
|
78682
|
+
* const {google} = require('googleapis');
|
|
78683
|
+
* const discoveryengine = google.discoveryengine('v1alpha');
|
|
78684
|
+
*
|
|
78685
|
+
* async function main() {
|
|
78686
|
+
* const auth = new google.auth.GoogleAuth({
|
|
78687
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
78688
|
+
* scopes: [
|
|
78689
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
78690
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
78691
|
+
* ],
|
|
78692
|
+
* });
|
|
78693
|
+
*
|
|
78694
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
78695
|
+
* const authClient = await auth.getClient();
|
|
78696
|
+
* google.options({auth: authClient});
|
|
78697
|
+
*
|
|
78698
|
+
* // Do the magic
|
|
78699
|
+
* const res =
|
|
78700
|
+
* await discoveryengine.projects.locations.userStores.licenseConfigsUsageStats.list(
|
|
78701
|
+
* {
|
|
78702
|
+
* // Required. The parent branch resource name, such as `projects/{project\}/locations/{location\}/userStores/{user_store_id\}`.
|
|
78703
|
+
* parent:
|
|
78704
|
+
* 'projects/my-project/locations/my-location/userStores/my-userStore',
|
|
78705
|
+
* },
|
|
78706
|
+
* );
|
|
78707
|
+
* console.log(res.data);
|
|
78708
|
+
*
|
|
78709
|
+
* // Example response
|
|
78710
|
+
* // {
|
|
78711
|
+
* // "licenseConfigUsageStats": []
|
|
78712
|
+
* // }
|
|
78713
|
+
* }
|
|
78714
|
+
*
|
|
78715
|
+
* main().catch(e => {
|
|
78716
|
+
* console.error(e);
|
|
78717
|
+
* throw e;
|
|
78718
|
+
* });
|
|
78719
|
+
*
|
|
78720
|
+
* ```
|
|
78721
|
+
*
|
|
78722
|
+
* @param params - Parameters for request
|
|
78723
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
78724
|
+
* @param callback - Optional callback that handles the response.
|
|
78725
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
78726
|
+
*/
|
|
78727
|
+
list(
|
|
78728
|
+
params: Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List,
|
|
78729
|
+
options: StreamMethodOptions
|
|
78730
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
78731
|
+
list(
|
|
78732
|
+
params?: Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List,
|
|
78733
|
+
options?: MethodOptions
|
|
78734
|
+
): Promise<
|
|
78735
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>
|
|
78736
|
+
>;
|
|
78737
|
+
list(
|
|
78738
|
+
params: Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List,
|
|
78739
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
78740
|
+
callback: BodyResponseCallback<Readable>
|
|
78741
|
+
): void;
|
|
78742
|
+
list(
|
|
78743
|
+
params: Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List,
|
|
78744
|
+
options:
|
|
78745
|
+
| MethodOptions
|
|
78746
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>,
|
|
78747
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>
|
|
78748
|
+
): void;
|
|
78749
|
+
list(
|
|
78750
|
+
params: Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List,
|
|
78751
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>
|
|
78752
|
+
): void;
|
|
78753
|
+
list(
|
|
78754
|
+
callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>
|
|
78755
|
+
): void;
|
|
78756
|
+
list(
|
|
78757
|
+
paramsOrCallback?:
|
|
78758
|
+
| Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List
|
|
78759
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>
|
|
78760
|
+
| BodyResponseCallback<Readable>,
|
|
78761
|
+
optionsOrCallback?:
|
|
78762
|
+
| MethodOptions
|
|
78763
|
+
| StreamMethodOptions
|
|
78764
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>
|
|
78765
|
+
| BodyResponseCallback<Readable>,
|
|
78766
|
+
callback?:
|
|
78767
|
+
| BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>
|
|
78768
|
+
| BodyResponseCallback<Readable>
|
|
78769
|
+
):
|
|
78770
|
+
| void
|
|
78771
|
+
| Promise<
|
|
78772
|
+
GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>
|
|
78773
|
+
>
|
|
78774
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
78775
|
+
let params = (paramsOrCallback ||
|
|
78776
|
+
{}) as Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List;
|
|
78777
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
78778
|
+
|
|
78779
|
+
if (typeof paramsOrCallback === 'function') {
|
|
78780
|
+
callback = paramsOrCallback;
|
|
78781
|
+
params =
|
|
78782
|
+
{} as Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List;
|
|
78783
|
+
options = {};
|
|
78784
|
+
}
|
|
78785
|
+
|
|
78786
|
+
if (typeof optionsOrCallback === 'function') {
|
|
78787
|
+
callback = optionsOrCallback;
|
|
78788
|
+
options = {};
|
|
78789
|
+
}
|
|
78790
|
+
|
|
78791
|
+
const rootUrl =
|
|
78792
|
+
options.rootUrl || 'https://discoveryengine.googleapis.com/';
|
|
78793
|
+
const parameters = {
|
|
78794
|
+
options: Object.assign(
|
|
78795
|
+
{
|
|
78796
|
+
url: (
|
|
78797
|
+
rootUrl + '/v1alpha/{+parent}/licenseConfigsUsageStats'
|
|
78798
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
78799
|
+
method: 'GET',
|
|
78800
|
+
apiVersion: '',
|
|
78801
|
+
},
|
|
78802
|
+
options
|
|
78803
|
+
),
|
|
78804
|
+
params,
|
|
78805
|
+
requiredParams: ['parent'],
|
|
78806
|
+
pathParams: ['parent'],
|
|
78807
|
+
context: this.context,
|
|
78808
|
+
};
|
|
78809
|
+
if (callback) {
|
|
78810
|
+
createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>(
|
|
78811
|
+
parameters,
|
|
78812
|
+
callback as BodyResponseCallback<unknown>
|
|
78813
|
+
);
|
|
78814
|
+
} else {
|
|
78815
|
+
return createAPIRequest<Schema$GoogleCloudDiscoveryengineV1alphaListLicenseConfigsUsageStatsResponse>(
|
|
78816
|
+
parameters
|
|
78817
|
+
);
|
|
78818
|
+
}
|
|
78819
|
+
}
|
|
78820
|
+
}
|
|
78821
|
+
|
|
78822
|
+
export interface Params$Resource$Projects$Locations$Userstores$Licenseconfigsusagestats$List
|
|
78823
|
+
extends StandardParameters {
|
|
78824
|
+
/**
|
|
78825
|
+
* Required. The parent branch resource name, such as `projects/{project\}/locations/{location\}/userStores/{user_store_id\}`.
|
|
78826
|
+
*/
|
|
78827
|
+
parent?: string;
|
|
78828
|
+
}
|
|
78829
|
+
|
|
77116
78830
|
export class Resource$Projects$Locations$Userstores$Operations {
|
|
77117
78831
|
context: APIRequestContext;
|
|
77118
78832
|
constructor(context: APIRequestContext) {
|
|
@@ -77503,7 +79217,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
77503
79217
|
* // Do the magic
|
|
77504
79218
|
* const res =
|
|
77505
79219
|
* await discoveryengine.projects.locations.userStores.userLicenses.list({
|
|
77506
|
-
* // Optional. Filter for the list request. Supported fields: * `
|
|
79220
|
+
* // Optional. Filter for the list request. Supported fields: * `license`_`assignment`_`state` * `user_principal` * `user_profile` Examples: * `license`_`assignment`_`state = ASSIGNED` to list assigned user licenses. * `license`_`assignment`_`state = NO_LICENSE` to list not licensed users. * `license`_`assignment`_`state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. * `license`_`assignment`_`state != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned.
|
|
77507
79221
|
* filter: 'placeholder-value',
|
|
77508
79222
|
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, defaults to 10. The maximum value is 50; values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT error is returned.
|
|
77509
79223
|
* pageSize: 'placeholder-value',
|
|
@@ -77633,7 +79347,7 @@ export namespace discoveryengine_v1alpha {
|
|
|
77633
79347
|
export interface Params$Resource$Projects$Locations$Userstores$Userlicenses$List
|
|
77634
79348
|
extends StandardParameters {
|
|
77635
79349
|
/**
|
|
77636
|
-
* Optional. Filter for the list request. Supported fields: * `
|
|
79350
|
+
* Optional. Filter for the list request. Supported fields: * `license`_`assignment`_`state` * `user_principal` * `user_profile` Examples: * `license`_`assignment`_`state = ASSIGNED` to list assigned user licenses. * `license`_`assignment`_`state = NO_LICENSE` to list not licensed users. * `license`_`assignment`_`state = NO_LICENSE_ATTEMPTED_LOGIN` to list users who attempted login but no license assigned. * `license`_`assignment`_`state != NO_LICENSE_ATTEMPTED_LOGIN` to filter out users who attempted login but no license assigned.
|
|
77637
79351
|
*/
|
|
77638
79352
|
filter?: string;
|
|
77639
79353
|
/**
|