@googleapis/discoveryengine 33.0.0 → 37.0.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/v1beta.ts CHANGED
@@ -879,6 +879,10 @@ export namespace discoveryengine_v1beta {
879
879
  * Required. Model name (e.g. `gemini-2.5-flash`, `gemini-3.1-pro-preview`). See `model_mixture` for the list of allowed models.
880
880
  */
881
881
  name?: string | null;
882
+ /**
883
+ * Optional. Sent as Vertex `ThinkingConfig.thinking_level`.
884
+ */
885
+ thinkingLevel?: string | null;
882
886
  /**
883
887
  * Optional. Relative weight for this model in the mixture. Must be a finite, strictly positive value. Weights across all entries are normalized server-side, so they need not sum to 1.0. Defaults to 1.0 when unset, which is convenient when configuring a single model or an even mixture. Some Pro-tier models are capped at most 50% of the total weight; requests violating that cap are rejected with INVALID_ARGUMENT.
884
888
  */
@@ -3326,7 +3330,7 @@ export namespace discoveryengine_v1beta {
3326
3330
  */
3327
3331
  displayName?: string | null;
3328
3332
  /**
3329
- * Optional. Feature config for the engine to opt in or opt out of features. Supported keys: * `*`: all features, if it's present, all other feature state settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-org-chart` * `bi-directional-audio` * `speech-to-text` * `feedback` * `session-sharing` * `personalization-memory` * `personalization-suggested-highlights` * `mobile-app-access` * `disable-agent-sharing` * `disable-image-generation` * `disable-video-generation` * `disable-onedrive-upload` * `disable-talk-to-content` * `disable-google-drive-upload` * `disable-welcome-emails` * `disable-canvas` * `canvas-workspace` * `skills` * `skill-sharing` * `skill-sharing-without-admin-approval` * `disable-projects` * `sobi` * `enable-end-user-sharing-with-groups` * `single-agent-orchestration` * `multi-agent-orchestration` * `cross-product-intelligence` * `workflow-agents` * `in-app-notifications`
3333
+ * Optional. Feature config for the engine to opt in or opt out of features. Supported keys: * `*`: all features, if it's present, all other feature state settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-org-chart` * `bi-directional-audio` * `speech-to-text` * `feedback` * `session-sharing` * `personalization-memory` * `personalization-suggested-highlights` * `mobile-app-access` * `disable-agent-sharing` * `disable-image-generation` * `disable-video-generation` * `disable-onedrive-upload` * `disable-talk-to-content` * `disable-google-drive-upload` * `disable-welcome-emails` * `disable-canvas` * `canvas-workspace` * `canvas-app-builder` * `skills` * `skill-sharing` * `skill-sharing-without-admin-approval` * `disable-projects` * `sobi` * `enable-end-user-sharing-with-groups` * `single-agent-orchestration` * `multi-agent-orchestration` * `cross-product-intelligence` * `workflow-agents` * `in-app-notifications`
3330
3334
  */
3331
3335
  features?: {[key: string]: string} | null;
3332
3336
  /**
@@ -3369,6 +3373,10 @@ export namespace discoveryengine_v1beta {
3369
3373
  * Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH.
3370
3374
  */
3371
3375
  searchEngineConfig?: Schema$GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig;
3376
+ /**
3377
+ * Optional. Non-empty default. Session config for the engine.
3378
+ */
3379
+ sessionConfig?: Schema$GoogleCloudDiscoveryengineV1alphaSessionConfig;
3372
3380
  /**
3373
3381
  * Additional config specs for a `similar-items` engine.
3374
3382
  */
@@ -5708,6 +5716,28 @@ export namespace discoveryengine_v1beta {
5708
5716
  */
5709
5717
  userPseudoId?: string | null;
5710
5718
  }
5719
+ /**
5720
+ * Configuration for the session.
5721
+ */
5722
+ export interface Schema$GoogleCloudDiscoveryengineV1alphaSessionConfig {
5723
+ /**
5724
+ * Optional. Session management policy that defines who will manage the session.
5725
+ */
5726
+ sessionManagementPolicy?: string | null;
5727
+ /**
5728
+ * Optional. The TTL for the session. If unset, the default value is 60 days.
5729
+ */
5730
+ sessionTtl?: Schema$GoogleCloudDiscoveryengineV1alphaSessionConfigSessionTtl;
5731
+ }
5732
+ /**
5733
+ * Defines the TTL for sessions.
5734
+ */
5735
+ export interface Schema$GoogleCloudDiscoveryengineV1alphaSessionConfigSessionTtl {
5736
+ /**
5737
+ * Defines the number of days for session TTL.
5738
+ */
5739
+ days?: number | null;
5740
+ }
5711
5741
  /**
5712
5742
  * Represents a turn, including a query from the user and a answer from service.
5713
5743
  */
@@ -6230,6 +6260,10 @@ export namespace discoveryengine_v1beta {
6230
6260
  * Optional. List of banned phrases.
6231
6261
  */
6232
6262
  bannedPhrases?: Schema$GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase[];
6263
+ /**
6264
+ * Optional. Data protection policy to be used for sanitizing file uploads.
6265
+ */
6266
+ dataProtectionPolicy?: Schema$GoogleCloudDiscoveryengineV1DataProtectionPolicy;
6233
6267
  /**
6234
6268
  * Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.
6235
6269
  */
@@ -7807,6 +7841,10 @@ export namespace discoveryengine_v1beta {
7807
7841
  * Optional. List of banned phrases.
7808
7842
  */
7809
7843
  bannedPhrases?: Schema$GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase[];
7844
+ /**
7845
+ * Optional. Data protection policy to be used for sanitizing file uploads.
7846
+ */
7847
+ dataProtectionPolicy?: Schema$GoogleCloudDiscoveryengineV1betaDataProtectionPolicy;
7810
7848
  /**
7811
7849
  * Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.
7812
7850
  */
@@ -9125,6 +9163,24 @@ export namespace discoveryengine_v1beta {
9125
9163
  */
9126
9164
  trainingStartTime?: string | null;
9127
9165
  }
9166
+ /**
9167
+ * Contains the data protection policy config for a DataStore or a connector.
9168
+ */
9169
+ export interface Schema$GoogleCloudDiscoveryengineV1betaDataProtectionPolicy {
9170
+ /**
9171
+ * Optional. Specifies the sensitive data protection policy for the connector source.
9172
+ */
9173
+ sensitiveDataProtectionPolicy?: Schema$GoogleCloudDiscoveryengineV1betaDataProtectionPolicySensitiveDataProtectionPolicy;
9174
+ }
9175
+ /**
9176
+ * Specifies a Sensitive Data Protection (https://cloud.google.com/sensitive-data-protection/docs/sensitive-data-protection-overview) policy.
9177
+ */
9178
+ export interface Schema$GoogleCloudDiscoveryengineV1betaDataProtectionPolicySensitiveDataProtectionPolicy {
9179
+ /**
9180
+ * Optional. Specifies the resource name of the Sensitive Data Protection content policy.
9181
+ */
9182
+ policy?: string | null;
9183
+ }
9128
9184
  /**
9129
9185
  * DataStore captures global settings and configs at the DataStore level.
9130
9186
  */
@@ -9161,6 +9217,10 @@ export namespace discoveryengine_v1beta {
9161
9217
  * Output only. Timestamp the DataStore was created at.
9162
9218
  */
9163
9219
  createTime?: string | null;
9220
+ /**
9221
+ * Optional. Specifies the data protection policy for the data store.
9222
+ */
9223
+ dataProtectionPolicy?: Schema$GoogleCloudDiscoveryengineV1betaDataProtectionPolicy;
9164
9224
  /**
9165
9225
  * Output only. The id of the default Schema associated to this data store.
9166
9226
  */
@@ -9860,7 +9920,7 @@ export namespace discoveryengine_v1beta {
9860
9920
  */
9861
9921
  displayName?: string | null;
9862
9922
  /**
9863
- * Optional. Feature config for the engine to opt in or opt out of features. Supported keys: * `*`: all features, if it's present, all other feature state settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-org-chart` * `bi-directional-audio` * `speech-to-text` * `feedback` * `session-sharing` * `personalization-memory` * `personalization-suggested-highlights` * `mobile-app-access` * `disable-agent-sharing` * `disable-image-generation` * `disable-video-generation` * `disable-onedrive-upload` * `disable-talk-to-content` * `disable-google-drive-upload` * `disable-welcome-emails` * `disable-canvas` * `canvas-workspace` * `skills` * `skill-sharing` * `skill-sharing-without-admin-approval` * `disable-projects` * `sobi` * `enable-end-user-sharing-with-groups` * `single-agent-orchestration` * `multi-agent-orchestration` * `cross-product-intelligence` * `workflow-agents` * `in-app-notifications`
9923
+ * Optional. Feature config for the engine to opt in or opt out of features. Supported keys: * `*`: all features, if it's present, all other feature state settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-org-chart` * `bi-directional-audio` * `speech-to-text` * `feedback` * `session-sharing` * `personalization-memory` * `personalization-suggested-highlights` * `mobile-app-access` * `disable-agent-sharing` * `disable-image-generation` * `disable-video-generation` * `disable-onedrive-upload` * `disable-talk-to-content` * `disable-google-drive-upload` * `disable-welcome-emails` * `disable-canvas` * `canvas-workspace` * `canvas-app-builder` * `skills` * `skill-sharing` * `skill-sharing-without-admin-approval` * `disable-projects` * `sobi` * `enable-end-user-sharing-with-groups` * `single-agent-orchestration` * `multi-agent-orchestration` * `cross-product-intelligence` * `workflow-agents` * `in-app-notifications`
9864
9924
  */
9865
9925
  features?: {[key: string]: string} | null;
9866
9926
  /**
@@ -9899,6 +9959,10 @@ export namespace discoveryengine_v1beta {
9899
9959
  * Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH.
9900
9960
  */
9901
9961
  searchEngineConfig?: Schema$GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig;
9962
+ /**
9963
+ * Optional. Non-empty default. Session config for the engine.
9964
+ */
9965
+ sessionConfig?: Schema$GoogleCloudDiscoveryengineV1betaSessionConfig;
9902
9966
  /**
9903
9967
  * Required. The solutions of the engine.
9904
9968
  */
@@ -13657,6 +13721,28 @@ export namespace discoveryengine_v1beta {
13657
13721
  */
13658
13722
  userPseudoId?: string | null;
13659
13723
  }
13724
+ /**
13725
+ * Configuration for the session.
13726
+ */
13727
+ export interface Schema$GoogleCloudDiscoveryengineV1betaSessionConfig {
13728
+ /**
13729
+ * Optional. Session management policy that defines who will manage the session.
13730
+ */
13731
+ sessionManagementPolicy?: string | null;
13732
+ /**
13733
+ * Optional. The TTL for the session. If unset, the default value is 60 days.
13734
+ */
13735
+ sessionTtl?: Schema$GoogleCloudDiscoveryengineV1betaSessionConfigSessionTtl;
13736
+ }
13737
+ /**
13738
+ * Defines the TTL for sessions.
13739
+ */
13740
+ export interface Schema$GoogleCloudDiscoveryengineV1betaSessionConfigSessionTtl {
13741
+ /**
13742
+ * Defines the number of days for session TTL.
13743
+ */
13744
+ days?: number | null;
13745
+ }
13660
13746
  /**
13661
13747
  * Represents a turn, including a query from the user and a answer from service.
13662
13748
  */
@@ -14808,6 +14894,10 @@ export namespace discoveryengine_v1beta {
14808
14894
  * Output only. Timestamp the DataConnector was created at.
14809
14895
  */
14810
14896
  createTime?: string | null;
14897
+ /**
14898
+ * Optional. Specifies the data protection policy for the connector.
14899
+ */
14900
+ dataProtectionPolicy?: Schema$GoogleCloudDiscoveryengineV1DataProtectionPolicy;
14811
14901
  /**
14812
14902
  * Required. The identifier for the data source. For the full, up-to-date list of supported connectors and their values, see [Connect a third-party data source](https://docs.cloud.google.com/gemini/enterprise/docs/connectors/connect-third-party-data-source#sources-by-launch-stage).
14813
14903
  */
@@ -15071,6 +15161,24 @@ export namespace discoveryengine_v1beta {
15071
15161
  */
15072
15162
  startingSchema?: Schema$GoogleCloudDiscoveryengineV1Schema;
15073
15163
  }
15164
+ /**
15165
+ * Contains the data protection policy config for a DataStore or a connector.
15166
+ */
15167
+ export interface Schema$GoogleCloudDiscoveryengineV1DataProtectionPolicy {
15168
+ /**
15169
+ * Optional. Specifies the sensitive data protection policy for the connector source.
15170
+ */
15171
+ sensitiveDataProtectionPolicy?: Schema$GoogleCloudDiscoveryengineV1DataProtectionPolicySensitiveDataProtectionPolicy;
15172
+ }
15173
+ /**
15174
+ * Specifies a Sensitive Data Protection (https://cloud.google.com/sensitive-data-protection/docs/sensitive-data-protection-overview) policy.
15175
+ */
15176
+ export interface Schema$GoogleCloudDiscoveryengineV1DataProtectionPolicySensitiveDataProtectionPolicy {
15177
+ /**
15178
+ * Optional. Specifies the resource name of the Sensitive Data Protection content policy.
15179
+ */
15180
+ policy?: string | null;
15181
+ }
15074
15182
  /**
15075
15183
  * DataStore captures global settings and configs at the DataStore level.
15076
15184
  */
@@ -15107,6 +15215,10 @@ export namespace discoveryengine_v1beta {
15107
15215
  * Output only. Timestamp the DataStore was created at.
15108
15216
  */
15109
15217
  createTime?: string | null;
15218
+ /**
15219
+ * Optional. Specifies the data protection policy for the data store.
15220
+ */
15221
+ dataProtectionPolicy?: Schema$GoogleCloudDiscoveryengineV1DataProtectionPolicy;
15110
15222
  /**
15111
15223
  * Output only. The id of the default Schema associated to this data store.
15112
15224
  */
@@ -15668,7 +15780,7 @@ export namespace discoveryengine_v1beta {
15668
15780
  */
15669
15781
  displayName?: string | null;
15670
15782
  /**
15671
- * Optional. Feature config for the engine to opt in or opt out of features. Supported keys: * `*`: all features, if it's present, all other feature state settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-org-chart` * `bi-directional-audio` * `speech-to-text` * `feedback` * `session-sharing` * `personalization-memory` * `personalization-suggested-highlights` * `mobile-app-access` * `disable-agent-sharing` * `disable-image-generation` * `disable-video-generation` * `disable-onedrive-upload` * `disable-talk-to-content` * `disable-google-drive-upload` * `disable-welcome-emails` * `disable-canvas` * `canvas-workspace` * `skills` * `skill-sharing` * `skill-sharing-without-admin-approval` * `disable-projects` * `sobi` * `enable-end-user-sharing-with-groups` * `single-agent-orchestration` * `multi-agent-orchestration` * `cross-product-intelligence` * `workflow-agents` * `in-app-notifications`
15783
+ * Optional. Feature config for the engine to opt in or opt out of features. Supported keys: * `*`: all features, if it's present, all other feature state settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-org-chart` * `bi-directional-audio` * `speech-to-text` * `feedback` * `session-sharing` * `personalization-memory` * `personalization-suggested-highlights` * `mobile-app-access` * `disable-agent-sharing` * `disable-image-generation` * `disable-video-generation` * `disable-onedrive-upload` * `disable-talk-to-content` * `disable-google-drive-upload` * `disable-welcome-emails` * `disable-canvas` * `canvas-workspace` * `canvas-app-builder` * `skills` * `skill-sharing` * `skill-sharing-without-admin-approval` * `disable-projects` * `sobi` * `enable-end-user-sharing-with-groups` * `single-agent-orchestration` * `multi-agent-orchestration` * `cross-product-intelligence` * `workflow-agents` * `in-app-notifications`
15672
15784
  */
15673
15785
  features?: {[key: string]: string} | null;
15674
15786
  /**
@@ -15707,6 +15819,10 @@ export namespace discoveryengine_v1beta {
15707
15819
  * Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH.
15708
15820
  */
15709
15821
  searchEngineConfig?: Schema$GoogleCloudDiscoveryengineV1EngineSearchEngineConfig;
15822
+ /**
15823
+ * Optional. Non-empty default. Session config for the engine.
15824
+ */
15825
+ sessionConfig?: Schema$GoogleCloudDiscoveryengineV1SessionConfig;
15710
15826
  /**
15711
15827
  * Required. The solutions of the engine.
15712
15828
  */
@@ -16799,6 +16915,28 @@ export namespace discoveryengine_v1beta {
16799
16915
  */
16800
16916
  demotionEventType?: string | null;
16801
16917
  }
16918
+ /**
16919
+ * Configuration for the session.
16920
+ */
16921
+ export interface Schema$GoogleCloudDiscoveryengineV1SessionConfig {
16922
+ /**
16923
+ * Optional. Session management policy that defines who will manage the session.
16924
+ */
16925
+ sessionManagementPolicy?: string | null;
16926
+ /**
16927
+ * Optional. The TTL for the session. If unset, the default value is 60 days.
16928
+ */
16929
+ sessionTtl?: Schema$GoogleCloudDiscoveryengineV1SessionConfigSessionTtl;
16930
+ }
16931
+ /**
16932
+ * Defines the TTL for sessions.
16933
+ */
16934
+ export interface Schema$GoogleCloudDiscoveryengineV1SessionConfigSessionTtl {
16935
+ /**
16936
+ * Defines the number of days for session TTL.
16937
+ */
16938
+ days?: number | null;
16939
+ }
16802
16940
  /**
16803
16941
  * Metadata for DataConnectorService.SetUpDataConnector method.
16804
16942
  */
@@ -20695,6 +20833,7 @@ export namespace discoveryengine_v1beta {
20695
20833
  * // "configurableBillingApproachUpdateTime": "my_configurableBillingApproachUpdateTime",
20696
20834
  * // "contentConfig": "my_contentConfig",
20697
20835
  * // "createTime": "my_createTime",
20836
+ * // "dataProtectionPolicy": {},
20698
20837
  * // "defaultSchemaId": "my_defaultSchemaId",
20699
20838
  * // "displayName": "my_displayName",
20700
20839
  * // "documentProcessingConfig": {},
@@ -21025,6 +21164,7 @@ export namespace discoveryengine_v1beta {
21025
21164
  * // "configurableBillingApproachUpdateTime": "my_configurableBillingApproachUpdateTime",
21026
21165
  * // "contentConfig": "my_contentConfig",
21027
21166
  * // "createTime": "my_createTime",
21167
+ * // "dataProtectionPolicy": {},
21028
21168
  * // "defaultSchemaId": "my_defaultSchemaId",
21029
21169
  * // "displayName": "my_displayName",
21030
21170
  * // "documentProcessingConfig": {},
@@ -21148,6 +21288,159 @@ export namespace discoveryengine_v1beta {
21148
21288
  }
21149
21289
  }
21150
21290
 
21291
+ /**
21292
+ * Gets the IAM access control policy for a DataStore. 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.
21293
+ * @example
21294
+ * ```js
21295
+ * // Before running the sample:
21296
+ * // - Enable the API at:
21297
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
21298
+ * // - Login into gcloud by running:
21299
+ * // ```sh
21300
+ * // $ gcloud auth application-default login
21301
+ * // ```
21302
+ * // - Install the npm module by running:
21303
+ * // ```sh
21304
+ * // $ npm install googleapis
21305
+ * // ```
21306
+ *
21307
+ * const {google} = require('googleapis');
21308
+ * const discoveryengine = google.discoveryengine('v1beta');
21309
+ *
21310
+ * async function main() {
21311
+ * const auth = new google.auth.GoogleAuth({
21312
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
21313
+ * scopes: [
21314
+ * 'https://www.googleapis.com/auth/cloud-platform',
21315
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
21316
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
21317
+ * ],
21318
+ * });
21319
+ *
21320
+ * // Acquire an auth client, and bind it to all future calls
21321
+ * const authClient = await auth.getClient();
21322
+ * google.options({auth: authClient});
21323
+ *
21324
+ * // Do the magic
21325
+ * const res =
21326
+ * await discoveryengine.projects.locations.collections.dataStores.getIamPolicy(
21327
+ * {
21328
+ * // 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).
21329
+ * 'options.requestedPolicyVersion': 'placeholder-value',
21330
+ * // 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.
21331
+ * resource:
21332
+ * 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
21333
+ * },
21334
+ * );
21335
+ * console.log(res.data);
21336
+ *
21337
+ * // Example response
21338
+ * // {
21339
+ * // "bindings": [],
21340
+ * // "etag": "my_etag",
21341
+ * // "version": 0
21342
+ * // }
21343
+ * }
21344
+ *
21345
+ * main().catch(e => {
21346
+ * console.error(e);
21347
+ * throw e;
21348
+ * });
21349
+ *
21350
+ * ```
21351
+ *
21352
+ * @param params - Parameters for request
21353
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
21354
+ * @param callback - Optional callback that handles the response.
21355
+ * @returns A promise if used with async/await, or void if used with a callback.
21356
+ */
21357
+ getIamPolicy(
21358
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy,
21359
+ options: StreamMethodOptions
21360
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
21361
+ getIamPolicy(
21362
+ params?: Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy,
21363
+ options?: MethodOptions
21364
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>;
21365
+ getIamPolicy(
21366
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy,
21367
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
21368
+ callback: BodyResponseCallback<Readable>
21369
+ ): void;
21370
+ getIamPolicy(
21371
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy,
21372
+ options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1Policy>,
21373
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
21374
+ ): void;
21375
+ getIamPolicy(
21376
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy,
21377
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
21378
+ ): void;
21379
+ getIamPolicy(
21380
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
21381
+ ): void;
21382
+ getIamPolicy(
21383
+ paramsOrCallback?:
21384
+ | Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy
21385
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
21386
+ | BodyResponseCallback<Readable>,
21387
+ optionsOrCallback?:
21388
+ | MethodOptions
21389
+ | StreamMethodOptions
21390
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
21391
+ | BodyResponseCallback<Readable>,
21392
+ callback?:
21393
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
21394
+ | BodyResponseCallback<Readable>
21395
+ ):
21396
+ | void
21397
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>
21398
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
21399
+ let params = (paramsOrCallback ||
21400
+ {}) as Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy;
21401
+ let options = (optionsOrCallback || {}) as MethodOptions;
21402
+
21403
+ if (typeof paramsOrCallback === 'function') {
21404
+ callback = paramsOrCallback;
21405
+ params =
21406
+ {} as Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy;
21407
+ options = {};
21408
+ }
21409
+
21410
+ if (typeof optionsOrCallback === 'function') {
21411
+ callback = optionsOrCallback;
21412
+ options = {};
21413
+ }
21414
+
21415
+ const rootUrl =
21416
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
21417
+ const parameters = {
21418
+ options: Object.assign(
21419
+ {
21420
+ url: (rootUrl + '/v1beta/{+resource}:getIamPolicy').replace(
21421
+ /([^:]\/)\/+/g,
21422
+ '$1'
21423
+ ),
21424
+ method: 'GET',
21425
+ apiVersion: '',
21426
+ },
21427
+ options
21428
+ ),
21429
+ params,
21430
+ requiredParams: ['resource'],
21431
+ pathParams: ['resource'],
21432
+ context: this.context,
21433
+ };
21434
+ if (callback) {
21435
+ createAPIRequest<Schema$GoogleIamV1Policy>(
21436
+ parameters,
21437
+ callback as BodyResponseCallback<unknown>
21438
+ );
21439
+ } else {
21440
+ return createAPIRequest<Schema$GoogleIamV1Policy>(parameters);
21441
+ }
21442
+ }
21443
+
21151
21444
  /**
21152
21445
  * Gets the SiteSearchEngine.
21153
21446
  * @example
@@ -21516,6 +21809,7 @@ export namespace discoveryengine_v1beta {
21516
21809
  * // "configurableBillingApproachUpdateTime": "my_configurableBillingApproachUpdateTime",
21517
21810
  * // "contentConfig": "my_contentConfig",
21518
21811
  * // "createTime": "my_createTime",
21812
+ * // "dataProtectionPolicy": {},
21519
21813
  * // "defaultSchemaId": "my_defaultSchemaId",
21520
21814
  * // "displayName": "my_displayName",
21521
21815
  * // "documentProcessingConfig": {},
@@ -21547,6 +21841,7 @@ export namespace discoveryengine_v1beta {
21547
21841
  * // "configurableBillingApproachUpdateTime": "my_configurableBillingApproachUpdateTime",
21548
21842
  * // "contentConfig": "my_contentConfig",
21549
21843
  * // "createTime": "my_createTime",
21844
+ * // "dataProtectionPolicy": {},
21550
21845
  * // "defaultSchemaId": "my_defaultSchemaId",
21551
21846
  * // "displayName": "my_displayName",
21552
21847
  * // "documentProcessingConfig": {},
@@ -21670,6 +21965,165 @@ export namespace discoveryengine_v1beta {
21670
21965
  }
21671
21966
  }
21672
21967
 
21968
+ /**
21969
+ * Sets the IAM access control policy for a DataStore. A `NOT_FOUND` error is returned if the resource does not exist. **Important:** When setting a policy directly on a DataStore resource, the only recommended roles in the bindings are: `roles/discoveryengine.admin` `roles/discoveryengine.agentspaceAdmin` `roles/discoveryengine.viewer` `roles/discoveryengine.agentspaceViewer` `roles/discoveryengine.user` `roles/discoveryengine.agentspaceUser` Attempting to grant any other role will result in a warning in logging.
21970
+ * @example
21971
+ * ```js
21972
+ * // Before running the sample:
21973
+ * // - Enable the API at:
21974
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
21975
+ * // - Login into gcloud by running:
21976
+ * // ```sh
21977
+ * // $ gcloud auth application-default login
21978
+ * // ```
21979
+ * // - Install the npm module by running:
21980
+ * // ```sh
21981
+ * // $ npm install googleapis
21982
+ * // ```
21983
+ *
21984
+ * const {google} = require('googleapis');
21985
+ * const discoveryengine = google.discoveryengine('v1beta');
21986
+ *
21987
+ * async function main() {
21988
+ * const auth = new google.auth.GoogleAuth({
21989
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
21990
+ * scopes: [
21991
+ * 'https://www.googleapis.com/auth/cloud-platform',
21992
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
21993
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
21994
+ * ],
21995
+ * });
21996
+ *
21997
+ * // Acquire an auth client, and bind it to all future calls
21998
+ * const authClient = await auth.getClient();
21999
+ * google.options({auth: authClient});
22000
+ *
22001
+ * // Do the magic
22002
+ * const res =
22003
+ * await discoveryengine.projects.locations.collections.dataStores.setIamPolicy(
22004
+ * {
22005
+ * // 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.
22006
+ * resource:
22007
+ * 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
22008
+ *
22009
+ * // Request body metadata
22010
+ * requestBody: {
22011
+ * // request body parameters
22012
+ * // {
22013
+ * // "policy": {}
22014
+ * // }
22015
+ * },
22016
+ * },
22017
+ * );
22018
+ * console.log(res.data);
22019
+ *
22020
+ * // Example response
22021
+ * // {
22022
+ * // "bindings": [],
22023
+ * // "etag": "my_etag",
22024
+ * // "version": 0
22025
+ * // }
22026
+ * }
22027
+ *
22028
+ * main().catch(e => {
22029
+ * console.error(e);
22030
+ * throw e;
22031
+ * });
22032
+ *
22033
+ * ```
22034
+ *
22035
+ * @param params - Parameters for request
22036
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
22037
+ * @param callback - Optional callback that handles the response.
22038
+ * @returns A promise if used with async/await, or void if used with a callback.
22039
+ */
22040
+ setIamPolicy(
22041
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy,
22042
+ options: StreamMethodOptions
22043
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
22044
+ setIamPolicy(
22045
+ params?: Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy,
22046
+ options?: MethodOptions
22047
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>;
22048
+ setIamPolicy(
22049
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy,
22050
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
22051
+ callback: BodyResponseCallback<Readable>
22052
+ ): void;
22053
+ setIamPolicy(
22054
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy,
22055
+ options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1Policy>,
22056
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
22057
+ ): void;
22058
+ setIamPolicy(
22059
+ params: Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy,
22060
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
22061
+ ): void;
22062
+ setIamPolicy(
22063
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
22064
+ ): void;
22065
+ setIamPolicy(
22066
+ paramsOrCallback?:
22067
+ | Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy
22068
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
22069
+ | BodyResponseCallback<Readable>,
22070
+ optionsOrCallback?:
22071
+ | MethodOptions
22072
+ | StreamMethodOptions
22073
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
22074
+ | BodyResponseCallback<Readable>,
22075
+ callback?:
22076
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
22077
+ | BodyResponseCallback<Readable>
22078
+ ):
22079
+ | void
22080
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>
22081
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
22082
+ let params = (paramsOrCallback ||
22083
+ {}) as Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy;
22084
+ let options = (optionsOrCallback || {}) as MethodOptions;
22085
+
22086
+ if (typeof paramsOrCallback === 'function') {
22087
+ callback = paramsOrCallback;
22088
+ params =
22089
+ {} as Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy;
22090
+ options = {};
22091
+ }
22092
+
22093
+ if (typeof optionsOrCallback === 'function') {
22094
+ callback = optionsOrCallback;
22095
+ options = {};
22096
+ }
22097
+
22098
+ const rootUrl =
22099
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
22100
+ const parameters = {
22101
+ options: Object.assign(
22102
+ {
22103
+ url: (rootUrl + '/v1beta/{+resource}:setIamPolicy').replace(
22104
+ /([^:]\/)\/+/g,
22105
+ '$1'
22106
+ ),
22107
+ method: 'POST',
22108
+ apiVersion: '',
22109
+ },
22110
+ options
22111
+ ),
22112
+ params,
22113
+ requiredParams: ['resource'],
22114
+ pathParams: ['resource'],
22115
+ context: this.context,
22116
+ };
22117
+ if (callback) {
22118
+ createAPIRequest<Schema$GoogleIamV1Policy>(
22119
+ parameters,
22120
+ callback as BodyResponseCallback<unknown>
22121
+ );
22122
+ } else {
22123
+ return createAPIRequest<Schema$GoogleIamV1Policy>(parameters);
22124
+ }
22125
+ }
22126
+
21673
22127
  /**
21674
22128
  * Trains a custom model.
21675
22129
  * @example
@@ -21901,6 +22355,16 @@ export namespace discoveryengine_v1beta {
21901
22355
  */
21902
22356
  name?: string;
21903
22357
  }
22358
+ export interface Params$Resource$Projects$Locations$Collections$Datastores$Getiampolicy extends StandardParameters {
22359
+ /**
22360
+ * 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).
22361
+ */
22362
+ 'options.requestedPolicyVersion'?: number;
22363
+ /**
22364
+ * 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.
22365
+ */
22366
+ resource?: string;
22367
+ }
21904
22368
  export interface Params$Resource$Projects$Locations$Collections$Datastores$Getsitesearchengine extends StandardParameters {
21905
22369
  /**
21906
22370
  * Required. Resource name of SiteSearchEngine, such as `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
@@ -21940,6 +22404,17 @@ export namespace discoveryengine_v1beta {
21940
22404
  */
21941
22405
  requestBody?: Schema$GoogleCloudDiscoveryengineV1betaDataStore;
21942
22406
  }
22407
+ export interface Params$Resource$Projects$Locations$Collections$Datastores$Setiampolicy extends StandardParameters {
22408
+ /**
22409
+ * 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.
22410
+ */
22411
+ resource?: string;
22412
+
22413
+ /**
22414
+ * Request body metadata
22415
+ */
22416
+ requestBody?: Schema$GoogleIamV1SetIamPolicyRequest;
22417
+ }
21943
22418
  export interface Params$Resource$Projects$Locations$Collections$Datastores$Traincustommodel extends StandardParameters {
21944
22419
  /**
21945
22420
  * Required. The resource name of the Data Store, such as `projects/x/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models.
@@ -36014,6 +36489,7 @@ export namespace discoveryengine_v1beta {
36014
36489
  * // "observabilityConfig": {},
36015
36490
  * // "procurementContactEmails": [],
36016
36491
  * // "searchEngineConfig": {},
36492
+ * // "sessionConfig": {},
36017
36493
  * // "solutionType": "my_solutionType",
36018
36494
  * // "updateTime": "my_updateTime"
36019
36495
  * // }
@@ -36344,6 +36820,7 @@ export namespace discoveryengine_v1beta {
36344
36820
  * // "observabilityConfig": {},
36345
36821
  * // "procurementContactEmails": [],
36346
36822
  * // "searchEngineConfig": {},
36823
+ * // "sessionConfig": {},
36347
36824
  * // "solutionType": "my_solutionType",
36348
36825
  * // "updateTime": "my_updateTime"
36349
36826
  * // }
@@ -36835,6 +37312,7 @@ export namespace discoveryengine_v1beta {
36835
37312
  * // "observabilityConfig": {},
36836
37313
  * // "procurementContactEmails": [],
36837
37314
  * // "searchEngineConfig": {},
37315
+ * // "sessionConfig": {},
36838
37316
  * // "solutionType": "my_solutionType",
36839
37317
  * // "updateTime": "my_updateTime"
36840
37318
  * // }
@@ -36867,6 +37345,7 @@ export namespace discoveryengine_v1beta {
36867
37345
  * // "observabilityConfig": {},
36868
37346
  * // "procurementContactEmails": [],
36869
37347
  * // "searchEngineConfig": {},
37348
+ * // "sessionConfig": {},
36870
37349
  * // "solutionType": "my_solutionType",
36871
37350
  * // "updateTime": "my_updateTime"
36872
37351
  * // }
@@ -37048,6 +37527,7 @@ export namespace discoveryengine_v1beta {
37048
37527
  * // "observabilityConfig": {},
37049
37528
  * // "procurementContactEmails": [],
37050
37529
  * // "searchEngineConfig": {},
37530
+ * // "sessionConfig": {},
37051
37531
  * // "solutionType": "my_solutionType",
37052
37532
  * // "updateTime": "my_updateTime"
37053
37533
  * // }
@@ -37232,6 +37712,7 @@ export namespace discoveryengine_v1beta {
37232
37712
  * // "observabilityConfig": {},
37233
37713
  * // "procurementContactEmails": [],
37234
37714
  * // "searchEngineConfig": {},
37715
+ * // "sessionConfig": {},
37235
37716
  * // "solutionType": "my_solutionType",
37236
37717
  * // "updateTime": "my_updateTime"
37237
37718
  * // }
@@ -45458,6 +45939,7 @@ export namespace discoveryengine_v1beta {
45458
45939
  * // "configurableBillingApproachUpdateTime": "my_configurableBillingApproachUpdateTime",
45459
45940
  * // "contentConfig": "my_contentConfig",
45460
45941
  * // "createTime": "my_createTime",
45942
+ * // "dataProtectionPolicy": {},
45461
45943
  * // "defaultSchemaId": "my_defaultSchemaId",
45462
45944
  * // "displayName": "my_displayName",
45463
45945
  * // "documentProcessingConfig": {},
@@ -45784,6 +46266,7 @@ export namespace discoveryengine_v1beta {
45784
46266
  * // "configurableBillingApproachUpdateTime": "my_configurableBillingApproachUpdateTime",
45785
46267
  * // "contentConfig": "my_contentConfig",
45786
46268
  * // "createTime": "my_createTime",
46269
+ * // "dataProtectionPolicy": {},
45787
46270
  * // "defaultSchemaId": "my_defaultSchemaId",
45788
46271
  * // "displayName": "my_displayName",
45789
46272
  * // "documentProcessingConfig": {},
@@ -45906,6 +46389,156 @@ export namespace discoveryengine_v1beta {
45906
46389
  }
45907
46390
  }
45908
46391
 
46392
+ /**
46393
+ * Gets the IAM access control policy for a DataStore. 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.
46394
+ * @example
46395
+ * ```js
46396
+ * // Before running the sample:
46397
+ * // - Enable the API at:
46398
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
46399
+ * // - Login into gcloud by running:
46400
+ * // ```sh
46401
+ * // $ gcloud auth application-default login
46402
+ * // ```
46403
+ * // - Install the npm module by running:
46404
+ * // ```sh
46405
+ * // $ npm install googleapis
46406
+ * // ```
46407
+ *
46408
+ * const {google} = require('googleapis');
46409
+ * const discoveryengine = google.discoveryengine('v1beta');
46410
+ *
46411
+ * async function main() {
46412
+ * const auth = new google.auth.GoogleAuth({
46413
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
46414
+ * scopes: [
46415
+ * 'https://www.googleapis.com/auth/cloud-platform',
46416
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
46417
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
46418
+ * ],
46419
+ * });
46420
+ *
46421
+ * // Acquire an auth client, and bind it to all future calls
46422
+ * const authClient = await auth.getClient();
46423
+ * google.options({auth: authClient});
46424
+ *
46425
+ * // Do the magic
46426
+ * const res = await discoveryengine.projects.locations.dataStores.getIamPolicy({
46427
+ * // 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).
46428
+ * 'options.requestedPolicyVersion': 'placeholder-value',
46429
+ * // 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.
46430
+ * resource:
46431
+ * 'projects/my-project/locations/my-location/dataStores/my-dataStore',
46432
+ * });
46433
+ * console.log(res.data);
46434
+ *
46435
+ * // Example response
46436
+ * // {
46437
+ * // "bindings": [],
46438
+ * // "etag": "my_etag",
46439
+ * // "version": 0
46440
+ * // }
46441
+ * }
46442
+ *
46443
+ * main().catch(e => {
46444
+ * console.error(e);
46445
+ * throw e;
46446
+ * });
46447
+ *
46448
+ * ```
46449
+ *
46450
+ * @param params - Parameters for request
46451
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
46452
+ * @param callback - Optional callback that handles the response.
46453
+ * @returns A promise if used with async/await, or void if used with a callback.
46454
+ */
46455
+ getIamPolicy(
46456
+ params: Params$Resource$Projects$Locations$Datastores$Getiampolicy,
46457
+ options: StreamMethodOptions
46458
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
46459
+ getIamPolicy(
46460
+ params?: Params$Resource$Projects$Locations$Datastores$Getiampolicy,
46461
+ options?: MethodOptions
46462
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>;
46463
+ getIamPolicy(
46464
+ params: Params$Resource$Projects$Locations$Datastores$Getiampolicy,
46465
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
46466
+ callback: BodyResponseCallback<Readable>
46467
+ ): void;
46468
+ getIamPolicy(
46469
+ params: Params$Resource$Projects$Locations$Datastores$Getiampolicy,
46470
+ options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1Policy>,
46471
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
46472
+ ): void;
46473
+ getIamPolicy(
46474
+ params: Params$Resource$Projects$Locations$Datastores$Getiampolicy,
46475
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
46476
+ ): void;
46477
+ getIamPolicy(
46478
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
46479
+ ): void;
46480
+ getIamPolicy(
46481
+ paramsOrCallback?:
46482
+ | Params$Resource$Projects$Locations$Datastores$Getiampolicy
46483
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
46484
+ | BodyResponseCallback<Readable>,
46485
+ optionsOrCallback?:
46486
+ | MethodOptions
46487
+ | StreamMethodOptions
46488
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
46489
+ | BodyResponseCallback<Readable>,
46490
+ callback?:
46491
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
46492
+ | BodyResponseCallback<Readable>
46493
+ ):
46494
+ | void
46495
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>
46496
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
46497
+ let params = (paramsOrCallback ||
46498
+ {}) as Params$Resource$Projects$Locations$Datastores$Getiampolicy;
46499
+ let options = (optionsOrCallback || {}) as MethodOptions;
46500
+
46501
+ if (typeof paramsOrCallback === 'function') {
46502
+ callback = paramsOrCallback;
46503
+ params =
46504
+ {} as Params$Resource$Projects$Locations$Datastores$Getiampolicy;
46505
+ options = {};
46506
+ }
46507
+
46508
+ if (typeof optionsOrCallback === 'function') {
46509
+ callback = optionsOrCallback;
46510
+ options = {};
46511
+ }
46512
+
46513
+ const rootUrl =
46514
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
46515
+ const parameters = {
46516
+ options: Object.assign(
46517
+ {
46518
+ url: (rootUrl + '/v1beta/{+resource}:getIamPolicy').replace(
46519
+ /([^:]\/)\/+/g,
46520
+ '$1'
46521
+ ),
46522
+ method: 'GET',
46523
+ apiVersion: '',
46524
+ },
46525
+ options
46526
+ ),
46527
+ params,
46528
+ requiredParams: ['resource'],
46529
+ pathParams: ['resource'],
46530
+ context: this.context,
46531
+ };
46532
+ if (callback) {
46533
+ createAPIRequest<Schema$GoogleIamV1Policy>(
46534
+ parameters,
46535
+ callback as BodyResponseCallback<unknown>
46536
+ );
46537
+ } else {
46538
+ return createAPIRequest<Schema$GoogleIamV1Policy>(parameters);
46539
+ }
46540
+ }
46541
+
45909
46542
  /**
45910
46543
  * Gets the SiteSearchEngine.
45911
46544
  * @example
@@ -46268,6 +46901,7 @@ export namespace discoveryengine_v1beta {
46268
46901
  * // "configurableBillingApproachUpdateTime": "my_configurableBillingApproachUpdateTime",
46269
46902
  * // "contentConfig": "my_contentConfig",
46270
46903
  * // "createTime": "my_createTime",
46904
+ * // "dataProtectionPolicy": {},
46271
46905
  * // "defaultSchemaId": "my_defaultSchemaId",
46272
46906
  * // "displayName": "my_displayName",
46273
46907
  * // "documentProcessingConfig": {},
@@ -46299,6 +46933,7 @@ export namespace discoveryengine_v1beta {
46299
46933
  * // "configurableBillingApproachUpdateTime": "my_configurableBillingApproachUpdateTime",
46300
46934
  * // "contentConfig": "my_contentConfig",
46301
46935
  * // "createTime": "my_createTime",
46936
+ * // "dataProtectionPolicy": {},
46302
46937
  * // "defaultSchemaId": "my_defaultSchemaId",
46303
46938
  * // "displayName": "my_displayName",
46304
46939
  * // "documentProcessingConfig": {},
@@ -46420,6 +47055,162 @@ export namespace discoveryengine_v1beta {
46420
47055
  );
46421
47056
  }
46422
47057
  }
47058
+
47059
+ /**
47060
+ * Sets the IAM access control policy for a DataStore. A `NOT_FOUND` error is returned if the resource does not exist. **Important:** When setting a policy directly on a DataStore resource, the only recommended roles in the bindings are: `roles/discoveryengine.admin` `roles/discoveryengine.agentspaceAdmin` `roles/discoveryengine.viewer` `roles/discoveryengine.agentspaceViewer` `roles/discoveryengine.user` `roles/discoveryengine.agentspaceUser` Attempting to grant any other role will result in a warning in logging.
47061
+ * @example
47062
+ * ```js
47063
+ * // Before running the sample:
47064
+ * // - Enable the API at:
47065
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
47066
+ * // - Login into gcloud by running:
47067
+ * // ```sh
47068
+ * // $ gcloud auth application-default login
47069
+ * // ```
47070
+ * // - Install the npm module by running:
47071
+ * // ```sh
47072
+ * // $ npm install googleapis
47073
+ * // ```
47074
+ *
47075
+ * const {google} = require('googleapis');
47076
+ * const discoveryengine = google.discoveryengine('v1beta');
47077
+ *
47078
+ * async function main() {
47079
+ * const auth = new google.auth.GoogleAuth({
47080
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
47081
+ * scopes: [
47082
+ * 'https://www.googleapis.com/auth/cloud-platform',
47083
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
47084
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
47085
+ * ],
47086
+ * });
47087
+ *
47088
+ * // Acquire an auth client, and bind it to all future calls
47089
+ * const authClient = await auth.getClient();
47090
+ * google.options({auth: authClient});
47091
+ *
47092
+ * // Do the magic
47093
+ * const res = await discoveryengine.projects.locations.dataStores.setIamPolicy({
47094
+ * // 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.
47095
+ * resource:
47096
+ * 'projects/my-project/locations/my-location/dataStores/my-dataStore',
47097
+ *
47098
+ * // Request body metadata
47099
+ * requestBody: {
47100
+ * // request body parameters
47101
+ * // {
47102
+ * // "policy": {}
47103
+ * // }
47104
+ * },
47105
+ * });
47106
+ * console.log(res.data);
47107
+ *
47108
+ * // Example response
47109
+ * // {
47110
+ * // "bindings": [],
47111
+ * // "etag": "my_etag",
47112
+ * // "version": 0
47113
+ * // }
47114
+ * }
47115
+ *
47116
+ * main().catch(e => {
47117
+ * console.error(e);
47118
+ * throw e;
47119
+ * });
47120
+ *
47121
+ * ```
47122
+ *
47123
+ * @param params - Parameters for request
47124
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
47125
+ * @param callback - Optional callback that handles the response.
47126
+ * @returns A promise if used with async/await, or void if used with a callback.
47127
+ */
47128
+ setIamPolicy(
47129
+ params: Params$Resource$Projects$Locations$Datastores$Setiampolicy,
47130
+ options: StreamMethodOptions
47131
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
47132
+ setIamPolicy(
47133
+ params?: Params$Resource$Projects$Locations$Datastores$Setiampolicy,
47134
+ options?: MethodOptions
47135
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>;
47136
+ setIamPolicy(
47137
+ params: Params$Resource$Projects$Locations$Datastores$Setiampolicy,
47138
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
47139
+ callback: BodyResponseCallback<Readable>
47140
+ ): void;
47141
+ setIamPolicy(
47142
+ params: Params$Resource$Projects$Locations$Datastores$Setiampolicy,
47143
+ options: MethodOptions | BodyResponseCallback<Schema$GoogleIamV1Policy>,
47144
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
47145
+ ): void;
47146
+ setIamPolicy(
47147
+ params: Params$Resource$Projects$Locations$Datastores$Setiampolicy,
47148
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
47149
+ ): void;
47150
+ setIamPolicy(
47151
+ callback: BodyResponseCallback<Schema$GoogleIamV1Policy>
47152
+ ): void;
47153
+ setIamPolicy(
47154
+ paramsOrCallback?:
47155
+ | Params$Resource$Projects$Locations$Datastores$Setiampolicy
47156
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
47157
+ | BodyResponseCallback<Readable>,
47158
+ optionsOrCallback?:
47159
+ | MethodOptions
47160
+ | StreamMethodOptions
47161
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
47162
+ | BodyResponseCallback<Readable>,
47163
+ callback?:
47164
+ | BodyResponseCallback<Schema$GoogleIamV1Policy>
47165
+ | BodyResponseCallback<Readable>
47166
+ ):
47167
+ | void
47168
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleIamV1Policy>>
47169
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
47170
+ let params = (paramsOrCallback ||
47171
+ {}) as Params$Resource$Projects$Locations$Datastores$Setiampolicy;
47172
+ let options = (optionsOrCallback || {}) as MethodOptions;
47173
+
47174
+ if (typeof paramsOrCallback === 'function') {
47175
+ callback = paramsOrCallback;
47176
+ params =
47177
+ {} as Params$Resource$Projects$Locations$Datastores$Setiampolicy;
47178
+ options = {};
47179
+ }
47180
+
47181
+ if (typeof optionsOrCallback === 'function') {
47182
+ callback = optionsOrCallback;
47183
+ options = {};
47184
+ }
47185
+
47186
+ const rootUrl =
47187
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
47188
+ const parameters = {
47189
+ options: Object.assign(
47190
+ {
47191
+ url: (rootUrl + '/v1beta/{+resource}:setIamPolicy').replace(
47192
+ /([^:]\/)\/+/g,
47193
+ '$1'
47194
+ ),
47195
+ method: 'POST',
47196
+ apiVersion: '',
47197
+ },
47198
+ options
47199
+ ),
47200
+ params,
47201
+ requiredParams: ['resource'],
47202
+ pathParams: ['resource'],
47203
+ context: this.context,
47204
+ };
47205
+ if (callback) {
47206
+ createAPIRequest<Schema$GoogleIamV1Policy>(
47207
+ parameters,
47208
+ callback as BodyResponseCallback<unknown>
47209
+ );
47210
+ } else {
47211
+ return createAPIRequest<Schema$GoogleIamV1Policy>(parameters);
47212
+ }
47213
+ }
46423
47214
  }
46424
47215
 
46425
47216
  export interface Params$Resource$Projects$Locations$Datastores$Completequery extends StandardParameters {
@@ -46487,6 +47278,16 @@ export namespace discoveryengine_v1beta {
46487
47278
  */
46488
47279
  name?: string;
46489
47280
  }
47281
+ export interface Params$Resource$Projects$Locations$Datastores$Getiampolicy extends StandardParameters {
47282
+ /**
47283
+ * 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).
47284
+ */
47285
+ 'options.requestedPolicyVersion'?: number;
47286
+ /**
47287
+ * 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.
47288
+ */
47289
+ resource?: string;
47290
+ }
46490
47291
  export interface Params$Resource$Projects$Locations$Datastores$Getsitesearchengine extends StandardParameters {
46491
47292
  /**
46492
47293
  * Required. Resource name of SiteSearchEngine, such as `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
@@ -46526,6 +47327,17 @@ export namespace discoveryengine_v1beta {
46526
47327
  */
46527
47328
  requestBody?: Schema$GoogleCloudDiscoveryengineV1betaDataStore;
46528
47329
  }
47330
+ export interface Params$Resource$Projects$Locations$Datastores$Setiampolicy extends StandardParameters {
47331
+ /**
47332
+ * 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.
47333
+ */
47334
+ resource?: string;
47335
+
47336
+ /**
47337
+ * Request body metadata
47338
+ */
47339
+ requestBody?: Schema$GoogleIamV1SetIamPolicyRequest;
47340
+ }
46529
47341
 
46530
47342
  export class Resource$Projects$Locations$Datastores$Branches {
46531
47343
  context: APIRequestContext;