// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Discovery Engine API Client for Deno * ==================================== * * Discovery Engine API. * * Docs: https://cloud.google.com/generative-ai-app-builder/docs/ * Source: https://googleapis.deno.dev/v1/discoveryengine:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * Discovery Engine API. */ export class DiscoveryEngine { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://discoveryengine.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Downloads a file from the session. * * @param name Required. The resource name of the Session. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` */ async mediaDownload(name: string, opts: MediaDownloadOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:downloadFile`); if (opts.fileId !== undefined) { url.searchParams.append("fileId", String(opts.fileId)); } if (opts.viewId !== undefined) { url.searchParams.append("viewId", String(opts.viewId)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGdataMedia(data); } /** * De-provisions a CmekConfig. * * @param name Required. The resource name of the CmekConfig to delete, such as `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. */ async projectsLocationsCmekConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets the CmekConfig. * * @param name Required. Resource name of CmekConfig, such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the CmekConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. */ async projectsLocationsCmekConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1CmekConfig; } /** * Lists all the CmekConfigs with the project. * * @param parent Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list CmekConfigs under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. */ async projectsLocationsCmekConfigsList(parent: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/cmekConfigs`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListCmekConfigsResponse; } /** * Provisions a CMEK key for use in a location of a customer's project. This * method will also conduct location validation on the provided cmekConfig to * make sure the key is valid and can be used in the selected location. * * @param name Required. The name of the CmekConfig of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. */ async projectsLocationsCmekConfigsPatch(name: string, req: GoogleCloudDiscoveryengineV1CmekConfig, opts: ProjectsLocationsCmekConfigsPatchOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.setDefault !== undefined) { url.searchParams.append("setDefault", String(opts.setDefault)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleLongrunningOperation; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsDataConnectorOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsDataConnectorOperationsList(name: string, opts: ProjectsLocationsCollectionsDataConnectorOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Gets index freshness metadata for Documents. Supported for website search * only. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. */ async projectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadata(parent: string, opts: ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/batchGetDocumentsMetadata`); if (opts["matcher.fhirMatcher.fhirResources"] !== undefined) { url.searchParams.append("matcher.fhirMatcher.fhirResources", String(opts["matcher.fhirMatcher.fhirResources"])); } if (opts["matcher.urisMatcher.uris"] !== undefined) { url.searchParams.append("matcher.urisMatcher.uris", String(opts["matcher.urisMatcher.uris"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse(data); } /** * Creates a Document. * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. */ async projectsLocationsCollectionsDataStoresBranchesDocumentsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Document, opts: ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Document(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/documents`); if (opts.documentId !== undefined) { url.searchParams.append("documentId", String(opts.documentId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1Document(data); } /** * Deletes a Document. * * @param name Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned. */ async projectsLocationsCollectionsDataStoresBranchesDocumentsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Document. * * @param name Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned. */ async projectsLocationsCollectionsDataStoresBranchesDocumentsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Document(data); } /** * Bulk import of multiple Documents. Request processing may be synchronous. * Non-existing items are created. Note: It is possible for a subset of the * Documents to be successfully updated. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission. */ async projectsLocationsCollectionsDataStoresBranchesDocumentsImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportDocumentsRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ImportDocumentsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/documents:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Gets a list of Documents. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned. */ async projectsLocationsCollectionsDataStoresBranchesDocumentsList(parent: string, opts: ProjectsLocationsCollectionsDataStoresBranchesDocumentsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/documents`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListDocumentsResponse(data); } /** * Updates a Document. * * @param name Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsCollectionsDataStoresBranchesDocumentsPatch(name: string, req: GoogleCloudDiscoveryengineV1Document, opts: ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Document(req); opts = serializeProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Document(data); } /** * Permanently deletes all selected Documents in a branch. This process is * asynchronous. Depending on the number of Documents to be deleted, this * operation can take hours to complete. Before the delete operation * completes, some Documents might still be returned by * DocumentService.GetDocument or DocumentService.ListDocuments. To get a list * of the Documents to be deleted, set PurgeDocumentsRequest.force to false. * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. */ async projectsLocationsCollectionsDataStoresBranchesDocumentsPurge(parent: string, req: GoogleCloudDiscoveryengineV1PurgeDocumentsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/documents:purge`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsLocationsCollectionsDataStoresBranchesOperationsCancel(name: string, req: GoogleLongrunningCancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsDataStoresBranchesOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsDataStoresBranchesOperationsList(name: string, opts: ProjectsLocationsCollectionsDataStoresBranchesOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Completes the specified user input with keyword suggestions. * * @param dataStore Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. */ async projectsLocationsCollectionsDataStoresCompleteQuery(dataStore: string, opts: ProjectsLocationsCollectionsDataStoresCompleteQueryOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ dataStore }:completeQuery`); if (opts.includeTailSuggestions !== undefined) { url.searchParams.append("includeTailSuggestions", String(opts.includeTailSuggestions)); } if (opts.query !== undefined) { url.searchParams.append("query", String(opts.query)); } if (opts.queryModel !== undefined) { url.searchParams.append("queryModel", String(opts.queryModel)); } if (opts.userPseudoId !== undefined) { url.searchParams.append("userPseudoId", String(opts.userPseudoId)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1CompleteQueryResponse; } /** * Completes the user input with advanced keyword suggestions. * * @param completionConfig Required. The completion_config of the parent dataStore or engine resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig` `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`. */ async projectsLocationsCollectionsDataStoresCompletionConfigCompleteQuery(completionConfig: string, req: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ completionConfig }:completeQuery`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse(data); } /** * Imports CompletionSuggestions for a DataStore. * * @param parent Required. The parent data store resource name for which to import customer autocomplete suggestions. Follows pattern `projects/*/locations/*/collections/*/dataStores/*` */ async projectsLocationsCollectionsDataStoresCompletionSuggestionsImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/completionSuggestions:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Permanently deletes all CompletionSuggestions for a DataStore. * * @param parent Required. The parent data store resource name for which to purge completion suggestions. Follows pattern projects/*/locations/*/collections/*/dataStores/*. */ async projectsLocationsCollectionsDataStoresCompletionSuggestionsPurge(parent: string, req: GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/completionSuggestions:purge`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a Control. By default 1000 controls are allowed for a data store. * A request can be submitted to adjust this limit. If the Control to create * already exists, an ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. */ async projectsLocationsCollectionsDataStoresControlsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Control, opts: ProjectsLocationsCollectionsDataStoresControlsCreateOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Control(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/controls`); if (opts.controlId !== undefined) { url.searchParams.append("controlId", String(opts.controlId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Deletes a Control. If the Control to delete does not exist, a NOT_FOUND * error is returned. * * @param name Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}` */ async projectsLocationsCollectionsDataStoresControlsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Control. * * @param name Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}` */ async projectsLocationsCollectionsDataStoresControlsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Lists all Controls by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. */ async projectsLocationsCollectionsDataStoresControlsList(parent: string, opts: ProjectsLocationsCollectionsDataStoresControlsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/controls`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListControlsResponse(data); } /** * Updates a Control. Control action type cannot be changed. If the Control * to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` */ async projectsLocationsCollectionsDataStoresControlsPatch(name: string, req: GoogleCloudDiscoveryengineV1Control, opts: ProjectsLocationsCollectionsDataStoresControlsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Control(req); opts = serializeProjectsLocationsCollectionsDataStoresControlsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Converses a conversation. * * @param name Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session. */ async projectsLocationsCollectionsDataStoresConversationsConverse(name: string, req: GoogleCloudDiscoveryengineV1ConverseConversationRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ConverseConversationRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:converse`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1ConverseConversationResponse(data); } /** * Creates a Conversation. If the Conversation to create already exists, an * ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsCollectionsDataStoresConversationsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Conversation): Promise { req = serializeGoogleCloudDiscoveryengineV1Conversation(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Deletes a Conversation. If the Conversation to delete does not exist, a * NOT_FOUND error is returned. * * @param name Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` */ async projectsLocationsCollectionsDataStoresConversationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Conversation. * * @param name Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` */ async projectsLocationsCollectionsDataStoresConversationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Lists all Conversations by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsCollectionsDataStoresConversationsList(parent: string, opts: ProjectsLocationsCollectionsDataStoresConversationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListConversationsResponse(data); } /** * Updates a Conversation. Conversation action type cannot be changed. If the * Conversation to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. */ async projectsLocationsCollectionsDataStoresConversationsPatch(name: string, req: GoogleCloudDiscoveryengineV1Conversation, opts: ProjectsLocationsCollectionsDataStoresConversationsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Conversation(req); opts = serializeProjectsLocationsCollectionsDataStoresConversationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Creates a DataStore. DataStore is for storing Documents. To serve these * documents for Search, or Recommendation use case, an Engine needs to be * created separately. * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. */ async projectsLocationsCollectionsDataStoresCreate(parent: string, req: GoogleCloudDiscoveryengineV1DataStore, opts: ProjectsLocationsCollectionsDataStoresCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/dataStores`); if (opts.cmekConfigName !== undefined) { url.searchParams.append("cmekConfigName", String(opts.cmekConfigName)); } if (opts.createAdvancedSiteSearch !== undefined) { url.searchParams.append("createAdvancedSiteSearch", String(opts.createAdvancedSiteSearch)); } if (opts.dataStoreId !== undefined) { url.searchParams.append("dataStoreId", String(opts.dataStoreId)); } if (opts.disableCmek !== undefined) { url.searchParams.append("disableCmek", String(opts.disableCmek)); } if (opts.skipDefaultSchemaCreation !== undefined) { url.searchParams.append("skipDefaultSchemaCreation", String(opts.skipDefaultSchemaCreation)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Gets a list of all the custom models. * * @param dataStore Required. The resource name of the parent Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to fetch the models from. */ async projectsLocationsCollectionsDataStoresCustomModelsList(dataStore: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ dataStore }/customModels`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListCustomModelsResponse(data); } /** * Deletes a DataStore. * * @param name Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned. */ async projectsLocationsCollectionsDataStoresDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets a DataStore. * * @param name Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned. */ async projectsLocationsCollectionsDataStoresGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1DataStore; } /** * Gets the SiteSearchEngine. * * @param name 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. */ async projectsLocationsCollectionsDataStoresGetSiteSearchEngine(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1SiteSearchEngine; } /** * Lists all the DataStores associated with the project. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned. */ async projectsLocationsCollectionsDataStoresList(parent: string, opts: ProjectsLocationsCollectionsDataStoresListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/dataStores`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListDataStoresResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsDataStoresModelsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsDataStoresModelsOperationsList(name: string, opts: ProjectsLocationsCollectionsDataStoresModelsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsDataStoresOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsDataStoresOperationsList(name: string, opts: ProjectsLocationsCollectionsDataStoresOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Updates a DataStore * * @param name Immutable. Identifier. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsCollectionsDataStoresPatch(name: string, req: GoogleCloudDiscoveryengineV1DataStore, opts: ProjectsLocationsCollectionsDataStoresPatchOptions = {}): Promise { opts = serializeProjectsLocationsCollectionsDataStoresPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1DataStore; } /** * Creates a Schema. * * @param parent Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. */ async projectsLocationsCollectionsDataStoresSchemasCreate(parent: string, req: GoogleCloudDiscoveryengineV1Schema, opts: ProjectsLocationsCollectionsDataStoresSchemasCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/schemas`); if (opts.schemaId !== undefined) { url.searchParams.append("schemaId", String(opts.schemaId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a Schema. * * @param name Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. */ async projectsLocationsCollectionsDataStoresSchemasDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets a Schema. * * @param name Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. */ async projectsLocationsCollectionsDataStoresSchemasGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1Schema; } /** * Gets a list of Schemas. * * @param parent Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. */ async projectsLocationsCollectionsDataStoresSchemasList(parent: string, opts: ProjectsLocationsCollectionsDataStoresSchemasListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/schemas`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListSchemasResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsDataStoresSchemasOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsDataStoresSchemasOperationsList(name: string, opts: ProjectsLocationsCollectionsDataStoresSchemasOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Updates a Schema. * * @param name Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsCollectionsDataStoresSchemasPatch(name: string, req: GoogleCloudDiscoveryengineV1Schema, opts: ProjectsLocationsCollectionsDataStoresSchemasPatchOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleLongrunningOperation; } /** * Answer query method. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsCollectionsDataStoresServingConfigsAnswer(servingConfig: string, req: GoogleCloudDiscoveryengineV1AnswerQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:answer`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AnswerQueryResponse(data); } /** * Gets a ServingConfig. Returns a NotFound error if the ServingConfig does * not exist. * * @param name Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` */ async projectsLocationsCollectionsDataStoresServingConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ServingConfig(data); } /** * Lists all ServingConfigs linked to this dataStore. * * @param parent Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */ async projectsLocationsCollectionsDataStoresServingConfigsList(parent: string, opts: ProjectsLocationsCollectionsDataStoresServingConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/servingConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListServingConfigsResponse(data); } /** * Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig * does not exist. * * @param name Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` */ async projectsLocationsCollectionsDataStoresServingConfigsPatch(name: string, req: GoogleCloudDiscoveryengineV1ServingConfig, opts: ProjectsLocationsCollectionsDataStoresServingConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1ServingConfig(req); opts = serializeProjectsLocationsCollectionsDataStoresServingConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1ServingConfig(data); } /** * Makes a recommendation, which requires a contextual user event. * * @param servingConfig Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID is used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests. */ async projectsLocationsCollectionsDataStoresServingConfigsRecommend(servingConfig: string, req: GoogleCloudDiscoveryengineV1RecommendRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1RecommendRequest(req); const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:recommend`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1RecommendResponse(data); } /** * Performs a search. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsCollectionsDataStoresServingConfigsSearch(servingConfig: string, req: GoogleCloudDiscoveryengineV1SearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:search`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1SearchResponse(data); } /** * Performs a search. Similar to the SearchService.Search method, but a lite * version that allows API key for authentication, where OAuth and IAM checks * are not required. Only public website search is supported by this method. * If data stores and engines not associated with public website search are * specified, a `FAILED_PRECONDITION` error is returned. This method can be * used for easy onboarding without having to implement an authentication * backend. However, it is strongly recommended to use SearchService.Search * instead with required OAuth and IAM checks to provide better data security. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsCollectionsDataStoresServingConfigsSearchLite(servingConfig: string, req: GoogleCloudDiscoveryengineV1SearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:searchLite`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1SearchResponse(data); } /** * Answer query method (streaming). It takes one AnswerQueryRequest and * returns multiple AnswerQueryResponse messages in a stream. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsCollectionsDataStoresServingConfigsStreamAnswer(servingConfig: string, req: GoogleCloudDiscoveryengineV1AnswerQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:streamAnswer`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AnswerQueryResponse(data); } /** * Gets a Answer. * * @param name Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}` */ async projectsLocationsCollectionsDataStoresSessionsAnswersGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Answer(data); } /** * Creates a Session. If the Session to create already exists, an * ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsCollectionsDataStoresSessionsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Session): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sessions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Deletes a Session. If the Session to delete does not exist, a NOT_FOUND * error is returned. * * @param name Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` */ async projectsLocationsCollectionsDataStoresSessionsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Session. * * @param name Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` */ async projectsLocationsCollectionsDataStoresSessionsGet(name: string, opts: ProjectsLocationsCollectionsDataStoresSessionsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.includeAnswerDetails !== undefined) { url.searchParams.append("includeAnswerDetails", String(opts.includeAnswerDetails)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Lists all Sessions by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsCollectionsDataStoresSessionsList(parent: string, opts: ProjectsLocationsCollectionsDataStoresSessionsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sessions`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListSessionsResponse; } /** * Updates a Session. Session action type cannot be changed. If the Session * to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` */ async projectsLocationsCollectionsDataStoresSessionsPatch(name: string, req: GoogleCloudDiscoveryengineV1Session, opts: ProjectsLocationsCollectionsDataStoresSessionsPatchOptions = {}): Promise { opts = serializeProjectsLocationsCollectionsDataStoresSessionsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Verify target sites' ownership and validity. This API sends all the target * sites under site search engine for verification. * * @param parent Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSites(parent: string, req: GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }:batchVerifyTargetSites`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Downgrade from advanced site search to basic site search. * * @param siteSearchEngine Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearch(siteSearchEngine: string, req: GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ siteSearchEngine }:disableAdvancedSiteSearch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Upgrade from basic site search to advanced site search. * * @param siteSearchEngine Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearch(siteSearchEngine: string, req: GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ siteSearchEngine }:enableAdvancedSiteSearch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Returns list of target sites with its domain verification status. This * method can only be called under data store with BASIC_SITE_SEARCH state at * the moment. * * @param siteSearchEngine Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatus(siteSearchEngine: string, opts: ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ siteSearchEngine }:fetchDomainVerificationStatus`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineOperationsList(name: string, opts: ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Request on-demand recrawl for a list of URIs. * * @param siteSearchEngine Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUris(siteSearchEngine: string, req: GoogleCloudDiscoveryengineV1RecrawlUrisRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ siteSearchEngine }:recrawlUris`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a Sitemap. * * @param parent Required. Parent resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Sitemap): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sitemaps`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a Sitemap. * * @param name Required. Full resource name of Sitemap, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`. If the caller does not have permission to access the Sitemap, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Sitemap does not exist, a NOT_FOUND error is returned. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Fetch Sitemaps in a DataStore. * * @param parent Required. Parent resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetch(parent: string, opts: ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sitemaps:fetch`); if (opts["matcher.urisMatcher.uris"] !== undefined) { url.searchParams.append("matcher.urisMatcher.uris", String(opts["matcher.urisMatcher.uris"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1FetchSitemapsResponse; } /** * Creates TargetSite in a batch. * * @param parent Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreate(parent: string, req: GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/targetSites:batchCreate`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a TargetSite. * * @param parent Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate(parent: string, req: GoogleCloudDiscoveryengineV1TargetSite): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/targetSites`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a TargetSite. * * @param name Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets a TargetSite. * * @param name Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1TargetSite; } /** * Gets a list of TargetSites. * * @param parent Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesList(parent: string, opts: ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/targetSites`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListTargetSitesResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsList(name: string, opts: ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Updates a TargetSite. * * @param name Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated. */ async projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatch(name: string, req: GoogleCloudDiscoveryengineV1TargetSite): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleLongrunningOperation; } /** * Imports all SuggestionDenyListEntry for a DataStore. * * @param parent Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. */ async projectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/suggestionDenyListEntries:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Permanently deletes all SuggestionDenyListEntry for a DataStore. * * @param parent Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. */ async projectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurge(parent: string, req: GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/suggestionDenyListEntries:purge`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Trains a custom model. * * @param dataStore Required. The resource name of the Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models. */ async projectsLocationsCollectionsDataStoresTrainCustomModel(dataStore: string, req: GoogleCloudDiscoveryengineV1TrainCustomModelRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ dataStore }:trainCustomModel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Writes a single user event from the browser. This uses a GET request to * due to browser restriction of POST-ing to a third-party domain. This method * is used only by the Discovery Engine API JavaScript pixel and Google Tag * Manager. Users should not call this method directly. * * @param parent Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. */ async projectsLocationsCollectionsDataStoresUserEventsCollect(parent: string, opts: ProjectsLocationsCollectionsDataStoresUserEventsCollectOptions = {}): Promise { opts = serializeProjectsLocationsCollectionsDataStoresUserEventsCollectOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:collect`); if (opts.ets !== undefined) { url.searchParams.append("ets", String(opts.ets)); } if (opts.uri !== undefined) { url.searchParams.append("uri", String(opts.uri)); } if (opts.userEvent !== undefined) { url.searchParams.append("userEvent", String(opts.userEvent)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleApiHttpBody(data); } /** * Bulk import of user events. Request processing might be synchronous. * Events that already exist are skipped. Use this method for backfilling * historical user events. Operation.response is of type ImportResponse. Note * that it is possible for a subset of the items to be successfully inserted. * Operation.metadata is of type ImportMetadata. * * @param parent Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` */ async projectsLocationsCollectionsDataStoresUserEventsImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportUserEventsRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ImportUserEventsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes permanently all user events specified by the filter provided. * Depending on the number of events specified by the filter, this operation * could take hours or days to complete. To test a filter, use the list * command first. * * @param parent Required. The resource name of the catalog under which the events are created. The format is `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`. */ async projectsLocationsCollectionsDataStoresUserEventsPurge(parent: string, req: GoogleCloudDiscoveryengineV1PurgeUserEventsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:purge`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Writes a single user event. * * @param parent Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. */ async projectsLocationsCollectionsDataStoresUserEventsWrite(parent: string, req: GoogleCloudDiscoveryengineV1UserEvent, opts: ProjectsLocationsCollectionsDataStoresUserEventsWriteOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1UserEvent(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:write`); if (opts.writeAsync !== undefined) { url.searchParams.append("writeAsync", String(opts.writeAsync)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1UserEvent(data); } /** * Gets a WidgetConfig. * * @param name Required. Full WidgetConfig resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}` */ async projectsLocationsCollectionsDataStoresWidgetConfigsGet(name: string, opts: ProjectsLocationsCollectionsDataStoresWidgetConfigsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.acceptCache !== undefined) { url.searchParams.append("acceptCache", String(opts.acceptCache)); } if (opts["getWidgetConfigRequestOption.turnOffCollectionComponents"] !== undefined) { url.searchParams.append("getWidgetConfigRequestOption.turnOffCollectionComponents", String(opts["getWidgetConfigRequestOption.turnOffCollectionComponents"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1WidgetConfig; } /** * Update a WidgetConfig. * * @param name Immutable. The full resource name of the widget config. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsCollectionsDataStoresWidgetConfigsPatch(name: string, req: GoogleCloudDiscoveryengineV1WidgetConfig, opts: ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchOptions = {}): Promise { opts = serializeProjectsLocationsCollectionsDataStoresWidgetConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1WidgetConfig; } /** * Deletes a Collection. * * @param name Required. The full resource name of the Collection, in the format of `projects/{project}/locations/{location}/collections/{collection}`. */ async projectsLocationsCollectionsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets an Assistant. * * @param name Required. Resource name of Assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` */ async projectsLocationsCollectionsEnginesAssistantsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1Assistant; } /** * Updates an Assistant * * @param name Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsCollectionsEnginesAssistantsPatch(name: string, req: GoogleCloudDiscoveryengineV1Assistant, opts: ProjectsLocationsCollectionsEnginesAssistantsPatchOptions = {}): Promise { opts = serializeProjectsLocationsCollectionsEnginesAssistantsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1Assistant; } /** * Assists the user with a query in a streaming fashion. * * @param name Required. The resource name of the Assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` */ async projectsLocationsCollectionsEnginesAssistantsStreamAssist(name: string, req: GoogleCloudDiscoveryengineV1StreamAssistRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:streamAssist`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1StreamAssistResponse(data); } /** * Completes the user input with advanced keyword suggestions. * * @param completionConfig Required. The completion_config of the parent dataStore or engine resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig` `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`. */ async projectsLocationsCollectionsEnginesCompletionConfigCompleteQuery(completionConfig: string, req: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ completionConfig }:completeQuery`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse(data); } /** * Creates a Control. By default 1000 controls are allowed for a data store. * A request can be submitted to adjust this limit. If the Control to create * already exists, an ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. */ async projectsLocationsCollectionsEnginesControlsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Control, opts: ProjectsLocationsCollectionsEnginesControlsCreateOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Control(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/controls`); if (opts.controlId !== undefined) { url.searchParams.append("controlId", String(opts.controlId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Deletes a Control. If the Control to delete does not exist, a NOT_FOUND * error is returned. * * @param name Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}` */ async projectsLocationsCollectionsEnginesControlsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Control. * * @param name Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}` */ async projectsLocationsCollectionsEnginesControlsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Lists all Controls by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. */ async projectsLocationsCollectionsEnginesControlsList(parent: string, opts: ProjectsLocationsCollectionsEnginesControlsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/controls`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListControlsResponse(data); } /** * Updates a Control. Control action type cannot be changed. If the Control * to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` */ async projectsLocationsCollectionsEnginesControlsPatch(name: string, req: GoogleCloudDiscoveryengineV1Control, opts: ProjectsLocationsCollectionsEnginesControlsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Control(req); opts = serializeProjectsLocationsCollectionsEnginesControlsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Converses a conversation. * * @param name Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session. */ async projectsLocationsCollectionsEnginesConversationsConverse(name: string, req: GoogleCloudDiscoveryengineV1ConverseConversationRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ConverseConversationRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:converse`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1ConverseConversationResponse(data); } /** * Creates a Conversation. If the Conversation to create already exists, an * ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsCollectionsEnginesConversationsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Conversation): Promise { req = serializeGoogleCloudDiscoveryengineV1Conversation(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Deletes a Conversation. If the Conversation to delete does not exist, a * NOT_FOUND error is returned. * * @param name Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` */ async projectsLocationsCollectionsEnginesConversationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Conversation. * * @param name Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` */ async projectsLocationsCollectionsEnginesConversationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Lists all Conversations by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsCollectionsEnginesConversationsList(parent: string, opts: ProjectsLocationsCollectionsEnginesConversationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListConversationsResponse(data); } /** * Updates a Conversation. Conversation action type cannot be changed. If the * Conversation to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. */ async projectsLocationsCollectionsEnginesConversationsPatch(name: string, req: GoogleCloudDiscoveryengineV1Conversation, opts: ProjectsLocationsCollectionsEnginesConversationsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Conversation(req); opts = serializeProjectsLocationsCollectionsEnginesConversationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Creates a Engine. * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. */ async projectsLocationsCollectionsEnginesCreate(parent: string, req: GoogleCloudDiscoveryengineV1Engine, opts: ProjectsLocationsCollectionsEnginesCreateOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Engine(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/engines`); if (opts.engineId !== undefined) { url.searchParams.append("engineId", String(opts.engineId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a Engine. * * @param name Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned. */ async projectsLocationsCollectionsEnginesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets a Engine. * * @param name Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. */ async projectsLocationsCollectionsEnginesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Engine(data); } /** * Lists all the Engines associated with the project. * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. */ async projectsLocationsCollectionsEnginesList(parent: string, opts: ProjectsLocationsCollectionsEnginesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/engines`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListEnginesResponse(data); } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsLocationsCollectionsEnginesOperationsCancel(name: string, req: GoogleLongrunningCancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsEnginesOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsEnginesOperationsList(name: string, opts: ProjectsLocationsCollectionsEnginesOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Updates an Engine * * @param name 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-9*/. Otherwise, an INVALID_ARGUMENT error is returned. */ async projectsLocationsCollectionsEnginesPatch(name: string, req: GoogleCloudDiscoveryengineV1Engine, opts: ProjectsLocationsCollectionsEnginesPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Engine(req); opts = serializeProjectsLocationsCollectionsEnginesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Engine(data); } /** * Answer query method. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsCollectionsEnginesServingConfigsAnswer(servingConfig: string, req: GoogleCloudDiscoveryengineV1AnswerQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:answer`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AnswerQueryResponse(data); } /** * Gets a ServingConfig. Returns a NotFound error if the ServingConfig does * not exist. * * @param name Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` */ async projectsLocationsCollectionsEnginesServingConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ServingConfig(data); } /** * Lists all ServingConfigs linked to this dataStore. * * @param parent Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */ async projectsLocationsCollectionsEnginesServingConfigsList(parent: string, opts: ProjectsLocationsCollectionsEnginesServingConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/servingConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListServingConfigsResponse(data); } /** * Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig * does not exist. * * @param name Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` */ async projectsLocationsCollectionsEnginesServingConfigsPatch(name: string, req: GoogleCloudDiscoveryengineV1ServingConfig, opts: ProjectsLocationsCollectionsEnginesServingConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1ServingConfig(req); opts = serializeProjectsLocationsCollectionsEnginesServingConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1ServingConfig(data); } /** * Makes a recommendation, which requires a contextual user event. * * @param servingConfig Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID is used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests. */ async projectsLocationsCollectionsEnginesServingConfigsRecommend(servingConfig: string, req: GoogleCloudDiscoveryengineV1RecommendRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1RecommendRequest(req); const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:recommend`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1RecommendResponse(data); } /** * Performs a search. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsCollectionsEnginesServingConfigsSearch(servingConfig: string, req: GoogleCloudDiscoveryengineV1SearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:search`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1SearchResponse(data); } /** * Performs a search. Similar to the SearchService.Search method, but a lite * version that allows API key for authentication, where OAuth and IAM checks * are not required. Only public website search is supported by this method. * If data stores and engines not associated with public website search are * specified, a `FAILED_PRECONDITION` error is returned. This method can be * used for easy onboarding without having to implement an authentication * backend. However, it is strongly recommended to use SearchService.Search * instead with required OAuth and IAM checks to provide better data security. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsCollectionsEnginesServingConfigsSearchLite(servingConfig: string, req: GoogleCloudDiscoveryengineV1SearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:searchLite`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1SearchResponse(data); } /** * Answer query method (streaming). It takes one AnswerQueryRequest and * returns multiple AnswerQueryResponse messages in a stream. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsCollectionsEnginesServingConfigsStreamAnswer(servingConfig: string, req: GoogleCloudDiscoveryengineV1AnswerQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:streamAnswer`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AnswerQueryResponse(data); } /** * Gets a Answer. * * @param name Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}` */ async projectsLocationsCollectionsEnginesSessionsAnswersGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Answer(data); } /** * Creates a Session. If the Session to create already exists, an * ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsCollectionsEnginesSessionsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Session): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sessions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Deletes a Session. If the Session to delete does not exist, a NOT_FOUND * error is returned. * * @param name Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` */ async projectsLocationsCollectionsEnginesSessionsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Session. * * @param name Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` */ async projectsLocationsCollectionsEnginesSessionsGet(name: string, opts: ProjectsLocationsCollectionsEnginesSessionsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.includeAnswerDetails !== undefined) { url.searchParams.append("includeAnswerDetails", String(opts.includeAnswerDetails)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Lists all Sessions by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsCollectionsEnginesSessionsList(parent: string, opts: ProjectsLocationsCollectionsEnginesSessionsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sessions`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListSessionsResponse; } /** * Updates a Session. Session action type cannot be changed. If the Session * to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` */ async projectsLocationsCollectionsEnginesSessionsPatch(name: string, req: GoogleCloudDiscoveryengineV1Session, opts: ProjectsLocationsCollectionsEnginesSessionsPatchOptions = {}): Promise { opts = serializeProjectsLocationsCollectionsEnginesSessionsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Gets a WidgetConfig. * * @param name Required. Full WidgetConfig resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}` */ async projectsLocationsCollectionsEnginesWidgetConfigsGet(name: string, opts: ProjectsLocationsCollectionsEnginesWidgetConfigsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.acceptCache !== undefined) { url.searchParams.append("acceptCache", String(opts.acceptCache)); } if (opts["getWidgetConfigRequestOption.turnOffCollectionComponents"] !== undefined) { url.searchParams.append("getWidgetConfigRequestOption.turnOffCollectionComponents", String(opts["getWidgetConfigRequestOption.turnOffCollectionComponents"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1WidgetConfig; } /** * Update a WidgetConfig. * * @param name Immutable. The full resource name of the widget config. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsCollectionsEnginesWidgetConfigsPatch(name: string, req: GoogleCloudDiscoveryengineV1WidgetConfig, opts: ProjectsLocationsCollectionsEnginesWidgetConfigsPatchOptions = {}): Promise { opts = serializeProjectsLocationsCollectionsEnginesWidgetConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1WidgetConfig; } /** * Gets the DataConnector. DataConnector is a singleton resource for each * Collection. * * @param name Required. Full resource name of DataConnector, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataConnector`. If the caller does not have permission to access the DataConnector, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataConnector does not exist, a NOT_FOUND error is returned. */ async projectsLocationsCollectionsGetDataConnector(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1DataConnector(data); } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsCollectionsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsCollectionsOperationsList(name: string, opts: ProjectsLocationsCollectionsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Updates a DataConnector. * * @param name Output only. The full resource name of the Data Connector. Format: `projects/*/locations/*/collections/*/dataConnector`. */ async projectsLocationsCollectionsUpdateDataConnector(name: string, req: GoogleCloudDiscoveryengineV1DataConnector, opts: ProjectsLocationsCollectionsUpdateDataConnectorOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1DataConnector(req); opts = serializeProjectsLocationsCollectionsUpdateDataConnectorOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1DataConnector(data); } /** * Gets index freshness metadata for Documents. Supported for website search * only. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. */ async projectsLocationsDataStoresBranchesBatchGetDocumentsMetadata(parent: string, opts: ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/batchGetDocumentsMetadata`); if (opts["matcher.fhirMatcher.fhirResources"] !== undefined) { url.searchParams.append("matcher.fhirMatcher.fhirResources", String(opts["matcher.fhirMatcher.fhirResources"])); } if (opts["matcher.urisMatcher.uris"] !== undefined) { url.searchParams.append("matcher.urisMatcher.uris", String(opts["matcher.urisMatcher.uris"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse(data); } /** * Creates a Document. * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. */ async projectsLocationsDataStoresBranchesDocumentsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Document, opts: ProjectsLocationsDataStoresBranchesDocumentsCreateOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Document(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/documents`); if (opts.documentId !== undefined) { url.searchParams.append("documentId", String(opts.documentId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1Document(data); } /** * Deletes a Document. * * @param name Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned. */ async projectsLocationsDataStoresBranchesDocumentsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Document. * * @param name Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned. */ async projectsLocationsDataStoresBranchesDocumentsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Document(data); } /** * Bulk import of multiple Documents. Request processing may be synchronous. * Non-existing items are created. Note: It is possible for a subset of the * Documents to be successfully updated. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission. */ async projectsLocationsDataStoresBranchesDocumentsImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportDocumentsRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ImportDocumentsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/documents:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Gets a list of Documents. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned. */ async projectsLocationsDataStoresBranchesDocumentsList(parent: string, opts: ProjectsLocationsDataStoresBranchesDocumentsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/documents`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListDocumentsResponse(data); } /** * Updates a Document. * * @param name Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsDataStoresBranchesDocumentsPatch(name: string, req: GoogleCloudDiscoveryengineV1Document, opts: ProjectsLocationsDataStoresBranchesDocumentsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Document(req); opts = serializeProjectsLocationsDataStoresBranchesDocumentsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Document(data); } /** * Permanently deletes all selected Documents in a branch. This process is * asynchronous. Depending on the number of Documents to be deleted, this * operation can take hours to complete. Before the delete operation * completes, some Documents might still be returned by * DocumentService.GetDocument or DocumentService.ListDocuments. To get a list * of the Documents to be deleted, set PurgeDocumentsRequest.force to false. * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. */ async projectsLocationsDataStoresBranchesDocumentsPurge(parent: string, req: GoogleCloudDiscoveryengineV1PurgeDocumentsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/documents:purge`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsLocationsDataStoresBranchesOperationsCancel(name: string, req: GoogleLongrunningCancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsDataStoresBranchesOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsDataStoresBranchesOperationsList(name: string, opts: ProjectsLocationsDataStoresBranchesOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Completes the specified user input with keyword suggestions. * * @param dataStore Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. */ async projectsLocationsDataStoresCompleteQuery(dataStore: string, opts: ProjectsLocationsDataStoresCompleteQueryOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ dataStore }:completeQuery`); if (opts.includeTailSuggestions !== undefined) { url.searchParams.append("includeTailSuggestions", String(opts.includeTailSuggestions)); } if (opts.query !== undefined) { url.searchParams.append("query", String(opts.query)); } if (opts.queryModel !== undefined) { url.searchParams.append("queryModel", String(opts.queryModel)); } if (opts.userPseudoId !== undefined) { url.searchParams.append("userPseudoId", String(opts.userPseudoId)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1CompleteQueryResponse; } /** * Completes the user input with advanced keyword suggestions. * * @param completionConfig Required. The completion_config of the parent dataStore or engine resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig` `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`. */ async projectsLocationsDataStoresCompletionConfigCompleteQuery(completionConfig: string, req: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ completionConfig }:completeQuery`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse(data); } /** * Imports CompletionSuggestions for a DataStore. * * @param parent Required. The parent data store resource name for which to import customer autocomplete suggestions. Follows pattern `projects/*/locations/*/collections/*/dataStores/*` */ async projectsLocationsDataStoresCompletionSuggestionsImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/completionSuggestions:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Permanently deletes all CompletionSuggestions for a DataStore. * * @param parent Required. The parent data store resource name for which to purge completion suggestions. Follows pattern projects/*/locations/*/collections/*/dataStores/*. */ async projectsLocationsDataStoresCompletionSuggestionsPurge(parent: string, req: GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/completionSuggestions:purge`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a Control. By default 1000 controls are allowed for a data store. * A request can be submitted to adjust this limit. If the Control to create * already exists, an ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. */ async projectsLocationsDataStoresControlsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Control, opts: ProjectsLocationsDataStoresControlsCreateOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Control(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/controls`); if (opts.controlId !== undefined) { url.searchParams.append("controlId", String(opts.controlId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Deletes a Control. If the Control to delete does not exist, a NOT_FOUND * error is returned. * * @param name Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}` */ async projectsLocationsDataStoresControlsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Control. * * @param name Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}` */ async projectsLocationsDataStoresControlsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Lists all Controls by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. */ async projectsLocationsDataStoresControlsList(parent: string, opts: ProjectsLocationsDataStoresControlsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/controls`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListControlsResponse(data); } /** * Updates a Control. Control action type cannot be changed. If the Control * to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` */ async projectsLocationsDataStoresControlsPatch(name: string, req: GoogleCloudDiscoveryengineV1Control, opts: ProjectsLocationsDataStoresControlsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Control(req); opts = serializeProjectsLocationsDataStoresControlsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Control(data); } /** * Converses a conversation. * * @param name Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session. */ async projectsLocationsDataStoresConversationsConverse(name: string, req: GoogleCloudDiscoveryengineV1ConverseConversationRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ConverseConversationRequest(req); const url = new URL(`${this.#baseUrl}v1/${ name }:converse`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1ConverseConversationResponse(data); } /** * Creates a Conversation. If the Conversation to create already exists, an * ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsDataStoresConversationsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Conversation): Promise { req = serializeGoogleCloudDiscoveryengineV1Conversation(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Deletes a Conversation. If the Conversation to delete does not exist, a * NOT_FOUND error is returned. * * @param name Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` */ async projectsLocationsDataStoresConversationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Conversation. * * @param name Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` */ async projectsLocationsDataStoresConversationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Lists all Conversations by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsDataStoresConversationsList(parent: string, opts: ProjectsLocationsDataStoresConversationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListConversationsResponse(data); } /** * Updates a Conversation. Conversation action type cannot be changed. If the * Conversation to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. */ async projectsLocationsDataStoresConversationsPatch(name: string, req: GoogleCloudDiscoveryengineV1Conversation, opts: ProjectsLocationsDataStoresConversationsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1Conversation(req); opts = serializeProjectsLocationsDataStoresConversationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1Conversation(data); } /** * Creates a DataStore. DataStore is for storing Documents. To serve these * documents for Search, or Recommendation use case, an Engine needs to be * created separately. * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. */ async projectsLocationsDataStoresCreate(parent: string, req: GoogleCloudDiscoveryengineV1DataStore, opts: ProjectsLocationsDataStoresCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/dataStores`); if (opts.cmekConfigName !== undefined) { url.searchParams.append("cmekConfigName", String(opts.cmekConfigName)); } if (opts.createAdvancedSiteSearch !== undefined) { url.searchParams.append("createAdvancedSiteSearch", String(opts.createAdvancedSiteSearch)); } if (opts.dataStoreId !== undefined) { url.searchParams.append("dataStoreId", String(opts.dataStoreId)); } if (opts.disableCmek !== undefined) { url.searchParams.append("disableCmek", String(opts.disableCmek)); } if (opts.skipDefaultSchemaCreation !== undefined) { url.searchParams.append("skipDefaultSchemaCreation", String(opts.skipDefaultSchemaCreation)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a DataStore. * * @param name Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned. */ async projectsLocationsDataStoresDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets a DataStore. * * @param name Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned. */ async projectsLocationsDataStoresGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1DataStore; } /** * Gets the SiteSearchEngine. * * @param name 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. */ async projectsLocationsDataStoresGetSiteSearchEngine(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1SiteSearchEngine; } /** * Lists all the DataStores associated with the project. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned. */ async projectsLocationsDataStoresList(parent: string, opts: ProjectsLocationsDataStoresListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/dataStores`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListDataStoresResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsDataStoresModelsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsDataStoresModelsOperationsList(name: string, opts: ProjectsLocationsDataStoresModelsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsDataStoresOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsDataStoresOperationsList(name: string, opts: ProjectsLocationsDataStoresOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Updates a DataStore * * @param name Immutable. Identifier. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsDataStoresPatch(name: string, req: GoogleCloudDiscoveryengineV1DataStore, opts: ProjectsLocationsDataStoresPatchOptions = {}): Promise { opts = serializeProjectsLocationsDataStoresPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1DataStore; } /** * Creates a Schema. * * @param parent Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. */ async projectsLocationsDataStoresSchemasCreate(parent: string, req: GoogleCloudDiscoveryengineV1Schema, opts: ProjectsLocationsDataStoresSchemasCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/schemas`); if (opts.schemaId !== undefined) { url.searchParams.append("schemaId", String(opts.schemaId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a Schema. * * @param name Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. */ async projectsLocationsDataStoresSchemasDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets a Schema. * * @param name Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. */ async projectsLocationsDataStoresSchemasGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1Schema; } /** * Gets a list of Schemas. * * @param parent Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. */ async projectsLocationsDataStoresSchemasList(parent: string, opts: ProjectsLocationsDataStoresSchemasListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/schemas`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListSchemasResponse; } /** * Updates a Schema. * * @param name Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsDataStoresSchemasPatch(name: string, req: GoogleCloudDiscoveryengineV1Schema, opts: ProjectsLocationsDataStoresSchemasPatchOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleLongrunningOperation; } /** * Answer query method. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsDataStoresServingConfigsAnswer(servingConfig: string, req: GoogleCloudDiscoveryengineV1AnswerQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:answer`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AnswerQueryResponse(data); } /** * Gets a ServingConfig. Returns a NotFound error if the ServingConfig does * not exist. * * @param name Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` */ async projectsLocationsDataStoresServingConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ServingConfig(data); } /** * Lists all ServingConfigs linked to this dataStore. * * @param parent Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */ async projectsLocationsDataStoresServingConfigsList(parent: string, opts: ProjectsLocationsDataStoresServingConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/servingConfigs`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListServingConfigsResponse(data); } /** * Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig * does not exist. * * @param name Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` */ async projectsLocationsDataStoresServingConfigsPatch(name: string, req: GoogleCloudDiscoveryengineV1ServingConfig, opts: ProjectsLocationsDataStoresServingConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1ServingConfig(req); opts = serializeProjectsLocationsDataStoresServingConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1ServingConfig(data); } /** * Makes a recommendation, which requires a contextual user event. * * @param servingConfig Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID is used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests. */ async projectsLocationsDataStoresServingConfigsRecommend(servingConfig: string, req: GoogleCloudDiscoveryengineV1RecommendRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1RecommendRequest(req); const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:recommend`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1RecommendResponse(data); } /** * Performs a search. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsDataStoresServingConfigsSearch(servingConfig: string, req: GoogleCloudDiscoveryengineV1SearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:search`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1SearchResponse(data); } /** * Performs a search. Similar to the SearchService.Search method, but a lite * version that allows API key for authentication, where OAuth and IAM checks * are not required. Only public website search is supported by this method. * If data stores and engines not associated with public website search are * specified, a `FAILED_PRECONDITION` error is returned. This method can be * used for easy onboarding without having to implement an authentication * backend. However, it is strongly recommended to use SearchService.Search * instead with required OAuth and IAM checks to provide better data security. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsDataStoresServingConfigsSearchLite(servingConfig: string, req: GoogleCloudDiscoveryengineV1SearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:searchLite`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1SearchResponse(data); } /** * Answer query method (streaming). It takes one AnswerQueryRequest and * returns multiple AnswerQueryResponse messages in a stream. * * @param servingConfig Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. */ async projectsLocationsDataStoresServingConfigsStreamAnswer(servingConfig: string, req: GoogleCloudDiscoveryengineV1AnswerQueryRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ servingConfig }:streamAnswer`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1AnswerQueryResponse(data); } /** * Gets a Answer. * * @param name Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}` */ async projectsLocationsDataStoresSessionsAnswersGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1Answer(data); } /** * Creates a Session. If the Session to create already exists, an * ALREADY_EXISTS error is returned. * * @param parent Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsDataStoresSessionsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Session): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sessions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Deletes a Session. If the Session to delete does not exist, a NOT_FOUND * error is returned. * * @param name Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` */ async projectsLocationsDataStoresSessionsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a Session. * * @param name Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` */ async projectsLocationsDataStoresSessionsGet(name: string, opts: ProjectsLocationsDataStoresSessionsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.includeAnswerDetails !== undefined) { url.searchParams.append("includeAnswerDetails", String(opts.includeAnswerDetails)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Lists all Sessions by their parent DataStore. * * @param parent Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ async projectsLocationsDataStoresSessionsList(parent: string, opts: ProjectsLocationsDataStoresSessionsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sessions`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListSessionsResponse; } /** * Updates a Session. Session action type cannot be changed. If the Session * to update does not exist, a NOT_FOUND error is returned. * * @param name Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` */ async projectsLocationsDataStoresSessionsPatch(name: string, req: GoogleCloudDiscoveryengineV1Session, opts: ProjectsLocationsDataStoresSessionsPatchOptions = {}): Promise { opts = serializeProjectsLocationsDataStoresSessionsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1Session; } /** * Downgrade from advanced site search to basic site search. * * @param siteSearchEngine Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. */ async projectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearch(siteSearchEngine: string, req: GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ siteSearchEngine }:disableAdvancedSiteSearch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Upgrade from basic site search to advanced site search. * * @param siteSearchEngine Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. */ async projectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearch(siteSearchEngine: string, req: GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ siteSearchEngine }:enableAdvancedSiteSearch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Request on-demand recrawl for a list of URIs. * * @param siteSearchEngine Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. */ async projectsLocationsDataStoresSiteSearchEngineRecrawlUris(siteSearchEngine: string, req: GoogleCloudDiscoveryengineV1RecrawlUrisRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ siteSearchEngine }:recrawlUris`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a Sitemap. * * @param parent Required. Parent resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. */ async projectsLocationsDataStoresSiteSearchEngineSitemapsCreate(parent: string, req: GoogleCloudDiscoveryengineV1Sitemap): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sitemaps`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a Sitemap. * * @param name Required. Full resource name of Sitemap, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`. If the caller does not have permission to access the Sitemap, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Sitemap does not exist, a NOT_FOUND error is returned. */ async projectsLocationsDataStoresSiteSearchEngineSitemapsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Fetch Sitemaps in a DataStore. * * @param parent Required. Parent resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. */ async projectsLocationsDataStoresSiteSearchEngineSitemapsFetch(parent: string, opts: ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/sitemaps:fetch`); if (opts["matcher.urisMatcher.uris"] !== undefined) { url.searchParams.append("matcher.urisMatcher.uris", String(opts["matcher.urisMatcher.uris"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1FetchSitemapsResponse; } /** * Creates TargetSite in a batch. * * @param parent Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field. */ async projectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreate(parent: string, req: GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/targetSites:batchCreate`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a TargetSite. * * @param parent Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. */ async projectsLocationsDataStoresSiteSearchEngineTargetSitesCreate(parent: string, req: GoogleCloudDiscoveryengineV1TargetSite): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/targetSites`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes a TargetSite. * * @param name Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. */ async projectsLocationsDataStoresSiteSearchEngineTargetSitesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets a TargetSite. * * @param name Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. */ async projectsLocationsDataStoresSiteSearchEngineTargetSitesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1TargetSite; } /** * Gets a list of TargetSites. * * @param parent Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. */ async projectsLocationsDataStoresSiteSearchEngineTargetSitesList(parent: string, opts: ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/targetSites`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListTargetSitesResponse; } /** * Updates a TargetSite. * * @param name Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated. */ async projectsLocationsDataStoresSiteSearchEngineTargetSitesPatch(name: string, req: GoogleCloudDiscoveryengineV1TargetSite): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleLongrunningOperation; } /** * Imports all SuggestionDenyListEntry for a DataStore. * * @param parent Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. */ async projectsLocationsDataStoresSuggestionDenyListEntriesImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/suggestionDenyListEntries:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Permanently deletes all SuggestionDenyListEntry for a DataStore. * * @param parent Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. */ async projectsLocationsDataStoresSuggestionDenyListEntriesPurge(parent: string, req: GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/suggestionDenyListEntries:purge`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Writes a single user event from the browser. This uses a GET request to * due to browser restriction of POST-ing to a third-party domain. This method * is used only by the Discovery Engine API JavaScript pixel and Google Tag * Manager. Users should not call this method directly. * * @param parent Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. */ async projectsLocationsDataStoresUserEventsCollect(parent: string, opts: ProjectsLocationsDataStoresUserEventsCollectOptions = {}): Promise { opts = serializeProjectsLocationsDataStoresUserEventsCollectOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:collect`); if (opts.ets !== undefined) { url.searchParams.append("ets", String(opts.ets)); } if (opts.uri !== undefined) { url.searchParams.append("uri", String(opts.uri)); } if (opts.userEvent !== undefined) { url.searchParams.append("userEvent", String(opts.userEvent)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleApiHttpBody(data); } /** * Bulk import of user events. Request processing might be synchronous. * Events that already exist are skipped. Use this method for backfilling * historical user events. Operation.response is of type ImportResponse. Note * that it is possible for a subset of the items to be successfully inserted. * Operation.metadata is of type ImportMetadata. * * @param parent Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` */ async projectsLocationsDataStoresUserEventsImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportUserEventsRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ImportUserEventsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes permanently all user events specified by the filter provided. * Depending on the number of events specified by the filter, this operation * could take hours or days to complete. To test a filter, use the list * command first. * * @param parent Required. The resource name of the catalog under which the events are created. The format is `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`. */ async projectsLocationsDataStoresUserEventsPurge(parent: string, req: GoogleCloudDiscoveryengineV1PurgeUserEventsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:purge`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Writes a single user event. * * @param parent Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. */ async projectsLocationsDataStoresUserEventsWrite(parent: string, req: GoogleCloudDiscoveryengineV1UserEvent, opts: ProjectsLocationsDataStoresUserEventsWriteOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1UserEvent(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:write`); if (opts.writeAsync !== undefined) { url.searchParams.append("writeAsync", String(opts.writeAsync)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1UserEvent(data); } /** * Gets a WidgetConfig. * * @param name Required. Full WidgetConfig resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}` */ async projectsLocationsDataStoresWidgetConfigsGet(name: string, opts: ProjectsLocationsDataStoresWidgetConfigsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.acceptCache !== undefined) { url.searchParams.append("acceptCache", String(opts.acceptCache)); } if (opts["getWidgetConfigRequestOption.turnOffCollectionComponents"] !== undefined) { url.searchParams.append("getWidgetConfigRequestOption.turnOffCollectionComponents", String(opts["getWidgetConfigRequestOption.turnOffCollectionComponents"])); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1WidgetConfig; } /** * Update a WidgetConfig. * * @param name Immutable. The full resource name of the widget config. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsDataStoresWidgetConfigsPatch(name: string, req: GoogleCloudDiscoveryengineV1WidgetConfig, opts: ProjectsLocationsDataStoresWidgetConfigsPatchOptions = {}): Promise { opts = serializeProjectsLocationsDataStoresWidgetConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1WidgetConfig; } /** * Gets the AclConfig. * * @param name Required. Resource name of AclConfig, such as `projects/*/locations/*/aclConfig`. If the caller does not have permission to access the AclConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. */ async projectsLocationsGetAclConfig(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1AclConfig; } /** * Gets the CmekConfig. * * @param name Required. Resource name of CmekConfig, such as `projects/*/locations/*/cmekConfig` or `projects/*/locations/*/cmekConfigs/*`. If the caller does not have permission to access the CmekConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. */ async projectsLocationsGetCmekConfig(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1CmekConfig; } /** * Performs a grounding check. * * @param groundingConfig Required. The resource name of the grounding config, such as `projects/*/locations/global/groundingConfigs/default_grounding_config`. */ async projectsLocationsGroundingConfigsCheck(groundingConfig: string, req: GoogleCloudDiscoveryengineV1CheckGroundingRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ groundingConfig }:check`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudDiscoveryengineV1CheckGroundingResponse; } /** * Creates a new Identity Mapping Store. * * @param parent Required. The parent collection resource name, such as `projects/{project}/locations/{location}`. */ async projectsLocationsIdentityMappingStoresCreate(parent: string, req: GoogleCloudDiscoveryengineV1IdentityMappingStore, opts: ProjectsLocationsIdentityMappingStoresCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/identityMappingStores`); if (opts.cmekConfigName !== undefined) { url.searchParams.append("cmekConfigName", String(opts.cmekConfigName)); } if (opts.disableCmek !== undefined) { url.searchParams.append("disableCmek", String(opts.disableCmek)); } if (opts.identityMappingStoreId !== undefined) { url.searchParams.append("identityMappingStoreId", String(opts.identityMappingStoreId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudDiscoveryengineV1IdentityMappingStore; } /** * Deletes the Identity Mapping Store. * * @param name Required. The name of the Identity Mapping Store to delete. Format: `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` */ async projectsLocationsIdentityMappingStoresDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets the Identity Mapping Store. * * @param name Required. The name of the Identity Mapping Store to get. Format: `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` */ async projectsLocationsIdentityMappingStoresGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1IdentityMappingStore; } /** * Imports a list of Identity Mapping Entries to an Identity Mapping Store. * * @param identityMappingStore Required. The name of the Identity Mapping Store to import Identity Mapping Entries to. Format: `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` */ async projectsLocationsIdentityMappingStoresImportIdentityMappings(identityMappingStore: string, req: GoogleCloudDiscoveryengineV1ImportIdentityMappingsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ identityMappingStore }:importIdentityMappings`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Lists all Identity Mapping Stores. * * @param parent Required. The parent of the Identity Mapping Stores to list. Format: `projects/{project}/locations/{location}`. */ async projectsLocationsIdentityMappingStoresList(parent: string, opts: ProjectsLocationsIdentityMappingStoresListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/identityMappingStores`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListIdentityMappingStoresResponse; } /** * Lists Identity Mappings in an Identity Mapping Store. * * @param identityMappingStore Required. The name of the Identity Mapping Store to list Identity Mapping Entries in. Format: `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` */ async projectsLocationsIdentityMappingStoresListIdentityMappings(identityMappingStore: string, opts: ProjectsLocationsIdentityMappingStoresListIdentityMappingsOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ identityMappingStore }:listIdentityMappings`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListIdentityMappingsResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsIdentityMappingStoresOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsIdentityMappingStoresOperationsList(name: string, opts: ProjectsLocationsIdentityMappingStoresOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Purges specified or all Identity Mapping Entries from an Identity Mapping * Store. * * @param identityMappingStore Required. The name of the Identity Mapping Store to purge Identity Mapping Entries from. Format: `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` */ async projectsLocationsIdentityMappingStoresPurgeIdentityMappings(identityMappingStore: string, req: GoogleCloudDiscoveryengineV1PurgeIdentityMappingsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ identityMappingStore }:purgeIdentityMappings`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a LicenseConfig * * @param parent Required. The parent resource name, such as `projects/{project}/locations/{location}`. */ async projectsLocationsLicenseConfigsCreate(parent: string, req: GoogleCloudDiscoveryengineV1LicenseConfig, opts: ProjectsLocationsLicenseConfigsCreateOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1LicenseConfig(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/licenseConfigs`); if (opts.licenseConfigId !== undefined) { url.searchParams.append("licenseConfigId", String(opts.licenseConfigId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1LicenseConfig(data); } /** * Gets a LicenseConfig. * * @param name Required. Full resource name of LicenseConfig, such as `projects/{project}/locations/{location}/licenseConfigs/*`. If the caller does not have permission to access the LicenseConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested LicenseConfig does not exist, a NOT_FOUND error is returned. */ async projectsLocationsLicenseConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1LicenseConfig(data); } /** * Updates the LicenseConfig * * @param name Immutable. Identifier. The fully qualified resource name of the license config. Format: `projects/{project}/locations/{location}/licenseConfigs/{license_config}` */ async projectsLocationsLicenseConfigsPatch(name: string, req: GoogleCloudDiscoveryengineV1LicenseConfig, opts: ProjectsLocationsLicenseConfigsPatchOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1LicenseConfig(req); opts = serializeProjectsLocationsLicenseConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudDiscoveryengineV1LicenseConfig(data); } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsPodcastsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Ranks a list of text records based on the given input query. * * @param rankingConfig Required. The resource name of the rank service config, such as `projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config`. */ async projectsLocationsRankingConfigsRank(rankingConfig: string, req: GoogleCloudDiscoveryengineV1RankRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ rankingConfig }:rank`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudDiscoveryengineV1RankResponse; } /** * Creates a Collection and sets up the DataConnector for it. To stop a * DataConnector after setup, use the CollectionService.DeleteCollection * method. * * @param parent Required. The parent of Collection, in the format of `projects/{project}/locations/{location}`. */ async projectsLocationsSetUpDataConnector(parent: string, req: GoogleCloudDiscoveryengineV1SetUpDataConnectorRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1SetUpDataConnectorRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }:setUpDataConnector`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a Collection and sets up the DataConnector for it. To stop a * DataConnector after setup, use the CollectionService.DeleteCollection * method. * * @param parent Required. The parent of Collection, in the format of `projects/{project}/locations/{location}`. */ async projectsLocationsSetUpDataConnectorV2(parent: string, req: GoogleCloudDiscoveryengineV1DataConnector, opts: ProjectsLocationsSetUpDataConnectorV2Options = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1DataConnector(req); const url = new URL(`${this.#baseUrl}v1/${ parent }:setUpDataConnectorV2`); if (opts.collectionDisplayName !== undefined) { url.searchParams.append("collectionDisplayName", String(opts.collectionDisplayName)); } if (opts.collectionId !== undefined) { url.searchParams.append("collectionId", String(opts.collectionId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Default ACL configuration for use in a location of a customer's project. * Updates will only reflect to new data stores. Existing data stores will * still use the old value. * * @param name Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsUpdateAclConfig(name: string, req: GoogleCloudDiscoveryengineV1AclConfig): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1AclConfig; } /** * Provisions a CMEK key for use in a location of a customer's project. This * method will also conduct location validation on the provided cmekConfig to * make sure the key is valid and can be used in the selected location. * * @param name Required. The name of the CmekConfig of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. */ async projectsLocationsUpdateCmekConfig(name: string, req: GoogleCloudDiscoveryengineV1CmekConfig, opts: ProjectsLocationsUpdateCmekConfigOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.setDefault !== undefined) { url.searchParams.append("setDefault", String(opts.setDefault)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleLongrunningOperation; } /** * Writes a single user event from the browser. This uses a GET request to * due to browser restriction of POST-ing to a third-party domain. This method * is used only by the Discovery Engine API JavaScript pixel and Google Tag * Manager. Users should not call this method directly. * * @param parent Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. */ async projectsLocationsUserEventsCollect(parent: string, opts: ProjectsLocationsUserEventsCollectOptions = {}): Promise { opts = serializeProjectsLocationsUserEventsCollectOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:collect`); if (opts.ets !== undefined) { url.searchParams.append("ets", String(opts.ets)); } if (opts.uri !== undefined) { url.searchParams.append("uri", String(opts.uri)); } if (opts.userEvent !== undefined) { url.searchParams.append("userEvent", String(opts.userEvent)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleApiHttpBody(data); } /** * Bulk import of user events. Request processing might be synchronous. * Events that already exist are skipped. Use this method for backfilling * historical user events. Operation.response is of type ImportResponse. Note * that it is possible for a subset of the items to be successfully inserted. * Operation.metadata is of type ImportMetadata. * * @param parent Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` */ async projectsLocationsUserEventsImport(parent: string, req: GoogleCloudDiscoveryengineV1ImportUserEventsRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1ImportUserEventsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Writes a single user event. * * @param parent Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. */ async projectsLocationsUserEventsWrite(parent: string, req: GoogleCloudDiscoveryengineV1UserEvent, opts: ProjectsLocationsUserEventsWriteOptions = {}): Promise { req = serializeGoogleCloudDiscoveryengineV1UserEvent(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userEvents:write`); if (opts.writeAsync !== undefined) { url.searchParams.append("writeAsync", String(opts.writeAsync)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudDiscoveryengineV1UserEvent(data); } /** * Updates the User License. This method is used for batch assign/unassign * licenses to users. * * @param parent Required. The parent UserStore resource name, format: `projects/{project}/locations/{location}/userStores/{user_store_id}`. */ async projectsLocationsUserStoresBatchUpdateUserLicenses(parent: string, req: GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequest): Promise { req = serializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }:batchUpdateUserLicenses`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates a new User Store. * * @param parent Required. The parent collection resource name, such as `projects/{project}/locations/{location}`. */ async projectsLocationsUserStoresCreate(parent: string, req: GoogleCloudDiscoveryengineV1UserStore, opts: ProjectsLocationsUserStoresCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/userStores`); if (opts.userStoreId !== undefined) { url.searchParams.append("userStoreId", String(opts.userStoreId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudDiscoveryengineV1UserStore; } /** * Deletes the User Store. * * @param name Required. The name of the User Store to delete. Format: `projects/{project}/locations/{location}/userStores/{user_store_id}` */ async projectsLocationsUserStoresDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Gets the User Store. * * @param name Required. The name of the User Store to get. Format: `projects/{project}/locations/{location}/userStores/{user_store_id}` */ async projectsLocationsUserStoresGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1UserStore; } /** * Lists all the LicenseConfigUsageStatss associated with the project. * * @param parent Required. The parent branch resource name, such as `projects/{project}/locations/{location}/userStores/{user_store_id}`. */ async projectsLocationsUserStoresLicenseConfigsUsageStatsList(parent: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/licenseConfigsUsageStats`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse(data); } /** * Updates the User Store. * * @param name Immutable. The full resource name of the User Store, in the format of `projects/{project}/locations/{location}/userStores/{user_store}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ async projectsLocationsUserStoresPatch(name: string, req: GoogleCloudDiscoveryengineV1UserStore, opts: ProjectsLocationsUserStoresPatchOptions = {}): Promise { opts = serializeProjectsLocationsUserStoresPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudDiscoveryengineV1UserStore; } /** * Lists the User Licenses. * * @param parent Required. The parent UserStore resource name, format: `projects/{project}/locations/{location}/userStores/{user_store_id}`. */ async projectsLocationsUserStoresUserLicensesList(parent: string, opts: ProjectsLocationsUserStoresUserLicensesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/userLicenses`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudDiscoveryengineV1ListUserLicensesResponse; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsOperationsCancel(name: string, req: GoogleLongrunningCancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsOperationsList(name: string, opts: ProjectsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningListOperationsResponse; } /** * Provisions the project resource. During the process, related systems will * get prepared and initialized. Caller must read the [Terms for data * use](https://cloud.google.com/retail/data-use-terms), and optionally * specify in request to provide consent to that service terms. * * @param name Required. Full resource name of a Project, such as `projects/{project_id_or_number}`. */ async projectsProvision(name: string, req: GoogleCloudDiscoveryengineV1ProvisionProjectRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:provision`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } } /** * Information to read/write to blobstore2. */ export interface GdataBlobstore2Info { /** * The blob generation id. */ blobGeneration?: bigint; /** * The blob id, e.g., /blobstore/prod/playground/scotty */ blobId?: string; /** * Read handle passed from Bigstore -> Scotty for a GCS download. This is a * signed, serialized blobstore2.ReadHandle proto which must never be set * outside of Bigstore, and is not applicable to non-GCS media downloads. */ downloadReadHandle?: Uint8Array; /** * The blob read token. Needed to read blobs that have not been replicated. * Might not be available until the final call. */ readToken?: string; /** * Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a * signed, serialized blobstore2.BlobMetadataContainer proto which must never * be consumed outside of Bigstore, and is not applicable to non-GCS media * uploads. */ uploadMetadataContainer?: Uint8Array; } function serializeGdataBlobstore2Info(data: any): GdataBlobstore2Info { return { ...data, blobGeneration: data["blobGeneration"] !== undefined ? String(data["blobGeneration"]) : undefined, downloadReadHandle: data["downloadReadHandle"] !== undefined ? encodeBase64(data["downloadReadHandle"]) : undefined, uploadMetadataContainer: data["uploadMetadataContainer"] !== undefined ? encodeBase64(data["uploadMetadataContainer"]) : undefined, }; } function deserializeGdataBlobstore2Info(data: any): GdataBlobstore2Info { return { ...data, blobGeneration: data["blobGeneration"] !== undefined ? BigInt(data["blobGeneration"]) : undefined, downloadReadHandle: data["downloadReadHandle"] !== undefined ? decodeBase64(data["downloadReadHandle"] as string) : undefined, uploadMetadataContainer: data["uploadMetadataContainer"] !== undefined ? decodeBase64(data["uploadMetadataContainer"] as string) : undefined, }; } /** * A sequence of media data references representing composite data. Introduced * to support Bigstore composite objects. For details, visit * http://go/bigstore-composites. */ export interface GdataCompositeMedia { /** * Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should * be the byte representation of a blobstore.BlobRef. Since Blobstore is * deprecating v1, use blobstore2_info instead. For now, any v2 blob will also * be represented in this field as v1 BlobRef. */ blobRef?: Uint8Array; /** * Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to * a v2 blob. */ blobstore2Info?: GdataBlobstore2Info; /** * A binary data reference for a media download. Serves as a * technology-agnostic binary reference in some Google infrastructure. This * value is a serialized storage_cosmo.BinaryReference proto. Storing it as * bytes is a hack to get around the fact that the cosmo proto (as well as * others it includes) doesn't support JavaScript. This prevents us from * including the actual type of this field. */ cosmoBinaryReference?: Uint8Array; /** * crc32.c hash for the payload. */ crc32cHash?: number; /** * Media data, set if reference_type is INLINE */ inline?: Uint8Array; /** * Size of the data, in bytes */ length?: bigint; /** * MD5 hash for the payload. */ md5Hash?: Uint8Array; /** * Reference to a TI Blob, set if reference_type is BIGSTORE_REF. */ objectId?: GdataObjectId; /** * Path to the data, set if reference_type is PATH */ path?: string; /** * Describes what the field reference contains. */ referenceType?: | "PATH" | "BLOB_REF" | "INLINE" | "BIGSTORE_REF" | "COSMO_BINARY_REFERENCE"; /** * SHA-1 hash for the payload. */ sha1Hash?: Uint8Array; } function serializeGdataCompositeMedia(data: any): GdataCompositeMedia { return { ...data, blobRef: data["blobRef"] !== undefined ? encodeBase64(data["blobRef"]) : undefined, blobstore2Info: data["blobstore2Info"] !== undefined ? serializeGdataBlobstore2Info(data["blobstore2Info"]) : undefined, cosmoBinaryReference: data["cosmoBinaryReference"] !== undefined ? encodeBase64(data["cosmoBinaryReference"]) : undefined, inline: data["inline"] !== undefined ? encodeBase64(data["inline"]) : undefined, length: data["length"] !== undefined ? String(data["length"]) : undefined, md5Hash: data["md5Hash"] !== undefined ? encodeBase64(data["md5Hash"]) : undefined, objectId: data["objectId"] !== undefined ? serializeGdataObjectId(data["objectId"]) : undefined, sha1Hash: data["sha1Hash"] !== undefined ? encodeBase64(data["sha1Hash"]) : undefined, }; } function deserializeGdataCompositeMedia(data: any): GdataCompositeMedia { return { ...data, blobRef: data["blobRef"] !== undefined ? decodeBase64(data["blobRef"] as string) : undefined, blobstore2Info: data["blobstore2Info"] !== undefined ? deserializeGdataBlobstore2Info(data["blobstore2Info"]) : undefined, cosmoBinaryReference: data["cosmoBinaryReference"] !== undefined ? decodeBase64(data["cosmoBinaryReference"] as string) : undefined, inline: data["inline"] !== undefined ? decodeBase64(data["inline"] as string) : undefined, length: data["length"] !== undefined ? BigInt(data["length"]) : undefined, md5Hash: data["md5Hash"] !== undefined ? decodeBase64(data["md5Hash"] as string) : undefined, objectId: data["objectId"] !== undefined ? deserializeGdataObjectId(data["objectId"]) : undefined, sha1Hash: data["sha1Hash"] !== undefined ? decodeBase64(data["sha1Hash"] as string) : undefined, }; } /** * Detailed Content-Type information from Scotty. The Content-Type of the media * will typically be filled in by the header or Scotty's best_guess, but this * extended information provides the backend with more information so that it * can make a better decision if needed. This is only used on media upload * requests from Scotty. */ export interface GdataContentTypeInfo { /** * Scotty's best guess of what the content type of the file is. */ bestGuess?: string; /** * The content type of the file derived by looking at specific bytes (i.e. * "magic bytes") of the actual file. */ fromBytes?: string; /** * The content type of the file derived from the file extension of the * original file name used by the client. */ fromFileName?: string; /** * The content type of the file as specified in the request headers, * multipart headers, or RUPIO start request. */ fromHeader?: string; /** * The content type of the file derived from the file extension of the URL * path. The URL path is assumed to represent a file name (which is typically * only true for agents that are providing a REST API). */ fromUrlPath?: string; } /** * Backend response for a Diff get checksums response. For details on the * Scotty Diff protocol, visit http://go/scotty-diff-protocol. */ export interface GdataDiffChecksumsResponse { /** * Exactly one of these fields must be populated. If checksums_location is * filled, the server will return the corresponding contents to the user. If * object_location is filled, the server will calculate the checksums based on * the content there and return that to the user. For details on the format of * the checksums, see http://go/scotty-diff-protocol. */ checksumsLocation?: GdataCompositeMedia; /** * The chunk size of checksums. Must be a multiple of 256KB. */ chunkSizeBytes?: bigint; /** * If set, calculate the checksums based on the contents and return them to * the caller. */ objectLocation?: GdataCompositeMedia; /** * The total size of the server object. */ objectSizeBytes?: bigint; /** * The object version of the object the checksums are being returned for. */ objectVersion?: string; } function serializeGdataDiffChecksumsResponse(data: any): GdataDiffChecksumsResponse { return { ...data, checksumsLocation: data["checksumsLocation"] !== undefined ? serializeGdataCompositeMedia(data["checksumsLocation"]) : undefined, chunkSizeBytes: data["chunkSizeBytes"] !== undefined ? String(data["chunkSizeBytes"]) : undefined, objectLocation: data["objectLocation"] !== undefined ? serializeGdataCompositeMedia(data["objectLocation"]) : undefined, objectSizeBytes: data["objectSizeBytes"] !== undefined ? String(data["objectSizeBytes"]) : undefined, }; } function deserializeGdataDiffChecksumsResponse(data: any): GdataDiffChecksumsResponse { return { ...data, checksumsLocation: data["checksumsLocation"] !== undefined ? deserializeGdataCompositeMedia(data["checksumsLocation"]) : undefined, chunkSizeBytes: data["chunkSizeBytes"] !== undefined ? BigInt(data["chunkSizeBytes"]) : undefined, objectLocation: data["objectLocation"] !== undefined ? deserializeGdataCompositeMedia(data["objectLocation"]) : undefined, objectSizeBytes: data["objectSizeBytes"] !== undefined ? BigInt(data["objectSizeBytes"]) : undefined, }; } /** * Backend response for a Diff download response. For details on the Scotty * Diff protocol, visit http://go/scotty-diff-protocol. */ export interface GdataDiffDownloadResponse { /** * The original object location. */ objectLocation?: GdataCompositeMedia; } function serializeGdataDiffDownloadResponse(data: any): GdataDiffDownloadResponse { return { ...data, objectLocation: data["objectLocation"] !== undefined ? serializeGdataCompositeMedia(data["objectLocation"]) : undefined, }; } function deserializeGdataDiffDownloadResponse(data: any): GdataDiffDownloadResponse { return { ...data, objectLocation: data["objectLocation"] !== undefined ? deserializeGdataCompositeMedia(data["objectLocation"]) : undefined, }; } /** * A Diff upload request. For details on the Scotty Diff protocol, visit * http://go/scotty-diff-protocol. */ export interface GdataDiffUploadRequest { /** * The location of the checksums for the new object. Agents must clone the * object located here, as the upload server will delete the contents once a * response is received. For details on the format of the checksums, see * http://go/scotty-diff-protocol. */ checksumsInfo?: GdataCompositeMedia; /** * The location of the new object. Agents must clone the object located here, * as the upload server will delete the contents once a response is received. */ objectInfo?: GdataCompositeMedia; /** * The object version of the object that is the base version the incoming * diff script will be applied to. This field will always be filled in. */ objectVersion?: string; } function serializeGdataDiffUploadRequest(data: any): GdataDiffUploadRequest { return { ...data, checksumsInfo: data["checksumsInfo"] !== undefined ? serializeGdataCompositeMedia(data["checksumsInfo"]) : undefined, objectInfo: data["objectInfo"] !== undefined ? serializeGdataCompositeMedia(data["objectInfo"]) : undefined, }; } function deserializeGdataDiffUploadRequest(data: any): GdataDiffUploadRequest { return { ...data, checksumsInfo: data["checksumsInfo"] !== undefined ? deserializeGdataCompositeMedia(data["checksumsInfo"]) : undefined, objectInfo: data["objectInfo"] !== undefined ? deserializeGdataCompositeMedia(data["objectInfo"]) : undefined, }; } /** * Backend response for a Diff upload request. For details on the Scotty Diff * protocol, visit http://go/scotty-diff-protocol. */ export interface GdataDiffUploadResponse { /** * The object version of the object at the server. Must be included in the * end notification response. The version in the end notification response * must correspond to the new version of the object that is now stored at the * server, after the upload. */ objectVersion?: string; /** * The location of the original file for a diff upload request. Must be * filled in if responding to an upload start notification. */ originalObject?: GdataCompositeMedia; } function serializeGdataDiffUploadResponse(data: any): GdataDiffUploadResponse { return { ...data, originalObject: data["originalObject"] !== undefined ? serializeGdataCompositeMedia(data["originalObject"]) : undefined, }; } function deserializeGdataDiffUploadResponse(data: any): GdataDiffUploadResponse { return { ...data, originalObject: data["originalObject"] !== undefined ? deserializeGdataCompositeMedia(data["originalObject"]) : undefined, }; } /** * Backend response for a Diff get version response. For details on the Scotty * Diff protocol, visit http://go/scotty-diff-protocol. */ export interface GdataDiffVersionResponse { /** * The total size of the server object. */ objectSizeBytes?: bigint; /** * The version of the object stored at the server. */ objectVersion?: string; } function serializeGdataDiffVersionResponse(data: any): GdataDiffVersionResponse { return { ...data, objectSizeBytes: data["objectSizeBytes"] !== undefined ? String(data["objectSizeBytes"]) : undefined, }; } function deserializeGdataDiffVersionResponse(data: any): GdataDiffVersionResponse { return { ...data, objectSizeBytes: data["objectSizeBytes"] !== undefined ? BigInt(data["objectSizeBytes"]) : undefined, }; } /** * Parameters specific to media downloads. */ export interface GdataDownloadParameters { /** * A boolean to be returned in the response to Scotty. Allows/disallows gzip * encoding of the payload content when the server thinks it's advantageous * (hence, does not guarantee compression) which allows Scotty to GZip the * response to the client. */ allowGzipCompression?: boolean; /** * Determining whether or not Apiary should skip the inclusion of any * Content-Range header on its response to Scotty. */ ignoreRange?: boolean; } /** * A reference to data stored on the filesystem, on GFS or in blobstore. */ export interface GdataMedia { /** * Deprecated, use one of explicit hash type fields instead. Algorithm used * for calculating the hash. As of 2011/01/21, "MD5" is the only possible * value for this field. New values may be added at any time. */ algorithm?: string; /** * Use object_id instead. */ bigstoreObjectRef?: Uint8Array; /** * Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should * be the byte representation of a blobstore.BlobRef. Since Blobstore is * deprecating v1, use blobstore2_info instead. For now, any v2 blob will also * be represented in this field as v1 BlobRef. */ blobRef?: Uint8Array; /** * Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to * a v2 blob. */ blobstore2Info?: GdataBlobstore2Info; /** * A composite media composed of one or more media objects, set if * reference_type is COMPOSITE_MEDIA. The media length field must be set to * the sum of the lengths of all composite media objects. Note: All composite * media must have length specified. */ compositeMedia?: GdataCompositeMedia[]; /** * MIME type of the data */ contentType?: string; /** * Extended content type information provided for Scotty uploads. */ contentTypeInfo?: GdataContentTypeInfo; /** * A binary data reference for a media download. Serves as a * technology-agnostic binary reference in some Google infrastructure. This * value is a serialized storage_cosmo.BinaryReference proto. Storing it as * bytes is a hack to get around the fact that the cosmo proto (as well as * others it includes) doesn't support JavaScript. This prevents us from * including the actual type of this field. */ cosmoBinaryReference?: Uint8Array; /** * For Scotty Uploads: Scotty-provided hashes for uploads For Scotty * Downloads: (WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A * Hash provided by the agent to be used to verify the data being downloaded. * Currently only supported for inline payloads. Further, only crc32c_hash is * currently supported. */ crc32cHash?: number; /** * Set if reference_type is DIFF_CHECKSUMS_RESPONSE. */ diffChecksumsResponse?: GdataDiffChecksumsResponse; /** * Set if reference_type is DIFF_DOWNLOAD_RESPONSE. */ diffDownloadResponse?: GdataDiffDownloadResponse; /** * Set if reference_type is DIFF_UPLOAD_REQUEST. */ diffUploadRequest?: GdataDiffUploadRequest; /** * Set if reference_type is DIFF_UPLOAD_RESPONSE. */ diffUploadResponse?: GdataDiffUploadResponse; /** * Set if reference_type is DIFF_VERSION_RESPONSE. */ diffVersionResponse?: GdataDiffVersionResponse; /** * Parameters for a media download. */ downloadParameters?: GdataDownloadParameters; /** * Original file name */ filename?: string; /** * Deprecated, use one of explicit hash type fields instead. These two hash * related fields will only be populated on Scotty based media uploads and * will contain the content of the hash group in the NotificationRequest: * http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto&q=class:Hash * Hex encoded hash value of the uploaded media. */ hash?: string; /** * For Scotty uploads only. If a user sends a hash code and the backend has * requested that Scotty verify the upload against the client hash, Scotty * will perform the check on behalf of the backend and will reject it if the * hashes don't match. This is set to true if Scotty performed this * verification. */ hashVerified?: boolean; /** * Media data, set if reference_type is INLINE */ inline?: Uint8Array; /** * |is_potential_retry| is set false only when Scotty is certain that it has * not sent the request before. When a client resumes an upload, this field * must be set true in agent calls, because Scotty cannot be certain that it * has never sent the request before due to potential failure in the session * state persistence. */ isPotentialRetry?: boolean; /** * Size of the data, in bytes */ length?: bigint; /** * Scotty-provided MD5 hash for an upload. */ md5Hash?: Uint8Array; /** * Media id to forward to the operation GetMedia. Can be set if * reference_type is GET_MEDIA. */ mediaId?: Uint8Array; /** * Reference to a TI Blob, set if reference_type is BIGSTORE_REF. */ objectId?: GdataObjectId; /** * Path to the data, set if reference_type is PATH */ path?: string; /** * Describes what the field reference contains. */ referenceType?: | "PATH" | "BLOB_REF" | "INLINE" | "GET_MEDIA" | "COMPOSITE_MEDIA" | "BIGSTORE_REF" | "DIFF_VERSION_RESPONSE" | "DIFF_CHECKSUMS_RESPONSE" | "DIFF_DOWNLOAD_RESPONSE" | "DIFF_UPLOAD_REQUEST" | "DIFF_UPLOAD_RESPONSE" | "COSMO_BINARY_REFERENCE" | "ARBITRARY_BYTES"; /** * Scotty-provided SHA1 hash for an upload. */ sha1Hash?: Uint8Array; /** * Scotty-provided SHA256 hash for an upload. */ sha256Hash?: Uint8Array; /** * Time at which the media data was last updated, in milliseconds since UNIX * epoch */ timestamp?: bigint; /** * A unique fingerprint/version id for the media data */ token?: string; } function serializeGdataMedia(data: any): GdataMedia { return { ...data, bigstoreObjectRef: data["bigstoreObjectRef"] !== undefined ? encodeBase64(data["bigstoreObjectRef"]) : undefined, blobRef: data["blobRef"] !== undefined ? encodeBase64(data["blobRef"]) : undefined, blobstore2Info: data["blobstore2Info"] !== undefined ? serializeGdataBlobstore2Info(data["blobstore2Info"]) : undefined, compositeMedia: data["compositeMedia"] !== undefined ? data["compositeMedia"].map((item: any) => (serializeGdataCompositeMedia(item))) : undefined, cosmoBinaryReference: data["cosmoBinaryReference"] !== undefined ? encodeBase64(data["cosmoBinaryReference"]) : undefined, diffChecksumsResponse: data["diffChecksumsResponse"] !== undefined ? serializeGdataDiffChecksumsResponse(data["diffChecksumsResponse"]) : undefined, diffDownloadResponse: data["diffDownloadResponse"] !== undefined ? serializeGdataDiffDownloadResponse(data["diffDownloadResponse"]) : undefined, diffUploadRequest: data["diffUploadRequest"] !== undefined ? serializeGdataDiffUploadRequest(data["diffUploadRequest"]) : undefined, diffUploadResponse: data["diffUploadResponse"] !== undefined ? serializeGdataDiffUploadResponse(data["diffUploadResponse"]) : undefined, diffVersionResponse: data["diffVersionResponse"] !== undefined ? serializeGdataDiffVersionResponse(data["diffVersionResponse"]) : undefined, inline: data["inline"] !== undefined ? encodeBase64(data["inline"]) : undefined, length: data["length"] !== undefined ? String(data["length"]) : undefined, md5Hash: data["md5Hash"] !== undefined ? encodeBase64(data["md5Hash"]) : undefined, mediaId: data["mediaId"] !== undefined ? encodeBase64(data["mediaId"]) : undefined, objectId: data["objectId"] !== undefined ? serializeGdataObjectId(data["objectId"]) : undefined, sha1Hash: data["sha1Hash"] !== undefined ? encodeBase64(data["sha1Hash"]) : undefined, sha256Hash: data["sha256Hash"] !== undefined ? encodeBase64(data["sha256Hash"]) : undefined, timestamp: data["timestamp"] !== undefined ? String(data["timestamp"]) : undefined, }; } function deserializeGdataMedia(data: any): GdataMedia { return { ...data, bigstoreObjectRef: data["bigstoreObjectRef"] !== undefined ? decodeBase64(data["bigstoreObjectRef"] as string) : undefined, blobRef: data["blobRef"] !== undefined ? decodeBase64(data["blobRef"] as string) : undefined, blobstore2Info: data["blobstore2Info"] !== undefined ? deserializeGdataBlobstore2Info(data["blobstore2Info"]) : undefined, compositeMedia: data["compositeMedia"] !== undefined ? data["compositeMedia"].map((item: any) => (deserializeGdataCompositeMedia(item))) : undefined, cosmoBinaryReference: data["cosmoBinaryReference"] !== undefined ? decodeBase64(data["cosmoBinaryReference"] as string) : undefined, diffChecksumsResponse: data["diffChecksumsResponse"] !== undefined ? deserializeGdataDiffChecksumsResponse(data["diffChecksumsResponse"]) : undefined, diffDownloadResponse: data["diffDownloadResponse"] !== undefined ? deserializeGdataDiffDownloadResponse(data["diffDownloadResponse"]) : undefined, diffUploadRequest: data["diffUploadRequest"] !== undefined ? deserializeGdataDiffUploadRequest(data["diffUploadRequest"]) : undefined, diffUploadResponse: data["diffUploadResponse"] !== undefined ? deserializeGdataDiffUploadResponse(data["diffUploadResponse"]) : undefined, diffVersionResponse: data["diffVersionResponse"] !== undefined ? deserializeGdataDiffVersionResponse(data["diffVersionResponse"]) : undefined, inline: data["inline"] !== undefined ? decodeBase64(data["inline"] as string) : undefined, length: data["length"] !== undefined ? BigInt(data["length"]) : undefined, md5Hash: data["md5Hash"] !== undefined ? decodeBase64(data["md5Hash"] as string) : undefined, mediaId: data["mediaId"] !== undefined ? decodeBase64(data["mediaId"] as string) : undefined, objectId: data["objectId"] !== undefined ? deserializeGdataObjectId(data["objectId"]) : undefined, sha1Hash: data["sha1Hash"] !== undefined ? decodeBase64(data["sha1Hash"] as string) : undefined, sha256Hash: data["sha256Hash"] !== undefined ? decodeBase64(data["sha256Hash"] as string) : undefined, timestamp: data["timestamp"] !== undefined ? BigInt(data["timestamp"]) : undefined, }; } /** * This is a copy of the tech.blob.ObjectId proto, which could not be used * directly here due to transitive closure issues with JavaScript support; see * http://b/8801763. */ export interface GdataObjectId { /** * The name of the bucket to which this object belongs. */ bucketName?: string; /** * Generation of the object. Generations are monotonically increasing across * writes, allowing them to be be compared to determine which generation is * newer. If this is omitted in a request, then you are requesting the live * object. See http://go/bigstore-versions */ generation?: bigint; /** * The name of the object. */ objectName?: string; } function serializeGdataObjectId(data: any): GdataObjectId { return { ...data, generation: data["generation"] !== undefined ? String(data["generation"]) : undefined, }; } function deserializeGdataObjectId(data: any): GdataObjectId { return { ...data, generation: data["generation"] !== undefined ? BigInt(data["generation"]) : undefined, }; } /** * `Distribution` contains summary statistics for a population of values. It * optionally contains a histogram representing the distribution of those values * across a set of buckets. The summary statistics are the count, mean, sum of * the squared deviation from the mean, the minimum, and the maximum of the set * of population of values. The histogram is based on a sequence of buckets and * gives a count of values that fall into each bucket. The boundaries of the * buckets are given either explicitly or by formulas for buckets of fixed or * exponentially increasing widths. Although it is not forbidden, it is * generally a bad idea to include non-finite values (infinities or NaNs) in the * population of values, as this will render the `mean` and * `sum_of_squared_deviation` fields meaningless. */ export interface GoogleApiDistribution { /** * The number of values in each bucket of the histogram, as described in * `bucket_options`. If the distribution does not have a histogram, then omit * this field. If there is a histogram, then the sum of the values in * `bucket_counts` must equal the value in the `count` field of the * distribution. If present, `bucket_counts` should contain N values, where N * is the number of buckets specified in `bucket_options`. If you supply fewer * than N values, the remaining values are assumed to be 0. The order of the * values in `bucket_counts` follows the bucket numbering schemes described * for the three bucket types. The first value must be the count for the * underflow bucket (number 0). The next N-2 values are the counts for the * finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is * the count for the overflow bucket (number N-1). */ bucketCounts?: bigint[]; /** * Defines the histogram bucket boundaries. If the distribution does not * contain a histogram, then omit this field. */ bucketOptions?: GoogleApiDistributionBucketOptions; /** * The number of values in the population. Must be non-negative. This value * must equal the sum of the values in `bucket_counts` if a histogram is * provided. */ count?: bigint; /** * Must be in increasing order of `value` field. */ exemplars?: GoogleApiDistributionExemplar[]; /** * The arithmetic mean of the values in the population. If `count` is zero * then this field must be zero. */ mean?: number; /** * If specified, contains the range of the population values. The field must * not be present if the `count` is zero. */ range?: GoogleApiDistributionRange; /** * The sum of squared deviations from the mean of the values in the * population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, "The * Art of Computer Programming", Vol. 2, page 232, 3rd edition describes * Welford's method for accumulating this sum in one pass. If `count` is zero * then this field must be zero. */ sumOfSquaredDeviation?: number; } function serializeGoogleApiDistribution(data: any): GoogleApiDistribution { return { ...data, bucketCounts: data["bucketCounts"] !== undefined ? data["bucketCounts"].map((item: any) => (String(item))) : undefined, count: data["count"] !== undefined ? String(data["count"]) : undefined, exemplars: data["exemplars"] !== undefined ? data["exemplars"].map((item: any) => (serializeGoogleApiDistributionExemplar(item))) : undefined, }; } function deserializeGoogleApiDistribution(data: any): GoogleApiDistribution { return { ...data, bucketCounts: data["bucketCounts"] !== undefined ? data["bucketCounts"].map((item: any) => (BigInt(item))) : undefined, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, exemplars: data["exemplars"] !== undefined ? data["exemplars"].map((item: any) => (deserializeGoogleApiDistributionExemplar(item))) : undefined, }; } /** * `BucketOptions` describes the bucket boundaries used to create a histogram * for the distribution. The buckets can be in a linear sequence, an exponential * sequence, or each bucket can be specified explicitly. `BucketOptions` does * not include the number of values in each bucket. A bucket has an inclusive * lower bound and exclusive upper bound for the values that are counted for * that bucket. The upper bound of a bucket must be strictly greater than the * lower bound. The sequence of N buckets for a distribution consists of an * underflow bucket (number 0), zero or more finite buckets (number 1 through N * - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the * lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - * 1. The buckets span the whole range of finite values: lower bound of the * underflow bucket is -infinity and the upper bound of the overflow bucket is * +infinity. The finite buckets are so-called because both bounds are finite. */ export interface GoogleApiDistributionBucketOptions { /** * The explicit buckets. */ explicitBuckets?: GoogleApiDistributionBucketOptionsExplicit; /** * The exponential buckets. */ exponentialBuckets?: GoogleApiDistributionBucketOptionsExponential; /** * The linear bucket. */ linearBuckets?: GoogleApiDistributionBucketOptionsLinear; } /** * Specifies a set of buckets with arbitrary widths. There are `size(bounds) + * 1` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 <= * i < N-1): bounds[i] Lower bound (1 <= i < N); bounds[i - 1] The `bounds` * field must contain at least one element. If `bounds` has only one element, * then there are no finite buckets, and that single element is the common * boundary of the overflow and underflow buckets. */ export interface GoogleApiDistributionBucketOptionsExplicit { /** * The values must be monotonically increasing. */ bounds?: number[]; } /** * Specifies an exponential sequence of buckets that have a width that is * proportional to the value of the lower bound. Each bucket represents a * constant relative uncertainty on a specific value in the bucket. There are * `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the following * boundaries: Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower * bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). */ export interface GoogleApiDistributionBucketOptionsExponential { /** * Must be greater than 1. */ growthFactor?: number; /** * Must be greater than 0. */ numFiniteBuckets?: number; /** * Must be greater than 0. */ scale?: number; } /** * Specifies a linear sequence of buckets that all have the same width (except * overflow and underflow). Each bucket represents a constant absolute * uncertainty on the specific value in the bucket. There are * `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the following * boundaries: Upper bound (0 <= i < N-1): offset + (width * i). Lower bound (1 * <= i < N): offset + (width * (i - 1)). */ export interface GoogleApiDistributionBucketOptionsLinear { /** * Must be greater than 0. */ numFiniteBuckets?: number; /** * Lower bound of the first bucket. */ offset?: number; /** * Must be greater than 0. */ width?: number; } /** * Exemplars are example points that may be used to annotate aggregated * distribution values. They are metadata that gives information about a * particular value added to a Distribution bucket, such as a trace ID that was * active when a value was added. They may contain further information, such as * a example values and timestamps, origin, etc. */ export interface GoogleApiDistributionExemplar { /** * Contextual information about the example value. Examples are: Trace: * type.googleapis.com/google.monitoring.v3.SpanContext Literal string: * type.googleapis.com/google.protobuf.StringValue Labels dropped during * aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There * may be only a single attachment of any given message type in a single * exemplar, and this is enforced by the system. */ attachments?: { [key: string]: any }[]; /** * The observation (sampling) time of the above value. */ timestamp?: Date; /** * Value of the exemplar point. This value determines to which bucket the * exemplar belongs. */ value?: number; } function serializeGoogleApiDistributionExemplar(data: any): GoogleApiDistributionExemplar { return { ...data, timestamp: data["timestamp"] !== undefined ? data["timestamp"].toISOString() : undefined, }; } function deserializeGoogleApiDistributionExemplar(data: any): GoogleApiDistributionExemplar { return { ...data, timestamp: data["timestamp"] !== undefined ? new Date(data["timestamp"]) : undefined, }; } /** * The range of the population values. */ export interface GoogleApiDistributionRange { /** * The maximum of the population values. */ max?: number; /** * The minimum of the population values. */ min?: number; } /** * Message that represents an arbitrary HTTP body. It should only be used for * payload formats that can't be represented as JSON, such as raw binary or an * HTML page. This message can be used both in streaming and non-streaming API * methods in the request as well as the response. It can be used as a top-level * request field, which is convenient if one wants to extract parameters from * either the URL or HTTP template into the request fields and also want access * to the raw HTTP body. Example: message GetResourceRequest { // A unique * request id. string request_id = 1; // The raw HTTP body is bound to this * field. google.api.HttpBody http_body = 2; } service ResourceService { rpc * GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc * UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } * Example with streaming methods: service CaldavService { rpc * GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); * rpc UpdateCalendar(stream google.api.HttpBody) returns (stream * google.api.HttpBody); } Use of this type only changes how the request and * response bodies are handled, all other features will continue to work * unchanged. */ export interface GoogleApiHttpBody { /** * The HTTP Content-Type header value specifying the content type of the * body. */ contentType?: string; /** * The HTTP request/response body as raw binary. */ data?: Uint8Array; /** * Application specific response metadata. Must be set in the first response * for streaming APIs. */ extensions?: { [key: string]: any }[]; } function serializeGoogleApiHttpBody(data: any): GoogleApiHttpBody { return { ...data, data: data["data"] !== undefined ? encodeBase64(data["data"]) : undefined, }; } function deserializeGoogleApiHttpBody(data: any): GoogleApiHttpBody { return { ...data, data: data["data"] !== undefined ? decodeBase64(data["data"] as string) : undefined, }; } /** * A specific metric, identified by specifying values for all of the labels of * a `MetricDescriptor`. */ export interface GoogleApiMetric { /** * The set of label values that uniquely identify this metric. All labels * listed in the `MetricDescriptor` must be assigned values. */ labels?: { [key: string]: string }; /** * An existing metric type, see google.api.MetricDescriptor. For example, * `custom.googleapis.com/invoice/paid/amount`. */ type?: string; } /** * An object representing a resource that can be used for monitoring, logging, * billing, or other purposes. Examples include virtual machine instances, * databases, and storage devices such as disks. The `type` field identifies a * MonitoredResourceDescriptor object that describes the resource's schema. * Information in the `labels` field identifies the actual resource and its * attributes according to the schema. For example, a particular Compute Engine * VM instance could be represented by the following object, because the * MonitoredResourceDescriptor for `"gce_instance"` has labels `"project_id"`, * `"instance_id"` and `"zone"`: { "type": "gce_instance", "labels": { * "project_id": "my-project", "instance_id": "12345678901234", "zone": * "us-central1-a" }} */ export interface GoogleApiMonitoredResource { /** * Required. Values for all of the labels listed in the associated monitored * resource descriptor. For example, Compute Engine VM instances use the * labels `"project_id"`, `"instance_id"`, and `"zone"`. */ labels?: { [key: string]: string }; /** * Required. The monitored resource type. This field must match the `type` * field of a MonitoredResourceDescriptor object. For example, the type of a * Compute Engine VM instance is `gce_instance`. Some descriptors include the * service name in the type; for example, the type of a Datastream stream is * `datastream.googleapis.com/Stream`. */ type?: string; } /** * Auxiliary metadata for a MonitoredResource object. MonitoredResource objects * contain the minimum set of information to uniquely identify a monitored * resource instance. There is some other useful auxiliary metadata. Monitoring * and Logging use an ingestion pipeline to extract metadata for cloud resources * of all types, and store the metadata in this message. */ export interface GoogleApiMonitoredResourceMetadata { /** * Output only. Values for predefined system metadata labels. System labels * are a kind of metadata extracted by Google, including "machine_image", * "vpc", "subnet_id", "security_group", "name", etc. System label values can * be only strings, Boolean values, or a list of strings. For example: { * "name": "my-test-instance", "security_group": ["a", "b", "c"], * "spot_instance": false } */ systemLabels?: { [key: string]: any }; /** * Output only. A map of user-defined metadata labels. */ userLabels?: { [key: string]: string }; } /** * The error payload that is populated on LRO sync APIs, including the * following: * * `google.cloud.discoveryengine.v1main.DataConnectorService.SetUpDataConnector` * * * `google.cloud.discoveryengine.v1main.DataConnectorService.StartConnectorRun` */ export interface GoogleCloudDiscoveryengineLoggingConnectorRunErrorContext { /** * The full resource name of the Connector Run. Format: * `projects/*\/locations/*\/collections/*\/dataConnector/connectorRuns/*`. * The `connector_run_id` is system-generated. */ connectorRun?: string; /** * The full resource name of the DataConnector. Format: * `projects/*\/locations/*\/collections/*\/dataConnector`. */ dataConnector?: string; /** * The time when the connector run ended. */ endTime?: Date; /** * The entity to sync for the connector run. */ entity?: string; /** * The operation resource name of the LRO to sync the connector. */ operation?: string; /** * The time when the connector run started. */ startTime?: Date; /** * The type of sync run. Can be one of the following: * `FULL` * * `INCREMENTAL` */ syncType?: string; } function serializeGoogleCloudDiscoveryengineLoggingConnectorRunErrorContext(data: any): GoogleCloudDiscoveryengineLoggingConnectorRunErrorContext { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineLoggingConnectorRunErrorContext(data: any): GoogleCloudDiscoveryengineLoggingConnectorRunErrorContext { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * A description of the context in which an error occurred. */ export interface GoogleCloudDiscoveryengineLoggingErrorContext { /** * The HTTP request which was processed when the error was triggered. */ httpRequest?: GoogleCloudDiscoveryengineLoggingHttpRequestContext; /** * The location in the source code where the decision was made to report the * error, usually the place where it was logged. */ reportLocation?: GoogleCloudDiscoveryengineLoggingSourceLocation; } /** * An error log which is reported to the Error Reporting system. */ export interface GoogleCloudDiscoveryengineLoggingErrorLog { /** * The error payload that is populated on LRO connector sync APIs. */ connectorRunPayload?: GoogleCloudDiscoveryengineLoggingConnectorRunErrorContext; /** * A description of the context in which the error occurred. */ context?: GoogleCloudDiscoveryengineLoggingErrorContext; /** * The error payload that is populated on LRO import APIs. */ importPayload?: GoogleCloudDiscoveryengineLoggingImportErrorContext; /** * A message describing the error. */ message?: string; /** * The API request payload, represented as a protocol buffer. Most API * request types are supported—for example: * * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocumentRequest` * * * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEventRequest` */ requestPayload?: { [key: string]: any }; /** * The API response payload, represented as a protocol buffer. This is used * to log some "soft errors", where the response is valid but we consider * there are some quality issues like unjoined events. The following API * responses are supported, and no PII is included: * * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend` * * `google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEvent` * * `google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent` */ responsePayload?: { [key: string]: any }; /** * The service context in which this error has occurred. */ serviceContext?: GoogleCloudDiscoveryengineLoggingServiceContext; /** * The RPC status associated with the error log. */ status?: GoogleRpcStatus; } function serializeGoogleCloudDiscoveryengineLoggingErrorLog(data: any): GoogleCloudDiscoveryengineLoggingErrorLog { return { ...data, connectorRunPayload: data["connectorRunPayload"] !== undefined ? serializeGoogleCloudDiscoveryengineLoggingConnectorRunErrorContext(data["connectorRunPayload"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineLoggingErrorLog(data: any): GoogleCloudDiscoveryengineLoggingErrorLog { return { ...data, connectorRunPayload: data["connectorRunPayload"] !== undefined ? deserializeGoogleCloudDiscoveryengineLoggingConnectorRunErrorContext(data["connectorRunPayload"]) : undefined, }; } /** * HTTP request data that is related to a reported error. */ export interface GoogleCloudDiscoveryengineLoggingHttpRequestContext { /** * The HTTP response status code for the request. */ responseStatusCode?: number; } /** * The error payload that is populated on LRO import APIs, including the * following: * * `google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments` * * `google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents` */ export interface GoogleCloudDiscoveryengineLoggingImportErrorContext { /** * The detailed content which caused the error on importing a document. */ document?: string; /** * Google Cloud Storage file path of the import source. Can be set for batch * operation error. */ gcsPath?: string; /** * Line number of the content in file. Should be empty for permission or * batch operation error. */ lineNumber?: string; /** * The operation resource name of the LRO. */ operation?: string; /** * The detailed content which caused the error on importing a user event. */ userEvent?: string; } /** * Describes a running service that sends errors. */ export interface GoogleCloudDiscoveryengineLoggingServiceContext { /** * An identifier of the service—for example, * `discoveryengine.googleapis.com`. */ service?: string; } /** * Indicates a location in the source code of the service for which errors are * reported. */ export interface GoogleCloudDiscoveryengineLoggingSourceLocation { /** * Human-readable name of a function or method—for example, * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`. */ functionName?: string; } /** * Access Control Configuration. */ export interface GoogleCloudDiscoveryengineV1AclConfig { /** * Identity provider config. */ idpConfig?: GoogleCloudDiscoveryengineV1IdpConfig; /** * Immutable. The full resource name of the acl configuration. Format: * `projects/{project}/locations/{location}/aclConfig`. This field must be a * UTF-8 encoded string with a length limit of 1024 characters. */ name?: string; } /** * Informations to support actions on the connector. */ export interface GoogleCloudDiscoveryengineV1ActionConfig { /** * Optional. Action parameters in structured json format. */ actionParams?: { [key: string]: any }; /** * Output only. The connector contains the necessary parameters and is * configured to support actions. */ readonly isActionConfigured?: boolean; /** * Optional. Action parameters in json string format. */ jsonActionParams?: string; /** * Optional. The Service Directory resource name * (projects/*\/locations/*\/namespaces/*\/services/*) representing a VPC * network endpoint used to connect to the data source's `instance_uri`, * defined in DataConnector.params. Required when VPC Service Controls are * enabled. */ serviceName?: string; /** * Optional. Whether to use static secrets for the connector. If true, the * secrets provided in the action_params will be ignored. */ useStaticSecrets?: boolean; } /** * Request message for CompletionService.AdvancedCompleteQuery method. . */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequest { /** * Optional. Specification to boost suggestions matching the condition. */ boostSpec?: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestBoostSpec; /** * Optional. Experiment ids for this request. */ experimentIds?: string[]; /** * Indicates if tail suggestions should be returned if there are no * suggestions that match the full query. Even if set to true, if there are * suggestions that match the full query, those are returned and no tail * suggestions are returned. */ includeTailSuggestions?: boolean; /** * Required. The typeahead input used to fetch suggestions. Maximum length is * 128 characters. The query can not be empty for most of the suggestion * types. If it is empty, an `INVALID_ARGUMENT` error is returned. The * exception is when the suggestion_types contains only the type * `RECENT_SEARCH`, the query can be an empty string. The is called "zero * prefix" feature, which returns user's recently searched queries given the * empty query. */ query?: string; /** * Specifies the autocomplete query model, which only applies to the QUERY * SuggestionType. This overrides any model specified in the Configuration > * Autocomplete section of the Cloud console. Currently supported values: * * `document` - Using suggestions generated from user-imported documents. * * `search-history` - Using suggestions generated from the past history of * SearchService.Search API calls. Do not use it when there is no traffic for * Search API. * `user-event` - Using suggestions generated from user-imported * search events. * `document-completable` - Using suggestions taken directly * from user-imported document fields marked as completable. Default values: * * `document` is the default model for regular dataStores. * `search-history` * is the default model for site search dataStores. */ queryModel?: string; /** * Optional. Suggestion types to return. If empty or unspecified, query * suggestions are returned. Only one suggestion type is supported at the * moment. */ suggestionTypes?: | "SUGGESTION_TYPE_UNSPECIFIED" | "QUERY" | "PEOPLE" | "CONTENT" | "RECENT_SEARCH" | "GOOGLE_WORKSPACE"[]; /** * Optional. Specification of each suggestion type. */ suggestionTypeSpecs?: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestSuggestionTypeSpec[]; /** * Optional. Information about the end user. This should be the same * identifier information as UserEvent.user_info and SearchRequest.user_info. */ userInfo?: GoogleCloudDiscoveryengineV1UserInfo; /** * Optional. A unique identifier for tracking visitors. For example, this * could be implemented with an HTTP cookie, which should be able to uniquely * identify a visitor on a single device. This unique identifier should not * change if the visitor logs in or out of the website. This field should NOT * have a fixed value such as `unknown_visitor`. This should be the same * identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. * The field must be a UTF-8 encoded string with a length limit of 128 */ userPseudoId?: string; } /** * Specification to boost suggestions based on the condtion of the suggestion. */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestBoostSpec { /** * Condition boost specifications. If a suggestion matches multiple * conditions in the specifications, boost values from these specifications * are all applied and combined in a non-linear way. Maximum number of * specifications is 20. Note: Currently only support language condition * boost. */ conditionBoostSpecs?: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestBoostSpecConditionBoostSpec[]; } /** * Boost applies to suggestions which match a condition. */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestBoostSpecConditionBoostSpec { /** * Strength of the boost, which should be in [-1, 1]. Negative boost means * demotion. Default is 0.0. Setting to 1.0 gives the suggestions a big * promotion. However, it does not necessarily mean that the top result will * be a boosted suggestion. Setting to -1.0 gives the suggestions a big * demotion. However, other suggestions that are relevant might still be * shown. Setting to 0.0 means no boost applied. The boosting condition is * ignored. */ boost?: number; /** * An expression which specifies a boost condition. The syntax is the same as * [filter expression * syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax). * Currently, the only supported condition is a list of BCP-47 lang codes. * Example: * To boost suggestions in languages `en` or `fr`: `(lang_code: * ANY("en", "fr"))` */ condition?: string; } /** * Specification of each suggestion type. */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestSuggestionTypeSpec { /** * Optional. Maximum number of suggestions to return for each suggestion * type. */ maxSuggestions?: number; /** * Optional. Suggestion type. */ suggestionType?: | "SUGGESTION_TYPE_UNSPECIFIED" | "QUERY" | "PEOPLE" | "CONTENT" | "RECENT_SEARCH" | "GOOGLE_WORKSPACE"; } /** * Response message for CompletionService.AdvancedCompleteQuery method. */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse { /** * Results of the matched content suggestions. The result list is ordered and * the first result is the top suggestion. */ contentSuggestions?: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion[]; /** * Results of the matched people suggestions. The result list is ordered and * the first result is the top suggestion. */ peopleSuggestions?: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion[]; /** * Results of the matched query suggestions. The result list is ordered and * the first result is a top suggestion. */ querySuggestions?: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseQuerySuggestion[]; /** * Results of the matched "recent search" suggestions. The result list is * ordered and the first result is the top suggestion. */ recentSearchSuggestions?: GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion[]; /** * True if the returned suggestions are all tail suggestions. For tail * matching to be triggered, include_tail_suggestions in the request must be * true and there must be no suggestions that match the full query. */ tailMatchTriggered?: boolean; } function serializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse(data: any): GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse { return { ...data, contentSuggestions: data["contentSuggestions"] !== undefined ? data["contentSuggestions"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion(item))) : undefined, peopleSuggestions: data["peopleSuggestions"] !== undefined ? data["peopleSuggestions"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion(item))) : undefined, recentSearchSuggestions: data["recentSearchSuggestions"] !== undefined ? data["recentSearchSuggestions"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse(data: any): GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse { return { ...data, contentSuggestions: data["contentSuggestions"] !== undefined ? data["contentSuggestions"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion(item))) : undefined, peopleSuggestions: data["peopleSuggestions"] !== undefined ? data["peopleSuggestions"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion(item))) : undefined, recentSearchSuggestions: data["recentSearchSuggestions"] !== undefined ? data["recentSearchSuggestions"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion(item))) : undefined, }; } /** * Suggestions as content. */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion { /** * The type of the content suggestion. */ contentType?: | "CONTENT_TYPE_UNSPECIFIED" | "GOOGLE_WORKSPACE" | "THIRD_PARTY"; /** * The name of the dataStore that this suggestion belongs to. */ dataStore?: string; /** * The destination uri of the content suggestion. */ destinationUri?: string; /** * The document data snippet in the suggestion. Only a subset of fields will * be populated. */ document?: GoogleCloudDiscoveryengineV1Document; /** * The icon uri of the content suggestion. */ iconUri?: string; /** * The score of each suggestion. The score is in the range of [0, 1]. */ score?: number; /** * The suggestion for the query. */ suggestion?: string; } function serializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion(data: any): GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion { return { ...data, document: data["document"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Document(data["document"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion(data: any): GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion { return { ...data, document: data["document"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Document(data["document"]) : undefined, }; } /** * Suggestions as people. */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion { /** * The name of the dataStore that this suggestion belongs to. */ dataStore?: string; /** * The destination uri of the person suggestion. */ destinationUri?: string; /** * The photo uri of the person suggestion. */ displayPhotoUri?: string; /** * The document data snippet in the suggestion. Only a subset of fields is * populated. */ document?: GoogleCloudDiscoveryengineV1Document; /** * The type of the person. */ personType?: | "PERSON_TYPE_UNSPECIFIED" | "CLOUD_IDENTITY" | "THIRD_PARTY_IDENTITY"; /** * The score of each suggestion. The score is in the range of [0, 1]. */ score?: number; /** * The suggestion for the query. */ suggestion?: string; } function serializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion(data: any): GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion { return { ...data, document: data["document"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Document(data["document"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion(data: any): GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion { return { ...data, document: data["document"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Document(data["document"]) : undefined, }; } /** * Suggestions as search queries. */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseQuerySuggestion { /** * The unique document field paths that serve as the source of this * suggestion if it was generated from completable fields. This field is only * populated for the document-completable model. */ completableFieldPaths?: string[]; /** * The name of the dataStore that this suggestion belongs to. */ dataStore?: string[]; /** * The score of each suggestion. The score is in the range of [0, 1]. */ score?: number; /** * The suggestion for the query. */ suggestion?: string; } /** * Suggestions from recent search history. */ export interface GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion { /** * The time when this recent rearch happened. */ recentSearchTime?: Date; /** * The score of each suggestion. The score is in the range of [0, 1]. */ score?: number; /** * The suggestion for the query. */ suggestion?: string; } function serializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion(data: any): GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion { return { ...data, recentSearchTime: data["recentSearchTime"] !== undefined ? data["recentSearchTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion(data: any): GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion { return { ...data, recentSearchTime: data["recentSearchTime"] !== undefined ? new Date(data["recentSearchTime"]) : undefined, }; } /** * Configuration data for advance site search. */ export interface GoogleCloudDiscoveryengineV1AdvancedSiteSearchConfig { /** * If set true, automatic refresh is disabled for the DataStore. */ disableAutomaticRefresh?: boolean; /** * If set true, initial indexing is disabled for the DataStore. */ disableInitialIndex?: boolean; } /** * The connector level alert config. */ export interface GoogleCloudDiscoveryengineV1AlertPolicyConfig { /** * Optional. The enrollment states of each alert. */ alertEnrollments?: GoogleCloudDiscoveryengineV1AlertPolicyConfigAlertEnrollment[]; /** * Immutable. The fully qualified resource name of the AlertPolicy. */ alertPolicyName?: string; } /** * The alert enrollment status. */ export interface GoogleCloudDiscoveryengineV1AlertPolicyConfigAlertEnrollment { /** * Immutable. The id of an alert. */ alertId?: string; /** * Required. The enrollment status of a customer. */ enrollState?: | "ENROLL_STATES_UNSPECIFIED" | "ENROLLED" | "DECLINED"; } /** * AlloyDB source import data from. */ export interface GoogleCloudDiscoveryengineV1AlloyDbSource { /** * Required. The AlloyDB cluster to copy the data from with a length limit of * 256 characters. */ clusterId?: string; /** * Required. The AlloyDB database to copy the data from with a length limit * of 256 characters. */ databaseId?: string; /** * Intermediate Cloud Storage directory used for the import with a length * limit of 2,000 characters. Can be specified if one wants to have the * AlloyDB export to a specific Cloud Storage directory. Ensure that the * AlloyDB service account has the necessary Cloud Storage Admin permissions * to access the specified Cloud Storage directory. */ gcsStagingDir?: string; /** * Required. The AlloyDB location to copy the data from with a length limit * of 256 characters. */ locationId?: string; /** * The project ID that contains the AlloyDB source. Has a length limit of 128 * characters. If not specified, inherits the project ID from the parent * request. */ projectId?: string; /** * Required. The AlloyDB table to copy the data from with a length limit of * 256 characters. */ tableId?: string; } /** * Access Control Configuration. */ export interface GoogleCloudDiscoveryengineV1alphaAclConfig { /** * Identity provider config. */ idpConfig?: GoogleCloudDiscoveryengineV1alphaIdpConfig; /** * Immutable. The full resource name of the acl configuration. Format: * `projects/{project}/locations/{location}/aclConfig`. This field must be a * UTF-8 encoded string with a length limit of 1024 characters. */ name?: string; } /** * Informations to support actions on the connector. */ export interface GoogleCloudDiscoveryengineV1alphaActionConfig { /** * Optional. Action parameters in structured json format. */ actionParams?: { [key: string]: any }; /** * Output only. The connector contains the necessary parameters and is * configured to support actions. */ readonly isActionConfigured?: boolean; /** * Optional. Action parameters in json string format. */ jsonActionParams?: string; /** * Optional. The Service Directory resource name * (projects/*\/locations/*\/namespaces/*\/services/*) representing a VPC * network endpoint used to connect to the data source's `instance_uri`, * defined in DataConnector.params. Required when VPC Service Controls are * enabled. */ serviceName?: string; /** * Optional. Whether to use static secrets for the connector. If true, the * secrets provided in the action_params will be ignored. */ useStaticSecrets?: boolean; } /** * Configuration data for advance site search. */ export interface GoogleCloudDiscoveryengineV1alphaAdvancedSiteSearchConfig { /** * If set true, automatic refresh is disabled for the DataStore. */ disableAutomaticRefresh?: boolean; /** * If set true, initial indexing is disabled for the DataStore. */ disableInitialIndex?: boolean; } /** * The connector level alert config. */ export interface GoogleCloudDiscoveryengineV1alphaAlertPolicyConfig { /** * Optional. The enrollment states of each alert. */ alertEnrollments?: GoogleCloudDiscoveryengineV1alphaAlertPolicyConfigAlertEnrollment[]; /** * Immutable. The fully qualified resource name of the AlertPolicy. */ alertPolicyName?: string; } /** * The alert enrollment status. */ export interface GoogleCloudDiscoveryengineV1alphaAlertPolicyConfigAlertEnrollment { /** * Immutable. The id of an alert. */ alertId?: string; /** * Required. The enrollment status of a customer. */ enrollState?: | "ENROLL_STATES_UNSPECIFIED" | "ENROLLED" | "DECLINED"; } /** * The resource level alert config. Used in: * UserLicense * EngineUserData The * AlertPolicyConfig in data connector is of same usage. No easy way to migrate. */ export interface GoogleCloudDiscoveryengineV1alphaAlertPolicyResourceConfig { /** * Optional. The enrollment state of each alert. */ alertEnrollments?: GoogleCloudDiscoveryengineV1alphaAlertPolicyResourceConfigAlertEnrollment[]; /** * Immutable. The fully qualified resource name of the AlertPolicy. */ alertPolicy?: string; /** * Optional. The contact details for each alert policy. */ contactDetails?: GoogleCloudDiscoveryengineV1alphaContactDetails[]; /** * Optional. The language code used for notifications */ languageCode?: string; } /** * The alert enrollment status. */ export interface GoogleCloudDiscoveryengineV1alphaAlertPolicyResourceConfigAlertEnrollment { /** * Immutable. The id of an alert. */ alertId?: string; /** * Required. The enrollment status of a customer. */ enrollState?: | "ENROLL_STATE_UNSPECIFIED" | "ENROLLED" | "DECLINED"; /** * Optional. Parameters used to instantiate a notification. Used for * notifications that are triggered when registered. Not stored. * Gemini * Business welcome emails. * Gemini Business user invitation emails. */ notificationParams?: { [key: string]: string }; } /** * Defines an answer. */ export interface GoogleCloudDiscoveryengineV1alphaAnswer { /** * Additional answer-skipped reasons. This provides the reason for ignored * cases. If nothing is skipped, this field is not set. */ answerSkippedReasons?: | "ANSWER_SKIPPED_REASON_UNSPECIFIED" | "ADVERSARIAL_QUERY_IGNORED" | "NON_ANSWER_SEEKING_QUERY_IGNORED" | "OUT_OF_DOMAIN_QUERY_IGNORED" | "POTENTIAL_POLICY_VIOLATION" | "NO_RELEVANT_CONTENT" | "JAIL_BREAKING_QUERY_IGNORED" | "CUSTOMER_POLICY_VIOLATION" | "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" | "LOW_GROUNDED_ANSWER" | "USER_DEFINED_CLASSIFICATION_QUERY_IGNORED" | "UNHELPFUL_ANSWER"[]; /** * The textual answer. */ answerText?: string; /** * List of blob attachments in the answer. */ blobAttachments?: GoogleCloudDiscoveryengineV1alphaAnswerBlobAttachment[]; /** * Citations. */ citations?: GoogleCloudDiscoveryengineV1alphaAnswerCitation[]; /** * Output only. Answer completed timestamp. */ readonly completeTime?: Date; /** * Output only. Answer creation timestamp. */ readonly createTime?: Date; /** * A score in the range of [0, 1] describing how grounded the answer is by * the reference chunks. */ groundingScore?: number; /** * Optional. Grounding supports. */ groundingSupports?: GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport[]; /** * Immutable. Fully qualified name * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*\/answers/*` */ name?: string; /** * Query understanding information. */ queryUnderstandingInfo?: GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo; /** * References. */ references?: GoogleCloudDiscoveryengineV1alphaAnswerReference[]; /** * Suggested related questions. */ relatedQuestions?: string[]; /** * Optional. Safety ratings. */ safetyRatings?: GoogleCloudDiscoveryengineV1alphaSafetyRating[]; /** * The state of the answer generation. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS" | "FAILED" | "SUCCEEDED" | "STREAMING"; /** * Answer generation steps. */ steps?: GoogleCloudDiscoveryengineV1alphaAnswerStep[]; } function serializeGoogleCloudDiscoveryengineV1alphaAnswer(data: any): GoogleCloudDiscoveryengineV1alphaAnswer { return { ...data, citations: data["citations"] !== undefined ? data["citations"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1alphaAnswerCitation(item))) : undefined, groundingSupports: data["groundingSupports"] !== undefined ? data["groundingSupports"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAnswer(data: any): GoogleCloudDiscoveryengineV1alphaAnswer { return { ...data, citations: data["citations"] !== undefined ? data["citations"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1alphaAnswerCitation(item))) : undefined, completeTime: data["completeTime"] !== undefined ? new Date(data["completeTime"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, groundingSupports: data["groundingSupports"] !== undefined ? data["groundingSupports"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport(item))) : undefined, }; } /** * Stores binarydata attached to text answer, e.g. image, video, audio, etc. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerBlobAttachment { /** * Output only. The attribution type of the blob. */ readonly attributionType?: | "ATTRIBUTION_TYPE_UNSPECIFIED" | "CORPUS" | "GENERATED"; /** * Output only. The mime type and data of the blob. */ readonly data?: GoogleCloudDiscoveryengineV1alphaAnswerBlobAttachmentBlob; } /** * The media type and data of the blob. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerBlobAttachmentBlob { /** * Output only. Raw bytes. */ readonly data?: Uint8Array; /** * Output only. The media type (MIME type) of the generated or retrieved * data. */ readonly mimeType?: string; } /** * Citation info for a segment. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerCitation { /** * End of the attributed segment, exclusive. Measured in bytes (UTF-8 * unicode). If there are multi-byte characters,such as non-ASCII characters, * the index measurement is longer than the string length. */ endIndex?: bigint; /** * Citation sources for the attributed segment. */ sources?: GoogleCloudDiscoveryengineV1alphaAnswerCitationSource[]; /** * Index indicates the start of the segment, measured in bytes (UTF-8 * unicode). If there are multi-byte characters,such as non-ASCII characters, * the index measurement is longer than the string length. */ startIndex?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaAnswerCitation(data: any): GoogleCloudDiscoveryengineV1alphaAnswerCitation { return { ...data, endIndex: data["endIndex"] !== undefined ? String(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? String(data["startIndex"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAnswerCitation(data: any): GoogleCloudDiscoveryengineV1alphaAnswerCitation { return { ...data, endIndex: data["endIndex"] !== undefined ? BigInt(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? BigInt(data["startIndex"]) : undefined, }; } /** * Citation source. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerCitationSource { /** * ID of the citation source. */ referenceId?: string; } /** * Grounding support for a claim in `answer_text`. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport { /** * Required. End of the claim, exclusive. */ endIndex?: bigint; /** * Indicates that this claim required grounding check. When the system * decided this claim didn't require attribution/grounding check, this field * is set to false. In that case, no grounding check was done for the claim * and therefore `grounding_score`, `sources` is not returned. */ groundingCheckRequired?: boolean; /** * A score in the range of [0, 1] describing how grounded is a specific claim * by the references. Higher value means that the claim is better supported by * the reference chunks. */ groundingScore?: number; /** * Optional. Citation sources for the claim. */ sources?: GoogleCloudDiscoveryengineV1alphaAnswerCitationSource[]; /** * Required. Index indicates the start of the claim, measured in bytes (UTF-8 * unicode). */ startIndex?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport(data: any): GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport { return { ...data, endIndex: data["endIndex"] !== undefined ? String(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? String(data["startIndex"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport(data: any): GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport { return { ...data, endIndex: data["endIndex"] !== undefined ? BigInt(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? BigInt(data["startIndex"]) : undefined, }; } /** * Query understanding information. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo { /** * Query classification information. */ queryClassificationInfo?: GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo[]; } /** * Query classification information. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo { /** * Classification output. */ positive?: boolean; /** * Query classification type. */ type?: | "TYPE_UNSPECIFIED" | "ADVERSARIAL_QUERY" | "NON_ANSWER_SEEKING_QUERY" | "JAIL_BREAKING_QUERY" | "NON_ANSWER_SEEKING_QUERY_V2" | "USER_DEFINED_CLASSIFICATION_QUERY"; } /** * Reference. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerReference { /** * Chunk information. */ chunkInfo?: GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo; /** * Structured document information. */ structuredDocumentInfo?: GoogleCloudDiscoveryengineV1alphaAnswerReferenceStructuredDocumentInfo; /** * Unstructured document information. */ unstructuredDocumentInfo?: GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo; } /** * Chunk information. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo { /** * Output only. Stores indexes of blobattachments linked to this chunk. */ readonly blobAttachmentIndexes?: bigint[]; /** * Chunk resource name. */ chunk?: string; /** * Chunk textual content. */ content?: string; /** * Document metadata. */ documentMetadata?: GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata; /** * The relevance of the chunk for a given query. Values range from 0.0 * (completely irrelevant) to 1.0 (completely relevant). This value is for * informational purpose only. It may change for the same query and chunk at * any time due to a model retraining or change in implementation. */ relevanceScore?: number; } /** * Document metadata. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata { /** * Document resource name. */ document?: string; /** * Page identifier. */ pageIdentifier?: string; /** * The structured JSON metadata for the document. It is populated from the * struct data from the Chunk in search result. */ structData?: { [key: string]: any }; /** * Title. */ title?: string; /** * URI for the document. */ uri?: string; } /** * Structured search information. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerReferenceStructuredDocumentInfo { /** * Document resource name. */ document?: string; /** * Structured search data. */ structData?: { [key: string]: any }; /** * Output only. The title of the document. */ readonly title?: string; /** * Output only. The URI of the document. */ readonly uri?: string; } /** * Unstructured document information. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo { /** * List of cited chunk contents derived from document content. */ chunkContents?: GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent[]; /** * Document resource name. */ document?: string; /** * The structured JSON metadata for the document. It is populated from the * struct data from the Chunk in search result. */ structData?: { [key: string]: any }; /** * Title. */ title?: string; /** * URI for the document. */ uri?: string; } /** * Chunk content. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent { /** * Output only. Stores indexes of blobattachments linked to this chunk. */ readonly blobAttachmentIndexes?: bigint[]; /** * Chunk textual content. */ content?: string; /** * Page identifier. */ pageIdentifier?: string; /** * The relevance of the chunk for a given query. Values range from 0.0 * (completely irrelevant) to 1.0 (completely relevant). This value is for * informational purpose only. It may change for the same query and chunk at * any time due to a model retraining or change in implementation. */ relevanceScore?: number; } /** * Step information. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerStep { /** * Actions. */ actions?: GoogleCloudDiscoveryengineV1alphaAnswerStepAction[]; /** * The description of the step. */ description?: string; /** * The state of the step. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS" | "FAILED" | "SUCCEEDED"; /** * The thought of the step. */ thought?: string; } /** * Action. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerStepAction { /** * Observation. */ observation?: GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation; /** * Search action. */ searchAction?: GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction; } /** * Observation. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation { /** * Search results observed by the search action, it can be snippets info or * chunk info, depending on the citation type set by the user. */ searchResults?: GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult[]; } export interface GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult { /** * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate * chunk info. */ chunkInfo?: GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo[]; /** * Document resource name. */ document?: string; /** * If citation_type is DOCUMENT_LEVEL_CITATION, populate document level * snippets. */ snippetInfo?: GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo[]; /** * Data representation. The structured JSON data for the document. It's * populated from the struct data from the Document, or the Chunk in search * result. */ structData?: { [key: string]: any }; /** * Title. */ title?: string; /** * URI for the document. */ uri?: string; } /** * Chunk information. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo { /** * Chunk resource name. */ chunk?: string; /** * Chunk textual content. */ content?: string; /** * The relevance of the chunk for a given query. Values range from 0.0 * (completely irrelevant) to 1.0 (completely relevant). This value is for * informational purpose only. It may change for the same query and chunk at * any time due to a model retraining or change in implementation. */ relevanceScore?: number; } /** * Snippet information. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo { /** * Snippet content. */ snippet?: string; /** * Status of the snippet defined by the search team. */ snippetStatus?: string; } /** * Search action. */ export interface GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction { /** * The query to search. */ query?: string; } /** * AssistAnswer resource, main part of AssistResponse. */ export interface GoogleCloudDiscoveryengineV1alphaAssistAnswer { /** * Reasons for not answering the assist call. */ assistSkippedReasons?: | "ASSIST_SKIPPED_REASON_UNSPECIFIED" | "NON_ASSIST_SEEKING_QUERY_IGNORED" | "CUSTOMER_POLICY_VIOLATION"[]; /** * Optional. The field contains information about the various policy checks' * results like the banned phrases or the Model Armor checks. This field is * populated only if the assist call was skipped due to a policy violation. */ customerPolicyEnforcementResult?: GoogleCloudDiscoveryengineV1alphaAssistAnswerCustomerPolicyEnforcementResult; /** * Immutable. Identifier. Resource name of the `AssistAnswer`. Format: * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * Replies of the assistant. */ replies?: GoogleCloudDiscoveryengineV1alphaAssistAnswerReply[]; /** * State of the answer generation. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS" | "FAILED" | "SUCCEEDED" | "SKIPPED"; } function serializeGoogleCloudDiscoveryengineV1alphaAssistAnswer(data: any): GoogleCloudDiscoveryengineV1alphaAssistAnswer { return { ...data, replies: data["replies"] !== undefined ? data["replies"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1alphaAssistAnswerReply(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAssistAnswer(data: any): GoogleCloudDiscoveryengineV1alphaAssistAnswer { return { ...data, replies: data["replies"] !== undefined ? data["replies"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1alphaAssistAnswerReply(item))) : undefined, }; } /** * Customer policy enforcement results. Contains the results of the various * policy checks, like the banned phrases or the Model Armor checks. */ export interface GoogleCloudDiscoveryengineV1alphaAssistAnswerCustomerPolicyEnforcementResult { /** * Customer policy enforcement results. Populated only if the assist call was * skipped due to a policy violation. It contains results from those filters * that blocked the processing of the query. */ policyResults?: GoogleCloudDiscoveryengineV1alphaAssistAnswerCustomerPolicyEnforcementResultPolicyEnforcementResult[]; /** * Final verdict of the customer policy enforcement. If only one policy * blocked the processing, the verdict is BLOCK. */ verdict?: | "UNSPECIFIED" | "ALLOW" | "BLOCK"; } /** * Customer policy enforcement result for the banned phrase policy. */ export interface GoogleCloudDiscoveryengineV1alphaAssistAnswerCustomerPolicyEnforcementResultBannedPhraseEnforcementResult { /** * The banned phrases that were found in the query or the answer. */ bannedPhrases?: string[]; } /** * Customer policy enforcement result for the Model Armor policy. */ export interface GoogleCloudDiscoveryengineV1alphaAssistAnswerCustomerPolicyEnforcementResultModelArmorEnforcementResult { /** * The error returned by Model Armor if the policy enforcement failed for * some reason. */ error?: GoogleRpcStatus; /** * The Model Armor violation that was found. */ modelArmorViolation?: string; } /** * Customer policy enforcement result for a single policy type. */ export interface GoogleCloudDiscoveryengineV1alphaAssistAnswerCustomerPolicyEnforcementResultPolicyEnforcementResult { /** * The policy enforcement result for the banned phrase policy. */ bannedPhraseEnforcementResult?: GoogleCloudDiscoveryengineV1alphaAssistAnswerCustomerPolicyEnforcementResultBannedPhraseEnforcementResult; /** * The policy enforcement result for the Model Armor policy. */ modelArmorEnforcementResult?: GoogleCloudDiscoveryengineV1alphaAssistAnswerCustomerPolicyEnforcementResultModelArmorEnforcementResult; } /** * One part of the multi-part response of the assist call. */ export interface GoogleCloudDiscoveryengineV1alphaAssistAnswerReply { /** * Possibly grounded response text or media from the assistant. */ groundedContent?: GoogleCloudDiscoveryengineV1alphaAssistantGroundedContent; /** * Output only. When set, uniquely identifies a reply within the * `AssistAnswer` resource. During an AssistantService.StreamAssist call, * multiple `Reply` messages with the same ID can occur within the response * stream (across multiple AssistantService.StreamAssistResponse messages). * These represent parts of a single `Reply` message in the final * `AssistAnswer` resource. */ readonly replyId?: string; } function serializeGoogleCloudDiscoveryengineV1alphaAssistAnswerReply(data: any): GoogleCloudDiscoveryengineV1alphaAssistAnswerReply { return { ...data, groundedContent: data["groundedContent"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContent(data["groundedContent"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAssistAnswerReply(data: any): GoogleCloudDiscoveryengineV1alphaAssistAnswerReply { return { ...data, groundedContent: data["groundedContent"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContent(data["groundedContent"]) : undefined, }; } /** * Multi-modal content. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantContent { /** * Result of executing an ExecutableCode. */ codeExecutionResult?: GoogleCloudDiscoveryengineV1alphaAssistantContentCodeExecutionResult; /** * Code generated by the model that is meant to be executed. */ executableCode?: GoogleCloudDiscoveryengineV1alphaAssistantContentExecutableCode; /** * A file, e.g., an audio summary. */ file?: GoogleCloudDiscoveryengineV1alphaAssistantContentFile; /** * Inline binary data. */ inlineData?: GoogleCloudDiscoveryengineV1alphaAssistantContentBlob; /** * The producer of the content. Can be "model" or "user". */ role?: string; /** * Inline text. */ text?: string; /** * Optional. Indicates if the part is thought from the model. */ thought?: boolean; } function serializeGoogleCloudDiscoveryengineV1alphaAssistantContent(data: any): GoogleCloudDiscoveryengineV1alphaAssistantContent { return { ...data, inlineData: data["inlineData"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaAssistantContentBlob(data["inlineData"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAssistantContent(data: any): GoogleCloudDiscoveryengineV1alphaAssistantContent { return { ...data, inlineData: data["inlineData"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaAssistantContentBlob(data["inlineData"]) : undefined, }; } /** * Inline blob. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantContentBlob { /** * Required. Raw bytes. */ data?: Uint8Array; /** * Required. The media type (MIME type) of the generated data. */ mimeType?: string; } function serializeGoogleCloudDiscoveryengineV1alphaAssistantContentBlob(data: any): GoogleCloudDiscoveryengineV1alphaAssistantContentBlob { return { ...data, data: data["data"] !== undefined ? encodeBase64(data["data"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAssistantContentBlob(data: any): GoogleCloudDiscoveryengineV1alphaAssistantContentBlob { return { ...data, data: data["data"] !== undefined ? decodeBase64(data["data"] as string) : undefined, }; } /** * Result of executing ExecutableCode. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantContentCodeExecutionResult { /** * Required. Outcome of the code execution. */ outcome?: | "OUTCOME_UNSPECIFIED" | "OUTCOME_OK" | "OUTCOME_FAILED" | "OUTCOME_DEADLINE_EXCEEDED"; /** * Optional. Contains stdout when code execution is successful, stderr or * other description otherwise. */ output?: string; } /** * Code generated by the model that is meant to be executed by the model. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantContentExecutableCode { /** * Required. The code content. Currently only supports Python. */ code?: string; } /** * A file, e.g., an audio summary. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantContentFile { /** * Required. The file ID. */ fileId?: string; /** * Required. The media type (MIME type) of the file. */ mimeType?: string; } /** * A piece of content and possibly its grounding information. Not all content * needs grounding. Phrases like "Of course, I will gladly search it for you." * do not need grounding. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantGroundedContent { /** * Source attribution of the generated content. See also * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check */ citationMetadata?: GoogleCloudDiscoveryengineV1alphaCitationMetadata; /** * The content. */ content?: GoogleCloudDiscoveryengineV1alphaAssistantContent; /** * Metadata for grounding based on text sources. */ textGroundingMetadata?: GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadata; } function serializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContent(data: any): GoogleCloudDiscoveryengineV1alphaAssistantGroundedContent { return { ...data, content: data["content"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaAssistantContent(data["content"]) : undefined, textGroundingMetadata: data["textGroundingMetadata"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadata(data["textGroundingMetadata"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContent(data: any): GoogleCloudDiscoveryengineV1alphaAssistantGroundedContent { return { ...data, content: data["content"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaAssistantContent(data["content"]) : undefined, textGroundingMetadata: data["textGroundingMetadata"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadata(data["textGroundingMetadata"]) : undefined, }; } /** * Grounding details for text sources. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadata { /** * References for the grounded text. */ references?: GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataReference[]; /** * Grounding information for parts of the text. */ segments?: GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataSegment[]; } function serializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadata(data: any): GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadata { return { ...data, segments: data["segments"] !== undefined ? data["segments"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataSegment(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadata(data: any): GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadata { return { ...data, segments: data["segments"] !== undefined ? data["segments"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataSegment(item))) : undefined, }; } /** * Referenced content and related document metadata. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataReference { /** * Referenced text content. */ content?: string; /** * Document metadata. */ documentMetadata?: GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataReferenceDocumentMetadata; } /** * Document metadata. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataReferenceDocumentMetadata { /** * Document resource name. */ document?: string; /** * Domain name from the document URI. Note that the `uri` field may contain a * URL that redirects to the actual website, in which case this will contain * the domain name of the target site. */ domain?: string; /** * The mime type of the document. * https://www.iana.org/assignments/media-types/media-types.xhtml. */ mimeType?: string; /** * Page identifier. */ pageIdentifier?: string; /** * Title. */ title?: string; /** * URI for the document. It may contain a URL that redirects to the actual * website. */ uri?: string; } /** * Grounding information for a segment of the text. */ export interface GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataSegment { /** * End of the segment, exclusive. */ endIndex?: bigint; /** * Score for the segment. */ groundingScore?: number; /** * References for the segment. */ referenceIndices?: number[]; /** * Zero-based index indicating the start of the segment, measured in bytes of * a UTF-8 string (i.e. characters encoded on multiple bytes have a length of * more than one). */ startIndex?: bigint; /** * The text segment itself. */ text?: string; } function serializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataSegment(data: any): GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataSegment { return { ...data, endIndex: data["endIndex"] !== undefined ? String(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? String(data["startIndex"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataSegment(data: any): GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingMetadataSegment { return { ...data, endIndex: data["endIndex"] !== undefined ? BigInt(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? BigInt(data["startIndex"]) : undefined, }; } /** * The configuration for the BAP connector. */ export interface GoogleCloudDiscoveryengineV1alphaBAPConfig { /** * Optional. The actions enabled on the associated BAP connection. */ enabledActions?: string[]; /** * Required. The supported connector modes for the associated BAP connection. */ supportedConnectorModes?: | "CONNECTOR_MODE_UNSPECIFIED" | "DATA_INGESTION" | "ACTIONS" | "END_USER_AUTHENTICATION"[]; } /** * Metadata related to the progress of the * SiteSearchEngineService.BatchCreateTargetSites operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for SiteSearchEngineService.BatchCreateTargetSites method. */ export interface GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse { /** * TargetSites created. */ targetSites?: GoogleCloudDiscoveryengineV1alphaTargetSite[]; } /** * Metadata related to the progress of the * UserLicenseService.BatchUpdateUserLicenses operation. This will be returned * by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaBatchUpdateUserLicensesMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of user licenses that failed to be updated. */ failureCount?: bigint; /** * Count of user licenses successfully updated. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaBatchUpdateUserLicensesMetadata(data: any): GoogleCloudDiscoveryengineV1alphaBatchUpdateUserLicensesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaBatchUpdateUserLicensesMetadata(data: any): GoogleCloudDiscoveryengineV1alphaBatchUpdateUserLicensesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for UserLicenseService.BatchUpdateUserLicenses method. */ export interface GoogleCloudDiscoveryengineV1alphaBatchUpdateUserLicensesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * UserLicenses successfully updated. */ userLicenses?: GoogleCloudDiscoveryengineV1alphaUserLicense[]; } /** * Source attributions for content. */ export interface GoogleCloudDiscoveryengineV1alphaCitation { /** * Output only. End index into the content. */ readonly endIndex?: number; /** * Output only. License of the attribution. */ readonly license?: string; /** * Output only. Publication date of the attribution. */ readonly publicationDate?: GoogleTypeDate; /** * Output only. Start index into the content. */ readonly startIndex?: number; /** * Output only. Title of the attribution. */ readonly title?: string; /** * Output only. Url reference of the attribution. */ readonly uri?: string; } /** * A collection of source attributions for a piece of content. */ export interface GoogleCloudDiscoveryengineV1alphaCitationMetadata { /** * Output only. List of citations. */ readonly citations?: GoogleCloudDiscoveryengineV1alphaCitation[]; } /** * Configurations used to enable CMEK data encryption with Cloud KMS keys. */ export interface GoogleCloudDiscoveryengineV1alphaCmekConfig { /** * Output only. The default CmekConfig for the Customer. */ readonly isDefault?: boolean; /** * Required. KMS key resource name which will be used to encrypt resources * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. */ kmsKey?: string; /** * Output only. KMS key version resource name which will be used to encrypt * resources `/cryptoKeyVersions/{keyVersion}`. */ readonly kmsKeyVersion?: string; /** * Output only. The timestamp of the last key rotation. */ readonly lastRotationTimestampMicros?: bigint; /** * Required. The name of the CmekConfig of the form * `projects/{project}/locations/{location}/cmekConfig` or * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. */ name?: string; /** * Output only. Whether the NotebookLM Corpus is ready to be used. */ readonly notebooklmState?: | "NOTEBOOK_LM_STATE_UNSPECIFIED" | "NOTEBOOK_LM_NOT_READY" | "NOTEBOOK_LM_READY" | "NOTEBOOK_LM_NOT_ENABLED"; /** * Optional. Single-regional CMEKs that are required for some VAIS features. */ singleRegionKeys?: GoogleCloudDiscoveryengineV1alphaSingleRegionKey[]; /** * Output only. The states of the CmekConfig. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "KEY_ISSUE" | "DELETING" | "DELETE_FAILED" | "UNUSABLE" | "ACTIVE_ROTATING" | "DELETED" | "EXPIRED"; } /** * Collection is a container for configuring resources and access to a set of * DataStores. */ export interface GoogleCloudDiscoveryengineV1alphaCollection { /** * Output only. Timestamp the Collection was created at. */ readonly createTime?: Date; /** * Output only. The data connector, if present, manages the connection for * data stores in the Collection. To set up the connector, use * DataConnectorService.SetUpDataConnector method, which creates a new * Collection while setting up the DataConnector singleton resource. Setting * up connector on an existing Collection is not supported. This output only * field contains a subset of the DataConnector fields, including `name`, * `data_source`, `entities.entity_name` and `entities.data_store`. To get * more details about a data connector, use the * DataConnectorService.GetDataConnector method. */ readonly dataConnector?: GoogleCloudDiscoveryengineV1alphaDataConnector; /** * Required. The Collection display name. This field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * INVALID_ARGUMENT error is returned. */ displayName?: string; /** * Immutable. The full resource name of the Collection. Format: * `projects/{project}/locations/{location}/collections/{collection_id}`. This * field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; } /** * Defines circumstances to be checked before allowing a behavior */ export interface GoogleCloudDiscoveryengineV1alphaCondition { /** * Range of time(s) specifying when condition is active. Maximum of 10 time * ranges. */ activeTimeRange?: GoogleCloudDiscoveryengineV1alphaConditionTimeRange[]; /** * Optional. Query regex to match the whole search query. Cannot be set when * Condition.query_terms is set. Only supported for Basic Site Search * promotion serving controls. */ queryRegex?: string; /** * Search only A list of terms to match the query on. Cannot be set when * Condition.query_regex is set. Maximum of 10 query terms. */ queryTerms?: GoogleCloudDiscoveryengineV1alphaConditionQueryTerm[]; } function serializeGoogleCloudDiscoveryengineV1alphaCondition(data: any): GoogleCloudDiscoveryengineV1alphaCondition { return { ...data, activeTimeRange: data["activeTimeRange"] !== undefined ? data["activeTimeRange"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1alphaConditionTimeRange(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaCondition(data: any): GoogleCloudDiscoveryengineV1alphaCondition { return { ...data, activeTimeRange: data["activeTimeRange"] !== undefined ? data["activeTimeRange"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1alphaConditionTimeRange(item))) : undefined, }; } /** * Matcher for search request query */ export interface GoogleCloudDiscoveryengineV1alphaConditionQueryTerm { /** * Whether the search query needs to exactly match the query term. */ fullMatch?: boolean; /** * The specific query value to match against Must be lowercase, must be * UTF-8. Can have at most 3 space separated terms if full_match is true. * Cannot be an empty string. Maximum length of 5000 characters. */ value?: string; } /** * Used for time-dependent conditions. */ export interface GoogleCloudDiscoveryengineV1alphaConditionTimeRange { /** * End of time range. Range is inclusive. Must be in the future. */ endTime?: Date; /** * Start of time range. Range is inclusive. */ startTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaConditionTimeRange(data: any): GoogleCloudDiscoveryengineV1alphaConditionTimeRange { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaConditionTimeRange(data: any): GoogleCloudDiscoveryengineV1alphaConditionTimeRange { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * A data sync run of DataConnector. After DataConnector is successfully * initialized, data syncs are scheduled at DataConnector.refresh_interval. A * ConnectorRun represents a data sync either in the past or onging that the * moment. // */ export interface GoogleCloudDiscoveryengineV1alphaConnectorRun { /** * Output only. The time when the connector run ended. */ readonly endTime?: Date; /** * Output only. The details of the entities synced at the ConnectorRun. Each * ConnectorRun consists of syncing one or more entities. */ readonly entityRuns?: GoogleCloudDiscoveryengineV1alphaConnectorRunEntityRun[]; /** * Contains info about errors incurred during the sync. Only exist if running * into an error state. Contains error code and error message. Use with the * `state` field. */ errors?: GoogleRpcStatus[]; /** * Output only. The time when the connector run was most recently paused. */ readonly latestPauseTime?: Date; /** * Output only. The full resource name of the Connector Run. Format: * `projects/*\/locations/*\/collections/*\/dataConnector/connectorRuns/*`. * The `connector_run_id` is system-generated. */ readonly name?: string; /** * Output only. The time when the connector run started. */ readonly startTime?: Date; /** * Output only. The state of the sync run. */ readonly state?: | "STATE_UNSPECIFIED" | "RUNNING" | "SUCCEEDED" | "FAILED" | "OVERRUN" | "CANCELLED" | "PENDING" | "WARNING" | "SKIPPED"; /** * Timestamp at which the connector run sync state was last updated. */ stateUpdateTime?: Date; /** * Output only. The trigger for this ConnectorRun. */ readonly trigger?: | "TRIGGER_UNSPECIFIED" | "SCHEDULER" | "INITIALIZATION" | "RESUME" | "MANUAL"; } function serializeGoogleCloudDiscoveryengineV1alphaConnectorRun(data: any): GoogleCloudDiscoveryengineV1alphaConnectorRun { return { ...data, stateUpdateTime: data["stateUpdateTime"] !== undefined ? data["stateUpdateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaConnectorRun(data: any): GoogleCloudDiscoveryengineV1alphaConnectorRun { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, entityRuns: data["entityRuns"] !== undefined ? data["entityRuns"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1alphaConnectorRunEntityRun(item))) : undefined, latestPauseTime: data["latestPauseTime"] !== undefined ? new Date(data["latestPauseTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, stateUpdateTime: data["stateUpdateTime"] !== undefined ? new Date(data["stateUpdateTime"]) : undefined, }; } /** * Represents an entity that was synced in this ConnectorRun. */ export interface GoogleCloudDiscoveryengineV1alphaConnectorRunEntityRun { /** * Optional. The number of documents deleted. */ deletedRecordCount?: bigint; /** * The name of the source entity. */ entityName?: string; /** * Optional. The total number of documents failed at sync at indexing stage. */ errorRecordCount?: bigint; /** * The errors from the entity's sync run. Only exist if running into an error * state. Contains error code and error message. */ errors?: GoogleRpcStatus[]; /** * Optional. The number of documents extracted from connector source, ready * to be ingested to VAIS. */ extractedRecordCount?: bigint; /** * Optional. The number of documents indexed. */ indexedRecordCount?: bigint; /** * Metadata to generate the progress bar. */ progress?: GoogleCloudDiscoveryengineV1alphaConnectorRunEntityRunProgress; /** * Optional. The number of documents scheduled to be crawled/extracted from * connector source. This only applies to third party connectors. */ scheduledRecordCount?: bigint; /** * Optional. The number of requests sent to 3p API. */ sourceApiRequestCount?: bigint; /** * The state of the entity's sync run. */ state?: | "STATE_UNSPECIFIED" | "RUNNING" | "SUCCEEDED" | "FAILED" | "OVERRUN" | "CANCELLED" | "PENDING" | "WARNING" | "SKIPPED"; /** * Timestamp at which the entity sync state was last updated. */ stateUpdateTime?: Date; /** * The timestamp for either extracted_documents_count, * indexed_documents_count and error_documents_count was last updated. */ statsUpdateTime?: Date; /** * Sync type of this run. */ syncType?: | "SYNC_TYPE_UNSPECIFIED" | "FULL" | "INCREMENTAL" | "REALTIME" | "SCALA_SYNC"; } function serializeGoogleCloudDiscoveryengineV1alphaConnectorRunEntityRun(data: any): GoogleCloudDiscoveryengineV1alphaConnectorRunEntityRun { return { ...data, deletedRecordCount: data["deletedRecordCount"] !== undefined ? String(data["deletedRecordCount"]) : undefined, errorRecordCount: data["errorRecordCount"] !== undefined ? String(data["errorRecordCount"]) : undefined, extractedRecordCount: data["extractedRecordCount"] !== undefined ? String(data["extractedRecordCount"]) : undefined, indexedRecordCount: data["indexedRecordCount"] !== undefined ? String(data["indexedRecordCount"]) : undefined, progress: data["progress"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaConnectorRunEntityRunProgress(data["progress"]) : undefined, scheduledRecordCount: data["scheduledRecordCount"] !== undefined ? String(data["scheduledRecordCount"]) : undefined, sourceApiRequestCount: data["sourceApiRequestCount"] !== undefined ? String(data["sourceApiRequestCount"]) : undefined, stateUpdateTime: data["stateUpdateTime"] !== undefined ? data["stateUpdateTime"].toISOString() : undefined, statsUpdateTime: data["statsUpdateTime"] !== undefined ? data["statsUpdateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaConnectorRunEntityRun(data: any): GoogleCloudDiscoveryengineV1alphaConnectorRunEntityRun { return { ...data, deletedRecordCount: data["deletedRecordCount"] !== undefined ? BigInt(data["deletedRecordCount"]) : undefined, errorRecordCount: data["errorRecordCount"] !== undefined ? BigInt(data["errorRecordCount"]) : undefined, extractedRecordCount: data["extractedRecordCount"] !== undefined ? BigInt(data["extractedRecordCount"]) : undefined, indexedRecordCount: data["indexedRecordCount"] !== undefined ? BigInt(data["indexedRecordCount"]) : undefined, progress: data["progress"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaConnectorRunEntityRunProgress(data["progress"]) : undefined, scheduledRecordCount: data["scheduledRecordCount"] !== undefined ? BigInt(data["scheduledRecordCount"]) : undefined, sourceApiRequestCount: data["sourceApiRequestCount"] !== undefined ? BigInt(data["sourceApiRequestCount"]) : undefined, stateUpdateTime: data["stateUpdateTime"] !== undefined ? new Date(data["stateUpdateTime"]) : undefined, statsUpdateTime: data["statsUpdateTime"] !== undefined ? new Date(data["statsUpdateTime"]) : undefined, }; } /** * Represents the progress of a sync run. */ export interface GoogleCloudDiscoveryengineV1alphaConnectorRunEntityRunProgress { /** * The current progress. */ currentCount?: bigint; /** * Derived. The percentile of the progress.current_count / total_count. The * value is between [0, 1.0] inclusive. */ percentile?: number; /** * The total. */ totalCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaConnectorRunEntityRunProgress(data: any): GoogleCloudDiscoveryengineV1alphaConnectorRunEntityRunProgress { return { ...data, currentCount: data["currentCount"] !== undefined ? String(data["currentCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaConnectorRunEntityRunProgress(data: any): GoogleCloudDiscoveryengineV1alphaConnectorRunEntityRunProgress { return { ...data, currentCount: data["currentCount"] !== undefined ? BigInt(data["currentCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, }; } /** * The contact info stored in resource level. If both project level and * resource level is populated, the resource level contact info will override * the project level contact info. */ export interface GoogleCloudDiscoveryengineV1alphaContactDetails { /** * Optional. The email address of the contact. */ emailAddress?: string; } /** * Defines a conditioned behavior to employ during serving. Must be attached to * a ServingConfig to be considered at serving time. Permitted actions dependent * on `SolutionType`. */ export interface GoogleCloudDiscoveryengineV1alphaControl { /** * Output only. List of all ServingConfig IDs this control is attached to. * May take up to 10 minutes to update after changes. */ readonly associatedServingConfigIds?: string[]; /** * Defines a boost-type control */ boostAction?: GoogleCloudDiscoveryengineV1alphaControlBoostAction; /** * Determines when the associated action will trigger. Omit to always apply * the action. Currently only a single condition may be specified. Otherwise * an INVALID ARGUMENT error is thrown. */ conditions?: GoogleCloudDiscoveryengineV1alphaCondition[]; /** * Required. Human readable name. The identifier used in UI views. Must be * UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID * ARGUMENT error is thrown. */ displayName?: string; /** * Defines a filter-type control Currently not supported by Recommendation */ filterAction?: GoogleCloudDiscoveryengineV1alphaControlFilterAction; /** * Immutable. Fully qualified name * `projects/*\/locations/global/dataStore/*\/controls/*` */ name?: string; /** * Promote certain links based on predefined trigger queries. */ promoteAction?: GoogleCloudDiscoveryengineV1alphaControlPromoteAction; /** * Defines a redirect-type control. */ redirectAction?: GoogleCloudDiscoveryengineV1alphaControlRedirectAction; /** * Required. Immutable. What solution the control belongs to. Must be * compatible with vertical of resource. Otherwise an INVALID ARGUMENT error * is thrown. */ solutionType?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"; /** * Treats a group of terms as synonyms of one another. */ synonymsAction?: GoogleCloudDiscoveryengineV1alphaControlSynonymsAction; /** * Specifies the use case for the control. Affects what condition fields can * be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use * case per control. Must be set when solution_type is * SolutionType.SOLUTION_TYPE_SEARCH. */ useCases?: | "SEARCH_USE_CASE_UNSPECIFIED" | "SEARCH_USE_CASE_SEARCH" | "SEARCH_USE_CASE_BROWSE"[]; } function serializeGoogleCloudDiscoveryengineV1alphaControl(data: any): GoogleCloudDiscoveryengineV1alphaControl { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1alphaCondition(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaControl(data: any): GoogleCloudDiscoveryengineV1alphaControl { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1alphaCondition(item))) : undefined, }; } /** * Adjusts order of products in returned list. */ export interface GoogleCloudDiscoveryengineV1alphaControlBoostAction { /** * Strength of the boost, which should be in [-1, 1]. Negative boost means * demotion. Default is 0.0 (No-op). */ boost?: number; /** * Required. Specifies which data store's documents can be boosted by this * control. Full data store name e.g. * projects/123/locations/global/collections/default_collection/dataStores/default_data_store */ dataStore?: string; /** * Required. Specifies which products to apply the boost to. If no filter is * provided all products will be boosted (No-op). Syntax documentation: * https://cloud.google.com/retail/docs/filter-and-order Maximum length is * 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. */ filter?: string; /** * Optional. Strength of the boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0 (No-op). */ fixedBoost?: number; /** * Optional. Complex specification for custom ranking based on customer * defined attribute value. */ interpolationBoostSpec?: GoogleCloudDiscoveryengineV1alphaControlBoostActionInterpolationBoostSpec; } /** * Specification for custom ranking based on customer specified attribute * value. It provides more controls for customized ranking than the simple * (condition, boost) combination above. */ export interface GoogleCloudDiscoveryengineV1alphaControlBoostActionInterpolationBoostSpec { /** * Optional. The attribute type to be used to determine the boost amount. The * attribute value can be derived from the field value of the specified * field_name. In the case of numerical it is straightforward i.e. * attribute_value = numerical_field_value. In the case of freshness however, * attribute_value = (time.now() - datetime_field_value). */ attributeType?: | "ATTRIBUTE_TYPE_UNSPECIFIED" | "NUMERICAL" | "FRESHNESS"; /** * Optional. The control points used to define the curve. The monotonic * function (defined through the interpolation_type above) passes through the * control points listed here. */ controlPoints?: GoogleCloudDiscoveryengineV1alphaControlBoostActionInterpolationBoostSpecControlPoint[]; /** * Optional. The name of the field whose value will be used to determine the * boost amount. */ fieldName?: string; /** * Optional. The interpolation type to be applied to connect the control * points listed below. */ interpolationType?: | "INTERPOLATION_TYPE_UNSPECIFIED" | "LINEAR"; } /** * The control points used to define the curve. The curve defined through these * control points can only be monotonically increasing or decreasing(constant * values are acceptable). */ export interface GoogleCloudDiscoveryengineV1alphaControlBoostActionInterpolationBoostSpecControlPoint { /** * Optional. Can be one of: 1. The numerical field value. 2. The duration * spec for freshness: The value must be formatted as an XSD `dayTimeDuration` * value (a restricted subset of an ISO 8601 duration value). The pattern for * this is: `nDnM]`. */ attributeValue?: string; /** * Optional. The value between -1 to 1 by which to boost the score if the * attribute_value evaluates to the value specified above. */ boostAmount?: number; } /** * Specified which products may be included in results. Uses same filter as * boost. */ export interface GoogleCloudDiscoveryengineV1alphaControlFilterAction { /** * Required. Specifies which data store's documents can be filtered by this * control. Full data store name e.g. * projects/123/locations/global/collections/default_collection/dataStores/default_data_store */ dataStore?: string; /** * Required. A filter to apply on the matching condition results. Required * Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order * Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is * thrown. */ filter?: string; } /** * Promote certain links based on some trigger queries. Example: Promote shoe * store link when searching for `shoe` keyword. The link can be outside of * associated data store. */ export interface GoogleCloudDiscoveryengineV1alphaControlPromoteAction { /** * Required. Data store with which this promotion is attached to. */ dataStore?: string; /** * Required. Promotion attached to this action. */ searchLinkPromotion?: GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion; } /** * Redirects a shopper to the provided URI. */ export interface GoogleCloudDiscoveryengineV1alphaControlRedirectAction { /** * Required. The URI to which the shopper will be redirected. Required. URI * must have length equal or less than 2000 characters. Otherwise an INVALID * ARGUMENT error is thrown. */ redirectUri?: string; } /** * Creates a set of terms that will act as synonyms of one another. Example: * "happy" will also be considered as "glad", "glad" will also be considered as * "happy". */ export interface GoogleCloudDiscoveryengineV1alphaControlSynonymsAction { /** * Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at * least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. */ synonyms?: string[]; } /** * The historical crawl rate timeseries data, used for monitoring. */ export interface GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries { /** * The QPS of the crawl rate. */ qpsTimeSeries?: GoogleMonitoringV3TimeSeries; } function serializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries { return { ...data, qpsTimeSeries: data["qpsTimeSeries"] !== undefined ? serializeGoogleMonitoringV3TimeSeries(data["qpsTimeSeries"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries { return { ...data, qpsTimeSeries: data["qpsTimeSeries"] !== undefined ? deserializeGoogleMonitoringV3TimeSeries(data["qpsTimeSeries"]) : undefined, }; } /** * Metadata related to the progress of the DataStoreService.CreateDataStore * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the EngineService.CreateEngine * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaCreateEngineMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaCreateEngineMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata for EvaluationService.CreateEvaluation method. */ export interface GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata { } /** * Metadata for Create Schema LRO. */ export interface GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.CreateSitemap operation. This will be returned by the * google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaCreateSitemapMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaCreateSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaCreateSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.CreateTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Defines custom fine tuning spec. */ export interface GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec { /** * Whether or not to enable and include custom fine tuned search adaptor * model. */ enableSearchAdaptor?: boolean; } /** * Manages the connection to external data sources for all data stores grouped * under a Collection. It's a singleton resource of Collection. The * initialization is only supported through * DataConnectorService.SetUpDataConnector method, which will create a new * Collection and initialize its DataConnector. */ export interface GoogleCloudDiscoveryengineV1alphaDataConnector { /** * Optional. Whether the connector will be created with an ACL config. * Currently this field only affects Cloud Storage and BigQuery connectors. */ aclEnabled?: boolean; /** * Optional. Action configurations to make the connector support actions. */ actionConfig?: GoogleCloudDiscoveryengineV1alphaActionConfig; /** * Output only. State of the action connector. This reflects whether the * action connector is initializing, active or has encountered errors. */ readonly actionState?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "FAILED" | "RUNNING" | "WARNING" | "INITIALIZATION_FAILED" | "UPDATING"; /** * Optional. The connector level alert config. */ alertPolicyConfigs?: GoogleCloudDiscoveryengineV1alphaAlertPolicyConfig[]; /** * Optional. Indicates whether the connector is disabled for auto run. It can * be used to pause periodical and real time sync. Update: with the * introduction of incremental_sync_disabled, auto_run_disabled is used to * pause/disable only full syncs */ autoRunDisabled?: boolean; /** * Optional. The configuration for establishing a BAP connection. */ bapConfig?: GoogleCloudDiscoveryengineV1alphaBAPConfig; /** * Output only. User actions that must be completed before the connector can * start syncing data. */ readonly blockingReasons?: | "BLOCKING_REASON_UNSPECIFIED" | "ALLOWLIST_STATIC_IP" | "ALLOWLIST_IN_SERVICE_ATTACHMENT" | "ALLOWLIST_SERVICE_ACCOUNT"[]; /** * Optional. The modes enabled for this connector. Default state is * CONNECTOR_MODE_UNSPECIFIED. */ connectorModes?: | "CONNECTOR_MODE_UNSPECIFIED" | "DATA_INGESTION" | "ACTIONS" | "FEDERATED" | "EUA" | "FEDERATED_AND_EUA"[]; /** * Output only. The type of connector. Each source can only map to one type. * For example, salesforce, confluence and jira have THIRD_PARTY connector * type. It is not mutable once set by system. */ readonly connectorType?: | "CONNECTOR_TYPE_UNSPECIFIED" | "THIRD_PARTY" | "GCP_FHIR" | "BIG_QUERY" | "GCS" | "GOOGLE_MAIL" | "GOOGLE_CALENDAR" | "GOOGLE_DRIVE" | "NATIVE_CLOUD_IDENTITY" | "THIRD_PARTY_FEDERATED" | "THIRD_PARTY_EUA" | "GCNV"; /** * Optional. Whether the END USER AUTHENTICATION connector is created in * SaaS. */ createEuaSaas?: boolean; /** * Output only. Timestamp the DataConnector was created at. */ readonly createTime?: Date; /** * Required. The name of the data source. Supported values: `salesforce`, * `jira`, `confluence`, `bigquery`. */ dataSource?: string; /** * Optional. Any target destinations used to connect to third-party services. */ destinationConfigs?: GoogleCloudDiscoveryengineV1alphaDestinationConfig[]; /** * Optional. Any params and credentials used specifically for EUA connectors. */ endUserConfig?: GoogleCloudDiscoveryengineV1alphaDataConnectorEndUserConfig; /** * List of entities from the connected data source to ingest. */ entities?: GoogleCloudDiscoveryengineV1alphaDataConnectorSourceEntity[]; /** * Output only. The errors from initialization or from the latest connector * run. */ readonly errors?: GoogleRpcStatus[]; /** * Optional. Any params and credentials used specifically for hybrid * connectors supporting FEDERATED mode. This field should only be set if the * connector is a hybrid connector and we want to enable FEDERATED mode. */ federatedConfig?: GoogleCloudDiscoveryengineV1alphaDataConnectorFederatedConfig; /** * Optional. If the connector is a hybrid connector, determines whether * ingestion is enabled and appropriate resources are provisioned during * connector creation. If the connector is not a hybrid connector, this field * is ignored. */ hybridIngestionDisabled?: boolean; /** * The refresh interval to sync the Access Control List information for the * documents ingested by this connector. If not set, the access control list * will be refreshed at the default interval of 30 minutes. The identity * refresh interval can be at least 30 minutes and at most 7 days. */ identityRefreshInterval?: number /* Duration */; /** * The configuration for the identity data synchronization runs. This * contains the refresh interval to sync the Access Control List information * for the documents ingested by this connector. */ identityScheduleConfig?: GoogleCloudDiscoveryengineV1alphaIdentityScheduleConfig; /** * Optional. The refresh interval specifically for incremental data syncs. If * unset, incremental syncs will use the default from env, set to 3hrs. The * minimum is 30 minutes and maximum is 7 days. Applicable to only 3P * connectors. When the refresh interval is set to the same value as the * incremental refresh interval, incremental sync will be disabled. */ incrementalRefreshInterval?: number /* Duration */; /** * Optional. Indicates whether incremental syncs are paused for this * connector. This is independent of auto_run_disabled. Applicable to only 3P * connectors. When the refresh interval is set to the same value as the * incremental refresh interval, incremental sync will be disabled, i.e. set * to true. */ incrementalSyncDisabled?: boolean; /** * Required data connector parameters in json string format. */ jsonParams?: string; /** * Input only. The KMS key to be used to protect the DataStores managed by * this connector. Must be set for requests that need to comply with CMEK Org * Policy protections. If this field is set and processed successfully, the * DataStores created by this connector will be protected by the KMS key. */ kmsKeyName?: string; /** * Output only. For periodic connectors only, the last time a data sync was * completed. */ readonly lastSyncTime?: Date; /** * Output only. The most recent timestamp when this DataConnector was paused, * affecting all functionalities such as data synchronization. Pausing a * connector has the following effects: - All functionalities, including data * synchronization, are halted. - Any ongoing data synchronization job will be * canceled. - No future data synchronization runs will be scheduled nor can * be triggered. */ readonly latestPauseTime?: Date; /** * Output only. The full resource name of the Data Connector. Format: * `projects/*\/locations/*\/collections/*\/dataConnector`. */ readonly name?: string; /** * Defines the scheduled time for the next data synchronization. This field * requires hour , minute, and time_zone from the [IANA Time Zone * Database](https://www.iana.org/time-zones). This is utilized when the data * connector has a refresh interval greater than 1 day. When the hours or * minutes are not specified, we will assume a sync time of 0:00. The user * must provide a time zone to avoid ambiguity. */ nextSyncTime?: GoogleTypeDateTime; /** * Required data connector parameters in structured json format. */ params?: { [key: string]: any }; /** * Output only. The tenant project ID associated with private connectivity * connectors. This project must be allowlisted by in order for the connector * to function. */ readonly privateConnectivityProjectId?: string; /** * Output only. real-time sync state */ readonly realtimeState?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "FAILED" | "RUNNING" | "WARNING" | "INITIALIZATION_FAILED" | "UPDATING"; /** * Optional. The configuration for realtime sync. */ realtimeSyncConfig?: GoogleCloudDiscoveryengineV1alphaDataConnectorRealtimeSyncConfig; /** * Required. The refresh interval for data sync. If duration is set to 0, the * data will be synced in real time. The streaming feature is not supported * yet. The minimum is 30 minutes and maximum is 7 days. When the refresh * interval is set to the same value as the incremental refresh interval, * incremental sync will be disabled. */ refreshInterval?: number /* Duration */; /** * Optional. Specifies keys to be removed from the 'params' field. This is * only active when 'params' is included in the 'update_mask' in an * UpdateDataConnectorRequest. Deletion takes precedence if a key is both in * 'remove_param_keys' and present in the 'params' field of the request. */ removeParamKeys?: string[]; /** * Output only. State of the connector. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "FAILED" | "RUNNING" | "WARNING" | "INITIALIZATION_FAILED" | "UPDATING"; /** * Output only. The static IP addresses used by this connector. */ readonly staticIpAddresses?: string[]; /** * Optional. Whether customer has enabled static IP addresses for this * connector. */ staticIpEnabled?: boolean; /** * The data synchronization mode supported by the data connector. */ syncMode?: | "PERIODIC" | "STREAMING" | "UNSPECIFIED"; /** * Output only. Timestamp the DataConnector was last updated. */ readonly updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDataConnector(data: any): GoogleCloudDiscoveryengineV1alphaDataConnector { return { ...data, identityRefreshInterval: data["identityRefreshInterval"] !== undefined ? data["identityRefreshInterval"] : undefined, identityScheduleConfig: data["identityScheduleConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaIdentityScheduleConfig(data["identityScheduleConfig"]) : undefined, incrementalRefreshInterval: data["incrementalRefreshInterval"] !== undefined ? data["incrementalRefreshInterval"] : undefined, nextSyncTime: data["nextSyncTime"] !== undefined ? serializeGoogleTypeDateTime(data["nextSyncTime"]) : undefined, refreshInterval: data["refreshInterval"] !== undefined ? data["refreshInterval"] : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDataConnector(data: any): GoogleCloudDiscoveryengineV1alphaDataConnector { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, identityRefreshInterval: data["identityRefreshInterval"] !== undefined ? data["identityRefreshInterval"] : undefined, identityScheduleConfig: data["identityScheduleConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaIdentityScheduleConfig(data["identityScheduleConfig"]) : undefined, incrementalRefreshInterval: data["incrementalRefreshInterval"] !== undefined ? data["incrementalRefreshInterval"] : undefined, lastSyncTime: data["lastSyncTime"] !== undefined ? new Date(data["lastSyncTime"]) : undefined, latestPauseTime: data["latestPauseTime"] !== undefined ? new Date(data["latestPauseTime"]) : undefined, nextSyncTime: data["nextSyncTime"] !== undefined ? deserializeGoogleTypeDateTime(data["nextSyncTime"]) : undefined, refreshInterval: data["refreshInterval"] !== undefined ? data["refreshInterval"] : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Any params and credentials used specifically for EUA connectors. */ export interface GoogleCloudDiscoveryengineV1alphaDataConnectorEndUserConfig { /** * Optional. Any additional parameters needed for EUA. */ additionalParams?: { [key: string]: any }; /** * Optional. Any authentication parameters specific to EUA connectors. */ authParams?: { [key: string]: any }; /** * Optional. Any authentication parameters specific to EUA connectors in json * string format. */ jsonAuthParams?: string; /** * Optional. The tenant project the connector is connected to. */ tenant?: GoogleCloudDiscoveryengineV1alphaTenant; } /** * Any params and credentials used specifically for hybrid connectors * supporting FEDERATED mode. */ export interface GoogleCloudDiscoveryengineV1alphaDataConnectorFederatedConfig { /** * Optional. Any additional parameters needed for FEDERATED. */ additionalParams?: { [key: string]: any }; /** * Optional. Any authentication parameters specific to FEDERATED connectors. */ authParams?: { [key: string]: any }; /** * Optional. Any authentication parameters specific to FEDERATED connectors * in json string format. */ jsonAuthParams?: string; } /** * The configuration for realtime sync to store additional params for realtime * sync. */ export interface GoogleCloudDiscoveryengineV1alphaDataConnectorRealtimeSyncConfig { /** * Optional. The ID of the Secret Manager secret used for webhook secret. */ realtimeSyncSecret?: string; /** * Optional. Streaming error details. */ streamingError?: GoogleCloudDiscoveryengineV1alphaDataConnectorRealtimeSyncConfigStreamingError; /** * Optional. Webhook url for the connector to specify additional params for * realtime sync. */ webhookUri?: string; } /** * Streaming error details. */ export interface GoogleCloudDiscoveryengineV1alphaDataConnectorRealtimeSyncConfigStreamingError { /** * Optional. Error details. */ error?: GoogleRpcStatus; /** * Optional. Streaming error. */ streamingErrorReason?: | "STREAMING_ERROR_REASON_UNSPECIFIED" | "STREAMING_SETUP_ERROR" | "STREAMING_SYNC_ERROR" | "INGRESS_ENDPOINT_REQUIRED"; } /** * Represents an entity in the data source. For example, the `Account` object * in Salesforce. */ export interface GoogleCloudDiscoveryengineV1alphaDataConnectorSourceEntity { /** * Output only. The full resource name of the associated data store for the * source entity. Format: * `projects/*\/locations/*\/collections/*\/dataStores/*`. When the connector * is initialized by the DataConnectorService.SetUpDataConnector method, a * DataStore is automatically created for each source entity. */ readonly dataStore?: string; /** * The name of the entity. Supported values by data source: * Salesforce: * `Lead`, `Opportunity`, `Contact`, `Account`, `Case`, `Contract`, `Campaign` * * Jira: `Issue` * Confluence: `Content`, `Space` */ entityName?: string; /** * Optional. Configuration for `HEALTHCARE_FHIR` vertical. */ healthcareFhirConfig?: GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig; /** * The parameters for the entity to facilitate data ingestion in json string * format. */ jsonParams?: string; /** * Attributes for indexing. Key: Field name. Value: The key property to map a * field to, such as `title`, and `description`. Supported key properties: * * `title`: The title for data record. This would be displayed on search * results. * `description`: The description for data record. This would be * displayed on search results. */ keyPropertyMappings?: { [key: string]: string }; /** * The parameters for the entity to facilitate data ingestion in structured * json format. */ params?: { [key: string]: any }; /** * Optional. The start schema to use for the DataStore created from this * SourceEntity. If unset, a default vertical specialized schema will be used. * This field is only used by SetUpDataConnector API, and will be ignored if * used in other APIs. This field will be omitted from all API responses * including GetDataConnector API. To retrieve a schema of a DataStore, use * SchemaService.GetSchema API instead. The provided schema will be validated * against certain rules on schema. Learn more from [this * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). */ startingSchema?: GoogleCloudDiscoveryengineV1alphaSchema; } /** * DataStore captures global settings and configs at the DataStore level. */ export interface GoogleCloudDiscoveryengineV1alphaDataStore { /** * Immutable. Whether data in the DataStore has ACL information. If set to * `true`, the source data must have ACL. ACL will be ingested when data is * ingested by DocumentService.ImportDocuments methods. When ACL is enabled * for the DataStore, Document can't be accessed by calling * DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL * is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` * content config. */ aclEnabled?: boolean; /** * Optional. Configuration for advanced site search. */ advancedSiteSearchConfig?: GoogleCloudDiscoveryengineV1alphaAdvancedSiteSearchConfig; /** * Output only. Data size estimation for billing. */ readonly billingEstimation?: GoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation; /** * Output only. CMEK-related information for the DataStore. */ readonly cmekConfig?: GoogleCloudDiscoveryengineV1alphaCmekConfig; /** * Optional. Configuration for configurable billing approach. See */ configurableBillingApproach?: | "CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED" | "CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE" | "CONFIGURABLE_CONSUMPTION_EMBEDDING"; /** * Output only. The timestamp when configurable_billing_approach was last * updated. */ readonly configurableBillingApproachUpdateTime?: Date; /** * Immutable. The content config of the data store. If this field is unset, * the server behavior defaults to ContentConfig.NO_CONTENT. */ contentConfig?: | "CONTENT_CONFIG_UNSPECIFIED" | "NO_CONTENT" | "CONTENT_REQUIRED" | "PUBLIC_WEBSITE" | "GOOGLE_WORKSPACE"; /** * Output only. Timestamp the DataStore was created at. */ readonly createTime?: Date; /** * Output only. The id of the default Schema associated to this data store. */ readonly defaultSchemaId?: string; /** * Required. The data store display name. This field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * INVALID_ARGUMENT error is returned. */ displayName?: string; /** * Configuration for Document understanding and enrichment. */ documentProcessingConfig?: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig; /** * Optional. Configuration for `HEALTHCARE_FHIR` vertical. */ healthcareFhirConfig?: GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig; /** * Immutable. The fully qualified resource name of the associated * IdentityMappingStore. This field can only be set for acl_enabled DataStores * with `THIRD_PARTY` or `GSUITE` IdP. Format: * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`. */ identityMappingStore?: string; /** * Output only. Data store level identity provider config. */ readonly idpConfig?: GoogleCloudDiscoveryengineV1alphaIdpConfig; /** * Immutable. The industry vertical that the data store registers. */ industryVertical?: | "INDUSTRY_VERTICAL_UNSPECIFIED" | "GENERIC" | "MEDIA" | "HEALTHCARE_FHIR"; /** * Optional. If set, this DataStore is an Infobot FAQ DataStore. */ isInfobotFaqDataStore?: boolean; /** * Input only. The KMS key to be used to protect this DataStore at creation * time. Must be set for requests that need to comply with CMEK Org Policy * protections. If this field is set and processed successfully, the DataStore * will be protected by the KMS key, as indicated in the cmek_config field. */ kmsKeyName?: string; /** * Language info for DataStore. */ languageInfo?: GoogleCloudDiscoveryengineV1alphaLanguageInfo; /** * Immutable. Identifier. The full resource name of the data store. Format: * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * Optional. Configuration for Natural Language Query Understanding. */ naturalLanguageQueryUnderstandingConfig?: GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig; /** * Optional. Stores serving config at DataStore level. */ servingConfigDataStore?: GoogleCloudDiscoveryengineV1alphaDataStoreServingConfigDataStore; /** * The solutions that the data store enrolls. Available solutions for each * industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and * `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is * automatically enrolled. Other solutions cannot be enrolled. */ solutionTypes?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"[]; /** * The start schema to use for this DataStore when provisioning it. If unset, * a default vertical specialized schema will be used. This field is only used * by CreateDataStore API, and will be ignored if used in other APIs. This * field will be omitted from all API responses including CreateDataStore API. * To retrieve a schema of a DataStore, use SchemaService.GetSchema API * instead. The provided schema will be validated against certain rules on * schema. Learn more from [this * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). */ startingSchema?: GoogleCloudDiscoveryengineV1alphaSchema; /** * Config to store data store type configuration for workspace data. This * must be set when DataStore.content_config is set as * DataStore.ContentConfig.GOOGLE_WORKSPACE. */ workspaceConfig?: GoogleCloudDiscoveryengineV1alphaWorkspaceConfig; } /** * Estimation of data size per data store. */ export interface GoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation { /** * Data size for structured data in terms of bytes. */ structuredDataSize?: bigint; /** * Last updated timestamp for structured data. */ structuredDataUpdateTime?: Date; /** * Data size for unstructured data in terms of bytes. */ unstructuredDataSize?: bigint; /** * Last updated timestamp for unstructured data. */ unstructuredDataUpdateTime?: Date; /** * Data size for websites in terms of bytes. */ websiteDataSize?: bigint; /** * Last updated timestamp for websites. */ websiteDataUpdateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation(data: any): GoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation { return { ...data, structuredDataSize: data["structuredDataSize"] !== undefined ? String(data["structuredDataSize"]) : undefined, structuredDataUpdateTime: data["structuredDataUpdateTime"] !== undefined ? data["structuredDataUpdateTime"].toISOString() : undefined, unstructuredDataSize: data["unstructuredDataSize"] !== undefined ? String(data["unstructuredDataSize"]) : undefined, unstructuredDataUpdateTime: data["unstructuredDataUpdateTime"] !== undefined ? data["unstructuredDataUpdateTime"].toISOString() : undefined, websiteDataSize: data["websiteDataSize"] !== undefined ? String(data["websiteDataSize"]) : undefined, websiteDataUpdateTime: data["websiteDataUpdateTime"] !== undefined ? data["websiteDataUpdateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation(data: any): GoogleCloudDiscoveryengineV1alphaDataStoreBillingEstimation { return { ...data, structuredDataSize: data["structuredDataSize"] !== undefined ? BigInt(data["structuredDataSize"]) : undefined, structuredDataUpdateTime: data["structuredDataUpdateTime"] !== undefined ? new Date(data["structuredDataUpdateTime"]) : undefined, unstructuredDataSize: data["unstructuredDataSize"] !== undefined ? BigInt(data["unstructuredDataSize"]) : undefined, unstructuredDataUpdateTime: data["unstructuredDataUpdateTime"] !== undefined ? new Date(data["unstructuredDataUpdateTime"]) : undefined, websiteDataSize: data["websiteDataSize"] !== undefined ? BigInt(data["websiteDataSize"]) : undefined, websiteDataUpdateTime: data["websiteDataUpdateTime"] !== undefined ? new Date(data["websiteDataUpdateTime"]) : undefined, }; } /** * Stores information regarding the serving configurations at DataStore level. */ export interface GoogleCloudDiscoveryengineV1alphaDataStoreServingConfigDataStore { /** * Optional. If set true, the DataStore will not be available for serving * search requests. */ disabledForServing?: boolean; } /** * The historical dedicated crawl rate timeseries data, used for monitoring. * Dedicated crawl is used by Vertex AI to crawl the user's website when * dedicate crawl is set. */ export interface GoogleCloudDiscoveryengineV1alphaDedicatedCrawlRateTimeSeries { /** * Vertex AI's error rate time series of auto-refresh dedicated crawl. */ autoRefreshCrawlErrorRate?: GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries; /** * Vertex AI's dedicated crawl rate time series of auto-refresh, which is the * crawl rate of Google-CloudVertexBot when dedicate crawl is set, and the * crawl rate is for best effort use cases like refreshing urls periodically. */ autoRefreshCrawlRate?: GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries; /** * Vertex AI's error rate time series of user triggered dedicated crawl. */ userTriggeredCrawlErrorRate?: GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries; /** * Vertex AI's dedicated crawl rate time series of user triggered crawl, * which is the crawl rate of Google-CloudVertexBot when dedicate crawl is * set, and user triggered crawl rate is for deterministic use cases like * crawling urls or sitemaps specified by users. */ userTriggeredCrawlRate?: GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries; } function serializeGoogleCloudDiscoveryengineV1alphaDedicatedCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1alphaDedicatedCrawlRateTimeSeries { return { ...data, autoRefreshCrawlErrorRate: data["autoRefreshCrawlErrorRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["autoRefreshCrawlErrorRate"]) : undefined, autoRefreshCrawlRate: data["autoRefreshCrawlRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["autoRefreshCrawlRate"]) : undefined, userTriggeredCrawlErrorRate: data["userTriggeredCrawlErrorRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["userTriggeredCrawlErrorRate"]) : undefined, userTriggeredCrawlRate: data["userTriggeredCrawlRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["userTriggeredCrawlRate"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDedicatedCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1alphaDedicatedCrawlRateTimeSeries { return { ...data, autoRefreshCrawlErrorRate: data["autoRefreshCrawlErrorRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["autoRefreshCrawlErrorRate"]) : undefined, autoRefreshCrawlRate: data["autoRefreshCrawlRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["autoRefreshCrawlRate"]) : undefined, userTriggeredCrawlErrorRate: data["userTriggeredCrawlErrorRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["userTriggeredCrawlErrorRate"]) : undefined, userTriggeredCrawlRate: data["userTriggeredCrawlRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["userTriggeredCrawlRate"]) : undefined, }; } /** * Metadata related to the progress of the AgentService.DeleteAgent operation. * This will be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteAgentMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteAgentMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteAgentMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteAgentMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteAgentMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the CmekConfigService.DeleteCmekConfig * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteCmekConfigMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteCmekConfigMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteCmekConfigMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteCmekConfigMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteCmekConfigMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the CollectionService.UpdateCollection * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteCollectionMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteCollectionMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteCollectionMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteCollectionMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteCollectionMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the DataStoreService.DeleteDataStore * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the EngineService.DeleteEngine * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * IdentityMappingStoreService.DeleteIdentityMappingStore operation. This will * be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteIdentityMappingStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteIdentityMappingStoreMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteIdentityMappingStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteIdentityMappingStoreMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteIdentityMappingStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata for DeleteSchema LRO. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request for DeleteSession method. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest { /** * Required. The resource name of the Session to delete. Format: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` */ name?: string; } /** * Metadata related to the progress of the * SiteSearchEngineService.DeleteSitemap operation. This will be returned by the * google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.DeleteTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the UserStoreService.DeleteUserStore * operation. This will be returned by the google.longrunning.Operation.metadata * field. Delete UserStore will delete all the end users under the user store, * return the number of end users successfully deleted or failed to delete in * the metadata. */ export interface GoogleCloudDiscoveryengineV1alphaDeleteUserStoreMetadata { /** * The number of end users under the user store that failed to be deleted. */ failureCount?: bigint; /** * The number of end users under the user store that were successfully * deleted. */ successCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaDeleteUserStoreMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteUserStoreMetadata { return { ...data, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDeleteUserStoreMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDeleteUserStoreMetadata { return { ...data, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, }; } /** * Defines target endpoints used to connect to third-party sources. */ export interface GoogleCloudDiscoveryengineV1alphaDestinationConfig { /** * Optional. The destinations for the corresponding key. */ destinations?: GoogleCloudDiscoveryengineV1alphaDestinationConfigDestination[]; /** * Additional parameters for this destination config in json string format. */ jsonParams?: string; /** * Optional. Unique destination identifier that is supported by the * connector. */ key?: string; /** * Optional. Additional parameters for this destination config in structured * json format. */ params?: { [key: string]: any }; } /** * Defines a target endpoint */ export interface GoogleCloudDiscoveryengineV1alphaDestinationConfigDestination { /** * Publicly routable host. */ host?: string; /** * Optional. Target port number accepted by the destination. */ port?: number; } /** * Metadata related to the progress of the * SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for SiteSearchEngineService.DisableAdvancedSiteSearch * method. */ export interface GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse { } /** * A singleton resource of DataStore. If it's empty when DataStore is created * and DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED, the default * parser will default to digital parser. */ export interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig { /** * Whether chunking mode is enabled. */ chunkingConfig?: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig; /** * Configurations for default Document parser. If not specified, we will * configure it as default DigitalParsingConfig, and the default parsing * config will be applied to all file types for Document parsing. */ defaultParsingConfig?: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig; /** * The full resource name of the Document Processing Config. Format: * `projects/*\/locations/*\/collections/*\/dataStores/*\/documentProcessingConfig`. */ name?: string; /** * Map from file type to override the default parsing configuration based on * the file type. Supported keys: * `pdf`: Override parsing config for PDF * files, either digital parsing, ocr parsing or layout parsing is supported. * * `html`: Override parsing config for HTML files, only digital parsing and * layout parsing are supported. * `docx`: Override parsing config for DOCX * files, only digital parsing and layout parsing are supported. * `pptx`: * Override parsing config for PPTX files, only digital parsing and layout * parsing are supported. * `xlsm`: Override parsing config for XLSM files, * only digital parsing and layout parsing are supported. * `xlsx`: Override * parsing config for XLSX files, only digital parsing and layout parsing are * supported. */ parsingConfigOverrides?: { [key: string]: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig }; } /** * Configuration for chunking config. */ export interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig { /** * Configuration for the layout based chunking. */ layoutBasedChunkingConfig?: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig; } /** * Configuration for the layout based chunking. */ export interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig { /** * The token size limit for each chunk. Supported values: 100-500 * (inclusive). Default value: 500. */ chunkSize?: number; /** * Whether to include appending different levels of headings to chunks from * the middle of the document to prevent context loss. Default value: False. */ includeAncestorHeadings?: boolean; } /** * Related configurations applied to a specific type of document parser. */ export interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig { /** * Configurations applied to digital parser. */ digitalParsingConfig?: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig; /** * Configurations applied to layout parser. */ layoutParsingConfig?: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig; /** * Configurations applied to OCR parser. Currently it only applies to PDFs. */ ocrParsingConfig?: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig; } /** * The digital parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig { } /** * The layout parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig { /** * Optional. If true, the processed document will be made available for the * GetProcessedDocument API. */ enableGetProcessedDocument?: boolean; /** * Optional. If true, the LLM based annotation is added to the image during * parsing. */ enableImageAnnotation?: boolean; /** * Optional. If true, the pdf layout will be refined using an LLM. */ enableLlmLayoutParsing?: boolean; /** * Optional. If true, the LLM based annotation is added to the table during * parsing. */ enableTableAnnotation?: boolean; /** * Optional. List of HTML classes to exclude from the parsed content. */ excludeHtmlClasses?: string[]; /** * Optional. List of HTML elements to exclude from the parsed content. */ excludeHtmlElements?: string[]; /** * Optional. List of HTML ids to exclude from the parsed content. */ excludeHtmlIds?: string[]; /** * Optional. Contains the required structure types to extract from the * document. Supported values: * `shareholder-structure` */ structuredContentTypes?: string[]; } /** * The OCR parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig { /** * [DEPRECATED] This field is deprecated. To use the additional enhanced * document elements processing, please switch to `layout_parsing_config`. */ enhancedDocumentElements?: string[]; /** * If true, will use native text instead of OCR text on pages containing * native text. */ useNativeText?: boolean; } /** * Metadata related to the progress of the * SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for SiteSearchEngineService.EnableAdvancedSiteSearch * method. */ export interface GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse { } /** * Metadata that describes the training and serving parameters of an Engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngine { /** * Optional. Immutable. This the application type which this engine resource * represents. NOTE: this is a new concept independ of existing industry * vertical or solution type. */ appType?: | "APP_TYPE_UNSPECIFIED" | "APP_TYPE_INTRANET"; /** * Configurations for the Chat Engine. Only applicable if solution_type is * SOLUTION_TYPE_CHAT. */ chatEngineConfig?: GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig; /** * Output only. Additional information of the Chat Engine. Only applicable if * solution_type is SOLUTION_TYPE_CHAT. */ readonly chatEngineMetadata?: GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata; /** * Output only. CMEK-related information for the Engine. */ readonly cmekConfig?: GoogleCloudDiscoveryengineV1alphaCmekConfig; /** * Common config spec that specifies the metadata of the engine. */ commonConfig?: GoogleCloudDiscoveryengineV1alphaEngineCommonConfig; /** * Optional. Configuration for configurable billing approach. */ configurableBillingApproach?: | "CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED" | "CONFIGURABLE_BILLING_APPROACH_ENABLED"; /** * Output only. Timestamp the Recommendation Engine was created at. */ readonly createTime?: Date; /** * Optional. The data stores associated with this engine. For * SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they * can only associate with at most one data store. If solution_type is * SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be * associated here. Note that when used in CreateEngineRequest, one DataStore * id must be provided as the system will use it for necessary * initializations. */ dataStoreIds?: string[]; /** * Optional. Whether to disable analytics for searches performed on this * engine. */ disableAnalytics?: boolean; /** * Required. The display name of the engine. Should be human readable. UTF-8 * encoded string with limit of 1024 characters. */ displayName?: string; /** * 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` * `feedback` * * `session-sharing` * `personalization-memory` * `disable-agent-sharing` * * `disable-image-generation` * `disable-video-generation` * * `disable-onedrive-upload` * `disable-talk-to-content` * * `disable-google-drive-upload` */ features?: { [key: string]: | "FEATURE_STATE_UNSPECIFIED" | "FEATURE_STATE_ON" | "FEATURE_STATE_OFF" }; /** * Optional. The industry vertical that the engine registers. The restriction * of the Engine industry vertical is based on DataStore: Vertical on Engine * has to match vertical of the DataStore linked to the engine. */ industryVertical?: | "INDUSTRY_VERTICAL_UNSPECIFIED" | "GENERIC" | "MEDIA" | "HEALTHCARE_FHIR"; /** * Configurations for the Media Engine. Only applicable on the data stores * with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA * vertical. */ mediaRecommendationEngineConfig?: GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig; /** * 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. */ modelConfigs?: { [key: string]: | "MODEL_STATE_UNSPECIFIED" | "MODEL_ENABLED" | "MODEL_DISABLED" }; /** * 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-9*\/. * Otherwise, an INVALID_ARGUMENT error is returned. */ name?: string; /** * Output only. Additional information of a recommendation engine. Only * applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION. */ readonly recommendationMetadata?: GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata; /** * Configurations for the Search Engine. Only applicable if solution_type is * SOLUTION_TYPE_SEARCH. */ searchEngineConfig?: GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig; /** * Additional config specs for a `similar-items` engine. */ similarDocumentsConfig?: GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig; /** * Required. The solutions of the engine. */ solutionType?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"; /** * Output only. Timestamp the Recommendation Engine was last updated. */ readonly updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaEngine(data: any): GoogleCloudDiscoveryengineV1alphaEngine { return { ...data, mediaRecommendationEngineConfig: data["mediaRecommendationEngineConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig(data["mediaRecommendationEngineConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaEngine(data: any): GoogleCloudDiscoveryengineV1alphaEngine { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, mediaRecommendationEngineConfig: data["mediaRecommendationEngineConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig(data["mediaRecommendationEngineConfig"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Configurations for a Chat Engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig { /** * The configurationt generate the Dialogflow agent that is associated to * this Engine. Note that these configurations are one-time consumed by and * passed to Dialogflow service. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. */ agentCreationConfig?: GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig; /** * Optional. If the flag set to true, we allow the agent and engine are in * different locations, otherwise the agent and engine are required to be in * the same location. The flag is set to false by default. Note that the * `allow_cross_region` are one-time consumed by and passed to * EngineService.CreateEngine. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. */ allowCrossRegion?: boolean; /** * The resource name of an exist Dialogflow agent to link to this Chat * Engine. Customers can either provide `agent_creation_config` to create * agent or provide an agent name that links the agent with the Chat engine. * Format: `projects//locations//agents/`. Note that the * `dialogflow_agent_to_link` are one-time consumed by and passed to * Dialogflow service. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. Use ChatEngineMetadata.dialogflow_agent for actual agent * association after Engine is created. */ dialogflowAgentToLink?: string; } /** * Configurations for generating a Dialogflow agent. Note that these * configurations are one-time consumed by and passed to Dialogflow service. It * means they cannot be retrieved using EngineService.GetEngine or * EngineService.ListEngines API after engine creation. */ export interface GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig { /** * Name of the company, organization or other entity that the agent * represents. Used for knowledge connector LLM prompt and for knowledge * search. */ business?: string; /** * Required. The default language of the agent as a language tag. See * [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) for a * list of the currently supported language codes. */ defaultLanguageCode?: string; /** * Agent location for Agent creation, supported values: global/us/eu. If not * provided, us Engine will create Agent using us-central-1 by default; eu * Engine will create Agent using eu-west-1 by default. */ location?: string; /** * Required. The time zone of the agent from the [time zone * database](https://www.iana.org/time-zones), e.g., America/New_York, * Europe/Paris. */ timeZone?: string; } /** * Additional information of a Chat Engine. Fields in this message are output * only. */ export interface GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata { /** * The resource name of a Dialogflow agent, that this Chat Engine refers to. * Format: `projects//locations//agents/`. */ dialogflowAgent?: string; } /** * Common configurations for an Engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngineCommonConfig { /** * The name of the company, business or entity that is associated with the * engine. Setting this may help improve LLM related features. */ companyName?: string; } /** * Additional config specs for a Media Recommendation engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig { /** * Optional. Additional engine features config. */ engineFeaturesConfig?: GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigEngineFeaturesConfig; /** * The optimization objective. e.g., `cvr`. This field together with * optimization_objective describe engine metadata to use to control engine * training and serving. Currently supported values: `ctr`, `cvr`. If not * specified, we choose default based on engine type. Default depends on type * of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => * `ctr` */ optimizationObjective?: string; /** * Name and value of the custom threshold for cvr optimization_objective. For * target_field `watch-time`, target_field_value must be an integer value * indicating the media progress time in seconds between (0, 86400] (excludes * 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the * target_field_value must be a valid float value between (0, 1.0] (excludes * 0, includes 1.0) (e.g., 0.5). */ optimizationObjectiveConfig?: GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig; /** * The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). * Since part of the cost of running the service is frequency of training - * this can be used to determine when to train engine in order to control * cost. If not specified: the default value for `CreateEngine` method is * `TRAINING`. The default value for `UpdateEngine` method is to keep the * state the same as before. */ trainingState?: | "TRAINING_STATE_UNSPECIFIED" | "PAUSED" | "TRAINING"; /** * Required. The type of engine. e.g., `recommended-for-you`. This field * together with optimization_objective describe engine metadata to use to * control engine training and serving. Currently supported values: * `recommended-for-you`, `others-you-may-like`, `more-like-this`, * `most-popular-items`. */ type?: string; } function serializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig(data: any): GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig { return { ...data, engineFeaturesConfig: data["engineFeaturesConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigEngineFeaturesConfig(data["engineFeaturesConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig(data: any): GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig { return { ...data, engineFeaturesConfig: data["engineFeaturesConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigEngineFeaturesConfig(data["engineFeaturesConfig"]) : undefined, }; } /** * More feature configs of the selected engine type. */ export interface GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigEngineFeaturesConfig { /** * Most popular engine feature config. */ mostPopularConfig?: GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig; /** * Recommended for you engine feature config. */ recommendedForYouConfig?: GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigRecommendedForYouFeatureConfig; } function serializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigEngineFeaturesConfig(data: any): GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigEngineFeaturesConfig { return { ...data, mostPopularConfig: data["mostPopularConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data["mostPopularConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigEngineFeaturesConfig(data: any): GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigEngineFeaturesConfig { return { ...data, mostPopularConfig: data["mostPopularConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data["mostPopularConfig"]) : undefined, }; } /** * Feature configurations that are required for creating a Most Popular engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig { /** * The time window of which the engine is queried at training and prediction * time. Positive integers only. The value translates to the last X days of * events. Currently required for the `most-popular-items` engine. */ timeWindowDays?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data: any): GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig { return { ...data, timeWindowDays: data["timeWindowDays"] !== undefined ? String(data["timeWindowDays"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data: any): GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig { return { ...data, timeWindowDays: data["timeWindowDays"] !== undefined ? BigInt(data["timeWindowDays"]) : undefined, }; } /** * Custom threshold for `cvr` optimization_objective. */ export interface GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig { /** * Required. The name of the field to target. Currently supported values: * `watch-percentage`, `watch-time`. */ targetField?: string; /** * Required. The threshold to be applied to the target (e.g., 0.5). */ targetFieldValueFloat?: number; } /** * Additional feature configurations for creating a `recommended-for-you` * engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigRecommendedForYouFeatureConfig { /** * The type of event with which the engine is queried at prediction time. If * set to `generic`, only `view-item`, `media-play`,and `media-complete` will * be used as `context-event` in engine training. If set to `view-home-page`, * `view-home-page` will also be used as `context-events` in addition to * `view-item`, `media-play`, and `media-complete`. Currently supported for * the `recommended-for-you` engine. Currently supported values: * `view-home-page`, `generic`. */ contextEventType?: string; } /** * Additional information of a recommendation engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata { /** * Output only. The state of data requirements for this engine: `DATA_OK` and * `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` * state. Engine can have `DATA_ERROR` state even if serving state is * `ACTIVE`: engines were trained successfully before, but cannot be refreshed * because the underlying engine no longer has sufficient data for training. */ readonly dataState?: | "DATA_STATE_UNSPECIFIED" | "DATA_OK" | "DATA_ERROR"; /** * Output only. The timestamp when the latest successful training finished. * Only applicable on Media Recommendation engines. */ readonly lastTrainTime?: Date; /** * Output only. The timestamp when the latest successful tune finished. Only * applicable on Media Recommendation engines. */ readonly lastTuneTime?: Date; /** * Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`. */ readonly servingState?: | "SERVING_STATE_UNSPECIFIED" | "INACTIVE" | "ACTIVE" | "TUNED"; /** * Output only. The latest tune operation id associated with the engine. Only * applicable on Media Recommendation engines. If present, this operation id * can be used to determine if there is an ongoing tune for this engine. To * check the operation status, send the GetOperation request with this * operation id in the engine resource format. If no tuning has happened for * this engine, the string is empty. */ readonly tuningOperation?: string; } /** * Configurations for a Search Engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig { /** * The add-on that this search engine enables. */ searchAddOns?: | "SEARCH_ADD_ON_UNSPECIFIED" | "SEARCH_ADD_ON_LLM"[]; /** * The search feature tier of this engine. Different tiers might have * different pricing. To learn more, check the pricing documentation. Defaults * to SearchTier.SEARCH_TIER_STANDARD if not specified. */ searchTier?: | "SEARCH_TIER_UNSPECIFIED" | "SEARCH_TIER_STANDARD" | "SEARCH_TIER_ENTERPRISE"; } /** * Additional config specs for a `similar-items` engine. */ export interface GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig { } /** * Metadata related to the progress of the EstimateDataSize operation. This is * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata { /** * Operation create time. */ createTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata(data: any): GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata(data: any): GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, }; } /** * Response of the EstimateDataSize request. If the long running operation was * successful, then this message is returned by the * google.longrunning.Operations.response field if the operation was successful. */ export interface GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse { /** * Data size in terms of bytes. */ dataSizeBytes?: bigint; /** * Total number of documents. */ documentCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse(data: any): GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse { return { ...data, dataSizeBytes: data["dataSizeBytes"] !== undefined ? String(data["dataSizeBytes"]) : undefined, documentCount: data["documentCount"] !== undefined ? String(data["documentCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse(data: any): GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse { return { ...data, dataSizeBytes: data["dataSizeBytes"] !== undefined ? BigInt(data["dataSizeBytes"]) : undefined, documentCount: data["documentCount"] !== undefined ? BigInt(data["documentCount"]) : undefined, }; } /** * An evaluation is a single execution (or run) of an evaluation process. It * encapsulates the state of the evaluation and the resulting data. */ export interface GoogleCloudDiscoveryengineV1alphaEvaluation { /** * Output only. Timestamp the Evaluation was created at. */ readonly createTime?: Date; /** * Output only. Timestamp the Evaluation was completed at. */ readonly endTime?: Date; /** * Output only. The error that occurred during evaluation. Only populated * when the evaluation's state is FAILED. */ readonly error?: GoogleRpcStatus; /** * Output only. A sample of errors encountered while processing the request. */ readonly errorSamples?: GoogleRpcStatus[]; /** * Required. The specification of the evaluation. */ evaluationSpec?: GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec; /** * Identifier. The full resource name of the Evaluation, in the format of * `projects/{project}/locations/{location}/evaluations/{evaluation}`. This * field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * Output only. The metrics produced by the evaluation, averaged across all * SampleQuerys in the SampleQuerySet. Only populated when the evaluation's * state is SUCCEEDED. */ readonly qualityMetrics?: GoogleCloudDiscoveryengineV1alphaQualityMetrics; /** * Output only. The state of the evaluation. */ readonly state?: | "STATE_UNSPECIFIED" | "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED"; } /** * Describes the specification of the evaluation. */ export interface GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec { /** * Optional. The specification of the query set. */ querySetSpec?: GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec; /** * Required. The search request that is used to perform the evaluation. Only * the following fields within SearchRequest are supported; if any other * fields are provided, an UNSUPPORTED error will be returned: * * SearchRequest.serving_config * SearchRequest.branch * * SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * * SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * * SearchRequest.user_pseudo_id */ searchRequest?: GoogleCloudDiscoveryengineV1alphaSearchRequest; } /** * Describes the specification of the query set. */ export interface GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec { /** * Optional. The full resource name of the SampleQuerySet used for the * evaluation, in the format of * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. */ sampleQuerySet?: string; } /** * Metadata related to the progress of the Export operation. This is returned * by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaExportMetricsMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaExportMetricsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaExportMetricsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaExportMetricsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaExportMetricsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the ExportMetricsRequest. If the long running operation was * successful, then this message is returned by the * google.longrunning.Operations.response field. */ export interface GoogleCloudDiscoveryengineV1alphaExportMetricsResponse { } /** * Configurations for fields of a schema. For example, configuring a field is * indexable, or searchable. */ export interface GoogleCloudDiscoveryengineV1alphaFieldConfig { /** * If this field is set, only the corresponding source will be indexed for * this field. Otherwise, the values from different sources are merged. * Assuming a page with `` in meta tag, and `` in page map: if this enum is * set to METATAGS, we will only index ``; if this enum is not set, we will * merge them and index ``. */ advancedSiteSearchDataSources?: | "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED" | "METATAGS" | "PAGEMAP" | "URI_PATTERN_MAPPING" | "SCHEMA_ORG"[]; /** * If completable_option is COMPLETABLE_ENABLED, field values are directly * used and returned as suggestions for Autocomplete in * CompletionService.CompleteQuery. If completable_option is unset, the server * behavior defaults to COMPLETABLE_DISABLED for fields that support setting * completable options, which are just `string` fields. For those fields that * do not support setting completable options, the server will skip * completable option setting, and setting completable_option for those fields * will throw `INVALID_ARGUMENT` error. */ completableOption?: | "COMPLETABLE_OPTION_UNSPECIFIED" | "COMPLETABLE_ENABLED" | "COMPLETABLE_DISABLED"; /** * If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are * available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if * FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an * `INVALID_ARGUMENT` error will be returned. If dynamic_facetable_option is * unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for * fields that support setting dynamic facetable options. For those fields * that do not support setting dynamic facetable options, such as `object` and * `boolean`, the server will skip dynamic facetable option setting, and * setting dynamic_facetable_option for those fields will throw * `INVALID_ARGUMENT` error. */ dynamicFacetableOption?: | "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED" | "DYNAMIC_FACETABLE_ENABLED" | "DYNAMIC_FACETABLE_DISABLED"; /** * Required. Field path of the schema field. For example: `title`, * `description`, `release_info.release_year`. */ fieldPath?: string; /** * Output only. Raw type of the field. */ readonly fieldType?: | "FIELD_TYPE_UNSPECIFIED" | "OBJECT" | "STRING" | "NUMBER" | "INTEGER" | "BOOLEAN" | "GEOLOCATION" | "DATETIME"; /** * If indexable_option is INDEXABLE_ENABLED, field values are indexed so that * it can be filtered or faceted in SearchService.Search. If indexable_option * is unset, the server behavior defaults to INDEXABLE_DISABLED for fields * that support setting indexable options. For those fields that do not * support setting indexable options, such as `object` and `boolean` and key * properties, the server will skip indexable_option setting, and setting * indexable_option for those fields will throw `INVALID_ARGUMENT` error. */ indexableOption?: | "INDEXABLE_OPTION_UNSPECIFIED" | "INDEXABLE_ENABLED" | "INDEXABLE_DISABLED"; /** * Output only. Type of the key property that this field is mapped to. Empty * string if this is not annotated as mapped to a key property. Example types * are `title`, `description`. Full list is defined by `keyPropertyMapping` in * the schema field annotation. If the schema field has a `KeyPropertyMapping` * annotation, `indexable_option` and `searchable_option` of this field cannot * be modified. */ readonly keyPropertyType?: string; /** * Optional. The metatag name found in the HTML page. If user defines this * field, the value of this metatag name will be used to extract metatag. If * the user does not define this field, the FieldConfig.field_path will be * used to extract metatag. */ metatagName?: string; /** * If recs_filterable_option is FILTERABLE_ENABLED, field values are * filterable by filter expression in RecommendationService.Recommend. If * FILTERABLE_ENABLED but the field type is numerical, field values are not * filterable by text queries in RecommendationService.Recommend. Only textual * fields are supported. If recs_filterable_option is unset, the default * setting is FILTERABLE_DISABLED for fields that support setting filterable * options. When a field set to [FILTERABLE_DISABLED] is filtered, a warning * is generated and an empty result is returned. */ recsFilterableOption?: | "FILTERABLE_OPTION_UNSPECIFIED" | "FILTERABLE_ENABLED" | "FILTERABLE_DISABLED"; /** * If retrievable_option is RETRIEVABLE_ENABLED, field values are included in * the search results. If retrievable_option is unset, the server behavior * defaults to RETRIEVABLE_DISABLED for fields that support setting * retrievable options. For those fields that do not support setting * retrievable options, such as `object` and `boolean`, the server will skip * retrievable option setting, and setting retrievable_option for those fields * will throw `INVALID_ARGUMENT` error. */ retrievableOption?: | "RETRIEVABLE_OPTION_UNSPECIFIED" | "RETRIEVABLE_ENABLED" | "RETRIEVABLE_DISABLED"; /** * Field paths for indexing custom attribute from schema.org data. More * details of schema.org and its defined types can be found at * [schema.org](https://schema.org). It is only used on advanced site search * schema. Currently only support full path from root. The full path to a * field is constructed by concatenating field names, starting from `_root`, * with a period `.` as the delimiter. Examples: * Publish date of the root: * _root.datePublished * Publish date of the reviews: * _root.review.datePublished */ schemaOrgPaths?: string[]; /** * If searchable_option is SEARCHABLE_ENABLED, field values are searchable by * text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type * is numerical, field values will not be searchable by text queries in * SearchService.Search, as there are no text values associated to numerical * fields. If searchable_option is unset, the server behavior defaults to * SEARCHABLE_DISABLED for fields that support setting searchable options. * Only `string` fields that have no key property mapping support setting * searchable_option. For those fields that do not support setting searchable * options, the server will skip searchable option setting, and setting * searchable_option for those fields will throw `INVALID_ARGUMENT` error. */ searchableOption?: | "SEARCHABLE_OPTION_UNSPECIFIED" | "SEARCHABLE_ENABLED" | "SEARCHABLE_DISABLED"; } /** * Request for GetSession method. */ export interface GoogleCloudDiscoveryengineV1alphaGetSessionRequest { /** * Optional. If set to true, the full session including all answer details * will be returned. */ includeAnswerDetails?: boolean; /** * Required. The resource name of the Session to get. Format: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` */ name?: string; } /** * Response message for SiteSearchEngineService.GetUriPatternDocumentData * method. */ export interface GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse { /** * Document data keyed by URI pattern. For example: document_data_map = { * "www.url1.com/*": { "Categories": ["category1", "category2"] }, * "www.url2.com/*": { "Categories": ["category3"] } } */ documentDataMap?: { [key: string]: { [key: string]: any } }; } /** * Config to data store for `HEALTHCARE_FHIR` vertical. */ export interface GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig { /** * Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical. If * set to `true`, the predefined healthcare fhir schema can be extended for * more customized searching and filtering. */ enableConfigurableSchema?: boolean; /** * Whether to enable static indexing for `HEALTHCARE_FHIR` batch ingestion. * If set to `true`, the batch ingestion will be processed in a static * indexing mode which is slower but more capable of handling larger volume. */ enableStaticIndexingForBatchIngestion?: boolean; } /** * IdentityMappingEntry LongRunningOperation metadata for * IdentityMappingStoreService.ImportIdentityMappings and * IdentityMappingStoreService.PurgeIdentityMappings */ export interface GoogleCloudDiscoveryengineV1alphaIdentityMappingEntryOperationMetadata { /** * The number of IdentityMappingEntries that failed to be processed. */ failureCount?: bigint; /** * The number of IdentityMappingEntries that were successfully processed. */ successCount?: bigint; /** * The total number of IdentityMappingEntries that were processed. */ totalCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaIdentityMappingEntryOperationMetadata(data: any): GoogleCloudDiscoveryengineV1alphaIdentityMappingEntryOperationMetadata { return { ...data, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaIdentityMappingEntryOperationMetadata(data: any): GoogleCloudDiscoveryengineV1alphaIdentityMappingEntryOperationMetadata { return { ...data, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, }; } /** * The configuration for the identity data synchronization runs. */ export interface GoogleCloudDiscoveryengineV1alphaIdentityScheduleConfig { /** * Optional. The UTC time when the next data sync is expected to start for * the Data Connector. Customers are only able to specify the hour and minute * to schedule the data sync. This is utilized when the data connector has a * refresh interval greater than 1 day. */ nextSyncTime?: GoogleTypeDateTime; /** * Optional. The refresh interval to sync the Access Control List information * for the documents ingested by this connector. If not set, the access * control list will be refreshed at the default interval of 30 minutes. The * identity refresh interval can be at least 30 minutes and at most 7 days. */ refreshInterval?: number /* Duration */; } function serializeGoogleCloudDiscoveryengineV1alphaIdentityScheduleConfig(data: any): GoogleCloudDiscoveryengineV1alphaIdentityScheduleConfig { return { ...data, nextSyncTime: data["nextSyncTime"] !== undefined ? serializeGoogleTypeDateTime(data["nextSyncTime"]) : undefined, refreshInterval: data["refreshInterval"] !== undefined ? data["refreshInterval"] : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaIdentityScheduleConfig(data: any): GoogleCloudDiscoveryengineV1alphaIdentityScheduleConfig { return { ...data, nextSyncTime: data["nextSyncTime"] !== undefined ? deserializeGoogleTypeDateTime(data["nextSyncTime"]) : undefined, refreshInterval: data["refreshInterval"] !== undefined ? data["refreshInterval"] : undefined, }; } /** * Identity Provider Config. */ export interface GoogleCloudDiscoveryengineV1alphaIdpConfig { /** * External Identity provider config. */ externalIdpConfig?: GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig; /** * Identity provider type configured. */ idpType?: | "IDP_TYPE_UNSPECIFIED" | "GSUITE" | "THIRD_PARTY"; } /** * Third party IDP Config. */ export interface GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig { /** * Workforce pool name. Example: "locations/global/workforcePools/pool_id" */ workforcePoolName?: string; } /** * Metadata related to the progress of the ImportCompletionSuggestions * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of CompletionSuggestions that failed to be imported. */ failureCount?: bigint; /** * Count of CompletionSuggestions successfully imported. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the CompletionService.ImportCompletionSuggestions method. If the * long running operation is done, this message is returned by the * google.longrunning.Operations.response field if the operation is successful. */ export interface GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse { /** * The desired location of errors incurred during the Import. */ errorConfig?: GoogleCloudDiscoveryengineV1alphaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Metadata related to the progress of the ImportDocuments operation. This is * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were processed successfully. */ successCount?: bigint; /** * Total count of entries that were processed. */ totalCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the ImportDocumentsRequest. If the long running operation is * done, then this message is returned by the * google.longrunning.Operations.response field if the operation was successful. */ export interface GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse { /** * Echoes the destination for the complete errors in the request if set. */ errorConfig?: GoogleCloudDiscoveryengineV1alphaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Configuration of destination for Import related errors. */ export interface GoogleCloudDiscoveryengineV1alphaImportErrorConfig { /** * Cloud Storage prefix for import errors. This must be an empty, existing * Cloud Storage directory. Import errors are written to sharded files in this * directory, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string; } /** * Response message for IdentityMappingStoreService.ImportIdentityMappings */ export interface GoogleCloudDiscoveryengineV1alphaImportIdentityMappingsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Metadata related to the progress of the ImportSampleQueries operation. This * will be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata { /** * ImportSampleQueries operation create time. */ createTime?: Date; /** * Count of SampleQuerys that failed to be imported. */ failureCount?: bigint; /** * Count of SampleQuerys successfully imported. */ successCount?: bigint; /** * Total count of SampleQuerys that were processed. */ totalCount?: bigint; /** * ImportSampleQueries operation last update time. If the operation is done, * this is also the finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the SampleQueryService.ImportSampleQueries method. If the long * running operation is done, this message is returned by the * google.longrunning.Operations.response field if the operation is successful. */ export interface GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse { /** * The desired location of errors incurred during the Import. */ errorConfig?: GoogleCloudDiscoveryengineV1alphaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Metadata related to the progress of the ImportSuggestionDenyListEntries * operation. This is returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CompletionService.ImportSuggestionDenyListEntries * method. */ export interface GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Count of deny list entries that failed to be imported. */ failedEntriesCount?: bigint; /** * Count of deny list entries successfully imported. */ importedEntriesCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse { return { ...data, failedEntriesCount: data["failedEntriesCount"] !== undefined ? String(data["failedEntriesCount"]) : undefined, importedEntriesCount: data["importedEntriesCount"] !== undefined ? String(data["importedEntriesCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse { return { ...data, failedEntriesCount: data["failedEntriesCount"] !== undefined ? BigInt(data["failedEntriesCount"]) : undefined, importedEntriesCount: data["importedEntriesCount"] !== undefined ? BigInt(data["importedEntriesCount"]) : undefined, }; } /** * Metadata related to the progress of the Import operation. This is returned * by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were processed successfully. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the ImportUserEventsRequest. If the long running operation was * successful, then this message is returned by the * google.longrunning.Operations.response field if the operation was successful. */ export interface GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse { /** * Echoes the destination for the complete errors if this field was set in * the request. */ errorConfig?: GoogleCloudDiscoveryengineV1alphaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Count of user events imported with complete existing Documents. */ joinedEventsCount?: bigint; /** * Count of user events imported, but with Document information not found in * the existing Branch. */ unjoinedEventsCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaImportUserEventsResponse(data: any): GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse { return { ...data, joinedEventsCount: data["joinedEventsCount"] !== undefined ? String(data["joinedEventsCount"]) : undefined, unjoinedEventsCount: data["unjoinedEventsCount"] !== undefined ? String(data["unjoinedEventsCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaImportUserEventsResponse(data: any): GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse { return { ...data, joinedEventsCount: data["joinedEventsCount"] !== undefined ? BigInt(data["joinedEventsCount"]) : undefined, unjoinedEventsCount: data["unjoinedEventsCount"] !== undefined ? BigInt(data["unjoinedEventsCount"]) : undefined, }; } /** * A floating point interval. */ export interface GoogleCloudDiscoveryengineV1alphaInterval { /** * Exclusive upper bound. */ exclusiveMaximum?: number; /** * Exclusive lower bound. */ exclusiveMinimum?: number; /** * Inclusive upper bound. */ maximum?: number; /** * Inclusive lower bound. */ minimum?: number; } /** * Language info for DataStore. */ export interface GoogleCloudDiscoveryengineV1alphaLanguageInfo { /** * Output only. Language part of normalized_language_code. E.g.: `en-US` -> * `en`, `zh-Hans-HK` -> `zh`, `en` -> `en`. */ readonly language?: string; /** * The language code for the DataStore. */ languageCode?: string; /** * Output only. This is the normalized form of language_code. E.g.: * language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have * normalized_language_code of `en-GB`. */ readonly normalizedLanguageCode?: string; /** * Output only. Region part of normalized_language_code, if present. E.g.: * `en-US` -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``. */ readonly region?: string; } /** * Information about users' licenses. */ export interface GoogleCloudDiscoveryengineV1alphaLicenseConfig { /** * Optional. The alert policy config for this license config. */ alertPolicyResourceConfig?: GoogleCloudDiscoveryengineV1alphaAlertPolicyResourceConfig; /** * Optional. Whether the license config should be auto renewed when it * reaches the end date. */ autoRenew?: boolean; /** * Optional. The planed end date. */ endDate?: GoogleTypeDate; /** * Optional. Whether the license config is for free trial. */ freeTrial?: boolean; /** * Output only. Whether the license config is for Gemini bundle. */ readonly geminiBundle?: boolean; /** * Required. Number of licenses purchased. */ licenseCount?: bigint; /** * Immutable. Identifier. The fully qualified resource name of the license * config. Format: * `projects/{project}/locations/{location}/licenseConfigs/{license_config}` */ name?: string; /** * Required. The start date. */ startDate?: GoogleTypeDate; /** * Output only. The state of the license config. */ readonly state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "EXPIRED" | "NOT_STARTED"; /** * Required. Subscription term. */ subscriptionTerm?: | "SUBSCRIPTION_TERM_UNSPECIFIED" | "SUBSCRIPTION_TERM_ONE_MONTH" | "SUBSCRIPTION_TERM_ONE_YEAR" | "SUBSCRIPTION_TERM_THREE_YEARS"; /** * Required. Subscription tier information for the license config. */ subscriptionTier?: | "SUBSCRIPTION_TIER_UNSPECIFIED" | "SUBSCRIPTION_TIER_SEARCH" | "SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT" | "SUBSCRIPTION_TIER_NOTEBOOK_LM" | "SUBSCRIPTION_TIER_FRONTLINE_WORKER" | "SUBSCRIPTION_TIER_AGENTSPACE_STARTER" | "SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS" | "SUBSCRIPTION_TIER_ENTERPRISE" | "SUBSCRIPTION_TIER_EDU" | "SUBSCRIPTION_TIER_EDU_PRO" | "SUBSCRIPTION_TIER_EDU_EMERGING" | "SUBSCRIPTION_TIER_EDU_PRO_EMERGING"; } function serializeGoogleCloudDiscoveryengineV1alphaLicenseConfig(data: any): GoogleCloudDiscoveryengineV1alphaLicenseConfig { return { ...data, licenseCount: data["licenseCount"] !== undefined ? String(data["licenseCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaLicenseConfig(data: any): GoogleCloudDiscoveryengineV1alphaLicenseConfig { return { ...data, licenseCount: data["licenseCount"] !== undefined ? BigInt(data["licenseCount"]) : undefined, }; } /** * Request for ListSessions method. */ export interface GoogleCloudDiscoveryengineV1alphaListSessionsRequest { /** * A comma-separated list of fields to filter by, in EBNF grammar. The * supported fields are: * `user_pseudo_id` * `state` * `display_name` * * `starred` * `is_pinned` * `labels` * `create_time` * `update_time` * Examples: * `user_pseudo_id = some_id` * `display_name = "some_name"` * * `starred = true` * `is_pinned=true AND (NOT labels:hidden)` * `create_time * > "1970-01-01T12:00:00Z"` */ filter?: string; /** * 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` * `create_time` * `session_name` * `is_pinned` Example: * * `update_time desc` * `create_time` * `is_pinned desc,update_time desc`: * list sessions by is_pinned first, then by update_time. */ orderBy?: string; /** * Maximum number of results to return. If unspecified, defaults to 50. Max * allowed value is 1000. */ pageSize?: number; /** * A page token, received from a previous `ListSessions` call. Provide this * to retrieve the subsequent page. */ pageToken?: string; /** * Required. The data store resource name. Format: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` */ parent?: string; } /** * Response for ListSessions method. */ export interface GoogleCloudDiscoveryengineV1alphaListSessionsResponse { /** * Pagination token, if not returned indicates the last page. */ nextPageToken?: string; /** * All the Sessions for a given data store. */ sessions?: GoogleCloudDiscoveryengineV1alphaSession[]; } /** * Configuration for Natural Language Query Understanding. */ export interface GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig { /** * Mode of Natural Language Query Understanding. If this field is unset, the * behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED. */ mode?: | "MODE_UNSPECIFIED" | "DISABLED" | "ENABLED"; } /** * Response message for CrawlRateManagementService.ObtainCrawlRate method. The * response contains organcic or dedicated crawl rate time series data for * monitoring, depending on whether dedicated crawl rate is set. */ export interface GoogleCloudDiscoveryengineV1alphaObtainCrawlRateResponse { /** * The historical dedicated crawl rate timeseries data, used for monitoring. */ dedicatedCrawlRateTimeSeries?: GoogleCloudDiscoveryengineV1alphaDedicatedCrawlRateTimeSeries; /** * Errors from service when handling the request. */ error?: GoogleRpcStatus; /** * The historical organic crawl rate timeseries data, used for monitoring. */ organicCrawlRateTimeSeries?: GoogleCloudDiscoveryengineV1alphaOrganicCrawlRateTimeSeries; /** * Output only. The state of the response. */ readonly state?: | "STATE_UNSPECIFIED" | "SUCCEEDED" | "FAILED"; } function serializeGoogleCloudDiscoveryengineV1alphaObtainCrawlRateResponse(data: any): GoogleCloudDiscoveryengineV1alphaObtainCrawlRateResponse { return { ...data, dedicatedCrawlRateTimeSeries: data["dedicatedCrawlRateTimeSeries"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaDedicatedCrawlRateTimeSeries(data["dedicatedCrawlRateTimeSeries"]) : undefined, organicCrawlRateTimeSeries: data["organicCrawlRateTimeSeries"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaOrganicCrawlRateTimeSeries(data["organicCrawlRateTimeSeries"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaObtainCrawlRateResponse(data: any): GoogleCloudDiscoveryengineV1alphaObtainCrawlRateResponse { return { ...data, dedicatedCrawlRateTimeSeries: data["dedicatedCrawlRateTimeSeries"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaDedicatedCrawlRateTimeSeries(data["dedicatedCrawlRateTimeSeries"]) : undefined, organicCrawlRateTimeSeries: data["organicCrawlRateTimeSeries"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaOrganicCrawlRateTimeSeries(data["organicCrawlRateTimeSeries"]) : undefined, }; } /** * The historical organic crawl rate timeseries data, used for monitoring. * Organic crawl is auto-determined by Google to crawl the user's website when * dedicate crawl is not set. Crawl rate is the QPS of crawl request Google * sends to the user's website. */ export interface GoogleCloudDiscoveryengineV1alphaOrganicCrawlRateTimeSeries { /** * Google's organic crawl rate time series, which is the sum of all * googlebots' crawl rate. Please refer to * https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers * for more details about googlebots. */ googleOrganicCrawlRate?: GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries; /** * Vertex AI's organic crawl rate time series, which is the crawl rate of * Google-CloudVertexBot when dedicate crawl is not set. Please refer to * https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot * for more details about Google-CloudVertexBot. */ vertexAiOrganicCrawlRate?: GoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries; } function serializeGoogleCloudDiscoveryengineV1alphaOrganicCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1alphaOrganicCrawlRateTimeSeries { return { ...data, googleOrganicCrawlRate: data["googleOrganicCrawlRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["googleOrganicCrawlRate"]) : undefined, vertexAiOrganicCrawlRate: data["vertexAiOrganicCrawlRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["vertexAiOrganicCrawlRate"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaOrganicCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1alphaOrganicCrawlRateTimeSeries { return { ...data, googleOrganicCrawlRate: data["googleOrganicCrawlRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["googleOrganicCrawlRate"]) : undefined, vertexAiOrganicCrawlRate: data["vertexAiOrganicCrawlRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaCrawlRateTimeSeries(data["vertexAiOrganicCrawlRate"]) : undefined, }; } /** * Metadata and configurations for a Google Cloud project in the service. */ export interface GoogleCloudDiscoveryengineV1alphaProject { /** * Output only. The current status of the project's configurable billing. */ readonly configurableBillingStatus?: GoogleCloudDiscoveryengineV1alphaProjectConfigurableBillingStatus; /** * Output only. The timestamp when this project is created. */ readonly createTime?: Date; /** * Optional. Customer provided configurations. */ customerProvidedConfig?: GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfig; /** * Output only. Full resource name of the project, for example * `projects/{project}`. Note that when making requests, project number and * project id are both acceptable, but the server will always respond in * project number. */ readonly name?: string; /** * Output only. The timestamp when this project is successfully provisioned. * Empty value means this project is still provisioning and is not ready for * use. */ readonly provisionCompletionTime?: Date; /** * Output only. A map of terms of services. The key is the `id` of * ServiceTerms. */ readonly serviceTermsMap?: { [key: string]: GoogleCloudDiscoveryengineV1alphaProjectServiceTerms }; } /** * Represents the currently effective configurable billing parameters. These * values are derived from the customer's subscription history stored internally * and reflect the thresholds actively being used for billing purposes at the * time of the GetProject call. This includes the start_time of the subscription * and may differ from the values in `customer_provided_config` due to billing * rules (e.g., scale-downs taking effect only at the start of a new month). */ export interface GoogleCloudDiscoveryengineV1alphaProjectConfigurableBillingStatus { /** * Optional. The currently effective Indexing Core threshold. This is the * threshold against which Indexing Core usage is compared for overage * calculations. */ effectiveIndexingCoreThreshold?: bigint; /** * Optional. The currently effective Search QPM threshold in queries per * minute. This is the threshold against which QPM usage is compared for * overage calculations. */ effectiveSearchQpmThreshold?: bigint; /** * Optional. The start time of the currently active billing subscription. */ startTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaProjectConfigurableBillingStatus(data: any): GoogleCloudDiscoveryengineV1alphaProjectConfigurableBillingStatus { return { ...data, effectiveIndexingCoreThreshold: data["effectiveIndexingCoreThreshold"] !== undefined ? String(data["effectiveIndexingCoreThreshold"]) : undefined, effectiveSearchQpmThreshold: data["effectiveSearchQpmThreshold"] !== undefined ? String(data["effectiveSearchQpmThreshold"]) : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaProjectConfigurableBillingStatus(data: any): GoogleCloudDiscoveryengineV1alphaProjectConfigurableBillingStatus { return { ...data, effectiveIndexingCoreThreshold: data["effectiveIndexingCoreThreshold"] !== undefined ? BigInt(data["effectiveIndexingCoreThreshold"]) : undefined, effectiveSearchQpmThreshold: data["effectiveSearchQpmThreshold"] !== undefined ? BigInt(data["effectiveSearchQpmThreshold"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Customer provided configurations. */ export interface GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfig { /** * Optional. Configuration for NotebookLM settings. */ notebooklmConfig?: GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfigNotebooklmConfig; } /** * Configuration for NotebookLM. */ export interface GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfigNotebooklmConfig { /** * Model Armor configuration to be used for sanitizing user prompts and LLM * responses. */ modelArmorConfig?: GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfigNotebooklmConfigModelArmorConfig; /** * Optional. Whether to disable the notebook sharing feature for the project. * Default to false if not specified. */ optOutNotebookSharing?: boolean; } /** * Configuration for customer defined Model Armor templates to be used for * sanitizing user prompts and LLM responses. */ export interface GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfigNotebooklmConfigModelArmorConfig { /** * Optional. The resource name of the Model Armor Template for sanitizing LLM * responses. Format: * projects/{project}/locations/{location}/templates/{template_id} If not * specified, no sanitization will be applied to the LLM response. */ responseTemplate?: string; /** * Optional. The resource name of the Model Armor Template for sanitizing * user prompts. Format: * projects/{project}/locations/{location}/templates/{template_id} If not * specified, no sanitization will be applied to the user prompt. */ userPromptTemplate?: string; } /** * Metadata about the terms of service. */ export interface GoogleCloudDiscoveryengineV1alphaProjectServiceTerms { /** * The last time when the project agreed to the terms of service. */ acceptTime?: Date; /** * The last time when the project declined or revoked the agreement to terms * of service. */ declineTime?: Date; /** * The unique identifier of this terms of service. Available terms: * * `GA_DATA_USE_TERMS`: [Terms for data * use](https://cloud.google.com/retail/data-use-terms). When using this as * `id`, the acceptable version to provide is `2022-11-23`. */ id?: string; /** * Whether the project has accepted/rejected the service terms or it is still * pending. */ state?: | "STATE_UNSPECIFIED" | "TERMS_ACCEPTED" | "TERMS_PENDING" | "TERMS_DECLINED"; /** * The version string of the terms of service. For acceptable values, see the * comments for id above. */ version?: string; } function serializeGoogleCloudDiscoveryengineV1alphaProjectServiceTerms(data: any): GoogleCloudDiscoveryengineV1alphaProjectServiceTerms { return { ...data, acceptTime: data["acceptTime"] !== undefined ? data["acceptTime"].toISOString() : undefined, declineTime: data["declineTime"] !== undefined ? data["declineTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaProjectServiceTerms(data: any): GoogleCloudDiscoveryengineV1alphaProjectServiceTerms { return { ...data, acceptTime: data["acceptTime"] !== undefined ? new Date(data["acceptTime"]) : undefined, declineTime: data["declineTime"] !== undefined ? new Date(data["declineTime"]) : undefined, }; } /** * Metadata associated with a project provision operation. */ export interface GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata { } /** * Metadata related to the progress of the PurgeCompletionSuggestions * operation. This is returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CompletionService.PurgeCompletionSuggestions method. */ export interface GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Whether the completion suggestions were successfully purged. */ purgeSucceeded?: boolean; } /** * Metadata related to the progress of the PurgeDocuments operation. This will * be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were ignored as entries were not found. */ ignoredCount?: bigint; /** * Count of entries that were deleted successfully. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, ignoredCount: data["ignoredCount"] !== undefined ? String(data["ignoredCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, ignoredCount: data["ignoredCount"] !== undefined ? BigInt(data["ignoredCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for DocumentService.PurgeDocuments method. If the long * running operation is successfully done, then this message is returned by the * google.longrunning.Operations.response field. */ export interface GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse { /** * The total count of documents purged as a result of the operation. */ purgeCount?: bigint; /** * A sample of document names that will be deleted. Only populated if `force` * is set to false. A max of 100 names will be returned and the names are * chosen at random. */ purgeSample?: string[]; } function serializeGoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse(data: any): GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? String(data["purgeCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse(data: any): GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? BigInt(data["purgeCount"]) : undefined, }; } /** * Metadata related to the progress of the PurgeSuggestionDenyListEntries * operation. This is returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CompletionService.PurgeSuggestionDenyListEntries * method. */ export interface GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Number of suggestion deny list entries purged. */ purgeCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? String(data["purgeCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? BigInt(data["purgeCount"]) : undefined, }; } /** * Metadata related to the progress of the PurgeUserEvents operation. This will * be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were deleted successfully. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata(data: any): GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the PurgeUserEventsRequest. If the long running operation is * successfully done, then this message is returned by the * google.longrunning.Operations.response field. */ export interface GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse { /** * The total count of events purged as a result of the operation. */ purgeCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse(data: any): GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? String(data["purgeCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse(data: any): GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? BigInt(data["purgeCount"]) : undefined, }; } /** * Describes the metrics produced by the evaluation. */ export interface GoogleCloudDiscoveryengineV1alphaQualityMetrics { /** * Normalized discounted cumulative gain (NDCG) per document, at various * top-k cutoff levels. NDCG measures the ranking quality, giving higher * relevance to top results. Example (top-3): Suppose SampleQuery with three * retrieved documents (D1, D2, D3) and binary relevance judgements (1 for * relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: * [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * DCG@3: * 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + * 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 */ docNdcg?: GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics; /** * Precision per document, at various top-k cutoff levels. Precision is the * fraction of retrieved documents that are relevant. Example (top-5): * For a * single SampleQuery, If 4 out of 5 retrieved documents in the top-5 are * relevant, precision@5 = 4/5 = 0.8 */ docPrecision?: GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics; /** * Recall per document, at various top-k cutoff levels. Recall is the * fraction of relevant documents retrieved out of all relevant documents. * Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant * documents are retrieved in the top-5, recall@5 = 3/5 = 0.6 */ docRecall?: GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics; /** * Normalized discounted cumulative gain (NDCG) per page, at various top-k * cutoff levels. NDCG measures the ranking quality, giving higher relevance * to top results. Example (top-3): Suppose SampleQuery with three retrieved * pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for * not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), * P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: 0/log2(1+1) + * 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + * 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 */ pageNdcg?: GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics; /** * Recall per page, at various top-k cutoff levels. Recall is the fraction of * relevant pages retrieved out of all relevant pages. Example (top-5): * For * a single SampleQuery, if 3 out of 5 relevant pages are retrieved in the * top-5, recall@5 = 3/5 = 0.6 */ pageRecall?: GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics; } /** * Stores the metric values at specific top-k levels. */ export interface GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics { /** * The top-1 value. */ top1?: number; /** * The top-10 value. */ top10?: number; /** * The top-3 value. */ top3?: number; /** * The top-5 value. */ top5?: number; } /** * Defines a user inputed query. */ export interface GoogleCloudDiscoveryengineV1alphaQuery { /** * Output only. Unique Id for the query. */ readonly queryId?: string; /** * Plain text. */ text?: string; } /** * Metadata related to the progress of the SiteSearchEngineService.RecrawlUris * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata { /** * Operation create time. */ createTime?: Date; /** * Unique URIs in the request that have invalid format. Sample limited to * 1000. */ invalidUris?: string[]; /** * Total number of unique URIs in the request that have invalid format. */ invalidUrisCount?: number; /** * URIs that have no index meta tag. Sample limited to 1000. */ noindexUris?: string[]; /** * Total number of URIs that have no index meta tag. */ noindexUrisCount?: number; /** * Total number of URIs that have yet to be crawled. */ pendingCount?: number; /** * Total number of URIs that were rejected due to insufficient indexing * resources. */ quotaExceededCount?: number; /** * Total number of URIs that have been crawled so far. */ successCount?: number; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; /** * Unique URIs in the request that don't match any TargetSite in the * DataStore, only match TargetSites that haven't been fully indexed, or match * a TargetSite with type EXCLUDE. Sample limited to 1000. */ urisNotMatchingTargetSites?: string[]; /** * Total number of URIs that don't match any TargetSites. */ urisNotMatchingTargetSitesCount?: number; /** * Total number of unique URIs in the request that are not in invalid_uris. */ validUrisCount?: number; } function serializeGoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata(data: any): GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata(data: any): GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for SiteSearchEngineService.RecrawlUris method. */ export interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse { /** * URIs that were not crawled before the LRO terminated. */ failedUris?: string[]; /** * Details for a sample of up to 10 `failed_uris`. */ failureSamples?: GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo[]; } /** * Details about why a particular URI failed to be crawled. Each FailureInfo * contains one FailureReason per CorpusType. */ export interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo { /** * List of failure reasons by corpus type (e.g. desktop, mobile). */ failureReasons?: GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason[]; /** * URI that failed to be crawled. */ uri?: string; } /** * Details about why crawling failed for a particular CorpusType, e.g., DESKTOP * and MOBILE crawling may fail for different reasons. */ export interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason { /** * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED. */ corpusType?: | "CORPUS_TYPE_UNSPECIFIED" | "DESKTOP" | "MOBILE"; /** * Reason why the URI was not crawled. */ errorMessage?: string; } /** * Metadata related to the progress of the * CrawlRateManagementService.RemoveDedicatedCrawlRate operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaRemoveDedicatedCrawlRateMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaRemoveDedicatedCrawlRateMetadata(data: any): GoogleCloudDiscoveryengineV1alphaRemoveDedicatedCrawlRateMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaRemoveDedicatedCrawlRateMetadata(data: any): GoogleCloudDiscoveryengineV1alphaRemoveDedicatedCrawlRateMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CrawlRateManagementService.RemoveDedicatedCrawlRate * method. It simply returns the state of the response, and an error message if * the state is FAILED. */ export interface GoogleCloudDiscoveryengineV1alphaRemoveDedicatedCrawlRateResponse { /** * Errors from service when handling the request. */ error?: GoogleRpcStatus; /** * Output only. The state of the response. */ readonly state?: | "STATE_UNSPECIFIED" | "SUCCEEDED" | "FAILED"; } /** * Safety rating corresponding to the generated content. */ export interface GoogleCloudDiscoveryengineV1alphaSafetyRating { /** * Output only. Indicates whether the content was filtered out because of * this rating. */ readonly blocked?: boolean; /** * Output only. Harm category. */ readonly category?: | "HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY"; /** * Output only. Harm probability levels in the content. */ readonly probability?: | "HARM_PROBABILITY_UNSPECIFIED" | "NEGLIGIBLE" | "LOW" | "MEDIUM" | "HIGH"; /** * Output only. Harm probability score. */ readonly probabilityScore?: number; /** * Output only. Harm severity levels in the content. */ readonly severity?: | "HARM_SEVERITY_UNSPECIFIED" | "HARM_SEVERITY_NEGLIGIBLE" | "HARM_SEVERITY_LOW" | "HARM_SEVERITY_MEDIUM" | "HARM_SEVERITY_HIGH"; /** * Output only. Harm severity score. */ readonly severityScore?: number; } /** * Defines the structure and layout of a type of document data. */ export interface GoogleCloudDiscoveryengineV1alphaSchema { /** * Output only. Configurations for fields of the schema. */ readonly fieldConfigs?: GoogleCloudDiscoveryengineV1alphaFieldConfig[]; /** * The JSON representation of the schema. */ jsonSchema?: string; /** * Immutable. The full resource name of the schema, in the format of * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * The structured representation of the schema. */ structSchema?: { [key: string]: any }; } /** * Promotion proto includes uri and other helping information to display the * promotion. */ export interface GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion { /** * Optional. The Promotion description. Maximum length: 200 characters. */ description?: string; /** * Optional. The Document the user wants to promote. For site search, leave * unset and only populate uri. Can be set along with uri. */ document?: string; /** * Optional. The enabled promotion will be returned for any serving configs * associated with the parent of the control this promotion is attached to. * This flag is used for basic site search only. */ enabled?: boolean; /** * Optional. The promotion thumbnail image url. */ imageUri?: string; /** * Required. The title of the promotion. Maximum length: 160 characters. */ title?: string; /** * Optional. The URL for the page the user wants to promote. Must be set for * site search. For other verticals, this is optional. */ uri?: string; } /** * Request message for SearchService.Search method. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequest { /** * Boost specification to boost certain documents. For more information on * boosting, see * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) */ boostSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec; /** * The branch resource name, such as * `projects/*\/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. * Use `default_branch` as the branch ID or leave this field empty, to search * documents under the default branch. */ branch?: string; /** * The default filter that is applied when a user performs a search without * checking any filters on the search page. The filter applied to every search * request when quality improvement such as query expansion is needed. In the * case a query does not have a sufficient amount of results this filter will * be used to determine whether or not to enable the query expansion flow. The * original filter will still be used for the query expanded search. This * field is strongly recommended to achieve high search quality. For more * information about filter syntax, see SearchRequest.filter. */ canonicalFilter?: string; /** * A specification for configuring the behavior of content search. */ contentSearchSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec; /** * Custom fine tuning configs. If set, it has higher priority than the * configs set in ServingConfig.custom_fine_tuning_spec. */ customFineTuningSpec?: GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec; /** * Specifications that define the specific DataStores to be searched, along * with configurations for those data stores. This is only considered for * Engines with multiple data stores. For engines with a single data store, * the specs directly under SearchRequest should be used. */ dataStoreSpecs?: GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec[]; /** * Optional. Config for display feature, like match highlighting on search * results. */ displaySpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestDisplaySpec; /** * Uses the provided embedding to do additional semantic document retrieval. * The retrieval is based on the dot product of * SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document * embedding that is provided in * SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If * SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it * will use ServingConfig.EmbeddingConfig.field_path. */ embeddingSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec; /** * Facet specifications for faceted search. If empty, no facets are returned. * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error * is returned. */ facetSpecs?: GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec[]; /** * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. Filter * expression is case-sensitive. If this field is unrecognizable, an * `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by * mapping the LHS filter key to a key property defined in the Vertex AI * Search backend -- this mapping is defined by the customer in their schema. * For example a media customer might have a field 'name' in their schema. In * this case the filter would look like this: filter --> name:'ANY("king * kong")' For more information about filtering including syntax and filter * operators, see * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; /** * Raw image query. */ imageQuery?: GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery; /** * The BCP-47 language code, such as "en-US" or "sr-Latn". For more * information, see [Standard * fields](https://cloud.google.com/apis/design/standard_fields). This field * helps to better interpret the query. If a value isn't specified, the query * language code is automatically detected, which may not be accurate. */ languageCode?: string; /** * Optional. Config for natural language query understanding capabilities, * such as extracting structured field filters from the query. Refer to [this * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) * for more information. If `naturalLanguageQueryUnderstandingSpec` is not * specified, no additional natural language query understanding will be done. */ naturalLanguageQueryUnderstandingSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec; /** * A 0-indexed integer that specifies the current offset (that is, starting * result location, amongst the Documents deemed by the API as relevant) in * search results. This field is only considered if page_token is unset. If * this field is negative, an `INVALID_ARGUMENT` is returned. A large offset * may be capped to a reasonable threshold. */ offset?: number; /** * The maximum number of results to return for OneBox. This applies to each * OneBox type individually. Default number is 10. */ oneBoxPageSize?: number; /** * The order in which documents are returned. Documents can be ordered by a * field in an Document object. Leave it unset if ordered by relevance. * `order_by` expression is case-sensitive. For more information on ordering * the website search results, see [Order web search * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). * For more information on ordering the healthcare search results, see [Order * healthcare search * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. */ orderBy?: string; /** * Maximum number of Documents to return. The maximum allowed value depends * on the data type. Values above the maximum value are coerced to the maximum * value. * Websites with basic indexing: Default `10`, Maximum `25`. * * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: * Default `50`, Maximum `100`. If this field is negative, an * `INVALID_ARGUMENT` is returned. */ pageSize?: number; /** * A page token received from a previous SearchService.Search call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to SearchService.Search must match the call that provided the page * token. Otherwise, an `INVALID_ARGUMENT` error is returned. */ pageToken?: string; /** * Additional search parameters. For public website search only, supported * values are: * `user_country_code`: string. Default empty. If set to * non-empty, results are restricted or boosted based on the location * provided. For example, `user_country_code: "au"` For available codes see * [Country * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * * `search_type`: double. Default empty. Enables non-webpage searching * depending on the value. The only valid non-default value is 1, which * enables image searching. For example, `search_type: 1` */ params?: { [key: string]: any }; /** * The specification for personalization. Notice that if both * ServingConfig.personalization_spec and SearchRequest.personalization_spec * are set, SearchRequest.personalization_spec overrides * ServingConfig.personalization_spec. */ personalizationSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestPersonalizationSpec; /** * Raw search query. */ query?: string; /** * The query expansion specification that specifies the conditions under * which query expansion occurs. */ queryExpansionSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec; /** * Optional. The ranking expression controls the customized ranking on * retrieval documents. This overrides ServingConfig.ranking_expression. The * syntax and supported features depend on the `ranking_expression_backend` * value. If `ranking_expression_backend` is not provided, it defaults to * `RANK_BY_EMBEDDING`. If ranking_expression_backend is not provided or set * to `RANK_BY_EMBEDDING`, it should be a single function or multiple * functions that are joined by "+". * ranking_expression = function, { " + ", * function }; Supported functions: * double * relevance_score * double * * dotProduct(embedding_field_path) Function variables: * `relevance_score`: * pre-defined keywords, used for measure relevance between query and * document. * `embedding_field_path`: the document embedding field used with * query embedding vector. * `dotProduct`: embedding function between * `embedding_field_path` and query embedding vector. Example ranking * expression: If document has an embedding field doc_embedding, the ranking * expression could be `0.5 * relevance_score + 0.3 * * dotProduct(doc_embedding)`. If ranking_expression_backend is set to * `RANK_BY_FORMULA`, the following expression types (and combinations of * those chained using + or * operators) are supported: * `double` * `signal` * * `log(signal)` * `exp(signal)` * `rr(signal, double > 0)` -- reciprocal * rank transformation with second argument being a denominator constant. * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise. * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns signal2 * | double, else returns signal1. Here are a few examples of ranking formulas * that use the supported ranking expression types: - `0.2 * * semantic_similarity_score + 0.8 * log(keyword_similarity_score)` -- mostly * rank by the logarithm of `keyword_similarity_score` with slight * `semantic_smilarity_score` adjustment. - `0.2 * * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * * is_nan(keyword_similarity_score)` -- rank by the exponent of * `semantic_similarity_score` filling the value with 0 if it's NaN, also add * constant 0.3 adjustment to the final score if `semantic_similarity_score` * is NaN. - `0.2 * rr(semantic_similarity_score, 16) + 0.8 * * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank of * `keyword_similarity_score` with slight adjustment of reciprocal rank of * `semantic_smilarity_score`. The following signals are supported: * * `semantic_similarity_score`: semantic similarity adjustment that is * calculated using the embeddings generated by a proprietary Google model. * This score determines how semantically similar a search query is to a * document. * `keyword_similarity_score`: keyword match adjustment uses the * Best Match 25 (BM25) ranking function. This score is calculated using a * probabilistic model to estimate the probability that a document is relevant * to a given query. * `relevance_score`: semantic relevance adjustment that * uses a proprietary Google model to determine the meaning and intent behind * a user's query in context with the content in the documents. * `pctr_rank`: * predicted conversion rate adjustment as a rank use predicted Click-through * rate (pCTR) to gauge the relevance and attractiveness of a search result * from a user's perspective. A higher pCTR suggests that the result is more * likely to satisfy the user's query and intent, making it a valuable signal * for ranking. * `freshness_rank`: freshness adjustment as a rank * * `document_age`: The time in hours elapsed since the document was last * updated, a floating-point number (e.g., 0.25 means 15 minutes). * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary Google * model to determine the keyword-based overlap between the query and the * document. * `base_rank`: the default rank of the result */ rankingExpression?: string; /** * Optional. The backend to use for the ranking expression evaluation. */ rankingExpressionBackend?: | "RANKING_EXPRESSION_BACKEND_UNSPECIFIED" | "BYOE" | "CLEARBOX" | "RANK_BY_EMBEDDING" | "RANK_BY_FORMULA"; /** * The Unicode country/region code (CLDR) of a location, such as "US" and * "419". For more information, see [Standard * fields](https://cloud.google.com/apis/design/standard_fields). If set, then * results will be boosted based on the region_code provided. */ regionCode?: string; /** * Optional. The specification for returning the relevance score. */ relevanceScoreSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceScoreSpec; /** * The relevance threshold of the search results. Default to Google defined * threshold, leveraging a balance of precision and recall to deliver both * highly accurate results and comprehensive coverage of relevant information. * This feature is not supported for healthcare search. */ relevanceThreshold?: | "RELEVANCE_THRESHOLD_UNSPECIFIED" | "LOWEST" | "LOW" | "MEDIUM" | "HIGH"; /** * Whether to turn on safe search. This is only supported for website search. */ safeSearch?: boolean; /** * Optional. SearchAddonSpec is used to disable add-ons for search as per new * repricing model. This field is only supported for search requests. */ searchAddonSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAddonSpec; /** * Search as you type configuration. Only supported for the * IndustryVertical.MEDIA vertical. */ searchAsYouTypeSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec; /** * Required. The resource name of the Search serving config, such as * `projects/*\/locations/global/collections/default_collection/engines/*\/servingConfigs/default_serving_config`, * or * `projects/*\/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. * This field is used to identify the serving configuration name, set of * models used to make the search. */ servingConfig?: string; /** * The session resource name. Optional. Session allows users to do multi-turn * /search API calls or coordination between /search API calls and /answer API * calls. Example #1 (multi-turn /search API calls): Call /search API with the * session ID generated in the first call. Here, the previous search query * gets considered in query standing. I.e., if the first query is "How did * Alphabet do in 2022?" and the current query is "How about 2023?", the * current query will be interpreted as "How did Alphabet do in 2023?". * Example #2 (coordination between /search API calls and /answer API calls): * Call /answer API with the session ID generated in the first call. Here, the * answer generation happens in the context of the search results from the * first search call. Multi-turn Search feature is currently at private GA * stage. Please use v1alpha or v1beta version instead before we launch this * feature to public GA. Or ask for allowlisting through Google Support team. */ session?: string; /** * Session specification. Can be used only when `session` is set. */ sessionSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec; /** * The spell correction specification that specifies the mode under which * spell correction takes effect. */ spellCorrectionSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec; /** * Uses the Engine, ServingConfig and Control freshly read from the database. * Note: this skips config cache and introduces dependency on databases, which * could significantly increase the API latency. It should only be used for * testing, but not serving end users. */ useLatestData?: boolean; /** * Information about the end user. Highly recommended for analytics and * personalization. UserInfo.user_agent is used to deduce `device_type` for * analytics. */ userInfo?: GoogleCloudDiscoveryengineV1alphaUserInfo; /** * The user labels applied to a resource must meet the following * requirements: * Each resource can have multiple labels, up to a maximum of * 64. * Each label must be a key-value pair. * Keys have a minimum length of * 1 character and a maximum length of 63 characters and cannot be empty. * Values can be empty and have a maximum length of 63 characters. * Keys and * values can contain only lowercase letters, numeric characters, underscores, * and dashes. All characters must use UTF-8 encoding, and international * characters are allowed. * The key portion of a label must be unique. * However, you can use the same key with multiple resources. * Keys must * start with a lowercase letter or international character. See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. */ userLabels?: { [key: string]: string }; /** * Optional. A unique identifier for tracking visitors. For example, this * could be implemented with an HTTP cookie, which should be able to uniquely * identify a visitor on a single device. This unique identifier should not * change if the visitor logs in or out of the website. This field should NOT * have a fixed value such as `unknown_visitor`. This should be the same * identifier as UserEvent.user_pseudo_id and * CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ userPseudoId?: string; } /** * Boost specification to boost certain documents. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec { /** * Condition boost specifications. If a document matches multiple conditions * in the specifications, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of specifications * is 20. */ conditionBoostSpecs?: GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec[]; } /** * Boost applies to documents which match a condition. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec { /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. Setting to 1.0 gives the document a * big promotion. However, it does not necessarily mean that the boosted * document will be the top result at all times, nor that other documents will * be excluded. Results could still be shown even when none of them matches * the condition. And results that are significantly more relevant to the * search query can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results that * are deeply relevant might still be shown. The document will have an * upstream battle to get a fairly high ranking, but it is not blocked out * completely. Setting to 0.0 means no boost applied. The boosting condition * is ignored. Only one of the (condition, boost) combination or the * boost_control_spec below are set. If both are set then the global boost is * ignored and the more fine-grained boost_control_spec is applied. */ boost?: number; /** * Complex specification for custom ranking based on customer defined * attribute value. */ boostControlSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec; /** * An expression which specifies a boost condition. The syntax and supported * fields are the same as a filter expression. See SearchRequest.filter for * detail syntax and limitations. Examples: * To boost documents with document * ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: * ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` */ condition?: string; } /** * Specification for custom ranking based on customer specified attribute * value. It provides more controls for customized ranking than the simple * (condition, boost) combination above. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec { /** * The attribute type to be used to determine the boost amount. The attribute * value can be derived from the field value of the specified field_name. In * the case of numerical it is straightforward i.e. attribute_value = * numerical_field_value. In the case of freshness however, attribute_value = * (time.now() - datetime_field_value). */ attributeType?: | "ATTRIBUTE_TYPE_UNSPECIFIED" | "NUMERICAL" | "FRESHNESS"; /** * The control points used to define the curve. The monotonic function * (defined through the interpolation_type above) passes through the control * points listed here. */ controlPoints?: GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint[]; /** * The name of the field whose value will be used to determine the boost * amount. */ fieldName?: string; /** * The interpolation type to be applied to connect the control points listed * below. */ interpolationType?: | "INTERPOLATION_TYPE_UNSPECIFIED" | "LINEAR"; } /** * The control points used to define the curve. The curve defined through these * control points can only be monotonically increasing or decreasing(constant * values are acceptable). */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint { /** * Can be one of: 1. The numerical field value. 2. The duration spec for * freshness: The value must be formatted as an XSD `dayTimeDuration` value (a * restricted subset of an ISO 8601 duration value). The pattern for this is: * `nDnM]`. */ attributeValue?: string; /** * The value between -1 to 1 by which to boost the score if the * attribute_value evaluates to the value specified above. */ boostAmount?: number; } /** * A specification for configuring the behavior of content search. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec { /** * Specifies the chunk spec to be returned from the search response. Only * available if the SearchRequest.ContentSearchSpec.search_result_mode is set * to CHUNKS */ chunkSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec; /** * If there is no extractive_content_spec provided, there will be no * extractive answer in the search response. */ extractiveContentSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec; /** * Specifies the search result mode. If unspecified, the search result mode * defaults to `DOCUMENTS`. */ searchResultMode?: | "SEARCH_RESULT_MODE_UNSPECIFIED" | "DOCUMENTS" | "CHUNKS"; /** * If `snippetSpec` is not specified, snippets are not included in the search * response. */ snippetSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec; /** * If `summarySpec` is not specified, summaries are not included in the * search response. */ summarySpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec; } /** * Specifies the chunk spec to be returned from the search response. Only * available if the SearchRequest.ContentSearchSpec.search_result_mode is set to * CHUNKS */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec { /** * The number of next chunks to be returned of the current chunk. The maximum * allowed value is 3. If not specified, no next chunks will be returned. */ numNextChunks?: number; /** * The number of previous chunks to be returned of the current chunk. The * maximum allowed value is 3. If not specified, no previous chunks will be * returned. */ numPreviousChunks?: number; } /** * A specification for configuring the extractive content in a search response. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec { /** * The maximum number of extractive answers returned in each search result. * An extractive answer is a verbatim answer extracted from the original * document, which provides a precise and contextually relevant answer to the * search query. If the number of matching answers is less than the * `max_extractive_answer_count`, return all of the answers. Otherwise, return * the `max_extractive_answer_count`. At most five answers are returned for * each SearchResult. */ maxExtractiveAnswerCount?: number; /** * The max number of extractive segments returned in each search result. Only * applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED * or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is * a text segment extracted from the original document that is relevant to the * search query, and, in general, more verbose than an extractive answer. The * segment could then be used as input for LLMs to generate summaries and * answers. If the number of matching segments is less than * `max_extractive_segment_count`, return all of the segments. Otherwise, * return the `max_extractive_segment_count`. */ maxExtractiveSegmentCount?: number; /** * Return at most `num_next_segments` segments after each selected segments. */ numNextSegments?: number; /** * Specifies whether to also include the adjacent from each selected * segments. Return at most `num_previous_segments` segments before each * selected segments. */ numPreviousSegments?: number; /** * Specifies whether to return the confidence score from the extractive * segments in each search result. This feature is available only for new or * allowlisted data stores. To allowlist your data store, contact your * Customer Engineer. The default value is `false`. */ returnExtractiveSegmentScore?: boolean; } /** * A specification for configuring snippets in a search response. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec { /** * [DEPRECATED] This field is deprecated. To control snippet return, use * `return_snippet` field. For backwards compatibility, we will return snippet * if max_snippet_count > 0. */ maxSnippetCount?: number; /** * [DEPRECATED] This field is deprecated and will have no affect on the * snippet. */ referenceOnly?: boolean; /** * If `true`, then return snippet. If no snippet can be generated, we return * "No snippet is available for this page." A `snippet_status` with `SUCCESS` * or `NO_SNIPPET_AVAILABLE` will also be returned. */ returnSnippet?: boolean; } /** * A specification for configuring a summary returned in a search response. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec { /** * Specifies whether to filter out adversarial queries. The default value is * `false`. Google employs search-query classification to detect adversarial * queries. No summary is returned if the search query is classified as an * adversarial query. For example, a user might ask a question regarding * negative comments about the company or submit a query designed to generate * unsafe, policy-violating output. If this field is set to `true`, we skip * generating summaries for adversarial queries and return fallback messages * instead. */ ignoreAdversarialQuery?: boolean; /** * Optional. Specifies whether to filter out jail-breaking queries. The * default value is `false`. Google employs search-query classification to * detect jail-breaking queries. No summary is returned if the search query is * classified as a jail-breaking query. A user might add instructions to the * query to change the tone, style, language, content of the answer, or ask * the model to act as a different entity, e.g. "Reply in the tone of a * competing company's CEO". If this field is set to `true`, we skip * generating summaries for jail-breaking queries and return fallback messages * instead. */ ignoreJailBreakingQuery?: boolean; /** * Specifies whether to filter out queries that have low relevance. The * default value is `false`. If this field is set to `false`, all search * results are used regardless of relevance to generate answers. If set to * `true`, only queries with high relevance search results will generate * answers. */ ignoreLowRelevantContent?: boolean; /** * Specifies whether to filter out queries that are not summary-seeking. The * default value is `false`. Google employs search-query classification to * detect summary-seeking queries. No summary is returned if the search query * is classified as a non-summary seeking query. For example, `why is the sky * blue` and `Who is the best soccer player in the world?` are summary-seeking * queries, but `SFO airport` and `world cup 2026` are not. They are most * likely navigational queries. If this field is set to `true`, we skip * generating summaries for non-summary seeking queries and return fallback * messages instead. */ ignoreNonSummarySeekingQuery?: boolean; /** * Specifies whether to include citations in the summary. The default value * is `false`. When this field is set to `true`, summaries include in-line * citation numbers. Example summary including citations: BigQuery is Google * Cloud's fully managed and completely serverless enterprise data warehouse * [1]. BigQuery supports all data types, works across clouds, and has * built-in machine learning and business intelligence, all within a unified * platform [2, 3]. The citation numbers refer to the returned search results * and are 1-indexed. For example, [1] means that the sentence is attributed * to the first search result. [2, 3] means that the sentence is attributed to * both the second and third search results. */ includeCitations?: boolean; /** * Language code for Summary. Use language tags defined by * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an * experimental feature. */ languageCode?: string; /** * If specified, the spec will be used to modify the prompt provided to the * LLM. */ modelPromptSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec; /** * If specified, the spec will be used to modify the model specification * provided to the LLM. */ modelSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec; /** * Optional. Multimodal specification. */ multimodalSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecMultiModalSpec; /** * The number of top results to generate the summary from. If the number of * results returned is less than `summaryResultCount`, the summary is * generated from all of the results. At most 10 results for documents mode, * or 50 for chunks mode, can be used to generate a summary. The chunks mode * is used when SearchRequest.ContentSearchSpec.search_result_mode is set to * CHUNKS. */ summaryResultCount?: number; /** * If true, answer will be generated from most relevant chunks from top * search results. This feature will improve summary quality. Note that with * this feature enabled, not all top search results will be referenced and * included in the reference list, so the citation source index only points to * the search results listed in the reference list. */ useSemanticChunks?: boolean; } /** * Specification of the prompt to use with the model. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec { /** * Text at the beginning of the prompt that instructs the assistant. Examples * are available in the user guide. */ preamble?: string; } /** * Specification of the model. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec { /** * The model version used to generate the summary. Supported values are: * * `stable`: string. Default value when no value is specified. Uses a * generally available, fine-tuned model. For more information, see [Answer * generation model versions and * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * `preview`: string. (Public preview) Uses a preview model. For more * information, see [Answer generation model versions and * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). */ version?: string; } /** * Multimodal specification: Will return an image from specified source. If * multiple sources are specified, the pick is a quality based decision. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecMultiModalSpec { /** * Optional. Source of image returned in the answer. */ imageSource?: | "IMAGE_SOURCE_UNSPECIFIED" | "ALL_AVAILABLE_SOURCES" | "CORPUS_IMAGE_ONLY" | "FIGURE_GENERATION_ONLY"; } /** * A struct to define data stores to filter on in a search call and * configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error * is returned. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec { /** * Optional. Boost specification to boost certain documents. For more * information on boosting, see * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) */ boostSpec?: GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec; /** * Optional. Custom search operators which if specified will be used to * filter results from workspace data stores. For more information on custom * search operators, see * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299). */ customSearchOperators?: string; /** * Required. Full resource name of DataStore, such as * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * The path must include the project number, project id is not supported for * this field. */ dataStore?: string; /** * Optional. Filter specification to filter documents in the data store * specified by data_store field. For more information on filtering, see * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; } /** * Specifies features for display, like match highlighting. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestDisplaySpec { /** * The condition under which match highlighting should occur. */ matchHighlightingCondition?: | "MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED" | "MATCH_HIGHLIGHTING_DISABLED" | "MATCH_HIGHLIGHTING_ENABLED"; } /** * The specification that uses customized query embedding vector to do semantic * document retrieval. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec { /** * The embedding vector used for retrieval. Limit to 1. */ embeddingVectors?: GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector[]; } /** * Embedding vector. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector { /** * Embedding field path in schema. */ fieldPath?: string; /** * Query embedding vector. */ vector?: number[]; } /** * A facet specification to perform faceted search. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec { /** * Enables dynamic position for this facet. If set to true, the position of * this facet among all facets in the response is determined automatically. If * dynamic facets are enabled, it is ordered together. If set to false, the * position of this facet in the response is the same as in the request, and * it is ranked before the facets with dynamic position enable and all dynamic * facets. For example, you may always want to have rating facet returned in * the response, but it's not necessarily to always display the rating facet * at the top. In that case, you can set enable_dynamic_position to true so * that the position of rating facet in response is determined automatically. * Another example, assuming you have the following facets in the request: * * "rating", enable_dynamic_position = true * "price", enable_dynamic_position * = false * "brands", enable_dynamic_position = false And also you have a * dynamic facets enabled, which generates a facet `gender`. Then the final * order of the facets in the response can be ("price", "brands", "rating", * "gender") or ("price", "brands", "gender", "rating") depends on how API * orders "gender" and "rating" facets. However, notice that "price" and * "brands" are always ranked at first and second position because their * enable_dynamic_position is false. */ enableDynamicPosition?: boolean; /** * List of keys to exclude when faceting. By default, FacetKey.key is not * excluded from the filter unless it is listed in this field. Listing a facet * key in this field allows its values to appear as facet results, even when * they are filtered out of search results. Using this field does not affect * what search results are returned. For example, suppose there are 100 * documents with the color facet "Red" and 200 documents with the color facet * "Blue". A query containing the filter "color:ANY("Red")" and having "color" * as FacetKey.key would by default return only "Red" documents in the search * results, and also return "Red" with count 100 as the only color facet. * Although there are also blue documents available, "Blue" would not be shown * as an available facet value. If "color" is listed in "excludedFilterKeys", * then the query returns the facet values "Red" with count 100 and "Blue" * with count 200, because the "color" key is now excluded from the filter. * Because this field doesn't affect search results, the search results are * still correctly filtered to return only "Red" documents. A maximum of 100 * values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. */ excludedFilterKeys?: string[]; /** * Required. The facet key specification. */ facetKey?: GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey; /** * Maximum facet values that are returned for this facet. If unspecified, * defaults to 20. The maximum allowed value is 300. Values above 300 are * coerced to 300. For aggregation in healthcare search, when the * [FacetKey.key] is "healthcare_aggregation_key", the limit will be * overridden to 10,000 internally, regardless of the value set here. If this * field is negative, an `INVALID_ARGUMENT` is returned. */ limit?: number; } /** * Specifies how a facet is computed. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey { /** * True to make facet keys case insensitive when getting faceting values with * prefixes or contains; false otherwise. */ caseInsensitive?: boolean; /** * Only get facet values that contain the given strings. For example, suppose * "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > * 2022". If set "contains" to "2022", the "category" facet only contains * "Action > 2022" and "Sci-Fi > 2022". Only supported on textual fields. * Maximum is 10. */ contains?: string[]; /** * Set only if values should be bucketed into intervals. Must be set for * facets with numerical values. Must not be set for facet with text values. * Maximum number of intervals is 30. */ intervals?: GoogleCloudDiscoveryengineV1alphaInterval[]; /** * Required. Supported textual and numerical facet keys in Document object, * over which the facet values are computed. Facet key is case-sensitive. */ key?: string; /** * The order in which documents are returned. Allowed values are: * "count * desc", which means order by SearchResponse.Facet.values.count descending. * * "value desc", which means order by SearchResponse.Facet.values.value * descending. Only applies to textual facets. If not set, textual values are * sorted in [natural * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical * intervals are sorted in the order given by FacetSpec.FacetKey.intervals. */ orderBy?: string; /** * Only get facet values that start with the given string prefix. For * example, suppose "category" has three values "Action > 2022", "Action > * 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" * facet only contains "Action > 2022" and "Action > 2021". Only supported on * textual fields. Maximum is 10. */ prefixes?: string[]; /** * Only get facet for the given restricted values. Only supported on textual * fields. For example, suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "restricted_values" to "Action * > 2022", the "category" facet only contains "Action > 2022". Only supported * on textual fields. Maximum is 10. */ restrictedValues?: string[]; } /** * Specifies the image query input. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery { /** * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP. */ imageBytes?: string; } /** * Specification to enable natural language understanding capabilities for * search requests. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec { /** * Optional. Allowlist of fields that can be used for natural language filter * extraction. By default, if this is unspecified, all indexable fields are * eligible for natural language filter extraction (but are not guaranteed to * be used). If any fields are specified in allowed_field_names, only the * fields that are both marked as indexable in the schema and specified in the * allowlist will be eligible for natural language filter extraction. Note: * for multi-datastore search, this is not yet supported, and will be ignored. */ allowedFieldNames?: string[]; /** * Optional. Controls behavior of how extracted filters are applied to the * search. The default behavior depends on the request. For single datastore * structured search, the default is `HARD_FILTER`. For multi-datastore * search, the default behavior is `SOFT_BOOST`. Location-based filters are * always applied as hard filters, and the `SOFT_BOOST` setting will not * affect them. This field is only used if * SearchRequest.natural_language_query_understanding_spec.filter_extraction_condition * is set to FilterExtractionCondition.ENABLED. */ extractedFilterBehavior?: | "EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED" | "HARD_FILTER" | "SOFT_BOOST"; /** * The condition under which filter extraction should occur. Server behavior * defaults to `DISABLED`. */ filterExtractionCondition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "ENABLED"; /** * Field names used for location-based filtering, where geolocation filters * are detected in natural language search queries. Only valid when the * FilterExtractionCondition is set to `ENABLED`. If this field is set, it * overrides the field names set in * ServingConfig.geo_search_query_detection_field_names. */ geoSearchQueryDetectionFieldNames?: string[]; } /** * The specification for personalization. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestPersonalizationSpec { /** * The personalization mode of the search request. Defaults to Mode.AUTO. */ mode?: | "MODE_UNSPECIFIED" | "AUTO" | "DISABLED"; } /** * Specification to determine under which conditions query expansion should * occur. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec { /** * The condition under which query expansion should occur. Default to * Condition.DISABLED. */ condition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "AUTO"; /** * Whether to pin unexpanded results. If this field is set to true, * unexpanded products are always at the top of the search results, followed * by the expanded results. */ pinUnexpandedResults?: boolean; } /** * The specification for returning the document relevance score. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceScoreSpec { /** * Optional. Whether to return the relevance score for search results. The * higher the score, the more relevant the document is to the query. */ returnRelevanceScore?: boolean; } /** * SearchAddonSpec is used to disable add-ons for search as per new repricing * model. By default if the SearchAddonSpec is not specified, we consider that * the customer wants to enable them wherever applicable. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAddonSpec { /** * Optional. If true, generative answer add-on is disabled. Generative answer * add-on includes natural language to filters and simple answers. */ disableGenerativeAnswerAddOn?: boolean; /** * Optional. If true, disables event re-ranking and personalization to * optimize KPIs & personalize results. */ disableKpiPersonalizationAddOn?: boolean; /** * Optional. If true, semantic add-on is disabled. Semantic add-on includes * embeddings and jetstream. */ disableSemanticAddOn?: boolean; } /** * Specification for search as you type in search requests. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec { /** * The condition under which search as you type should occur. Default to * Condition.DISABLED. */ condition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "ENABLED" | "AUTO"; } /** * Session specification. Multi-turn Search feature is currently at private GA * stage. Please use v1alpha or v1beta version instead before we launch this * feature to public GA. Or ask for allowlisting through Google Support team. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec { /** * If set, the search result gets stored to the "turn" specified by this * query ID. Example: Let's say the session looks like this: session { name: * ".../sessions/xxx" turns { query { text: "What is foo?" query_id: * ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How * about bar then?" query_id: ".../questions/zzz" } } } The user can call * /search API with a request like this: session: ".../sessions/xxx" * session_spec { query_id: ".../questions/zzz" } Then, the API stores the * search result, associated with the last turn. The stored search result can * be used by a subsequent /answer API call (with the session ID and the query * ID specified). Also, it is possible to call /search and /answer in parallel * with the same session ID & query ID. */ queryId?: string; /** * The number of top search results to persist. The persisted search results * can be used for the subsequent /answer api call. This field is similar to * the `summary_result_count` field in * SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most * 10 results for documents mode, or 50 for chunks mode. */ searchResultPersistenceCount?: number; } /** * The specification for query spell correction. */ export interface GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec { /** * The mode under which spell correction replaces the original search query. * Defaults to Mode.AUTO. */ mode?: | "MODE_UNSPECIFIED" | "SUGGESTION_ONLY" | "AUTO"; } /** * External session proto definition. */ export interface GoogleCloudDiscoveryengineV1alphaSession { /** * Optional. The display name of the session. This field is used to identify * the session in the UI. By default, the display name is the first turn query * text in the session. */ displayName?: string; /** * Output only. The time the session finished. */ readonly endTime?: Date; /** * Optional. Whether the session is pinned, pinned session will be displayed * on the top of the session list. */ isPinned?: boolean; /** * Optional. The labels for the session. Can be set as filter in * ListSessionsRequest. */ labels?: string[]; /** * Immutable. Fully qualified name * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` */ name?: string; /** * Output only. The time the session started. */ readonly startTime?: Date; /** * The state of the session. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS"; /** * Turns. */ turns?: GoogleCloudDiscoveryengineV1alphaSessionTurn[]; /** * A unique identifier for tracking users. */ userPseudoId?: string; } /** * Represents a turn, including a query from the user and a answer from * service. */ export interface GoogleCloudDiscoveryengineV1alphaSessionTurn { /** * Optional. The resource name of the answer to the user query. Only set if * the answer generation (/answer API call) happened in this turn. */ answer?: string; /** * Output only. In ConversationalSearchService.GetSession API, if * GetSessionRequest.include_answer_details is set to true, this field will be * populated when getting answer query session. */ readonly detailedAnswer?: GoogleCloudDiscoveryengineV1alphaAnswer; /** * Output only. In ConversationalSearchService.GetSession API, if * GetSessionRequest.include_answer_details is set to true, this field will be * populated when getting assistant session. */ readonly detailedAssistAnswer?: GoogleCloudDiscoveryengineV1alphaAssistAnswer; /** * Optional. The user query. May not be set if this turn is merely * regenerating an answer to a different turn */ query?: GoogleCloudDiscoveryengineV1alphaQuery; /** * Optional. Represents metadata related to the query config, for example LLM * model and version used, model parameters (temperature, grounding * parameters, etc.). The prefix "google." is reserved for Google-developed * functionality. */ queryConfig?: { [key: string]: string }; } /** * Metadata related to the progress of the * CrawlRateManagementService.SetDedicatedCrawlRate operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaSetDedicatedCrawlRateMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaSetDedicatedCrawlRateMetadata(data: any): GoogleCloudDiscoveryengineV1alphaSetDedicatedCrawlRateMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaSetDedicatedCrawlRateMetadata(data: any): GoogleCloudDiscoveryengineV1alphaSetDedicatedCrawlRateMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CrawlRateManagementService.SetDedicatedCrawlRate * method. It simply returns the state of the response, and an error message if * the state is FAILED. */ export interface GoogleCloudDiscoveryengineV1alphaSetDedicatedCrawlRateResponse { /** * Errors from service when handling the request. */ error?: GoogleRpcStatus; /** * Output only. The state of the response. */ readonly state?: | "STATE_UNSPECIFIED" | "SUCCEEDED" | "FAILED"; } /** * Metadata for DataConnectorService.SetUpDataConnector method. */ export interface GoogleCloudDiscoveryengineV1alphaSetUpDataConnectorMetadata { } /** * Metadata related to the progress of the * SiteSearchEngineService.SetUriPatternDocumentData operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata(data: any): GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata(data: any): GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for SiteSearchEngineService.SetUriPatternDocumentData * method. */ export interface GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse { } /** * Metadata for single-regional CMEKs. */ export interface GoogleCloudDiscoveryengineV1alphaSingleRegionKey { /** * Required. Single-regional kms key resource name which will be used to * encrypt resources * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. */ kmsKey?: string; } /** * A sitemap for the SiteSearchEngine. */ export interface GoogleCloudDiscoveryengineV1alphaSitemap { /** * Output only. The sitemap's creation time. */ readonly createTime?: Date; /** * Output only. The fully qualified resource name of the sitemap. * `projects/*\/locations/*\/collections/*\/dataStores/*\/siteSearchEngine/sitemaps/*` * The `sitemap_id` suffix is system-generated. */ readonly name?: string; /** * Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`. */ uri?: string; } /** * Verification information for target sites in advanced site search. */ export interface GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo { /** * Site verification state indicating the ownership and validity. */ siteVerificationState?: | "SITE_VERIFICATION_STATE_UNSPECIFIED" | "VERIFIED" | "UNVERIFIED" | "EXEMPTED"; /** * Latest site verification time. */ verifyTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaSiteVerificationInfo(data: any): GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo { return { ...data, verifyTime: data["verifyTime"] !== undefined ? data["verifyTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaSiteVerificationInfo(data: any): GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo { return { ...data, verifyTime: data["verifyTime"] !== undefined ? new Date(data["verifyTime"]) : undefined, }; } /** * A target site for the SiteSearchEngine. */ export interface GoogleCloudDiscoveryengineV1alphaTargetSite { /** * Immutable. If set to false, a uri_pattern is generated to include all * pages whose address contains the provided_uri_pattern. If set to true, an * uri_pattern is generated to try to be an exact match of the * provided_uri_pattern or just the specific page if the provided_uri_pattern * is a specific one. provided_uri_pattern is always normalized to generate * the URI pattern to be used by the search engine. */ exactMatch?: boolean; /** * Output only. Failure reason. */ readonly failureReason?: GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason; /** * Output only. This is system-generated based on the provided_uri_pattern. */ readonly generatedUriPattern?: string; /** * Output only. Indexing status. */ readonly indexingStatus?: | "INDEXING_STATUS_UNSPECIFIED" | "PENDING" | "FAILED" | "SUCCEEDED" | "DELETING" | "CANCELLABLE" | "CANCELLED"; /** * Output only. The fully qualified resource name of the target site. * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` * The `target_site_id` is system-generated. */ readonly name?: string; /** * Required. Input only. The user provided URI pattern from which the * `generated_uri_pattern` is generated. */ providedUriPattern?: string; /** * Output only. Root domain of the provided_uri_pattern. */ readonly rootDomainUri?: string; /** * Output only. Site ownership and validity verification status. */ readonly siteVerificationInfo?: GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo; /** * The type of the target site, e.g., whether the site is to be included or * excluded. */ type?: | "TYPE_UNSPECIFIED" | "INCLUDE" | "EXCLUDE"; /** * Output only. The target site's last updated time. */ readonly updateTime?: Date; } /** * Site search indexing failure reasons. */ export interface GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason { /** * Failed due to insufficient quota. */ quotaFailure?: GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure; } function serializeGoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason(data: any): GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason { return { ...data, quotaFailure: data["quotaFailure"] !== undefined ? serializeGoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure(data["quotaFailure"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason(data: any): GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason { return { ...data, quotaFailure: data["quotaFailure"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure(data["quotaFailure"]) : undefined, }; } /** * Failed due to insufficient quota. */ export interface GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure { /** * This number is an estimation on how much total quota this project needs to * successfully complete indexing. */ totalRequiredQuota?: bigint; } function serializeGoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure(data: any): GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure { return { ...data, totalRequiredQuota: data["totalRequiredQuota"] !== undefined ? String(data["totalRequiredQuota"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure(data: any): GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure { return { ...data, totalRequiredQuota: data["totalRequiredQuota"] !== undefined ? BigInt(data["totalRequiredQuota"]) : undefined, }; } /** * Tenant information for a connector source. This includes some of the same * information stored in the Credential message, but is limited to only what is * needed to provide a list of accessible tenants to the user. */ export interface GoogleCloudDiscoveryengineV1alphaTenant { /** * Optional display name for the tenant, e.g. "My Slack Team". */ displayName?: string; /** * The tenant's instance ID. Examples: Jira * ("8594f221-9797-5f78-1fa4-485e198d7cd0"), Slack ("T123456"). */ id?: string; /** * The URI of the tenant, if applicable. For example, the URI of a Jira * instance is https://my-jira-instance.atlassian.net, and a Slack tenant does * not have a URI. */ uri?: string; } /** * Metadata related to the progress of the TrainCustomModel operation. This is * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata(data: any): GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata(data: any): GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the TrainCustomModelRequest. This message is returned by the * google.longrunning.Operations.response field. */ export interface GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse { /** * Echoes the destination for the complete errors in the request if set. */ errorConfig?: GoogleCloudDiscoveryengineV1alphaImportErrorConfig; /** * A sample of errors encountered while processing the data. */ errorSamples?: GoogleRpcStatus[]; /** * The metrics of the trained model. */ metrics?: { [key: string]: number }; /** * Fully qualified name of the CustomTuningModel. */ modelName?: string; /** * The trained model status. Possible values are: * **bad-data**: The * training data quality is bad. * **no-improvement**: Tuning didn't improve * performance. Won't deploy. * **in-progress**: Model training job creation * is in progress. * **training**: Model is actively training. * * **evaluating**: The model is evaluating trained metrics. * **indexing**: * The model trained metrics are indexing. * **ready**: The model is ready for * serving. */ modelStatus?: string; } /** * Metadata associated with a tune operation. */ export interface GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata { /** * Required. The resource name of the engine that this tune applies to. * Format: * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}` */ engine?: string; } /** * Response associated with a tune operation. */ export interface GoogleCloudDiscoveryengineV1alphaTuneEngineResponse { } /** * Metadata related to the progress of the CmekConfigService.UpdateCmekConfig * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata(data: any): GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata(data: any): GoogleCloudDiscoveryengineV1alphaUpdateCmekConfigMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the CollectionService.UpdateCollection * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1alphaUpdateCollectionMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaUpdateCollectionMetadata(data: any): GoogleCloudDiscoveryengineV1alphaUpdateCollectionMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaUpdateCollectionMetadata(data: any): GoogleCloudDiscoveryengineV1alphaUpdateCollectionMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata for UpdateSchema LRO. */ export interface GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request for UpdateSession method. */ export interface GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest { /** * Required. The Session to update. */ session?: GoogleCloudDiscoveryengineV1alphaSession; /** * Indicates which fields in the provided Session to update. The following * are NOT supported: * Session.name If not set or empty, all supported fields * are updated. */ updateMask?: string /* FieldMask */; } function serializeGoogleCloudDiscoveryengineV1alphaUpdateSessionRequest(data: any): GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaUpdateSessionRequest(data: any): GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.UpdateTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Information of an end user. */ export interface GoogleCloudDiscoveryengineV1alphaUserInfo { /** * Optional. IANA time zone, e.g. Europe/Budapest. */ timeZone?: string; /** * User agent as included in the HTTP header. The field must be a UTF-8 * encoded string with a length limit of 1,000 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. This should not be set when using the * client side event reporting with GTM or JavaScript tag in * UserEventService.CollectUserEvent or if UserEvent.direct_user_request is * set. */ userAgent?: string; /** * Highly recommended for logged-in users. Unique identifier for logged-in * user, such as a user name. Don't set for anonymous users. Always use a * hashed value for this ID. Don't set the field to the same fixed ID for * different users. This mixes the event history of those users together, * which results in degraded model quality. The field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ userId?: string; } /** * User License information assigned by the admin. */ export interface GoogleCloudDiscoveryengineV1alphaUserLicense { /** * Output only. User created timestamp. */ readonly createTime?: Date; /** * Output only. User last logged in time. If the user has not logged in yet, * this field will be empty. */ readonly lastLoginTime?: Date; /** * Output only. License assignment state of the user. If the user is assigned * with a license config, the user login will be assigned with the license; If * the user's license assignment state is unassigned or unspecified, no * license config will be associated to the user; */ readonly licenseAssignmentState?: | "LICENSE_ASSIGNMENT_STATE_UNSPECIFIED" | "ASSIGNED" | "UNASSIGNED" | "NO_LICENSE" | "NO_LICENSE_ATTEMPTED_LOGIN" | "BLOCKED"; /** * Optional. The full resource name of the Subscription(LicenseConfig) * assigned to the user. */ licenseConfig?: string; /** * Output only. User update timestamp. */ readonly updateTime?: Date; /** * Required. Immutable. The user principal of the User, could be email * address or other prinical identifier. This field is immutable. Admin assign * licenses based on the user principal. */ userPrincipal?: string; /** * Optional. The user profile. We user user full name(First name + Last name) * as user profile. */ userProfile?: string; } /** * Config to store data store type configuration for workspace data */ export interface GoogleCloudDiscoveryengineV1alphaWorkspaceConfig { /** * Obfuscated Dasher customer ID. */ dasherCustomerId?: string; /** * Optional. The super admin email address for the workspace that will be * used for access token generation. For now we only use it for Native Google * Drive connector data ingestion. */ superAdminEmailAddress?: string; /** * Optional. The super admin service account for the workspace that will be * used for access token generation. For now we only use it for Native Google * Drive connector data ingestion. */ superAdminServiceAccount?: string; /** * The Google Workspace data source. */ type?: | "TYPE_UNSPECIFIED" | "GOOGLE_DRIVE" | "GOOGLE_MAIL" | "GOOGLE_SITES" | "GOOGLE_CALENDAR" | "GOOGLE_CHAT" | "GOOGLE_GROUPS" | "GOOGLE_KEEP" | "GOOGLE_PEOPLE"; } /** * Defines an answer. */ export interface GoogleCloudDiscoveryengineV1Answer { /** * Additional answer-skipped reasons. This provides the reason for ignored * cases. If nothing is skipped, this field is not set. */ answerSkippedReasons?: | "ANSWER_SKIPPED_REASON_UNSPECIFIED" | "ADVERSARIAL_QUERY_IGNORED" | "NON_ANSWER_SEEKING_QUERY_IGNORED" | "OUT_OF_DOMAIN_QUERY_IGNORED" | "POTENTIAL_POLICY_VIOLATION" | "NO_RELEVANT_CONTENT" | "JAIL_BREAKING_QUERY_IGNORED" | "CUSTOMER_POLICY_VIOLATION" | "NON_ANSWER_SEEKING_QUERY_IGNORED_V2" | "LOW_GROUNDED_ANSWER" | "USER_DEFINED_CLASSIFICATION_QUERY_IGNORED" | "UNHELPFUL_ANSWER"[]; /** * The textual answer. */ answerText?: string; /** * Citations. */ citations?: GoogleCloudDiscoveryengineV1AnswerCitation[]; /** * Output only. Answer completed timestamp. */ readonly completeTime?: Date; /** * Output only. Answer creation timestamp. */ readonly createTime?: Date; /** * A score in the range of [0, 1] describing how grounded the answer is by * the reference chunks. */ groundingScore?: number; /** * Optional. Grounding supports. */ groundingSupports?: GoogleCloudDiscoveryengineV1AnswerGroundingSupport[]; /** * Immutable. Fully qualified name * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*\/answers/*` */ name?: string; /** * Query understanding information. */ queryUnderstandingInfo?: GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo; /** * References. */ references?: GoogleCloudDiscoveryengineV1AnswerReference[]; /** * Suggested related questions. */ relatedQuestions?: string[]; /** * Optional. Safety ratings. */ safetyRatings?: GoogleCloudDiscoveryengineV1SafetyRating[]; /** * The state of the answer generation. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS" | "FAILED" | "SUCCEEDED" | "STREAMING"; /** * Answer generation steps. */ steps?: GoogleCloudDiscoveryengineV1AnswerStep[]; } function serializeGoogleCloudDiscoveryengineV1Answer(data: any): GoogleCloudDiscoveryengineV1Answer { return { ...data, citations: data["citations"] !== undefined ? data["citations"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1AnswerCitation(item))) : undefined, groundingSupports: data["groundingSupports"] !== undefined ? data["groundingSupports"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1AnswerGroundingSupport(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1Answer(data: any): GoogleCloudDiscoveryengineV1Answer { return { ...data, citations: data["citations"] !== undefined ? data["citations"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1AnswerCitation(item))) : undefined, completeTime: data["completeTime"] !== undefined ? new Date(data["completeTime"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, groundingSupports: data["groundingSupports"] !== undefined ? data["groundingSupports"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1AnswerGroundingSupport(item))) : undefined, }; } /** * Citation info for a segment. */ export interface GoogleCloudDiscoveryengineV1AnswerCitation { /** * End of the attributed segment, exclusive. Measured in bytes (UTF-8 * unicode). If there are multi-byte characters,such as non-ASCII characters, * the index measurement is longer than the string length. */ endIndex?: bigint; /** * Citation sources for the attributed segment. */ sources?: GoogleCloudDiscoveryengineV1AnswerCitationSource[]; /** * Index indicates the start of the segment, measured in bytes (UTF-8 * unicode). If there are multi-byte characters,such as non-ASCII characters, * the index measurement is longer than the string length. */ startIndex?: bigint; } function serializeGoogleCloudDiscoveryengineV1AnswerCitation(data: any): GoogleCloudDiscoveryengineV1AnswerCitation { return { ...data, endIndex: data["endIndex"] !== undefined ? String(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? String(data["startIndex"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AnswerCitation(data: any): GoogleCloudDiscoveryengineV1AnswerCitation { return { ...data, endIndex: data["endIndex"] !== undefined ? BigInt(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? BigInt(data["startIndex"]) : undefined, }; } /** * Citation source. */ export interface GoogleCloudDiscoveryengineV1AnswerCitationSource { /** * ID of the citation source. */ referenceId?: string; } /** * The specification for answer generation. */ export interface GoogleCloudDiscoveryengineV1AnswerGenerationSpec { /** * Optional. The specification for user specified classifier spec. */ userDefinedClassifierSpec?: GoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSpec; } function serializeGoogleCloudDiscoveryengineV1AnswerGenerationSpec(data: any): GoogleCloudDiscoveryengineV1AnswerGenerationSpec { return { ...data, userDefinedClassifierSpec: data["userDefinedClassifierSpec"] !== undefined ? serializeGoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSpec(data["userDefinedClassifierSpec"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AnswerGenerationSpec(data: any): GoogleCloudDiscoveryengineV1AnswerGenerationSpec { return { ...data, userDefinedClassifierSpec: data["userDefinedClassifierSpec"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSpec(data["userDefinedClassifierSpec"]) : undefined, }; } /** * The specification for user defined classifier. */ export interface GoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSpec { /** * Optional. Whether or not to enable and include user defined classifier. */ enableUserDefinedClassifier?: boolean; /** * Optional. The model id to be used for the user defined classifier. */ modelId?: string; /** * Optional. The preamble to be used for the user defined classifier. */ preamble?: string; /** * Optional. The seed value to be used for the user defined classifier. */ seed?: number; /** * Optional. The task marker to be used for the user defined classifier. */ taskMarker?: string; /** * Optional. The temperature value to be used for the user defined * classifier. */ temperature?: number; /** * Optional. The top-k value to be used for the user defined classifier. */ topK?: bigint; /** * Optional. The top-p value to be used for the user defined classifier. */ topP?: number; } function serializeGoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSpec(data: any): GoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSpec { return { ...data, topK: data["topK"] !== undefined ? String(data["topK"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSpec(data: any): GoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSpec { return { ...data, topK: data["topK"] !== undefined ? BigInt(data["topK"]) : undefined, }; } /** * Grounding support for a claim in `answer_text`. */ export interface GoogleCloudDiscoveryengineV1AnswerGroundingSupport { /** * Required. End of the claim, exclusive. */ endIndex?: bigint; /** * Indicates that this claim required grounding check. When the system * decided this claim didn't require attribution/grounding check, this field * is set to false. In that case, no grounding check was done for the claim * and therefore `grounding_score`, `sources` is not returned. */ groundingCheckRequired?: boolean; /** * A score in the range of [0, 1] describing how grounded is a specific claim * by the references. Higher value means that the claim is better supported by * the reference chunks. */ groundingScore?: number; /** * Optional. Citation sources for the claim. */ sources?: GoogleCloudDiscoveryengineV1AnswerCitationSource[]; /** * Required. Index indicates the start of the claim, measured in bytes (UTF-8 * unicode). */ startIndex?: bigint; } function serializeGoogleCloudDiscoveryengineV1AnswerGroundingSupport(data: any): GoogleCloudDiscoveryengineV1AnswerGroundingSupport { return { ...data, endIndex: data["endIndex"] !== undefined ? String(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? String(data["startIndex"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AnswerGroundingSupport(data: any): GoogleCloudDiscoveryengineV1AnswerGroundingSupport { return { ...data, endIndex: data["endIndex"] !== undefined ? BigInt(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? BigInt(data["startIndex"]) : undefined, }; } /** * Request message for ConversationalSearchService.AnswerQuery method. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequest { /** * Answer generation specification. */ answerGenerationSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpec; /** * Deprecated: This field is deprecated. Streaming Answer API will be * supported. Asynchronous mode control. If enabled, the response will be * returned with answer/session resource name without final answer. The API * users need to do the polling to get the latest status of answer/session by * calling ConversationalSearchService.GetAnswer or * ConversationalSearchService.GetSession method. */ asynchronousMode?: boolean; /** * Optional. End user specification. */ endUserSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestEndUserSpec; /** * Optional. Grounding specification. */ groundingSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestGroundingSpec; /** * Required. Current user query. */ query?: GoogleCloudDiscoveryengineV1Query; /** * Query understanding specification. */ queryUnderstandingSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpec; /** * Related questions specification. */ relatedQuestionsSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec; /** * Model specification. */ safetySpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec; /** * Search specification. */ searchSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpec; /** * The session resource name. Not required. When session field is not set, * the API is in sessionless mode. We support auto session mode: users can use * the wildcard symbol `-` as session ID. A new ID will be automatically * generated and assigned. */ session?: string; /** * The user labels applied to a resource must meet the following * requirements: * Each resource can have multiple labels, up to a maximum of * 64. * Each label must be a key-value pair. * Keys have a minimum length of * 1 character and a maximum length of 63 characters and cannot be empty. * Values can be empty and have a maximum length of 63 characters. * Keys and * values can contain only lowercase letters, numeric characters, underscores, * and dashes. All characters must use UTF-8 encoding, and international * characters are allowed. * The key portion of a label must be unique. * However, you can use the same key with multiple resources. * Keys must * start with a lowercase letter or international character. See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. */ userLabels?: { [key: string]: string }; /** * A unique identifier for tracking visitors. For example, this could be * implemented with an HTTP cookie, which should be able to uniquely identify * a visitor on a single device. This unique identifier should not change if * the visitor logs in or out of the website. This field should NOT have a * fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ userPseudoId?: string; } /** * Answer generation specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpec { /** * Language code for Answer. Use language tags defined by * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an * experimental feature. */ answerLanguageCode?: string; /** * Specifies whether to filter out adversarial queries. The default value is * `false`. Google employs search-query classification to detect adversarial * queries. No answer is returned if the search query is classified as an * adversarial query. For example, a user might ask a question regarding * negative comments about the company or submit a query designed to generate * unsafe, policy-violating output. If this field is set to `true`, we skip * generating answers for adversarial queries and return fallback messages * instead. */ ignoreAdversarialQuery?: boolean; /** * Optional. Specifies whether to filter out jail-breaking queries. The * default value is `false`. Google employs search-query classification to * detect jail-breaking queries. No summary is returned if the search query is * classified as a jail-breaking query. A user might add instructions to the * query to change the tone, style, language, content of the answer, or ask * the model to act as a different entity, e.g. "Reply in the tone of a * competing company's CEO". If this field is set to `true`, we skip * generating summaries for jail-breaking queries and return fallback messages * instead. */ ignoreJailBreakingQuery?: boolean; /** * Specifies whether to filter out queries that have low relevance. If this * field is set to `false`, all search results are used regardless of * relevance to generate answers. If set to `true` or unset, the behavior will * be determined automatically by the service. */ ignoreLowRelevantContent?: boolean; /** * Specifies whether to filter out queries that are not answer-seeking. The * default value is `false`. Google employs search-query classification to * detect answer-seeking queries. No answer is returned if the search query is * classified as a non-answer seeking query. If this field is set to `true`, * we skip generating answers for non-answer seeking queries and return * fallback messages instead. */ ignoreNonAnswerSeekingQuery?: boolean; /** * Specifies whether to include citation metadata in the answer. The default * value is `false`. */ includeCitations?: boolean; /** * Answer generation model specification. */ modelSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecModelSpec; /** * Answer generation prompt specification. */ promptSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecPromptSpec; } /** * Answer Generation Model specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecModelSpec { /** * Model version. If not set, it will use the default stable model. Allowed * values are: stable, preview. */ modelVersion?: string; } /** * Answer generation prompt specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecPromptSpec { /** * Customized preamble. */ preamble?: string; } /** * End user specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestEndUserSpec { /** * Optional. End user metadata. */ endUserMetadata?: GoogleCloudDiscoveryengineV1AnswerQueryRequestEndUserSpecEndUserMetaData[]; } /** * End user metadata. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestEndUserSpecEndUserMetaData { /** * Chunk information. */ chunkInfo?: GoogleCloudDiscoveryengineV1AnswerQueryRequestEndUserSpecEndUserMetaDataChunkInfo; } /** * Chunk information. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestEndUserSpecEndUserMetaDataChunkInfo { /** * Chunk textual content. It is limited to 8000 characters. */ content?: string; /** * Metadata of the document from the current chunk. */ documentMetadata?: GoogleCloudDiscoveryengineV1AnswerQueryRequestEndUserSpecEndUserMetaDataChunkInfoDocumentMetadata; } /** * Document metadata contains the information of the document of the current * chunk. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestEndUserSpecEndUserMetaDataChunkInfoDocumentMetadata { /** * Title of the document. */ title?: string; } /** * Grounding specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestGroundingSpec { /** * Optional. Specifies whether to enable the filtering based on grounding * score and at what level. */ filteringLevel?: | "FILTERING_LEVEL_UNSPECIFIED" | "FILTERING_LEVEL_LOW" | "FILTERING_LEVEL_HIGH"; /** * Optional. Specifies whether to include grounding_supports in the answer. * The default value is `false`. When this field is set to `true`, returned * answer will have `grounding_score` and will contain GroundingSupports for * each claim. */ includeGroundingSupports?: boolean; } /** * Query understanding specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpec { /** * Optional. Whether to disable spell correction. The default value is * `false`. */ disableSpellCorrection?: boolean; /** * Query classification specification. */ queryClassificationSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec; /** * Query rephraser specification. */ queryRephraserSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec; } /** * Query classification specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec { /** * Enabled query classification types. */ types?: | "TYPE_UNSPECIFIED" | "ADVERSARIAL_QUERY" | "NON_ANSWER_SEEKING_QUERY" | "JAIL_BREAKING_QUERY" | "NON_ANSWER_SEEKING_QUERY_V2" | "USER_DEFINED_CLASSIFICATION_QUERY"[]; } /** * Query rephraser specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec { /** * Disable query rephraser. */ disable?: boolean; /** * Max rephrase steps. The max number is 5 steps. If not set or set to < 1, * it will be set to 1 by default. */ maxRephraseSteps?: number; /** * Optional. Query Rephraser Model specification. */ modelSpec?: GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec; } /** * Query Rephraser Model specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec { /** * Optional. Enabled query rephraser model type. If not set, it will use * LARGE by default. */ modelType?: | "MODEL_TYPE_UNSPECIFIED" | "SMALL" | "LARGE"; } /** * Related questions specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec { /** * Enable related questions feature if true. */ enable?: boolean; } /** * Safety specification. There are two use cases: 1. when only * safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied * for all categories. 2. when safety_spec.enable is set and some * safety_settings are set, only specified safety_settings are applied. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec { /** * Enable the safety filtering on the answer response. It is false by * default. */ enable?: boolean; /** * Optional. Safety settings. This settings are effective only when the * safety_spec.enable is true. */ safetySettings?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpecSafetySetting[]; } /** * Safety settings. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpecSafetySetting { /** * Required. Harm category. */ category?: | "HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY"; /** * Required. The harm block threshold. */ threshold?: | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF"; } /** * Search specification. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpec { /** * Search parameters. */ searchParams?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchParams; /** * Search result list. */ searchResultList?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultList; } /** * Search parameters. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchParams { /** * Boost specification to boost certain documents in search results which may * affect the answer query response. For more information on boosting, see * [Boosting](https://cloud.google.com/retail/docs/boosting#boost) */ boostSpec?: GoogleCloudDiscoveryengineV1SearchRequestBoostSpec; /** * Specs defining dataStores to filter on in a search call and configurations * for those dataStores. This is only considered for engines with multiple * dataStores use case. For single dataStore within an engine, they should use * the specs at the top level. */ dataStoreSpecs?: GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec[]; /** * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. Filter * expression is case-sensitive. This will be used to filter search results * which may affect the Answer response. If this field is unrecognizable, an * `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by * mapping the LHS filter key to a key property defined in the Vertex AI * Search backend -- this mapping is defined by the customer in their schema. * For example a media customers might have a field 'name' in their schema. In * this case the filter would look like this: filter --> name:'ANY("king * kong")' For more information about filtering including syntax and filter * operators, see * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; /** * Number of search results to return. The default value is 10. */ maxReturnResults?: number; /** * The order in which documents are returned. Documents can be ordered by a * field in an Document object. Leave it unset if ordered by relevance. * `order_by` expression is case-sensitive. For more information on ordering, * see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. */ orderBy?: string; /** * Specifies the search result mode. If unspecified, the search result mode * defaults to `DOCUMENTS`. See [parse and chunk * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) */ searchResultMode?: | "SEARCH_RESULT_MODE_UNSPECIFIED" | "DOCUMENTS" | "CHUNKS"; } /** * Search result list. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultList { /** * Search results. */ searchResults?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResult[]; } /** * Search result. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResult { /** * Chunk information. */ chunkInfo?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo; /** * Unstructured document information. */ unstructuredDocumentInfo?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo; } /** * Chunk information. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo { /** * Chunk resource name. */ chunk?: string; /** * Chunk textual content. */ content?: string; /** * Metadata of the document from the current chunk. */ documentMetadata?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata; } /** * Document metadata contains the information of the document of the current * chunk. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata { /** * Title of the document. */ title?: string; /** * Uri of the document. */ uri?: string; } /** * Unstructured document information. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo { /** * Document resource name. */ document?: string; /** * List of document contexts. The content will be used for Answer Generation. * This is supposed to be the main content of the document that can be long * and comprehensive. */ documentContexts?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext[]; /** * Deprecated: This field is deprecated and will have no effect on the Answer * generation. Please use document_contexts and extractive_segments fields. * List of extractive answers. */ extractiveAnswers?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer[]; /** * List of extractive segments. */ extractiveSegments?: GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment[]; /** * Title. */ title?: string; /** * URI for the document. */ uri?: string; } /** * Document context. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext { /** * Document content to be used for answer generation. */ content?: string; /** * Page identifier. */ pageIdentifier?: string; } /** * Extractive answer. * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer { /** * Extractive answer content. */ content?: string; /** * Page identifier. */ pageIdentifier?: string; } /** * Extractive segment. * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) * Answer generation will only use it if document_contexts is empty. This is * supposed to be shorter snippets. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment { /** * Extractive segment content. */ content?: string; /** * Page identifier. */ pageIdentifier?: string; } /** * Response message for ConversationalSearchService.AnswerQuery method. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryResponse { /** * Answer resource object. If * AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps * is greater than 1, use Answer.name to fetch answer information using * ConversationalSearchService.GetAnswer API. */ answer?: GoogleCloudDiscoveryengineV1Answer; /** * A global unique ID used for logging. */ answerQueryToken?: string; /** * Session resource object. It will be only available when session field is * set and valid in the AnswerQueryRequest request. */ session?: GoogleCloudDiscoveryengineV1Session; } function serializeGoogleCloudDiscoveryengineV1AnswerQueryResponse(data: any): GoogleCloudDiscoveryengineV1AnswerQueryResponse { return { ...data, answer: data["answer"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Answer(data["answer"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AnswerQueryResponse(data: any): GoogleCloudDiscoveryengineV1AnswerQueryResponse { return { ...data, answer: data["answer"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Answer(data["answer"]) : undefined, }; } /** * Query understanding information. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo { /** * Query classification information. */ queryClassificationInfo?: GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfoQueryClassificationInfo[]; } /** * Query classification information. */ export interface GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfoQueryClassificationInfo { /** * Classification output. */ positive?: boolean; /** * Query classification type. */ type?: | "TYPE_UNSPECIFIED" | "ADVERSARIAL_QUERY" | "NON_ANSWER_SEEKING_QUERY" | "JAIL_BREAKING_QUERY" | "NON_ANSWER_SEEKING_QUERY_V2" | "USER_DEFINED_CLASSIFICATION_QUERY"; } /** * Reference. */ export interface GoogleCloudDiscoveryengineV1AnswerReference { /** * Chunk information. */ chunkInfo?: GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfo; /** * Structured document information. */ structuredDocumentInfo?: GoogleCloudDiscoveryengineV1AnswerReferenceStructuredDocumentInfo; /** * Unstructured document information. */ unstructuredDocumentInfo?: GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfo; } /** * Chunk information. */ export interface GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfo { /** * Chunk resource name. */ chunk?: string; /** * Chunk textual content. */ content?: string; /** * Document metadata. */ documentMetadata?: GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfoDocumentMetadata; /** * The relevance of the chunk for a given query. Values range from 0.0 * (completely irrelevant) to 1.0 (completely relevant). This value is for * informational purpose only. It may change for the same query and chunk at * any time due to a model retraining or change in implementation. */ relevanceScore?: number; } /** * Document metadata. */ export interface GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfoDocumentMetadata { /** * Document resource name. */ document?: string; /** * Page identifier. */ pageIdentifier?: string; /** * The structured JSON metadata for the document. It is populated from the * struct data from the Chunk in search result. */ structData?: { [key: string]: any }; /** * Title. */ title?: string; /** * URI for the document. */ uri?: string; } /** * Structured search information. */ export interface GoogleCloudDiscoveryengineV1AnswerReferenceStructuredDocumentInfo { /** * Document resource name. */ document?: string; /** * Structured search data. */ structData?: { [key: string]: any }; /** * Output only. The title of the document. */ readonly title?: string; /** * Output only. The URI of the document. */ readonly uri?: string; } /** * Unstructured document information. */ export interface GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfo { /** * List of cited chunk contents derived from document content. */ chunkContents?: GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfoChunkContent[]; /** * Document resource name. */ document?: string; /** * The structured JSON metadata for the document. It is populated from the * struct data from the Chunk in search result. */ structData?: { [key: string]: any }; /** * Title. */ title?: string; /** * URI for the document. */ uri?: string; } /** * Chunk content. */ export interface GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfoChunkContent { /** * Chunk textual content. */ content?: string; /** * Page identifier. */ pageIdentifier?: string; /** * The relevance of the chunk for a given query. Values range from 0.0 * (completely irrelevant) to 1.0 (completely relevant). This value is for * informational purpose only. It may change for the same query and chunk at * any time due to a model retraining or change in implementation. */ relevanceScore?: number; } /** * Step information. */ export interface GoogleCloudDiscoveryengineV1AnswerStep { /** * Actions. */ actions?: GoogleCloudDiscoveryengineV1AnswerStepAction[]; /** * The description of the step. */ description?: string; /** * The state of the step. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS" | "FAILED" | "SUCCEEDED"; /** * The thought of the step. */ thought?: string; } /** * Action. */ export interface GoogleCloudDiscoveryengineV1AnswerStepAction { /** * Observation. */ observation?: GoogleCloudDiscoveryengineV1AnswerStepActionObservation; /** * Search action. */ searchAction?: GoogleCloudDiscoveryengineV1AnswerStepActionSearchAction; } /** * Observation. */ export interface GoogleCloudDiscoveryengineV1AnswerStepActionObservation { /** * Search results observed by the search action, it can be snippets info or * chunk info, depending on the citation type set by the user. */ searchResults?: GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResult[]; } export interface GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResult { /** * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate * chunk info. */ chunkInfo?: GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultChunkInfo[]; /** * Document resource name. */ document?: string; /** * If citation_type is DOCUMENT_LEVEL_CITATION, populate document level * snippets. */ snippetInfo?: GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo[]; /** * Data representation. The structured JSON data for the document. It's * populated from the struct data from the Document, or the Chunk in search * result. */ structData?: { [key: string]: any }; /** * Title. */ title?: string; /** * URI for the document. */ uri?: string; } /** * Chunk information. */ export interface GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultChunkInfo { /** * Chunk resource name. */ chunk?: string; /** * Chunk textual content. */ content?: string; /** * The relevance of the chunk for a given query. Values range from 0.0 * (completely irrelevant) to 1.0 (completely relevant). This value is for * informational purpose only. It may change for the same query and chunk at * any time due to a model retraining or change in implementation. */ relevanceScore?: number; } /** * Snippet information. */ export interface GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo { /** * Snippet content. */ snippet?: string; /** * Status of the snippet defined by the search team. */ snippetStatus?: string; } /** * Search action. */ export interface GoogleCloudDiscoveryengineV1AnswerStepActionSearchAction { /** * The query to search. */ query?: string; } /** * AssistAnswer resource, main part of AssistResponse. */ export interface GoogleCloudDiscoveryengineV1AssistAnswer { /** * Reasons for not answering the assist call. */ assistSkippedReasons?: | "ASSIST_SKIPPED_REASON_UNSPECIFIED" | "NON_ASSIST_SEEKING_QUERY_IGNORED" | "CUSTOMER_POLICY_VIOLATION"[]; /** * Optional. The field contains information about the various policy checks' * results like the banned phrases or the Model Armor checks. This field is * populated only if the assist call was skipped due to a policy violation. */ customerPolicyEnforcementResult?: GoogleCloudDiscoveryengineV1AssistAnswerCustomerPolicyEnforcementResult; /** * Immutable. Identifier. Resource name of the `AssistAnswer`. Format: * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * Replies of the assistant. */ replies?: GoogleCloudDiscoveryengineV1AssistAnswerReply[]; /** * State of the answer generation. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS" | "FAILED" | "SUCCEEDED" | "SKIPPED"; } function serializeGoogleCloudDiscoveryengineV1AssistAnswer(data: any): GoogleCloudDiscoveryengineV1AssistAnswer { return { ...data, replies: data["replies"] !== undefined ? data["replies"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1AssistAnswerReply(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AssistAnswer(data: any): GoogleCloudDiscoveryengineV1AssistAnswer { return { ...data, replies: data["replies"] !== undefined ? data["replies"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1AssistAnswerReply(item))) : undefined, }; } /** * Customer policy enforcement results. Contains the results of the various * policy checks, like the banned phrases or the Model Armor checks. */ export interface GoogleCloudDiscoveryengineV1AssistAnswerCustomerPolicyEnforcementResult { /** * Customer policy enforcement results. Populated only if the assist call was * skipped due to a policy violation. It contains results from those filters * that blocked the processing of the query. */ policyResults?: GoogleCloudDiscoveryengineV1AssistAnswerCustomerPolicyEnforcementResultPolicyEnforcementResult[]; /** * Final verdict of the customer policy enforcement. If only one policy * blocked the processing, the verdict is BLOCK. */ verdict?: | "UNSPECIFIED" | "ALLOW" | "BLOCK"; } /** * Customer policy enforcement result for the banned phrase policy. */ export interface GoogleCloudDiscoveryengineV1AssistAnswerCustomerPolicyEnforcementResultBannedPhraseEnforcementResult { /** * The banned phrases that were found in the query or the answer. */ bannedPhrases?: string[]; } /** * Customer policy enforcement result for the Model Armor policy. */ export interface GoogleCloudDiscoveryengineV1AssistAnswerCustomerPolicyEnforcementResultModelArmorEnforcementResult { /** * The error returned by Model Armor if the policy enforcement failed for * some reason. */ error?: GoogleRpcStatus; /** * The Model Armor violation that was found. */ modelArmorViolation?: string; } /** * Customer policy enforcement result for a single policy type. */ export interface GoogleCloudDiscoveryengineV1AssistAnswerCustomerPolicyEnforcementResultPolicyEnforcementResult { /** * The policy enforcement result for the banned phrase policy. */ bannedPhraseEnforcementResult?: GoogleCloudDiscoveryengineV1AssistAnswerCustomerPolicyEnforcementResultBannedPhraseEnforcementResult; /** * The policy enforcement result for the Model Armor policy. */ modelArmorEnforcementResult?: GoogleCloudDiscoveryengineV1AssistAnswerCustomerPolicyEnforcementResultModelArmorEnforcementResult; } /** * One part of the multi-part response of the assist call. */ export interface GoogleCloudDiscoveryengineV1AssistAnswerReply { /** * Possibly grounded response text or media from the assistant. */ groundedContent?: GoogleCloudDiscoveryengineV1AssistantGroundedContent; } function serializeGoogleCloudDiscoveryengineV1AssistAnswerReply(data: any): GoogleCloudDiscoveryengineV1AssistAnswerReply { return { ...data, groundedContent: data["groundedContent"] !== undefined ? serializeGoogleCloudDiscoveryengineV1AssistantGroundedContent(data["groundedContent"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AssistAnswerReply(data: any): GoogleCloudDiscoveryengineV1AssistAnswerReply { return { ...data, groundedContent: data["groundedContent"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1AssistantGroundedContent(data["groundedContent"]) : undefined, }; } /** * Discovery Engine Assistant resource. */ export interface GoogleCloudDiscoveryengineV1Assistant { /** * Optional. Customer policy for the assistant. */ customerPolicy?: GoogleCloudDiscoveryengineV1AssistantCustomerPolicy; /** * Optional. Note: not implemented yet. Use enabled_actions instead. The * enabled tools on this assistant. The keys are connector name, for example * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector * The values consist of admin enabled tools towards the connector instance. * Admin can selectively enable multiple tools on any of the connector * instances that they created in the project. For example * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, * "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } */ enabledTools?: { [key: string]: GoogleCloudDiscoveryengineV1AssistantToolList }; /** * Optional. Configuration for the generation of the assistant response. */ generationConfig?: GoogleCloudDiscoveryengineV1AssistantGenerationConfig; /** * Immutable. Resource name of the assistant. Format: * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` * It must be a UTF-8 encoded string with a length limit of 1024 characters. */ name?: string; /** * Optional. The type of web grounding to use. */ webGroundingType?: | "WEB_GROUNDING_TYPE_UNSPECIFIED" | "WEB_GROUNDING_TYPE_DISABLED" | "WEB_GROUNDING_TYPE_GOOGLE_SEARCH" | "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH"; } /** * Multi-modal content. */ export interface GoogleCloudDiscoveryengineV1AssistantContent { /** * Result of executing an ExecutableCode. */ codeExecutionResult?: GoogleCloudDiscoveryengineV1AssistantContentCodeExecutionResult; /** * Code generated by the model that is meant to be executed. */ executableCode?: GoogleCloudDiscoveryengineV1AssistantContentExecutableCode; /** * A file, e.g., an audio summary. */ file?: GoogleCloudDiscoveryengineV1AssistantContentFile; /** * Inline binary data. */ inlineData?: GoogleCloudDiscoveryengineV1AssistantContentBlob; /** * The producer of the content. Can be "model" or "user". */ role?: string; /** * Inline text. */ text?: string; /** * Optional. Indicates if the part is thought from the model. */ thought?: boolean; } function serializeGoogleCloudDiscoveryengineV1AssistantContent(data: any): GoogleCloudDiscoveryengineV1AssistantContent { return { ...data, inlineData: data["inlineData"] !== undefined ? serializeGoogleCloudDiscoveryengineV1AssistantContentBlob(data["inlineData"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AssistantContent(data: any): GoogleCloudDiscoveryengineV1AssistantContent { return { ...data, inlineData: data["inlineData"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1AssistantContentBlob(data["inlineData"]) : undefined, }; } /** * Inline blob. */ export interface GoogleCloudDiscoveryengineV1AssistantContentBlob { /** * Required. Raw bytes. */ data?: Uint8Array; /** * Required. The media type (MIME type) of the generated data. */ mimeType?: string; } function serializeGoogleCloudDiscoveryengineV1AssistantContentBlob(data: any): GoogleCloudDiscoveryengineV1AssistantContentBlob { return { ...data, data: data["data"] !== undefined ? encodeBase64(data["data"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AssistantContentBlob(data: any): GoogleCloudDiscoveryengineV1AssistantContentBlob { return { ...data, data: data["data"] !== undefined ? decodeBase64(data["data"] as string) : undefined, }; } /** * Result of executing ExecutableCode. */ export interface GoogleCloudDiscoveryengineV1AssistantContentCodeExecutionResult { /** * Required. Outcome of the code execution. */ outcome?: | "OUTCOME_UNSPECIFIED" | "OUTCOME_OK" | "OUTCOME_FAILED" | "OUTCOME_DEADLINE_EXCEEDED"; /** * Optional. Contains stdout when code execution is successful, stderr or * other description otherwise. */ output?: string; } /** * Code generated by the model that is meant to be executed by the model. */ export interface GoogleCloudDiscoveryengineV1AssistantContentExecutableCode { /** * Required. The code content. Currently only supports Python. */ code?: string; } /** * A file, e.g., an audio summary. */ export interface GoogleCloudDiscoveryengineV1AssistantContentFile { /** * Required. The file ID. */ fileId?: string; /** * Required. The media type (MIME type) of the file. */ mimeType?: string; } /** * Customer-defined policy for the assistant. */ export interface GoogleCloudDiscoveryengineV1AssistantCustomerPolicy { /** * Optional. List of banned phrases. */ bannedPhrases?: GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase[]; /** * Optional. Model Armor configuration to be used for sanitizing user prompts * and assistant responses. */ modelArmorConfig?: GoogleCloudDiscoveryengineV1AssistantCustomerPolicyModelArmorConfig; } /** * Definition of a customer-defined banned phrase. A banned phrase is not * allowed to appear in the user query or the LLM response, or else the answer * will be refused. */ export interface GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase { /** * Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored * when matching banned phrases. For example, "cafe" would match "café". */ ignoreDiacritics?: boolean; /** * Optional. Match type for the banned phrase. */ matchType?: | "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED" | "SIMPLE_STRING_MATCH" | "WORD_BOUNDARY_STRING_MATCH"; /** * Required. The raw string content to be banned. */ phrase?: string; } /** * Configuration for customer defined Model Armor templates to be used for * sanitizing user prompts and assistant responses. */ export interface GoogleCloudDiscoveryengineV1AssistantCustomerPolicyModelArmorConfig { /** * Optional. Defines the failure mode for Model Armor sanitization. */ failureMode?: | "FAILURE_MODE_UNSPECIFIED" | "FAIL_OPEN" | "FAIL_CLOSED"; /** * Optional. The resource name of the Model Armor template for sanitizing * assistant responses. Format: * `projects/{project}/locations/{location}/templates/{template_id}` If not * specified, no sanitization will be applied to the assistant response. */ responseTemplate?: string; /** * Optional. The resource name of the Model Armor template for sanitizing * user prompts. Format: * `projects/{project}/locations/{location}/templates/{template_id}` If not * specified, no sanitization will be applied to the user prompt. */ userPromptTemplate?: string; } /** * Configuration for the generation of the assistant response. */ export interface GoogleCloudDiscoveryengineV1AssistantGenerationConfig { /** * The default language to use for the generation of the assistant response. * Use an ISO 639-1 language code such as `en`. If not specified, the language * will be automatically detected. */ defaultLanguage?: string; /** * System instruction, also known as the prompt preamble for LLM calls. See * also * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions */ systemInstruction?: GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction; } /** * System instruction, also known as the prompt preamble for LLM calls. */ export interface GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction { /** * Optional. Additional system instruction that will be added to the default * system instruction. */ additionalSystemInstruction?: string; } /** * A piece of content and possibly its grounding information. Not all content * needs grounding. Phrases like "Of course, I will gladly search it for you." * do not need grounding. */ export interface GoogleCloudDiscoveryengineV1AssistantGroundedContent { /** * Source attribution of the generated content. See also * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check */ citationMetadata?: GoogleCloudDiscoveryengineV1CitationMetadata; /** * The content. */ content?: GoogleCloudDiscoveryengineV1AssistantContent; /** * Metadata for grounding based on text sources. */ textGroundingMetadata?: GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata; } function serializeGoogleCloudDiscoveryengineV1AssistantGroundedContent(data: any): GoogleCloudDiscoveryengineV1AssistantGroundedContent { return { ...data, content: data["content"] !== undefined ? serializeGoogleCloudDiscoveryengineV1AssistantContent(data["content"]) : undefined, textGroundingMetadata: data["textGroundingMetadata"] !== undefined ? serializeGoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata(data["textGroundingMetadata"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AssistantGroundedContent(data: any): GoogleCloudDiscoveryengineV1AssistantGroundedContent { return { ...data, content: data["content"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1AssistantContent(data["content"]) : undefined, textGroundingMetadata: data["textGroundingMetadata"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata(data["textGroundingMetadata"]) : undefined, }; } /** * Grounding details for text sources. */ export interface GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata { /** * References for the grounded text. */ references?: GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataReference[]; /** * Grounding information for parts of the text. */ segments?: GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment[]; } function serializeGoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata(data: any): GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata { return { ...data, segments: data["segments"] !== undefined ? data["segments"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata(data: any): GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata { return { ...data, segments: data["segments"] !== undefined ? data["segments"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment(item))) : undefined, }; } /** * Referenced content and related document metadata. */ export interface GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataReference { /** * Referenced text content. */ content?: string; /** * Document metadata. */ documentMetadata?: GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataReferenceDocumentMetadata; } /** * Document metadata. */ export interface GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataReferenceDocumentMetadata { /** * Document resource name. */ document?: string; /** * Domain name from the document URI. Note that the `uri` field may contain a * URL that redirects to the actual website, in which case this will contain * the domain name of the target site. */ domain?: string; /** * The mime type of the document. * https://www.iana.org/assignments/media-types/media-types.xhtml. */ mimeType?: string; /** * Page identifier. */ pageIdentifier?: string; /** * Title. */ title?: string; /** * URI for the document. It may contain a URL that redirects to the actual * website. */ uri?: string; } /** * Grounding information for a segment of the text. */ export interface GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment { /** * End of the segment, exclusive. */ endIndex?: bigint; /** * Score for the segment. */ groundingScore?: number; /** * References for the segment. */ referenceIndices?: number[]; /** * Zero-based index indicating the start of the segment, measured in bytes of * a UTF-8 string (i.e. characters encoded on multiple bytes have a length of * more than one). */ startIndex?: bigint; /** * The text segment itself. */ text?: string; } function serializeGoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment(data: any): GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment { return { ...data, endIndex: data["endIndex"] !== undefined ? String(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? String(data["startIndex"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment(data: any): GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment { return { ...data, endIndex: data["endIndex"] !== undefined ? BigInt(data["endIndex"]) : undefined, startIndex: data["startIndex"] !== undefined ? BigInt(data["startIndex"]) : undefined, }; } /** * Information to identify a tool. */ export interface GoogleCloudDiscoveryengineV1AssistantToolInfo { /** * The display name of the tool. */ toolDisplayName?: string; /** * The name of the tool as defined by * DataConnectorService.QueryAvailableActions. Note: it's using `action` in * the DataConnectorService apis, but they are the same as the `tool` here. */ toolName?: string; } /** * The enabled tools on a connector */ export interface GoogleCloudDiscoveryengineV1AssistantToolList { /** * The list of tools with corresponding tool information. */ toolInfo?: GoogleCloudDiscoveryengineV1AssistantToolInfo[]; } /** * User metadata of the request. */ export interface GoogleCloudDiscoveryengineV1AssistUserMetadata { /** * Optional. Preferred language to be used for answering if language * detection fails. Also used as the language of error messages created by * actions, regardless of language detection results. */ preferredLanguageCode?: string; /** * Optional. IANA time zone, e.g. Europe/Budapest. */ timeZone?: string; } /** * The configuration for the BAP connector. */ export interface GoogleCloudDiscoveryengineV1BAPConfig { /** * Optional. The actions enabled on the associated BAP connection. */ enabledActions?: string[]; /** * Required. The supported connector modes for the associated BAP connection. */ supportedConnectorModes?: | "CONNECTOR_MODE_UNSPECIFIED" | "DATA_INGESTION" | "ACTIONS" | "END_USER_AUTHENTICATION"[]; } /** * Metadata related to the progress of the * SiteSearchEngineService.BatchCreateTargetSites operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for SiteSearchEngineService.BatchCreateTargetSites method. */ export interface GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest { /** * Required. The request message specifying the resources to create. A * maximum of 20 TargetSites can be created in a batch. */ requests?: GoogleCloudDiscoveryengineV1CreateTargetSiteRequest[]; } /** * Response message for SiteSearchEngineService.BatchCreateTargetSites method. */ export interface GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse { /** * TargetSites created. */ targetSites?: GoogleCloudDiscoveryengineV1TargetSite[]; } /** * Response message for DocumentService.BatchGetDocumentsMetadata method. */ export interface GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse { /** * The metadata of the Documents. */ documentsMetadata?: GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata[]; } function serializeGoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse(data: any): GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse { return { ...data, documentsMetadata: data["documentsMetadata"] !== undefined ? data["documentsMetadata"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse(data: any): GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse { return { ...data, documentsMetadata: data["documentsMetadata"] !== undefined ? data["documentsMetadata"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata(item))) : undefined, }; } /** * The metadata of a Document. */ export interface GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata { /** * The data ingestion source of the Document. Allowed values are: * `batch`: * Data ingested via Batch API, e.g., ImportDocuments. * `streaming` Data * ingested via Streaming API, e.g., FHIR streaming. */ dataIngestionSource?: string; /** * The timestamp of the last time the Document was last indexed. */ lastRefreshedTime?: Date; /** * The value of the matcher that was used to match the Document. */ matcherValue?: GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue; /** * The state of the document. */ state?: | "STATE_UNSPECIFIED" | "INDEXED" | "NOT_IN_TARGET_SITE" | "NOT_IN_INDEX"; } function serializeGoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata(data: any): GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata { return { ...data, lastRefreshedTime: data["lastRefreshedTime"] !== undefined ? data["lastRefreshedTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata(data: any): GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata { return { ...data, lastRefreshedTime: data["lastRefreshedTime"] !== undefined ? new Date(data["lastRefreshedTime"]) : undefined, }; } /** * The value of the matcher that was used to match the Document. */ export interface GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue { /** * Format: * projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id} */ fhirResource?: string; /** * If match by URI, the URI of the Document. */ uri?: string; } /** * Metadata related to the progress of the * UserLicenseService.BatchUpdateUserLicenses operation. This will be returned * by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of user licenses that failed to be updated. */ failureCount?: bigint; /** * Count of user licenses successfully updated. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesMetadata(data: any): GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesMetadata(data: any): GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for UserLicenseService.BatchUpdateUserLicenses method. */ export interface GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequest { /** * Optional. If true, if user licenses removed associated license config, the * user license will be deleted. By default which is false, the user license * will be updated to unassigned state. */ deleteUnassignedUserLicenses?: boolean; /** * The inline source for the input content for document embeddings. */ inlineSource?: GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequestInlineSource; } function serializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequest(data: any): GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequest { return { ...data, inlineSource: data["inlineSource"] !== undefined ? serializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequestInlineSource(data["inlineSource"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequest(data: any): GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequest { return { ...data, inlineSource: data["inlineSource"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequestInlineSource(data["inlineSource"]) : undefined, }; } /** * The inline source for the input config for BatchUpdateUserLicenses method. */ export interface GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequestInlineSource { /** * Optional. The list of fields to update. */ updateMask?: string /* FieldMask */; /** * Required. A list of user licenses to update. Each user license must have a * valid UserLicense.user_principal. */ userLicenses?: GoogleCloudDiscoveryengineV1UserLicense[]; } function serializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequestInlineSource(data: any): GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequestInlineSource { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequestInlineSource(data: any): GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesRequestInlineSource { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Response message for UserLicenseService.BatchUpdateUserLicenses method. */ export interface GoogleCloudDiscoveryengineV1BatchUpdateUserLicensesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * UserLicenses successfully updated. */ userLicenses?: GoogleCloudDiscoveryengineV1UserLicense[]; } /** * Request message for SiteSearchEngineService.BatchVerifyTargetSites method. */ export interface GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest { } /** * Access Control Configuration. */ export interface GoogleCloudDiscoveryengineV1betaAclConfig { /** * Identity provider config. */ idpConfig?: GoogleCloudDiscoveryengineV1betaIdpConfig; /** * Immutable. The full resource name of the acl configuration. Format: * `projects/{project}/locations/{location}/aclConfig`. This field must be a * UTF-8 encoded string with a length limit of 1024 characters. */ name?: string; } /** * Configuration data for advance site search. */ export interface GoogleCloudDiscoveryengineV1betaAdvancedSiteSearchConfig { /** * If set true, automatic refresh is disabled for the DataStore. */ disableAutomaticRefresh?: boolean; /** * If set true, initial indexing is disabled for the DataStore. */ disableInitialIndex?: boolean; } /** * Metadata related to the progress of the * SiteSearchEngineService.BatchCreateTargetSites operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for SiteSearchEngineService.BatchCreateTargetSites method. */ export interface GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse { /** * TargetSites created. */ targetSites?: GoogleCloudDiscoveryengineV1betaTargetSite[]; } /** * Metadata related to the progress of the * UserLicenseService.BatchUpdateUserLicenses operation. This will be returned * by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaBatchUpdateUserLicensesMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of user licenses that failed to be updated. */ failureCount?: bigint; /** * Count of user licenses successfully updated. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaBatchUpdateUserLicensesMetadata(data: any): GoogleCloudDiscoveryengineV1betaBatchUpdateUserLicensesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaBatchUpdateUserLicensesMetadata(data: any): GoogleCloudDiscoveryengineV1betaBatchUpdateUserLicensesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for UserLicenseService.BatchUpdateUserLicenses method. */ export interface GoogleCloudDiscoveryengineV1betaBatchUpdateUserLicensesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * UserLicenses successfully updated. */ userLicenses?: GoogleCloudDiscoveryengineV1betaUserLicense[]; } /** * Configurations used to enable CMEK data encryption with Cloud KMS keys. */ export interface GoogleCloudDiscoveryengineV1betaCmekConfig { /** * Output only. The default CmekConfig for the Customer. */ readonly isDefault?: boolean; /** * Required. KMS key resource name which will be used to encrypt resources * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. */ kmsKey?: string; /** * Output only. KMS key version resource name which will be used to encrypt * resources `/cryptoKeyVersions/{keyVersion}`. */ readonly kmsKeyVersion?: string; /** * Output only. The timestamp of the last key rotation. */ readonly lastRotationTimestampMicros?: bigint; /** * Required. The name of the CmekConfig of the form * `projects/{project}/locations/{location}/cmekConfig` or * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. */ name?: string; /** * Output only. Whether the NotebookLM Corpus is ready to be used. */ readonly notebooklmState?: | "NOTEBOOK_LM_STATE_UNSPECIFIED" | "NOTEBOOK_LM_NOT_READY" | "NOTEBOOK_LM_READY" | "NOTEBOOK_LM_NOT_ENABLED"; /** * Optional. Single-regional CMEKs that are required for some VAIS features. */ singleRegionKeys?: GoogleCloudDiscoveryengineV1betaSingleRegionKey[]; /** * Output only. The states of the CmekConfig. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "KEY_ISSUE" | "DELETING" | "DELETE_FAILED" | "UNUSABLE" | "ACTIVE_ROTATING" | "DELETED" | "EXPIRED"; } /** * Defines circumstances to be checked before allowing a behavior */ export interface GoogleCloudDiscoveryengineV1betaCondition { /** * Range of time(s) specifying when condition is active. Maximum of 10 time * ranges. */ activeTimeRange?: GoogleCloudDiscoveryengineV1betaConditionTimeRange[]; /** * Optional. Query regex to match the whole search query. Cannot be set when * Condition.query_terms is set. Only supported for Basic Site Search * promotion serving controls. */ queryRegex?: string; /** * Search only A list of terms to match the query on. Cannot be set when * Condition.query_regex is set. Maximum of 10 query terms. */ queryTerms?: GoogleCloudDiscoveryengineV1betaConditionQueryTerm[]; } function serializeGoogleCloudDiscoveryengineV1betaCondition(data: any): GoogleCloudDiscoveryengineV1betaCondition { return { ...data, activeTimeRange: data["activeTimeRange"] !== undefined ? data["activeTimeRange"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1betaConditionTimeRange(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaCondition(data: any): GoogleCloudDiscoveryengineV1betaCondition { return { ...data, activeTimeRange: data["activeTimeRange"] !== undefined ? data["activeTimeRange"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1betaConditionTimeRange(item))) : undefined, }; } /** * Matcher for search request query */ export interface GoogleCloudDiscoveryengineV1betaConditionQueryTerm { /** * Whether the search query needs to exactly match the query term. */ fullMatch?: boolean; /** * The specific query value to match against Must be lowercase, must be * UTF-8. Can have at most 3 space separated terms if full_match is true. * Cannot be an empty string. Maximum length of 5000 characters. */ value?: string; } /** * Used for time-dependent conditions. */ export interface GoogleCloudDiscoveryengineV1betaConditionTimeRange { /** * End of time range. Range is inclusive. Must be in the future. */ endTime?: Date; /** * Start of time range. Range is inclusive. */ startTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaConditionTimeRange(data: any): GoogleCloudDiscoveryengineV1betaConditionTimeRange { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaConditionTimeRange(data: any): GoogleCloudDiscoveryengineV1betaConditionTimeRange { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Defines a conditioned behavior to employ during serving. Must be attached to * a ServingConfig to be considered at serving time. Permitted actions dependent * on `SolutionType`. */ export interface GoogleCloudDiscoveryengineV1betaControl { /** * Output only. List of all ServingConfig IDs this control is attached to. * May take up to 10 minutes to update after changes. */ readonly associatedServingConfigIds?: string[]; /** * Defines a boost-type control */ boostAction?: GoogleCloudDiscoveryengineV1betaControlBoostAction; /** * Determines when the associated action will trigger. Omit to always apply * the action. Currently only a single condition may be specified. Otherwise * an INVALID ARGUMENT error is thrown. */ conditions?: GoogleCloudDiscoveryengineV1betaCondition[]; /** * Required. Human readable name. The identifier used in UI views. Must be * UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID * ARGUMENT error is thrown. */ displayName?: string; /** * Defines a filter-type control Currently not supported by Recommendation */ filterAction?: GoogleCloudDiscoveryengineV1betaControlFilterAction; /** * Immutable. Fully qualified name * `projects/*\/locations/global/dataStore/*\/controls/*` */ name?: string; /** * Promote certain links based on predefined trigger queries. */ promoteAction?: GoogleCloudDiscoveryengineV1betaControlPromoteAction; /** * Defines a redirect-type control. */ redirectAction?: GoogleCloudDiscoveryengineV1betaControlRedirectAction; /** * Required. Immutable. What solution the control belongs to. Must be * compatible with vertical of resource. Otherwise an INVALID ARGUMENT error * is thrown. */ solutionType?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"; /** * Treats a group of terms as synonyms of one another. */ synonymsAction?: GoogleCloudDiscoveryengineV1betaControlSynonymsAction; /** * Specifies the use case for the control. Affects what condition fields can * be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use * case per control. Must be set when solution_type is * SolutionType.SOLUTION_TYPE_SEARCH. */ useCases?: | "SEARCH_USE_CASE_UNSPECIFIED" | "SEARCH_USE_CASE_SEARCH" | "SEARCH_USE_CASE_BROWSE"[]; } function serializeGoogleCloudDiscoveryengineV1betaControl(data: any): GoogleCloudDiscoveryengineV1betaControl { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1betaCondition(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaControl(data: any): GoogleCloudDiscoveryengineV1betaControl { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1betaCondition(item))) : undefined, }; } /** * Adjusts order of products in returned list. */ export interface GoogleCloudDiscoveryengineV1betaControlBoostAction { /** * Strength of the boost, which should be in [-1, 1]. Negative boost means * demotion. Default is 0.0 (No-op). */ boost?: number; /** * Required. Specifies which data store's documents can be boosted by this * control. Full data store name e.g. * projects/123/locations/global/collections/default_collection/dataStores/default_data_store */ dataStore?: string; /** * Required. Specifies which products to apply the boost to. If no filter is * provided all products will be boosted (No-op). Syntax documentation: * https://cloud.google.com/retail/docs/filter-and-order Maximum length is * 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. */ filter?: string; /** * Optional. Strength of the boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0 (No-op). */ fixedBoost?: number; /** * Optional. Complex specification for custom ranking based on customer * defined attribute value. */ interpolationBoostSpec?: GoogleCloudDiscoveryengineV1betaControlBoostActionInterpolationBoostSpec; } /** * Specification for custom ranking based on customer specified attribute * value. It provides more controls for customized ranking than the simple * (condition, boost) combination above. */ export interface GoogleCloudDiscoveryengineV1betaControlBoostActionInterpolationBoostSpec { /** * Optional. The attribute type to be used to determine the boost amount. The * attribute value can be derived from the field value of the specified * field_name. In the case of numerical it is straightforward i.e. * attribute_value = numerical_field_value. In the case of freshness however, * attribute_value = (time.now() - datetime_field_value). */ attributeType?: | "ATTRIBUTE_TYPE_UNSPECIFIED" | "NUMERICAL" | "FRESHNESS"; /** * Optional. The control points used to define the curve. The monotonic * function (defined through the interpolation_type above) passes through the * control points listed here. */ controlPoints?: GoogleCloudDiscoveryengineV1betaControlBoostActionInterpolationBoostSpecControlPoint[]; /** * Optional. The name of the field whose value will be used to determine the * boost amount. */ fieldName?: string; /** * Optional. The interpolation type to be applied to connect the control * points listed below. */ interpolationType?: | "INTERPOLATION_TYPE_UNSPECIFIED" | "LINEAR"; } /** * The control points used to define the curve. The curve defined through these * control points can only be monotonically increasing or decreasing(constant * values are acceptable). */ export interface GoogleCloudDiscoveryengineV1betaControlBoostActionInterpolationBoostSpecControlPoint { /** * Optional. Can be one of: 1. The numerical field value. 2. The duration * spec for freshness: The value must be formatted as an XSD `dayTimeDuration` * value (a restricted subset of an ISO 8601 duration value). The pattern for * this is: `nDnM]`. */ attributeValue?: string; /** * Optional. The value between -1 to 1 by which to boost the score if the * attribute_value evaluates to the value specified above. */ boostAmount?: number; } /** * Specified which products may be included in results. Uses same filter as * boost. */ export interface GoogleCloudDiscoveryengineV1betaControlFilterAction { /** * Required. Specifies which data store's documents can be filtered by this * control. Full data store name e.g. * projects/123/locations/global/collections/default_collection/dataStores/default_data_store */ dataStore?: string; /** * Required. A filter to apply on the matching condition results. Required * Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order * Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is * thrown. */ filter?: string; } /** * Promote certain links based on some trigger queries. Example: Promote shoe * store link when searching for `shoe` keyword. The link can be outside of * associated data store. */ export interface GoogleCloudDiscoveryengineV1betaControlPromoteAction { /** * Required. Data store with which this promotion is attached to. */ dataStore?: string; /** * Required. Promotion attached to this action. */ searchLinkPromotion?: GoogleCloudDiscoveryengineV1betaSearchLinkPromotion; } /** * Redirects a shopper to the provided URI. */ export interface GoogleCloudDiscoveryengineV1betaControlRedirectAction { /** * Required. The URI to which the shopper will be redirected. Required. URI * must have length equal or less than 2000 characters. Otherwise an INVALID * ARGUMENT error is thrown. */ redirectUri?: string; } /** * Creates a set of terms that will act as synonyms of one another. Example: * "happy" will also be considered as "glad", "glad" will also be considered as * "happy". */ export interface GoogleCloudDiscoveryengineV1betaControlSynonymsAction { /** * Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at * least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. */ synonyms?: string[]; } /** * The historical crawl rate timeseries data, used for monitoring. */ export interface GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries { /** * The QPS of the crawl rate. */ qpsTimeSeries?: GoogleMonitoringV3TimeSeries; } function serializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries { return { ...data, qpsTimeSeries: data["qpsTimeSeries"] !== undefined ? serializeGoogleMonitoringV3TimeSeries(data["qpsTimeSeries"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries { return { ...data, qpsTimeSeries: data["qpsTimeSeries"] !== undefined ? deserializeGoogleMonitoringV3TimeSeries(data["qpsTimeSeries"]) : undefined, }; } /** * Metadata related to the progress of the DataStoreService.CreateDataStore * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the EngineService.CreateEngine * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1betaCreateEngineMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaCreateEngineMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaCreateEngineMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata for EvaluationService.CreateEvaluation method. */ export interface GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata { } /** * Metadata for Create Schema LRO. */ export interface GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaCreateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaCreateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.CreateSitemap operation. This will be returned by the * google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaCreateSitemapMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaCreateSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaCreateSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.CreateTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * DataStore captures global settings and configs at the DataStore level. */ export interface GoogleCloudDiscoveryengineV1betaDataStore { /** * Immutable. Whether data in the DataStore has ACL information. If set to * `true`, the source data must have ACL. ACL will be ingested when data is * ingested by DocumentService.ImportDocuments methods. When ACL is enabled * for the DataStore, Document can't be accessed by calling * DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL * is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` * content config. */ aclEnabled?: boolean; /** * Optional. Configuration for advanced site search. */ advancedSiteSearchConfig?: GoogleCloudDiscoveryengineV1betaAdvancedSiteSearchConfig; /** * Output only. Data size estimation for billing. */ readonly billingEstimation?: GoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation; /** * Output only. CMEK-related information for the DataStore. */ readonly cmekConfig?: GoogleCloudDiscoveryengineV1betaCmekConfig; /** * Optional. Configuration for configurable billing approach. See */ configurableBillingApproach?: | "CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED" | "CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE" | "CONFIGURABLE_CONSUMPTION_EMBEDDING"; /** * Output only. The timestamp when configurable_billing_approach was last * updated. */ readonly configurableBillingApproachUpdateTime?: Date; /** * Immutable. The content config of the data store. If this field is unset, * the server behavior defaults to ContentConfig.NO_CONTENT. */ contentConfig?: | "CONTENT_CONFIG_UNSPECIFIED" | "NO_CONTENT" | "CONTENT_REQUIRED" | "PUBLIC_WEBSITE" | "GOOGLE_WORKSPACE"; /** * Output only. Timestamp the DataStore was created at. */ readonly createTime?: Date; /** * Output only. The id of the default Schema associated to this data store. */ readonly defaultSchemaId?: string; /** * Required. The data store display name. This field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * INVALID_ARGUMENT error is returned. */ displayName?: string; /** * Configuration for Document understanding and enrichment. */ documentProcessingConfig?: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig; /** * Optional. Configuration for `HEALTHCARE_FHIR` vertical. */ healthcareFhirConfig?: GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig; /** * Immutable. The fully qualified resource name of the associated * IdentityMappingStore. This field can only be set for acl_enabled DataStores * with `THIRD_PARTY` or `GSUITE` IdP. Format: * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`. */ identityMappingStore?: string; /** * Immutable. The industry vertical that the data store registers. */ industryVertical?: | "INDUSTRY_VERTICAL_UNSPECIFIED" | "GENERIC" | "MEDIA" | "HEALTHCARE_FHIR"; /** * Optional. If set, this DataStore is an Infobot FAQ DataStore. */ isInfobotFaqDataStore?: boolean; /** * Input only. The KMS key to be used to protect this DataStore at creation * time. Must be set for requests that need to comply with CMEK Org Policy * protections. If this field is set and processed successfully, the DataStore * will be protected by the KMS key, as indicated in the cmek_config field. */ kmsKeyName?: string; /** * Language info for DataStore. */ languageInfo?: GoogleCloudDiscoveryengineV1betaLanguageInfo; /** * Immutable. Identifier. The full resource name of the data store. Format: * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * Optional. Configuration for Natural Language Query Understanding. */ naturalLanguageQueryUnderstandingConfig?: GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig; /** * Optional. Stores serving config at DataStore level. */ servingConfigDataStore?: GoogleCloudDiscoveryengineV1betaDataStoreServingConfigDataStore; /** * The solutions that the data store enrolls. Available solutions for each * industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and * `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is * automatically enrolled. Other solutions cannot be enrolled. */ solutionTypes?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"[]; /** * The start schema to use for this DataStore when provisioning it. If unset, * a default vertical specialized schema will be used. This field is only used * by CreateDataStore API, and will be ignored if used in other APIs. This * field will be omitted from all API responses including CreateDataStore API. * To retrieve a schema of a DataStore, use SchemaService.GetSchema API * instead. The provided schema will be validated against certain rules on * schema. Learn more from [this * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). */ startingSchema?: GoogleCloudDiscoveryengineV1betaSchema; /** * Config to store data store type configuration for workspace data. This * must be set when DataStore.content_config is set as * DataStore.ContentConfig.GOOGLE_WORKSPACE. */ workspaceConfig?: GoogleCloudDiscoveryengineV1betaWorkspaceConfig; } /** * Estimation of data size per data store. */ export interface GoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation { /** * Data size for structured data in terms of bytes. */ structuredDataSize?: bigint; /** * Last updated timestamp for structured data. */ structuredDataUpdateTime?: Date; /** * Data size for unstructured data in terms of bytes. */ unstructuredDataSize?: bigint; /** * Last updated timestamp for unstructured data. */ unstructuredDataUpdateTime?: Date; /** * Data size for websites in terms of bytes. */ websiteDataSize?: bigint; /** * Last updated timestamp for websites. */ websiteDataUpdateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation(data: any): GoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation { return { ...data, structuredDataSize: data["structuredDataSize"] !== undefined ? String(data["structuredDataSize"]) : undefined, structuredDataUpdateTime: data["structuredDataUpdateTime"] !== undefined ? data["structuredDataUpdateTime"].toISOString() : undefined, unstructuredDataSize: data["unstructuredDataSize"] !== undefined ? String(data["unstructuredDataSize"]) : undefined, unstructuredDataUpdateTime: data["unstructuredDataUpdateTime"] !== undefined ? data["unstructuredDataUpdateTime"].toISOString() : undefined, websiteDataSize: data["websiteDataSize"] !== undefined ? String(data["websiteDataSize"]) : undefined, websiteDataUpdateTime: data["websiteDataUpdateTime"] !== undefined ? data["websiteDataUpdateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation(data: any): GoogleCloudDiscoveryengineV1betaDataStoreBillingEstimation { return { ...data, structuredDataSize: data["structuredDataSize"] !== undefined ? BigInt(data["structuredDataSize"]) : undefined, structuredDataUpdateTime: data["structuredDataUpdateTime"] !== undefined ? new Date(data["structuredDataUpdateTime"]) : undefined, unstructuredDataSize: data["unstructuredDataSize"] !== undefined ? BigInt(data["unstructuredDataSize"]) : undefined, unstructuredDataUpdateTime: data["unstructuredDataUpdateTime"] !== undefined ? new Date(data["unstructuredDataUpdateTime"]) : undefined, websiteDataSize: data["websiteDataSize"] !== undefined ? BigInt(data["websiteDataSize"]) : undefined, websiteDataUpdateTime: data["websiteDataUpdateTime"] !== undefined ? new Date(data["websiteDataUpdateTime"]) : undefined, }; } /** * Stores information regarding the serving configurations at DataStore level. */ export interface GoogleCloudDiscoveryengineV1betaDataStoreServingConfigDataStore { /** * Optional. If set true, the DataStore will not be available for serving * search requests. */ disabledForServing?: boolean; } /** * The historical dedicated crawl rate timeseries data, used for monitoring. * Dedicated crawl is used by Vertex AI to crawl the user's website when * dedicate crawl is set. */ export interface GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries { /** * Vertex AI's error rate time series of auto-refresh dedicated crawl. */ autoRefreshCrawlErrorRate?: GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries; /** * Vertex AI's dedicated crawl rate time series of auto-refresh, which is the * crawl rate of Google-CloudVertexBot when dedicate crawl is set, and the * crawl rate is for best effort use cases like refreshing urls periodically. */ autoRefreshCrawlRate?: GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries; /** * Vertex AI's error rate time series of user triggered dedicated crawl. */ userTriggeredCrawlErrorRate?: GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries; /** * Vertex AI's dedicated crawl rate time series of user triggered crawl, * which is the crawl rate of Google-CloudVertexBot when dedicate crawl is * set, and user triggered crawl rate is for deterministic use cases like * crawling urls or sitemaps specified by users. */ userTriggeredCrawlRate?: GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries; } function serializeGoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries { return { ...data, autoRefreshCrawlErrorRate: data["autoRefreshCrawlErrorRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["autoRefreshCrawlErrorRate"]) : undefined, autoRefreshCrawlRate: data["autoRefreshCrawlRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["autoRefreshCrawlRate"]) : undefined, userTriggeredCrawlErrorRate: data["userTriggeredCrawlErrorRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["userTriggeredCrawlErrorRate"]) : undefined, userTriggeredCrawlRate: data["userTriggeredCrawlRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["userTriggeredCrawlRate"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries { return { ...data, autoRefreshCrawlErrorRate: data["autoRefreshCrawlErrorRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["autoRefreshCrawlErrorRate"]) : undefined, autoRefreshCrawlRate: data["autoRefreshCrawlRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["autoRefreshCrawlRate"]) : undefined, userTriggeredCrawlErrorRate: data["userTriggeredCrawlErrorRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["userTriggeredCrawlErrorRate"]) : undefined, userTriggeredCrawlRate: data["userTriggeredCrawlRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["userTriggeredCrawlRate"]) : undefined, }; } /** * Metadata related to the progress of the DataStoreService.DeleteDataStore * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the EngineService.DeleteEngine * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaDeleteEngineMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDeleteEngineMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * IdentityMappingStoreService.DeleteIdentityMappingStore operation. This will * be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaDeleteIdentityMappingStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaDeleteIdentityMappingStoreMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteIdentityMappingStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDeleteIdentityMappingStoreMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteIdentityMappingStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata for DeleteSchema LRO. */ export interface GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.DeleteSitemap operation. This will be returned by the * google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaDeleteSitemapMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaDeleteSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDeleteSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.DeleteTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for SiteSearchEngineService.DisableAdvancedSiteSearch * method. */ export interface GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse { } /** * A singleton resource of DataStore. If it's empty when DataStore is created * and DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED, the default * parser will default to digital parser. */ export interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig { /** * Whether chunking mode is enabled. */ chunkingConfig?: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig; /** * Configurations for default Document parser. If not specified, we will * configure it as default DigitalParsingConfig, and the default parsing * config will be applied to all file types for Document parsing. */ defaultParsingConfig?: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig; /** * The full resource name of the Document Processing Config. Format: * `projects/*\/locations/*\/collections/*\/dataStores/*\/documentProcessingConfig`. */ name?: string; /** * Map from file type to override the default parsing configuration based on * the file type. Supported keys: * `pdf`: Override parsing config for PDF * files, either digital parsing, ocr parsing or layout parsing is supported. * * `html`: Override parsing config for HTML files, only digital parsing and * layout parsing are supported. * `docx`: Override parsing config for DOCX * files, only digital parsing and layout parsing are supported. * `pptx`: * Override parsing config for PPTX files, only digital parsing and layout * parsing are supported. * `xlsm`: Override parsing config for XLSM files, * only digital parsing and layout parsing are supported. * `xlsx`: Override * parsing config for XLSX files, only digital parsing and layout parsing are * supported. */ parsingConfigOverrides?: { [key: string]: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig }; } /** * Configuration for chunking config. */ export interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig { /** * Configuration for the layout based chunking. */ layoutBasedChunkingConfig?: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig; } /** * Configuration for the layout based chunking. */ export interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig { /** * The token size limit for each chunk. Supported values: 100-500 * (inclusive). Default value: 500. */ chunkSize?: number; /** * Whether to include appending different levels of headings to chunks from * the middle of the document to prevent context loss. Default value: False. */ includeAncestorHeadings?: boolean; } /** * Related configurations applied to a specific type of document parser. */ export interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig { /** * Configurations applied to digital parser. */ digitalParsingConfig?: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig; /** * Configurations applied to layout parser. */ layoutParsingConfig?: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig; /** * Configurations applied to OCR parser. Currently it only applies to PDFs. */ ocrParsingConfig?: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig; } /** * The digital parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig { } /** * The layout parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig { /** * Optional. If true, the processed document will be made available for the * GetProcessedDocument API. */ enableGetProcessedDocument?: boolean; /** * Optional. If true, the LLM based annotation is added to the image during * parsing. */ enableImageAnnotation?: boolean; /** * Optional. If true, the pdf layout will be refined using an LLM. */ enableLlmLayoutParsing?: boolean; /** * Optional. If true, the LLM based annotation is added to the table during * parsing. */ enableTableAnnotation?: boolean; /** * Optional. List of HTML classes to exclude from the parsed content. */ excludeHtmlClasses?: string[]; /** * Optional. List of HTML elements to exclude from the parsed content. */ excludeHtmlElements?: string[]; /** * Optional. List of HTML ids to exclude from the parsed content. */ excludeHtmlIds?: string[]; /** * Optional. Contains the required structure types to extract from the * document. Supported values: * `shareholder-structure` */ structuredContentTypes?: string[]; } /** * The OCR parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig { /** * [DEPRECATED] This field is deprecated. To use the additional enhanced * document elements processing, please switch to `layout_parsing_config`. */ enhancedDocumentElements?: string[]; /** * If true, will use native text instead of OCR text on pages containing * native text. */ useNativeText?: boolean; } /** * Metadata related to the progress of the * SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for SiteSearchEngineService.EnableAdvancedSiteSearch * method. */ export interface GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse { } /** * Metadata that describes the training and serving parameters of an Engine. */ export interface GoogleCloudDiscoveryengineV1betaEngine { /** * Optional. Immutable. This the application type which this engine resource * represents. NOTE: this is a new concept independ of existing industry * vertical or solution type. */ appType?: | "APP_TYPE_UNSPECIFIED" | "APP_TYPE_INTRANET"; /** * Configurations for the Chat Engine. Only applicable if solution_type is * SOLUTION_TYPE_CHAT. */ chatEngineConfig?: GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig; /** * Output only. Additional information of the Chat Engine. Only applicable if * solution_type is SOLUTION_TYPE_CHAT. */ readonly chatEngineMetadata?: GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata; /** * Output only. CMEK-related information for the Engine. */ readonly cmekConfig?: GoogleCloudDiscoveryengineV1betaCmekConfig; /** * Common config spec that specifies the metadata of the engine. */ commonConfig?: GoogleCloudDiscoveryengineV1betaEngineCommonConfig; /** * Optional. Configuration for configurable billing approach. */ configurableBillingApproach?: | "CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED" | "CONFIGURABLE_BILLING_APPROACH_ENABLED"; /** * Output only. Timestamp the Recommendation Engine was created at. */ readonly createTime?: Date; /** * Optional. The data stores associated with this engine. For * SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they * can only associate with at most one data store. If solution_type is * SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be * associated here. Note that when used in CreateEngineRequest, one DataStore * id must be provided as the system will use it for necessary * initializations. */ dataStoreIds?: string[]; /** * Optional. Whether to disable analytics for searches performed on this * engine. */ disableAnalytics?: boolean; /** * Required. The display name of the engine. Should be human readable. UTF-8 * encoded string with limit of 1024 characters. */ displayName?: string; /** * 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` * `feedback` * * `session-sharing` * `personalization-memory` * `disable-agent-sharing` * * `disable-image-generation` * `disable-video-generation` * * `disable-onedrive-upload` * `disable-talk-to-content` * * `disable-google-drive-upload` */ features?: { [key: string]: | "FEATURE_STATE_UNSPECIFIED" | "FEATURE_STATE_ON" | "FEATURE_STATE_OFF" }; /** * Optional. The industry vertical that the engine registers. The restriction * of the Engine industry vertical is based on DataStore: Vertical on Engine * has to match vertical of the DataStore linked to the engine. */ industryVertical?: | "INDUSTRY_VERTICAL_UNSPECIFIED" | "GENERIC" | "MEDIA" | "HEALTHCARE_FHIR"; /** * Configurations for the Media Engine. Only applicable on the data stores * with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA * vertical. */ mediaRecommendationEngineConfig?: GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig; /** * 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. */ modelConfigs?: { [key: string]: | "MODEL_STATE_UNSPECIFIED" | "MODEL_ENABLED" | "MODEL_DISABLED" }; /** * 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-9*\/. * Otherwise, an INVALID_ARGUMENT error is returned. */ name?: string; /** * Configurations for the Search Engine. Only applicable if solution_type is * SOLUTION_TYPE_SEARCH. */ searchEngineConfig?: GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig; /** * Required. The solutions of the engine. */ solutionType?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"; /** * Output only. Timestamp the Recommendation Engine was last updated. */ readonly updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaEngine(data: any): GoogleCloudDiscoveryengineV1betaEngine { return { ...data, mediaRecommendationEngineConfig: data["mediaRecommendationEngineConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig(data["mediaRecommendationEngineConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaEngine(data: any): GoogleCloudDiscoveryengineV1betaEngine { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, mediaRecommendationEngineConfig: data["mediaRecommendationEngineConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig(data["mediaRecommendationEngineConfig"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Configurations for a Chat Engine. */ export interface GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig { /** * The configurationt generate the Dialogflow agent that is associated to * this Engine. Note that these configurations are one-time consumed by and * passed to Dialogflow service. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. */ agentCreationConfig?: GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig; /** * Optional. If the flag set to true, we allow the agent and engine are in * different locations, otherwise the agent and engine are required to be in * the same location. The flag is set to false by default. Note that the * `allow_cross_region` are one-time consumed by and passed to * EngineService.CreateEngine. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. */ allowCrossRegion?: boolean; /** * The resource name of an exist Dialogflow agent to link to this Chat * Engine. Customers can either provide `agent_creation_config` to create * agent or provide an agent name that links the agent with the Chat engine. * Format: `projects//locations//agents/`. Note that the * `dialogflow_agent_to_link` are one-time consumed by and passed to * Dialogflow service. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. Use ChatEngineMetadata.dialogflow_agent for actual agent * association after Engine is created. */ dialogflowAgentToLink?: string; } /** * Configurations for generating a Dialogflow agent. Note that these * configurations are one-time consumed by and passed to Dialogflow service. It * means they cannot be retrieved using EngineService.GetEngine or * EngineService.ListEngines API after engine creation. */ export interface GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig { /** * Name of the company, organization or other entity that the agent * represents. Used for knowledge connector LLM prompt and for knowledge * search. */ business?: string; /** * Required. The default language of the agent as a language tag. See * [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) for a * list of the currently supported language codes. */ defaultLanguageCode?: string; /** * Agent location for Agent creation, supported values: global/us/eu. If not * provided, us Engine will create Agent using us-central-1 by default; eu * Engine will create Agent using eu-west-1 by default. */ location?: string; /** * Required. The time zone of the agent from the [time zone * database](https://www.iana.org/time-zones), e.g., America/New_York, * Europe/Paris. */ timeZone?: string; } /** * Additional information of a Chat Engine. Fields in this message are output * only. */ export interface GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata { /** * The resource name of a Dialogflow agent, that this Chat Engine refers to. * Format: `projects//locations//agents/`. */ dialogflowAgent?: string; } /** * Common configurations for an Engine. */ export interface GoogleCloudDiscoveryengineV1betaEngineCommonConfig { /** * The name of the company, business or entity that is associated with the * engine. Setting this may help improve LLM related features. */ companyName?: string; } /** * Additional config specs for a Media Recommendation engine. */ export interface GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig { /** * Optional. Additional engine features config. */ engineFeaturesConfig?: GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigEngineFeaturesConfig; /** * The optimization objective. e.g., `cvr`. This field together with * optimization_objective describe engine metadata to use to control engine * training and serving. Currently supported values: `ctr`, `cvr`. If not * specified, we choose default based on engine type. Default depends on type * of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => * `ctr` */ optimizationObjective?: string; /** * Name and value of the custom threshold for cvr optimization_objective. For * target_field `watch-time`, target_field_value must be an integer value * indicating the media progress time in seconds between (0, 86400] (excludes * 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the * target_field_value must be a valid float value between (0, 1.0] (excludes * 0, includes 1.0) (e.g., 0.5). */ optimizationObjectiveConfig?: GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig; /** * The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). * Since part of the cost of running the service is frequency of training - * this can be used to determine when to train engine in order to control * cost. If not specified: the default value for `CreateEngine` method is * `TRAINING`. The default value for `UpdateEngine` method is to keep the * state the same as before. */ trainingState?: | "TRAINING_STATE_UNSPECIFIED" | "PAUSED" | "TRAINING"; /** * Required. The type of engine. e.g., `recommended-for-you`. This field * together with optimization_objective describe engine metadata to use to * control engine training and serving. Currently supported values: * `recommended-for-you`, `others-you-may-like`, `more-like-this`, * `most-popular-items`. */ type?: string; } function serializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig(data: any): GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig { return { ...data, engineFeaturesConfig: data["engineFeaturesConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigEngineFeaturesConfig(data["engineFeaturesConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig(data: any): GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfig { return { ...data, engineFeaturesConfig: data["engineFeaturesConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigEngineFeaturesConfig(data["engineFeaturesConfig"]) : undefined, }; } /** * More feature configs of the selected engine type. */ export interface GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigEngineFeaturesConfig { /** * Most popular engine feature config. */ mostPopularConfig?: GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig; /** * Recommended for you engine feature config. */ recommendedForYouConfig?: GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigRecommendedForYouFeatureConfig; } function serializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigEngineFeaturesConfig(data: any): GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigEngineFeaturesConfig { return { ...data, mostPopularConfig: data["mostPopularConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data["mostPopularConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigEngineFeaturesConfig(data: any): GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigEngineFeaturesConfig { return { ...data, mostPopularConfig: data["mostPopularConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data["mostPopularConfig"]) : undefined, }; } /** * Feature configurations that are required for creating a Most Popular engine. */ export interface GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig { /** * The time window of which the engine is queried at training and prediction * time. Positive integers only. The value translates to the last X days of * events. Currently required for the `most-popular-items` engine. */ timeWindowDays?: bigint; } function serializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data: any): GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig { return { ...data, timeWindowDays: data["timeWindowDays"] !== undefined ? String(data["timeWindowDays"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data: any): GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigMostPopularFeatureConfig { return { ...data, timeWindowDays: data["timeWindowDays"] !== undefined ? BigInt(data["timeWindowDays"]) : undefined, }; } /** * Custom threshold for `cvr` optimization_objective. */ export interface GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig { /** * Required. The name of the field to target. Currently supported values: * `watch-percentage`, `watch-time`. */ targetField?: string; /** * Required. The threshold to be applied to the target (e.g., 0.5). */ targetFieldValueFloat?: number; } /** * Additional feature configurations for creating a `recommended-for-you` * engine. */ export interface GoogleCloudDiscoveryengineV1betaEngineMediaRecommendationEngineConfigRecommendedForYouFeatureConfig { /** * The type of event with which the engine is queried at prediction time. If * set to `generic`, only `view-item`, `media-play`,and `media-complete` will * be used as `context-event` in engine training. If set to `view-home-page`, * `view-home-page` will also be used as `context-events` in addition to * `view-item`, `media-play`, and `media-complete`. Currently supported for * the `recommended-for-you` engine. Currently supported values: * `view-home-page`, `generic`. */ contextEventType?: string; } /** * Configurations for a Search Engine. */ export interface GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig { /** * The add-on that this search engine enables. */ searchAddOns?: | "SEARCH_ADD_ON_UNSPECIFIED" | "SEARCH_ADD_ON_LLM"[]; /** * The search feature tier of this engine. Different tiers might have * different pricing. To learn more, check the pricing documentation. Defaults * to SearchTier.SEARCH_TIER_STANDARD if not specified. */ searchTier?: | "SEARCH_TIER_UNSPECIFIED" | "SEARCH_TIER_STANDARD" | "SEARCH_TIER_ENTERPRISE"; } /** * An evaluation is a single execution (or run) of an evaluation process. It * encapsulates the state of the evaluation and the resulting data. */ export interface GoogleCloudDiscoveryengineV1betaEvaluation { /** * Output only. Timestamp the Evaluation was created at. */ readonly createTime?: Date; /** * Output only. Timestamp the Evaluation was completed at. */ readonly endTime?: Date; /** * Output only. The error that occurred during evaluation. Only populated * when the evaluation's state is FAILED. */ readonly error?: GoogleRpcStatus; /** * Output only. A sample of errors encountered while processing the request. */ readonly errorSamples?: GoogleRpcStatus[]; /** * Required. The specification of the evaluation. */ evaluationSpec?: GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec; /** * Identifier. The full resource name of the Evaluation, in the format of * `projects/{project}/locations/{location}/evaluations/{evaluation}`. This * field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * Output only. The metrics produced by the evaluation, averaged across all * SampleQuerys in the SampleQuerySet. Only populated when the evaluation's * state is SUCCEEDED. */ readonly qualityMetrics?: GoogleCloudDiscoveryengineV1betaQualityMetrics; /** * Output only. The state of the evaluation. */ readonly state?: | "STATE_UNSPECIFIED" | "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED"; } /** * Describes the specification of the evaluation. */ export interface GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec { /** * Optional. The specification of the query set. */ querySetSpec?: GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec; /** * Required. The search request that is used to perform the evaluation. Only * the following fields within SearchRequest are supported; if any other * fields are provided, an UNSUPPORTED error will be returned: * * SearchRequest.serving_config * SearchRequest.branch * * SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * * SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * * SearchRequest.user_pseudo_id */ searchRequest?: GoogleCloudDiscoveryengineV1betaSearchRequest; } /** * Describes the specification of the query set. */ export interface GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec { /** * Optional. The full resource name of the SampleQuerySet used for the * evaluation, in the format of * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. */ sampleQuerySet?: string; } /** * Config to data store for `HEALTHCARE_FHIR` vertical. */ export interface GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig { /** * Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical. If * set to `true`, the predefined healthcare fhir schema can be extended for * more customized searching and filtering. */ enableConfigurableSchema?: boolean; /** * Whether to enable static indexing for `HEALTHCARE_FHIR` batch ingestion. * If set to `true`, the batch ingestion will be processed in a static * indexing mode which is slower but more capable of handling larger volume. */ enableStaticIndexingForBatchIngestion?: boolean; } /** * IdentityMappingEntry LongRunningOperation metadata for * IdentityMappingStoreService.ImportIdentityMappings and * IdentityMappingStoreService.PurgeIdentityMappings */ export interface GoogleCloudDiscoveryengineV1betaIdentityMappingEntryOperationMetadata { /** * The number of IdentityMappingEntries that failed to be processed. */ failureCount?: bigint; /** * The number of IdentityMappingEntries that were successfully processed. */ successCount?: bigint; /** * The total number of IdentityMappingEntries that were processed. */ totalCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1betaIdentityMappingEntryOperationMetadata(data: any): GoogleCloudDiscoveryengineV1betaIdentityMappingEntryOperationMetadata { return { ...data, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaIdentityMappingEntryOperationMetadata(data: any): GoogleCloudDiscoveryengineV1betaIdentityMappingEntryOperationMetadata { return { ...data, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, }; } /** * Identity Provider Config. */ export interface GoogleCloudDiscoveryengineV1betaIdpConfig { /** * External Identity provider config. */ externalIdpConfig?: GoogleCloudDiscoveryengineV1betaIdpConfigExternalIdpConfig; /** * Identity provider type configured. */ idpType?: | "IDP_TYPE_UNSPECIFIED" | "GSUITE" | "THIRD_PARTY"; } /** * Third party IDP Config. */ export interface GoogleCloudDiscoveryengineV1betaIdpConfigExternalIdpConfig { /** * Workforce pool name. Example: "locations/global/workforcePools/pool_id" */ workforcePoolName?: string; } /** * Metadata related to the progress of the ImportCompletionSuggestions * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of CompletionSuggestions that failed to be imported. */ failureCount?: bigint; /** * Count of CompletionSuggestions successfully imported. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the CompletionService.ImportCompletionSuggestions method. If the * long running operation is done, this message is returned by the * google.longrunning.Operations.response field if the operation is successful. */ export interface GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse { /** * The desired location of errors incurred during the Import. */ errorConfig?: GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Metadata related to the progress of the ImportDocuments operation. This is * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were processed successfully. */ successCount?: bigint; /** * Total count of entries that were processed. */ totalCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaImportDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaImportDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the ImportDocumentsRequest. If the long running operation is * done, then this message is returned by the * google.longrunning.Operations.response field if the operation was successful. */ export interface GoogleCloudDiscoveryengineV1betaImportDocumentsResponse { /** * Echoes the destination for the complete errors in the request if set. */ errorConfig?: GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Configuration of destination for Import related errors. */ export interface GoogleCloudDiscoveryengineV1betaImportErrorConfig { /** * Cloud Storage prefix for import errors. This must be an empty, existing * Cloud Storage directory. Import errors are written to sharded files in this * directory, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string; } /** * Response message for IdentityMappingStoreService.ImportIdentityMappings */ export interface GoogleCloudDiscoveryengineV1betaImportIdentityMappingsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Metadata related to the progress of the ImportSampleQueries operation. This * will be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata { /** * ImportSampleQueries operation create time. */ createTime?: Date; /** * Count of SampleQuerys that failed to be imported. */ failureCount?: bigint; /** * Count of SampleQuerys successfully imported. */ successCount?: bigint; /** * Total count of SampleQuerys that were processed. */ totalCount?: bigint; /** * ImportSampleQueries operation last update time. If the operation is done, * this is also the finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the SampleQueryService.ImportSampleQueries method. If the long * running operation is done, this message is returned by the * google.longrunning.Operations.response field if the operation is successful. */ export interface GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse { /** * The desired location of errors incurred during the Import. */ errorConfig?: GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Metadata related to the progress of the ImportSuggestionDenyListEntries * operation. This is returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CompletionService.ImportSuggestionDenyListEntries * method. */ export interface GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Count of deny list entries that failed to be imported. */ failedEntriesCount?: bigint; /** * Count of deny list entries successfully imported. */ importedEntriesCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse { return { ...data, failedEntriesCount: data["failedEntriesCount"] !== undefined ? String(data["failedEntriesCount"]) : undefined, importedEntriesCount: data["importedEntriesCount"] !== undefined ? String(data["importedEntriesCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse { return { ...data, failedEntriesCount: data["failedEntriesCount"] !== undefined ? BigInt(data["failedEntriesCount"]) : undefined, importedEntriesCount: data["importedEntriesCount"] !== undefined ? BigInt(data["importedEntriesCount"]) : undefined, }; } /** * Metadata related to the progress of the Import operation. This is returned * by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were processed successfully. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaImportUserEventsMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaImportUserEventsMetadata(data: any): GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the ImportUserEventsRequest. If the long running operation was * successful, then this message is returned by the * google.longrunning.Operations.response field if the operation was successful. */ export interface GoogleCloudDiscoveryengineV1betaImportUserEventsResponse { /** * Echoes the destination for the complete errors if this field was set in * the request. */ errorConfig?: GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Count of user events imported with complete existing Documents. */ joinedEventsCount?: bigint; /** * Count of user events imported, but with Document information not found in * the existing Branch. */ unjoinedEventsCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1betaImportUserEventsResponse(data: any): GoogleCloudDiscoveryengineV1betaImportUserEventsResponse { return { ...data, joinedEventsCount: data["joinedEventsCount"] !== undefined ? String(data["joinedEventsCount"]) : undefined, unjoinedEventsCount: data["unjoinedEventsCount"] !== undefined ? String(data["unjoinedEventsCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaImportUserEventsResponse(data: any): GoogleCloudDiscoveryengineV1betaImportUserEventsResponse { return { ...data, joinedEventsCount: data["joinedEventsCount"] !== undefined ? BigInt(data["joinedEventsCount"]) : undefined, unjoinedEventsCount: data["unjoinedEventsCount"] !== undefined ? BigInt(data["unjoinedEventsCount"]) : undefined, }; } /** * A floating point interval. */ export interface GoogleCloudDiscoveryengineV1betaInterval { /** * Exclusive upper bound. */ exclusiveMaximum?: number; /** * Exclusive lower bound. */ exclusiveMinimum?: number; /** * Inclusive upper bound. */ maximum?: number; /** * Inclusive lower bound. */ minimum?: number; } /** * Language info for DataStore. */ export interface GoogleCloudDiscoveryengineV1betaLanguageInfo { /** * Output only. Language part of normalized_language_code. E.g.: `en-US` -> * `en`, `zh-Hans-HK` -> `zh`, `en` -> `en`. */ readonly language?: string; /** * The language code for the DataStore. */ languageCode?: string; /** * Output only. This is the normalized form of language_code. E.g.: * language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have * normalized_language_code of `en-GB`. */ readonly normalizedLanguageCode?: string; /** * Output only. Region part of normalized_language_code, if present. E.g.: * `en-US` -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``. */ readonly region?: string; } /** * Information about users' licenses. */ export interface GoogleCloudDiscoveryengineV1betaLicenseConfig { /** * Optional. Whether the license config should be auto renewed when it * reaches the end date. */ autoRenew?: boolean; /** * Optional. The planed end date. */ endDate?: GoogleTypeDate; /** * Optional. Whether the license config is for free trial. */ freeTrial?: boolean; /** * Output only. Whether the license config is for Gemini bundle. */ readonly geminiBundle?: boolean; /** * Required. Number of licenses purchased. */ licenseCount?: bigint; /** * Immutable. Identifier. The fully qualified resource name of the license * config. Format: * `projects/{project}/locations/{location}/licenseConfigs/{license_config}` */ name?: string; /** * Required. The start date. */ startDate?: GoogleTypeDate; /** * Output only. The state of the license config. */ readonly state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "EXPIRED" | "NOT_STARTED"; /** * Required. Subscription term. */ subscriptionTerm?: | "SUBSCRIPTION_TERM_UNSPECIFIED" | "SUBSCRIPTION_TERM_ONE_MONTH" | "SUBSCRIPTION_TERM_ONE_YEAR" | "SUBSCRIPTION_TERM_THREE_YEARS"; /** * Required. Subscription tier information for the license config. */ subscriptionTier?: | "SUBSCRIPTION_TIER_UNSPECIFIED" | "SUBSCRIPTION_TIER_SEARCH" | "SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT" | "SUBSCRIPTION_TIER_NOTEBOOK_LM" | "SUBSCRIPTION_TIER_FRONTLINE_WORKER" | "SUBSCRIPTION_TIER_AGENTSPACE_STARTER" | "SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS" | "SUBSCRIPTION_TIER_ENTERPRISE" | "SUBSCRIPTION_TIER_EDU" | "SUBSCRIPTION_TIER_EDU_PRO" | "SUBSCRIPTION_TIER_EDU_EMERGING" | "SUBSCRIPTION_TIER_EDU_PRO_EMERGING"; } function serializeGoogleCloudDiscoveryengineV1betaLicenseConfig(data: any): GoogleCloudDiscoveryengineV1betaLicenseConfig { return { ...data, licenseCount: data["licenseCount"] !== undefined ? String(data["licenseCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaLicenseConfig(data: any): GoogleCloudDiscoveryengineV1betaLicenseConfig { return { ...data, licenseCount: data["licenseCount"] !== undefined ? BigInt(data["licenseCount"]) : undefined, }; } /** * Configuration for Natural Language Query Understanding. */ export interface GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig { /** * Mode of Natural Language Query Understanding. If this field is unset, the * behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED. */ mode?: | "MODE_UNSPECIFIED" | "DISABLED" | "ENABLED"; } /** * Response message for CrawlRateManagementService.ObtainCrawlRate method. The * response contains organcic or dedicated crawl rate time series data for * monitoring, depending on whether dedicated crawl rate is set. */ export interface GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse { /** * The historical dedicated crawl rate timeseries data, used for monitoring. */ dedicatedCrawlRateTimeSeries?: GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries; /** * Errors from service when handling the request. */ error?: GoogleRpcStatus; /** * The historical organic crawl rate timeseries data, used for monitoring. */ organicCrawlRateTimeSeries?: GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries; /** * Output only. The state of the response. */ readonly state?: | "STATE_UNSPECIFIED" | "SUCCEEDED" | "FAILED"; } function serializeGoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse(data: any): GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse { return { ...data, dedicatedCrawlRateTimeSeries: data["dedicatedCrawlRateTimeSeries"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries(data["dedicatedCrawlRateTimeSeries"]) : undefined, organicCrawlRateTimeSeries: data["organicCrawlRateTimeSeries"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries(data["organicCrawlRateTimeSeries"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse(data: any): GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse { return { ...data, dedicatedCrawlRateTimeSeries: data["dedicatedCrawlRateTimeSeries"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries(data["dedicatedCrawlRateTimeSeries"]) : undefined, organicCrawlRateTimeSeries: data["organicCrawlRateTimeSeries"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries(data["organicCrawlRateTimeSeries"]) : undefined, }; } /** * The historical organic crawl rate timeseries data, used for monitoring. * Organic crawl is auto-determined by Google to crawl the user's website when * dedicate crawl is not set. Crawl rate is the QPS of crawl request Google * sends to the user's website. */ export interface GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries { /** * Google's organic crawl rate time series, which is the sum of all * googlebots' crawl rate. Please refer to * https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers * for more details about googlebots. */ googleOrganicCrawlRate?: GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries; /** * Vertex AI's organic crawl rate time series, which is the crawl rate of * Google-CloudVertexBot when dedicate crawl is not set. Please refer to * https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot * for more details about Google-CloudVertexBot. */ vertexAiOrganicCrawlRate?: GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries; } function serializeGoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries { return { ...data, googleOrganicCrawlRate: data["googleOrganicCrawlRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["googleOrganicCrawlRate"]) : undefined, vertexAiOrganicCrawlRate: data["vertexAiOrganicCrawlRate"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["vertexAiOrganicCrawlRate"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries(data: any): GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries { return { ...data, googleOrganicCrawlRate: data["googleOrganicCrawlRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["googleOrganicCrawlRate"]) : undefined, vertexAiOrganicCrawlRate: data["vertexAiOrganicCrawlRate"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries(data["vertexAiOrganicCrawlRate"]) : undefined, }; } /** * Metadata and configurations for a Google Cloud project in the service. */ export interface GoogleCloudDiscoveryengineV1betaProject { /** * Output only. The current status of the project's configurable billing. */ readonly configurableBillingStatus?: GoogleCloudDiscoveryengineV1betaProjectConfigurableBillingStatus; /** * Output only. The timestamp when this project is created. */ readonly createTime?: Date; /** * Optional. Customer provided configurations. */ customerProvidedConfig?: GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfig; /** * Output only. Full resource name of the project, for example * `projects/{project}`. Note that when making requests, project number and * project id are both acceptable, but the server will always respond in * project number. */ readonly name?: string; /** * Output only. The timestamp when this project is successfully provisioned. * Empty value means this project is still provisioning and is not ready for * use. */ readonly provisionCompletionTime?: Date; /** * Output only. A map of terms of services. The key is the `id` of * ServiceTerms. */ readonly serviceTermsMap?: { [key: string]: GoogleCloudDiscoveryengineV1betaProjectServiceTerms }; } /** * Represents the currently effective configurable billing parameters. These * values are derived from the customer's subscription history stored internally * and reflect the thresholds actively being used for billing purposes at the * time of the GetProject call. This includes the start_time of the subscription * and may differ from the values in `customer_provided_config` due to billing * rules (e.g., scale-downs taking effect only at the start of a new month). */ export interface GoogleCloudDiscoveryengineV1betaProjectConfigurableBillingStatus { /** * Optional. The currently effective Indexing Core threshold. This is the * threshold against which Indexing Core usage is compared for overage * calculations. */ effectiveIndexingCoreThreshold?: bigint; /** * Optional. The currently effective Search QPM threshold in queries per * minute. This is the threshold against which QPM usage is compared for * overage calculations. */ effectiveSearchQpmThreshold?: bigint; /** * Optional. The start time of the currently active billing subscription. */ startTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaProjectConfigurableBillingStatus(data: any): GoogleCloudDiscoveryengineV1betaProjectConfigurableBillingStatus { return { ...data, effectiveIndexingCoreThreshold: data["effectiveIndexingCoreThreshold"] !== undefined ? String(data["effectiveIndexingCoreThreshold"]) : undefined, effectiveSearchQpmThreshold: data["effectiveSearchQpmThreshold"] !== undefined ? String(data["effectiveSearchQpmThreshold"]) : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaProjectConfigurableBillingStatus(data: any): GoogleCloudDiscoveryengineV1betaProjectConfigurableBillingStatus { return { ...data, effectiveIndexingCoreThreshold: data["effectiveIndexingCoreThreshold"] !== undefined ? BigInt(data["effectiveIndexingCoreThreshold"]) : undefined, effectiveSearchQpmThreshold: data["effectiveSearchQpmThreshold"] !== undefined ? BigInt(data["effectiveSearchQpmThreshold"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Customer provided configurations. */ export interface GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfig { /** * Optional. Configuration for NotebookLM settings. */ notebooklmConfig?: GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfigNotebooklmConfig; } /** * Configuration for NotebookLM. */ export interface GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfigNotebooklmConfig { /** * Model Armor configuration to be used for sanitizing user prompts and LLM * responses. */ modelArmorConfig?: GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfigNotebooklmConfigModelArmorConfig; /** * Optional. Whether to disable the notebook sharing feature for the project. * Default to false if not specified. */ optOutNotebookSharing?: boolean; } /** * Configuration for customer defined Model Armor templates to be used for * sanitizing user prompts and LLM responses. */ export interface GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfigNotebooklmConfigModelArmorConfig { /** * Optional. The resource name of the Model Armor Template for sanitizing LLM * responses. Format: * projects/{project}/locations/{location}/templates/{template_id} If not * specified, no sanitization will be applied to the LLM response. */ responseTemplate?: string; /** * Optional. The resource name of the Model Armor Template for sanitizing * user prompts. Format: * projects/{project}/locations/{location}/templates/{template_id} If not * specified, no sanitization will be applied to the user prompt. */ userPromptTemplate?: string; } /** * Metadata about the terms of service. */ export interface GoogleCloudDiscoveryengineV1betaProjectServiceTerms { /** * The last time when the project agreed to the terms of service. */ acceptTime?: Date; /** * The last time when the project declined or revoked the agreement to terms * of service. */ declineTime?: Date; /** * The unique identifier of this terms of service. Available terms: * * `GA_DATA_USE_TERMS`: [Terms for data * use](https://cloud.google.com/retail/data-use-terms). When using this as * `id`, the acceptable version to provide is `2022-11-23`. */ id?: string; /** * Whether the project has accepted/rejected the service terms or it is still * pending. */ state?: | "STATE_UNSPECIFIED" | "TERMS_ACCEPTED" | "TERMS_PENDING" | "TERMS_DECLINED"; /** * The version string of the terms of service. For acceptable values, see the * comments for id above. */ version?: string; } function serializeGoogleCloudDiscoveryengineV1betaProjectServiceTerms(data: any): GoogleCloudDiscoveryengineV1betaProjectServiceTerms { return { ...data, acceptTime: data["acceptTime"] !== undefined ? data["acceptTime"].toISOString() : undefined, declineTime: data["declineTime"] !== undefined ? data["declineTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaProjectServiceTerms(data: any): GoogleCloudDiscoveryengineV1betaProjectServiceTerms { return { ...data, acceptTime: data["acceptTime"] !== undefined ? new Date(data["acceptTime"]) : undefined, declineTime: data["declineTime"] !== undefined ? new Date(data["declineTime"]) : undefined, }; } /** * Metadata associated with a project provision operation. */ export interface GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata { } /** * Metadata related to the progress of the PurgeDocuments operation. This will * be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were ignored as entries were not found. */ ignoredCount?: bigint; /** * Count of entries that were deleted successfully. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, ignoredCount: data["ignoredCount"] !== undefined ? String(data["ignoredCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, ignoredCount: data["ignoredCount"] !== undefined ? BigInt(data["ignoredCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for DocumentService.PurgeDocuments method. If the long * running operation is successfully done, then this message is returned by the * google.longrunning.Operations.response field. */ export interface GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse { /** * The total count of documents purged as a result of the operation. */ purgeCount?: bigint; /** * A sample of document names that will be deleted. Only populated if `force` * is set to false. A max of 100 names will be returned and the names are * chosen at random. */ purgeSample?: string[]; } function serializeGoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse(data: any): GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? String(data["purgeCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse(data: any): GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? BigInt(data["purgeCount"]) : undefined, }; } /** * Metadata related to the progress of the PurgeSuggestionDenyListEntries * operation. This is returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CompletionService.PurgeSuggestionDenyListEntries * method. */ export interface GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Number of suggestion deny list entries purged. */ purgeCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? String(data["purgeCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? BigInt(data["purgeCount"]) : undefined, }; } /** * Describes the metrics produced by the evaluation. */ export interface GoogleCloudDiscoveryengineV1betaQualityMetrics { /** * Normalized discounted cumulative gain (NDCG) per document, at various * top-k cutoff levels. NDCG measures the ranking quality, giving higher * relevance to top results. Example (top-3): Suppose SampleQuery with three * retrieved documents (D1, D2, D3) and binary relevance judgements (1 for * relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: * [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * DCG@3: * 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + * 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 */ docNdcg?: GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics; /** * Precision per document, at various top-k cutoff levels. Precision is the * fraction of retrieved documents that are relevant. Example (top-5): * For a * single SampleQuery, If 4 out of 5 retrieved documents in the top-5 are * relevant, precision@5 = 4/5 = 0.8 */ docPrecision?: GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics; /** * Recall per document, at various top-k cutoff levels. Recall is the * fraction of relevant documents retrieved out of all relevant documents. * Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant * documents are retrieved in the top-5, recall@5 = 3/5 = 0.6 */ docRecall?: GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics; /** * Normalized discounted cumulative gain (NDCG) per page, at various top-k * cutoff levels. NDCG measures the ranking quality, giving higher relevance * to top results. Example (top-3): Suppose SampleQuery with three retrieved * pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for * not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), * P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: 0/log2(1+1) + * 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + * 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 */ pageNdcg?: GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics; /** * Recall per page, at various top-k cutoff levels. Recall is the fraction of * relevant pages retrieved out of all relevant pages. Example (top-5): * For * a single SampleQuery, if 3 out of 5 relevant pages are retrieved in the * top-5, recall@5 = 3/5 = 0.6 */ pageRecall?: GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics; } /** * Stores the metric values at specific top-k levels. */ export interface GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics { /** * The top-1 value. */ top1?: number; /** * The top-10 value. */ top10?: number; /** * The top-3 value. */ top3?: number; /** * The top-5 value. */ top5?: number; } /** * Metadata related to the progress of the * CrawlRateManagementService.RemoveDedicatedCrawlRate operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata(data: any): GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata(data: any): GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CrawlRateManagementService.RemoveDedicatedCrawlRate * method. It simply returns the state of the response, and an error message if * the state is FAILED. */ export interface GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse { /** * Errors from service when handling the request. */ error?: GoogleRpcStatus; /** * Output only. The state of the response. */ readonly state?: | "STATE_UNSPECIFIED" | "SUCCEEDED" | "FAILED"; } /** * Defines the structure and layout of a type of document data. */ export interface GoogleCloudDiscoveryengineV1betaSchema { /** * The JSON representation of the schema. */ jsonSchema?: string; /** * Immutable. The full resource name of the schema, in the format of * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * The structured representation of the schema. */ structSchema?: { [key: string]: any }; } /** * Promotion proto includes uri and other helping information to display the * promotion. */ export interface GoogleCloudDiscoveryengineV1betaSearchLinkPromotion { /** * Optional. The Promotion description. Maximum length: 200 characters. */ description?: string; /** * Optional. The Document the user wants to promote. For site search, leave * unset and only populate uri. Can be set along with uri. */ document?: string; /** * Optional. The enabled promotion will be returned for any serving configs * associated with the parent of the control this promotion is attached to. * This flag is used for basic site search only. */ enabled?: boolean; /** * Optional. The promotion thumbnail image url. */ imageUri?: string; /** * Required. The title of the promotion. Maximum length: 160 characters. */ title?: string; /** * Optional. The URL for the page the user wants to promote. Must be set for * site search. For other verticals, this is optional. */ uri?: string; } /** * Request message for SearchService.Search method. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequest { /** * Boost specification to boost certain documents. For more information on * boosting, see * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) */ boostSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec; /** * The branch resource name, such as * `projects/*\/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. * Use `default_branch` as the branch ID or leave this field empty, to search * documents under the default branch. */ branch?: string; /** * The default filter that is applied when a user performs a search without * checking any filters on the search page. The filter applied to every search * request when quality improvement such as query expansion is needed. In the * case a query does not have a sufficient amount of results this filter will * be used to determine whether or not to enable the query expansion flow. The * original filter will still be used for the query expanded search. This * field is strongly recommended to achieve high search quality. For more * information about filter syntax, see SearchRequest.filter. */ canonicalFilter?: string; /** * A specification for configuring the behavior of content search. */ contentSearchSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec; /** * Specifications that define the specific DataStores to be searched, along * with configurations for those data stores. This is only considered for * Engines with multiple data stores. For engines with a single data store, * the specs directly under SearchRequest should be used. */ dataStoreSpecs?: GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec[]; /** * Optional. Config for display feature, like match highlighting on search * results. */ displaySpec?: GoogleCloudDiscoveryengineV1betaSearchRequestDisplaySpec; /** * Uses the provided embedding to do additional semantic document retrieval. * The retrieval is based on the dot product of * SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document * embedding that is provided in * SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If * SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it * will use ServingConfig.EmbeddingConfig.field_path. */ embeddingSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec; /** * Facet specifications for faceted search. If empty, no facets are returned. * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error * is returned. */ facetSpecs?: GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec[]; /** * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. Filter * expression is case-sensitive. If this field is unrecognizable, an * `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by * mapping the LHS filter key to a key property defined in the Vertex AI * Search backend -- this mapping is defined by the customer in their schema. * For example a media customer might have a field 'name' in their schema. In * this case the filter would look like this: filter --> name:'ANY("king * kong")' For more information about filtering including syntax and filter * operators, see * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; /** * Raw image query. */ imageQuery?: GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery; /** * The BCP-47 language code, such as "en-US" or "sr-Latn". For more * information, see [Standard * fields](https://cloud.google.com/apis/design/standard_fields). This field * helps to better interpret the query. If a value isn't specified, the query * language code is automatically detected, which may not be accurate. */ languageCode?: string; /** * Optional. Config for natural language query understanding capabilities, * such as extracting structured field filters from the query. Refer to [this * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) * for more information. If `naturalLanguageQueryUnderstandingSpec` is not * specified, no additional natural language query understanding will be done. */ naturalLanguageQueryUnderstandingSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec; /** * A 0-indexed integer that specifies the current offset (that is, starting * result location, amongst the Documents deemed by the API as relevant) in * search results. This field is only considered if page_token is unset. If * this field is negative, an `INVALID_ARGUMENT` is returned. A large offset * may be capped to a reasonable threshold. */ offset?: number; /** * The maximum number of results to return for OneBox. This applies to each * OneBox type individually. Default number is 10. */ oneBoxPageSize?: number; /** * The order in which documents are returned. Documents can be ordered by a * field in an Document object. Leave it unset if ordered by relevance. * `order_by` expression is case-sensitive. For more information on ordering * the website search results, see [Order web search * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). * For more information on ordering the healthcare search results, see [Order * healthcare search * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. */ orderBy?: string; /** * Maximum number of Documents to return. The maximum allowed value depends * on the data type. Values above the maximum value are coerced to the maximum * value. * Websites with basic indexing: Default `10`, Maximum `25`. * * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: * Default `50`, Maximum `100`. If this field is negative, an * `INVALID_ARGUMENT` is returned. */ pageSize?: number; /** * A page token received from a previous SearchService.Search call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to SearchService.Search must match the call that provided the page * token. Otherwise, an `INVALID_ARGUMENT` error is returned. */ pageToken?: string; /** * Additional search parameters. For public website search only, supported * values are: * `user_country_code`: string. Default empty. If set to * non-empty, results are restricted or boosted based on the location * provided. For example, `user_country_code: "au"` For available codes see * [Country * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * * `search_type`: double. Default empty. Enables non-webpage searching * depending on the value. The only valid non-default value is 1, which * enables image searching. For example, `search_type: 1` */ params?: { [key: string]: any }; /** * The specification for personalization. Notice that if both * ServingConfig.personalization_spec and SearchRequest.personalization_spec * are set, SearchRequest.personalization_spec overrides * ServingConfig.personalization_spec. */ personalizationSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestPersonalizationSpec; /** * Raw search query. */ query?: string; /** * The query expansion specification that specifies the conditions under * which query expansion occurs. */ queryExpansionSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec; /** * Optional. The ranking expression controls the customized ranking on * retrieval documents. This overrides ServingConfig.ranking_expression. The * syntax and supported features depend on the `ranking_expression_backend` * value. If `ranking_expression_backend` is not provided, it defaults to * `RANK_BY_EMBEDDING`. If ranking_expression_backend is not provided or set * to `RANK_BY_EMBEDDING`, it should be a single function or multiple * functions that are joined by "+". * ranking_expression = function, { " + ", * function }; Supported functions: * double * relevance_score * double * * dotProduct(embedding_field_path) Function variables: * `relevance_score`: * pre-defined keywords, used for measure relevance between query and * document. * `embedding_field_path`: the document embedding field used with * query embedding vector. * `dotProduct`: embedding function between * `embedding_field_path` and query embedding vector. Example ranking * expression: If document has an embedding field doc_embedding, the ranking * expression could be `0.5 * relevance_score + 0.3 * * dotProduct(doc_embedding)`. If ranking_expression_backend is set to * `RANK_BY_FORMULA`, the following expression types (and combinations of * those chained using + or * operators) are supported: * `double` * `signal` * * `log(signal)` * `exp(signal)` * `rr(signal, double > 0)` -- reciprocal * rank transformation with second argument being a denominator constant. * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise. * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns signal2 * | double, else returns signal1. Here are a few examples of ranking formulas * that use the supported ranking expression types: - `0.2 * * semantic_similarity_score + 0.8 * log(keyword_similarity_score)` -- mostly * rank by the logarithm of `keyword_similarity_score` with slight * `semantic_smilarity_score` adjustment. - `0.2 * * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * * is_nan(keyword_similarity_score)` -- rank by the exponent of * `semantic_similarity_score` filling the value with 0 if it's NaN, also add * constant 0.3 adjustment to the final score if `semantic_similarity_score` * is NaN. - `0.2 * rr(semantic_similarity_score, 16) + 0.8 * * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank of * `keyword_similarity_score` with slight adjustment of reciprocal rank of * `semantic_smilarity_score`. The following signals are supported: * * `semantic_similarity_score`: semantic similarity adjustment that is * calculated using the embeddings generated by a proprietary Google model. * This score determines how semantically similar a search query is to a * document. * `keyword_similarity_score`: keyword match adjustment uses the * Best Match 25 (BM25) ranking function. This score is calculated using a * probabilistic model to estimate the probability that a document is relevant * to a given query. * `relevance_score`: semantic relevance adjustment that * uses a proprietary Google model to determine the meaning and intent behind * a user's query in context with the content in the documents. * `pctr_rank`: * predicted conversion rate adjustment as a rank use predicted Click-through * rate (pCTR) to gauge the relevance and attractiveness of a search result * from a user's perspective. A higher pCTR suggests that the result is more * likely to satisfy the user's query and intent, making it a valuable signal * for ranking. * `freshness_rank`: freshness adjustment as a rank * * `document_age`: The time in hours elapsed since the document was last * updated, a floating-point number (e.g., 0.25 means 15 minutes). * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary Google * model to determine the keyword-based overlap between the query and the * document. * `base_rank`: the default rank of the result */ rankingExpression?: string; /** * Optional. The backend to use for the ranking expression evaluation. */ rankingExpressionBackend?: | "RANKING_EXPRESSION_BACKEND_UNSPECIFIED" | "BYOE" | "CLEARBOX" | "RANK_BY_EMBEDDING" | "RANK_BY_FORMULA"; /** * The Unicode country/region code (CLDR) of a location, such as "US" and * "419". For more information, see [Standard * fields](https://cloud.google.com/apis/design/standard_fields). If set, then * results will be boosted based on the region_code provided. */ regionCode?: string; /** * Optional. The specification for returning the relevance score. */ relevanceScoreSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceScoreSpec; /** * The relevance threshold of the search results. Default to Google defined * threshold, leveraging a balance of precision and recall to deliver both * highly accurate results and comprehensive coverage of relevant information. * This feature is not supported for healthcare search. */ relevanceThreshold?: | "RELEVANCE_THRESHOLD_UNSPECIFIED" | "LOWEST" | "LOW" | "MEDIUM" | "HIGH"; /** * Whether to turn on safe search. This is only supported for website search. */ safeSearch?: boolean; /** * Optional. SearchAddonSpec is used to disable add-ons for search as per new * repricing model. This field is only supported for search requests. */ searchAddonSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestSearchAddonSpec; /** * Search as you type configuration. Only supported for the * IndustryVertical.MEDIA vertical. */ searchAsYouTypeSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec; /** * Required. The resource name of the Search serving config, such as * `projects/*\/locations/global/collections/default_collection/engines/*\/servingConfigs/default_serving_config`, * or * `projects/*\/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. * This field is used to identify the serving configuration name, set of * models used to make the search. */ servingConfig?: string; /** * The session resource name. Optional. Session allows users to do multi-turn * /search API calls or coordination between /search API calls and /answer API * calls. Example #1 (multi-turn /search API calls): Call /search API with the * session ID generated in the first call. Here, the previous search query * gets considered in query standing. I.e., if the first query is "How did * Alphabet do in 2022?" and the current query is "How about 2023?", the * current query will be interpreted as "How did Alphabet do in 2023?". * Example #2 (coordination between /search API calls and /answer API calls): * Call /answer API with the session ID generated in the first call. Here, the * answer generation happens in the context of the search results from the * first search call. Multi-turn Search feature is currently at private GA * stage. Please use v1alpha or v1beta version instead before we launch this * feature to public GA. Or ask for allowlisting through Google Support team. */ session?: string; /** * Session specification. Can be used only when `session` is set. */ sessionSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec; /** * The spell correction specification that specifies the mode under which * spell correction takes effect. */ spellCorrectionSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec; /** * Information about the end user. Highly recommended for analytics and * personalization. UserInfo.user_agent is used to deduce `device_type` for * analytics. */ userInfo?: GoogleCloudDiscoveryengineV1betaUserInfo; /** * The user labels applied to a resource must meet the following * requirements: * Each resource can have multiple labels, up to a maximum of * 64. * Each label must be a key-value pair. * Keys have a minimum length of * 1 character and a maximum length of 63 characters and cannot be empty. * Values can be empty and have a maximum length of 63 characters. * Keys and * values can contain only lowercase letters, numeric characters, underscores, * and dashes. All characters must use UTF-8 encoding, and international * characters are allowed. * The key portion of a label must be unique. * However, you can use the same key with multiple resources. * Keys must * start with a lowercase letter or international character. See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. */ userLabels?: { [key: string]: string }; /** * Optional. A unique identifier for tracking visitors. For example, this * could be implemented with an HTTP cookie, which should be able to uniquely * identify a visitor on a single device. This unique identifier should not * change if the visitor logs in or out of the website. This field should NOT * have a fixed value such as `unknown_visitor`. This should be the same * identifier as UserEvent.user_pseudo_id and * CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ userPseudoId?: string; } /** * Boost specification to boost certain documents. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec { /** * Condition boost specifications. If a document matches multiple conditions * in the specifications, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of specifications * is 20. */ conditionBoostSpecs?: GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec[]; } /** * Boost applies to documents which match a condition. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec { /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. Setting to 1.0 gives the document a * big promotion. However, it does not necessarily mean that the boosted * document will be the top result at all times, nor that other documents will * be excluded. Results could still be shown even when none of them matches * the condition. And results that are significantly more relevant to the * search query can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results that * are deeply relevant might still be shown. The document will have an * upstream battle to get a fairly high ranking, but it is not blocked out * completely. Setting to 0.0 means no boost applied. The boosting condition * is ignored. Only one of the (condition, boost) combination or the * boost_control_spec below are set. If both are set then the global boost is * ignored and the more fine-grained boost_control_spec is applied. */ boost?: number; /** * Complex specification for custom ranking based on customer defined * attribute value. */ boostControlSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec; /** * An expression which specifies a boost condition. The syntax and supported * fields are the same as a filter expression. See SearchRequest.filter for * detail syntax and limitations. Examples: * To boost documents with document * ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: * ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` */ condition?: string; } /** * Specification for custom ranking based on customer specified attribute * value. It provides more controls for customized ranking than the simple * (condition, boost) combination above. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec { /** * The attribute type to be used to determine the boost amount. The attribute * value can be derived from the field value of the specified field_name. In * the case of numerical it is straightforward i.e. attribute_value = * numerical_field_value. In the case of freshness however, attribute_value = * (time.now() - datetime_field_value). */ attributeType?: | "ATTRIBUTE_TYPE_UNSPECIFIED" | "NUMERICAL" | "FRESHNESS"; /** * The control points used to define the curve. The monotonic function * (defined through the interpolation_type above) passes through the control * points listed here. */ controlPoints?: GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint[]; /** * The name of the field whose value will be used to determine the boost * amount. */ fieldName?: string; /** * The interpolation type to be applied to connect the control points listed * below. */ interpolationType?: | "INTERPOLATION_TYPE_UNSPECIFIED" | "LINEAR"; } /** * The control points used to define the curve. The curve defined through these * control points can only be monotonically increasing or decreasing(constant * values are acceptable). */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint { /** * Can be one of: 1. The numerical field value. 2. The duration spec for * freshness: The value must be formatted as an XSD `dayTimeDuration` value (a * restricted subset of an ISO 8601 duration value). The pattern for this is: * `nDnM]`. */ attributeValue?: string; /** * The value between -1 to 1 by which to boost the score if the * attribute_value evaluates to the value specified above. */ boostAmount?: number; } /** * A specification for configuring the behavior of content search. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec { /** * Specifies the chunk spec to be returned from the search response. Only * available if the SearchRequest.ContentSearchSpec.search_result_mode is set * to CHUNKS */ chunkSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec; /** * If there is no extractive_content_spec provided, there will be no * extractive answer in the search response. */ extractiveContentSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec; /** * Specifies the search result mode. If unspecified, the search result mode * defaults to `DOCUMENTS`. */ searchResultMode?: | "SEARCH_RESULT_MODE_UNSPECIFIED" | "DOCUMENTS" | "CHUNKS"; /** * If `snippetSpec` is not specified, snippets are not included in the search * response. */ snippetSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec; /** * If `summarySpec` is not specified, summaries are not included in the * search response. */ summarySpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec; } /** * Specifies the chunk spec to be returned from the search response. Only * available if the SearchRequest.ContentSearchSpec.search_result_mode is set to * CHUNKS */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec { /** * The number of next chunks to be returned of the current chunk. The maximum * allowed value is 3. If not specified, no next chunks will be returned. */ numNextChunks?: number; /** * The number of previous chunks to be returned of the current chunk. The * maximum allowed value is 3. If not specified, no previous chunks will be * returned. */ numPreviousChunks?: number; } /** * A specification for configuring the extractive content in a search response. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec { /** * The maximum number of extractive answers returned in each search result. * An extractive answer is a verbatim answer extracted from the original * document, which provides a precise and contextually relevant answer to the * search query. If the number of matching answers is less than the * `max_extractive_answer_count`, return all of the answers. Otherwise, return * the `max_extractive_answer_count`. At most five answers are returned for * each SearchResult. */ maxExtractiveAnswerCount?: number; /** * The max number of extractive segments returned in each search result. Only * applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED * or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is * a text segment extracted from the original document that is relevant to the * search query, and, in general, more verbose than an extractive answer. The * segment could then be used as input for LLMs to generate summaries and * answers. If the number of matching segments is less than * `max_extractive_segment_count`, return all of the segments. Otherwise, * return the `max_extractive_segment_count`. */ maxExtractiveSegmentCount?: number; /** * Return at most `num_next_segments` segments after each selected segments. */ numNextSegments?: number; /** * Specifies whether to also include the adjacent from each selected * segments. Return at most `num_previous_segments` segments before each * selected segments. */ numPreviousSegments?: number; /** * Specifies whether to return the confidence score from the extractive * segments in each search result. This feature is available only for new or * allowlisted data stores. To allowlist your data store, contact your * Customer Engineer. The default value is `false`. */ returnExtractiveSegmentScore?: boolean; } /** * A specification for configuring snippets in a search response. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec { /** * [DEPRECATED] This field is deprecated. To control snippet return, use * `return_snippet` field. For backwards compatibility, we will return snippet * if max_snippet_count > 0. */ maxSnippetCount?: number; /** * [DEPRECATED] This field is deprecated and will have no affect on the * snippet. */ referenceOnly?: boolean; /** * If `true`, then return snippet. If no snippet can be generated, we return * "No snippet is available for this page." A `snippet_status` with `SUCCESS` * or `NO_SNIPPET_AVAILABLE` will also be returned. */ returnSnippet?: boolean; } /** * A specification for configuring a summary returned in a search response. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec { /** * Specifies whether to filter out adversarial queries. The default value is * `false`. Google employs search-query classification to detect adversarial * queries. No summary is returned if the search query is classified as an * adversarial query. For example, a user might ask a question regarding * negative comments about the company or submit a query designed to generate * unsafe, policy-violating output. If this field is set to `true`, we skip * generating summaries for adversarial queries and return fallback messages * instead. */ ignoreAdversarialQuery?: boolean; /** * Optional. Specifies whether to filter out jail-breaking queries. The * default value is `false`. Google employs search-query classification to * detect jail-breaking queries. No summary is returned if the search query is * classified as a jail-breaking query. A user might add instructions to the * query to change the tone, style, language, content of the answer, or ask * the model to act as a different entity, e.g. "Reply in the tone of a * competing company's CEO". If this field is set to `true`, we skip * generating summaries for jail-breaking queries and return fallback messages * instead. */ ignoreJailBreakingQuery?: boolean; /** * Specifies whether to filter out queries that have low relevance. The * default value is `false`. If this field is set to `false`, all search * results are used regardless of relevance to generate answers. If set to * `true`, only queries with high relevance search results will generate * answers. */ ignoreLowRelevantContent?: boolean; /** * Specifies whether to filter out queries that are not summary-seeking. The * default value is `false`. Google employs search-query classification to * detect summary-seeking queries. No summary is returned if the search query * is classified as a non-summary seeking query. For example, `why is the sky * blue` and `Who is the best soccer player in the world?` are summary-seeking * queries, but `SFO airport` and `world cup 2026` are not. They are most * likely navigational queries. If this field is set to `true`, we skip * generating summaries for non-summary seeking queries and return fallback * messages instead. */ ignoreNonSummarySeekingQuery?: boolean; /** * Specifies whether to include citations in the summary. The default value * is `false`. When this field is set to `true`, summaries include in-line * citation numbers. Example summary including citations: BigQuery is Google * Cloud's fully managed and completely serverless enterprise data warehouse * [1]. BigQuery supports all data types, works across clouds, and has * built-in machine learning and business intelligence, all within a unified * platform [2, 3]. The citation numbers refer to the returned search results * and are 1-indexed. For example, [1] means that the sentence is attributed * to the first search result. [2, 3] means that the sentence is attributed to * both the second and third search results. */ includeCitations?: boolean; /** * Language code for Summary. Use language tags defined by * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an * experimental feature. */ languageCode?: string; /** * If specified, the spec will be used to modify the prompt provided to the * LLM. */ modelPromptSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec; /** * If specified, the spec will be used to modify the model specification * provided to the LLM. */ modelSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec; /** * Optional. Multimodal specification. */ multimodalSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMultiModalSpec; /** * The number of top results to generate the summary from. If the number of * results returned is less than `summaryResultCount`, the summary is * generated from all of the results. At most 10 results for documents mode, * or 50 for chunks mode, can be used to generate a summary. The chunks mode * is used when SearchRequest.ContentSearchSpec.search_result_mode is set to * CHUNKS. */ summaryResultCount?: number; /** * If true, answer will be generated from most relevant chunks from top * search results. This feature will improve summary quality. Note that with * this feature enabled, not all top search results will be referenced and * included in the reference list, so the citation source index only points to * the search results listed in the reference list. */ useSemanticChunks?: boolean; } /** * Specification of the prompt to use with the model. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec { /** * Text at the beginning of the prompt that instructs the assistant. Examples * are available in the user guide. */ preamble?: string; } /** * Specification of the model. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec { /** * The model version used to generate the summary. Supported values are: * * `stable`: string. Default value when no value is specified. Uses a * generally available, fine-tuned model. For more information, see [Answer * generation model versions and * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * `preview`: string. (Public preview) Uses a preview model. For more * information, see [Answer generation model versions and * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). */ version?: string; } /** * Multimodal specification: Will return an image from specified source. If * multiple sources are specified, the pick is a quality based decision. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMultiModalSpec { /** * Optional. Source of image returned in the answer. */ imageSource?: | "IMAGE_SOURCE_UNSPECIFIED" | "ALL_AVAILABLE_SOURCES" | "CORPUS_IMAGE_ONLY" | "FIGURE_GENERATION_ONLY"; } /** * A struct to define data stores to filter on in a search call and * configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error * is returned. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec { /** * Optional. Boost specification to boost certain documents. For more * information on boosting, see * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) */ boostSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec; /** * Optional. Custom search operators which if specified will be used to * filter results from workspace data stores. For more information on custom * search operators, see * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299). */ customSearchOperators?: string; /** * Required. Full resource name of DataStore, such as * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * The path must include the project number, project id is not supported for * this field. */ dataStore?: string; /** * Optional. Filter specification to filter documents in the data store * specified by data_store field. For more information on filtering, see * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; } /** * Specifies features for display, like match highlighting. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestDisplaySpec { /** * The condition under which match highlighting should occur. */ matchHighlightingCondition?: | "MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED" | "MATCH_HIGHLIGHTING_DISABLED" | "MATCH_HIGHLIGHTING_ENABLED"; } /** * The specification that uses customized query embedding vector to do semantic * document retrieval. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec { /** * The embedding vector used for retrieval. Limit to 1. */ embeddingVectors?: GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector[]; } /** * Embedding vector. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector { /** * Embedding field path in schema. */ fieldPath?: string; /** * Query embedding vector. */ vector?: number[]; } /** * A facet specification to perform faceted search. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec { /** * Enables dynamic position for this facet. If set to true, the position of * this facet among all facets in the response is determined automatically. If * dynamic facets are enabled, it is ordered together. If set to false, the * position of this facet in the response is the same as in the request, and * it is ranked before the facets with dynamic position enable and all dynamic * facets. For example, you may always want to have rating facet returned in * the response, but it's not necessarily to always display the rating facet * at the top. In that case, you can set enable_dynamic_position to true so * that the position of rating facet in response is determined automatically. * Another example, assuming you have the following facets in the request: * * "rating", enable_dynamic_position = true * "price", enable_dynamic_position * = false * "brands", enable_dynamic_position = false And also you have a * dynamic facets enabled, which generates a facet `gender`. Then the final * order of the facets in the response can be ("price", "brands", "rating", * "gender") or ("price", "brands", "gender", "rating") depends on how API * orders "gender" and "rating" facets. However, notice that "price" and * "brands" are always ranked at first and second position because their * enable_dynamic_position is false. */ enableDynamicPosition?: boolean; /** * List of keys to exclude when faceting. By default, FacetKey.key is not * excluded from the filter unless it is listed in this field. Listing a facet * key in this field allows its values to appear as facet results, even when * they are filtered out of search results. Using this field does not affect * what search results are returned. For example, suppose there are 100 * documents with the color facet "Red" and 200 documents with the color facet * "Blue". A query containing the filter "color:ANY("Red")" and having "color" * as FacetKey.key would by default return only "Red" documents in the search * results, and also return "Red" with count 100 as the only color facet. * Although there are also blue documents available, "Blue" would not be shown * as an available facet value. If "color" is listed in "excludedFilterKeys", * then the query returns the facet values "Red" with count 100 and "Blue" * with count 200, because the "color" key is now excluded from the filter. * Because this field doesn't affect search results, the search results are * still correctly filtered to return only "Red" documents. A maximum of 100 * values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. */ excludedFilterKeys?: string[]; /** * Required. The facet key specification. */ facetKey?: GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey; /** * Maximum facet values that are returned for this facet. If unspecified, * defaults to 20. The maximum allowed value is 300. Values above 300 are * coerced to 300. For aggregation in healthcare search, when the * [FacetKey.key] is "healthcare_aggregation_key", the limit will be * overridden to 10,000 internally, regardless of the value set here. If this * field is negative, an `INVALID_ARGUMENT` is returned. */ limit?: number; } /** * Specifies how a facet is computed. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey { /** * True to make facet keys case insensitive when getting faceting values with * prefixes or contains; false otherwise. */ caseInsensitive?: boolean; /** * Only get facet values that contain the given strings. For example, suppose * "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > * 2022". If set "contains" to "2022", the "category" facet only contains * "Action > 2022" and "Sci-Fi > 2022". Only supported on textual fields. * Maximum is 10. */ contains?: string[]; /** * Set only if values should be bucketed into intervals. Must be set for * facets with numerical values. Must not be set for facet with text values. * Maximum number of intervals is 30. */ intervals?: GoogleCloudDiscoveryengineV1betaInterval[]; /** * Required. Supported textual and numerical facet keys in Document object, * over which the facet values are computed. Facet key is case-sensitive. */ key?: string; /** * The order in which documents are returned. Allowed values are: * "count * desc", which means order by SearchResponse.Facet.values.count descending. * * "value desc", which means order by SearchResponse.Facet.values.value * descending. Only applies to textual facets. If not set, textual values are * sorted in [natural * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical * intervals are sorted in the order given by FacetSpec.FacetKey.intervals. */ orderBy?: string; /** * Only get facet values that start with the given string prefix. For * example, suppose "category" has three values "Action > 2022", "Action > * 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" * facet only contains "Action > 2022" and "Action > 2021". Only supported on * textual fields. Maximum is 10. */ prefixes?: string[]; /** * Only get facet for the given restricted values. Only supported on textual * fields. For example, suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "restricted_values" to "Action * > 2022", the "category" facet only contains "Action > 2022". Only supported * on textual fields. Maximum is 10. */ restrictedValues?: string[]; } /** * Specifies the image query input. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery { /** * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP. */ imageBytes?: string; } /** * Specification to enable natural language understanding capabilities for * search requests. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec { /** * Optional. Allowlist of fields that can be used for natural language filter * extraction. By default, if this is unspecified, all indexable fields are * eligible for natural language filter extraction (but are not guaranteed to * be used). If any fields are specified in allowed_field_names, only the * fields that are both marked as indexable in the schema and specified in the * allowlist will be eligible for natural language filter extraction. Note: * for multi-datastore search, this is not yet supported, and will be ignored. */ allowedFieldNames?: string[]; /** * Optional. Controls behavior of how extracted filters are applied to the * search. The default behavior depends on the request. For single datastore * structured search, the default is `HARD_FILTER`. For multi-datastore * search, the default behavior is `SOFT_BOOST`. Location-based filters are * always applied as hard filters, and the `SOFT_BOOST` setting will not * affect them. This field is only used if * SearchRequest.natural_language_query_understanding_spec.filter_extraction_condition * is set to FilterExtractionCondition.ENABLED. */ extractedFilterBehavior?: | "EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED" | "HARD_FILTER" | "SOFT_BOOST"; /** * The condition under which filter extraction should occur. Server behavior * defaults to `DISABLED`. */ filterExtractionCondition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "ENABLED"; /** * Field names used for location-based filtering, where geolocation filters * are detected in natural language search queries. Only valid when the * FilterExtractionCondition is set to `ENABLED`. If this field is set, it * overrides the field names set in * ServingConfig.geo_search_query_detection_field_names. */ geoSearchQueryDetectionFieldNames?: string[]; } /** * The specification for personalization. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestPersonalizationSpec { /** * The personalization mode of the search request. Defaults to Mode.AUTO. */ mode?: | "MODE_UNSPECIFIED" | "AUTO" | "DISABLED"; } /** * Specification to determine under which conditions query expansion should * occur. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec { /** * The condition under which query expansion should occur. Default to * Condition.DISABLED. */ condition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "AUTO"; /** * Whether to pin unexpanded results. If this field is set to true, * unexpanded products are always at the top of the search results, followed * by the expanded results. */ pinUnexpandedResults?: boolean; } /** * The specification for returning the document relevance score. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceScoreSpec { /** * Optional. Whether to return the relevance score for search results. The * higher the score, the more relevant the document is to the query. */ returnRelevanceScore?: boolean; } /** * SearchAddonSpec is used to disable add-ons for search as per new repricing * model. By default if the SearchAddonSpec is not specified, we consider that * the customer wants to enable them wherever applicable. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestSearchAddonSpec { /** * Optional. If true, generative answer add-on is disabled. Generative answer * add-on includes natural language to filters and simple answers. */ disableGenerativeAnswerAddOn?: boolean; /** * Optional. If true, disables event re-ranking and personalization to * optimize KPIs & personalize results. */ disableKpiPersonalizationAddOn?: boolean; /** * Optional. If true, semantic add-on is disabled. Semantic add-on includes * embeddings and jetstream. */ disableSemanticAddOn?: boolean; } /** * Specification for search as you type in search requests. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec { /** * The condition under which search as you type should occur. Default to * Condition.DISABLED. */ condition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "ENABLED" | "AUTO"; } /** * Session specification. Multi-turn Search feature is currently at private GA * stage. Please use v1alpha or v1beta version instead before we launch this * feature to public GA. Or ask for allowlisting through Google Support team. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec { /** * If set, the search result gets stored to the "turn" specified by this * query ID. Example: Let's say the session looks like this: session { name: * ".../sessions/xxx" turns { query { text: "What is foo?" query_id: * ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How * about bar then?" query_id: ".../questions/zzz" } } } The user can call * /search API with a request like this: session: ".../sessions/xxx" * session_spec { query_id: ".../questions/zzz" } Then, the API stores the * search result, associated with the last turn. The stored search result can * be used by a subsequent /answer API call (with the session ID and the query * ID specified). Also, it is possible to call /search and /answer in parallel * with the same session ID & query ID. */ queryId?: string; /** * The number of top search results to persist. The persisted search results * can be used for the subsequent /answer api call. This field is similar to * the `summary_result_count` field in * SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most * 10 results for documents mode, or 50 for chunks mode. */ searchResultPersistenceCount?: number; } /** * The specification for query spell correction. */ export interface GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec { /** * The mode under which spell correction replaces the original search query. * Defaults to Mode.AUTO. */ mode?: | "MODE_UNSPECIFIED" | "SUGGESTION_ONLY" | "AUTO"; } /** * Metadata related to the progress of the * CrawlRateManagementService.SetDedicatedCrawlRate operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata(data: any): GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata(data: any): GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response message for CrawlRateManagementService.SetDedicatedCrawlRate * method. It simply returns the state of the response, and an error message if * the state is FAILED. */ export interface GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse { /** * Errors from service when handling the request. */ error?: GoogleRpcStatus; /** * Output only. The state of the response. */ readonly state?: | "STATE_UNSPECIFIED" | "SUCCEEDED" | "FAILED"; } /** * Metadata for single-regional CMEKs. */ export interface GoogleCloudDiscoveryengineV1betaSingleRegionKey { /** * Required. Single-regional kms key resource name which will be used to * encrypt resources * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. */ kmsKey?: string; } /** * A sitemap for the SiteSearchEngine. */ export interface GoogleCloudDiscoveryengineV1betaSitemap { /** * Output only. The sitemap's creation time. */ readonly createTime?: Date; /** * Output only. The fully qualified resource name of the sitemap. * `projects/*\/locations/*\/collections/*\/dataStores/*\/siteSearchEngine/sitemaps/*` * The `sitemap_id` suffix is system-generated. */ readonly name?: string; /** * Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`. */ uri?: string; } /** * Verification information for target sites in advanced site search. */ export interface GoogleCloudDiscoveryengineV1betaSiteVerificationInfo { /** * Site verification state indicating the ownership and validity. */ siteVerificationState?: | "SITE_VERIFICATION_STATE_UNSPECIFIED" | "VERIFIED" | "UNVERIFIED" | "EXEMPTED"; /** * Latest site verification time. */ verifyTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaSiteVerificationInfo(data: any): GoogleCloudDiscoveryengineV1betaSiteVerificationInfo { return { ...data, verifyTime: data["verifyTime"] !== undefined ? data["verifyTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaSiteVerificationInfo(data: any): GoogleCloudDiscoveryengineV1betaSiteVerificationInfo { return { ...data, verifyTime: data["verifyTime"] !== undefined ? new Date(data["verifyTime"]) : undefined, }; } /** * A target site for the SiteSearchEngine. */ export interface GoogleCloudDiscoveryengineV1betaTargetSite { /** * Immutable. If set to false, a uri_pattern is generated to include all * pages whose address contains the provided_uri_pattern. If set to true, an * uri_pattern is generated to try to be an exact match of the * provided_uri_pattern or just the specific page if the provided_uri_pattern * is a specific one. provided_uri_pattern is always normalized to generate * the URI pattern to be used by the search engine. */ exactMatch?: boolean; /** * Output only. Failure reason. */ readonly failureReason?: GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason; /** * Output only. This is system-generated based on the provided_uri_pattern. */ readonly generatedUriPattern?: string; /** * Output only. Indexing status. */ readonly indexingStatus?: | "INDEXING_STATUS_UNSPECIFIED" | "PENDING" | "FAILED" | "SUCCEEDED" | "DELETING" | "CANCELLABLE" | "CANCELLED"; /** * Output only. The fully qualified resource name of the target site. * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` * The `target_site_id` is system-generated. */ readonly name?: string; /** * Required. Input only. The user provided URI pattern from which the * `generated_uri_pattern` is generated. */ providedUriPattern?: string; /** * Output only. Root domain of the provided_uri_pattern. */ readonly rootDomainUri?: string; /** * Output only. Site ownership and validity verification status. */ readonly siteVerificationInfo?: GoogleCloudDiscoveryengineV1betaSiteVerificationInfo; /** * The type of the target site, e.g., whether the site is to be included or * excluded. */ type?: | "TYPE_UNSPECIFIED" | "INCLUDE" | "EXCLUDE"; /** * Output only. The target site's last updated time. */ readonly updateTime?: Date; } /** * Site search indexing failure reasons. */ export interface GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason { /** * Failed due to insufficient quota. */ quotaFailure?: GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure; } function serializeGoogleCloudDiscoveryengineV1betaTargetSiteFailureReason(data: any): GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason { return { ...data, quotaFailure: data["quotaFailure"] !== undefined ? serializeGoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure(data["quotaFailure"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaTargetSiteFailureReason(data: any): GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason { return { ...data, quotaFailure: data["quotaFailure"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure(data["quotaFailure"]) : undefined, }; } /** * Failed due to insufficient quota. */ export interface GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure { /** * This number is an estimation on how much total quota this project needs to * successfully complete indexing. */ totalRequiredQuota?: bigint; } function serializeGoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure(data: any): GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure { return { ...data, totalRequiredQuota: data["totalRequiredQuota"] !== undefined ? String(data["totalRequiredQuota"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure(data: any): GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure { return { ...data, totalRequiredQuota: data["totalRequiredQuota"] !== undefined ? BigInt(data["totalRequiredQuota"]) : undefined, }; } /** * Metadata related to the progress of the TrainCustomModel operation. This is * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata(data: any): GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata(data: any): GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Response of the TrainCustomModelRequest. This message is returned by the * google.longrunning.Operations.response field. */ export interface GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse { /** * Echoes the destination for the complete errors in the request if set. */ errorConfig?: GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * A sample of errors encountered while processing the data. */ errorSamples?: GoogleRpcStatus[]; /** * The metrics of the trained model. */ metrics?: { [key: string]: number }; /** * Fully qualified name of the CustomTuningModel. */ modelName?: string; /** * The trained model status. Possible values are: * **bad-data**: The * training data quality is bad. * **no-improvement**: Tuning didn't improve * performance. Won't deploy. * **in-progress**: Model training job creation * is in progress. * **training**: Model is actively training. * * **evaluating**: The model is evaluating trained metrics. * **indexing**: * The model trained metrics are indexing. * **ready**: The model is ready for * serving. */ modelStatus?: string; } /** * Metadata associated with a tune operation. */ export interface GoogleCloudDiscoveryengineV1betaTuneEngineMetadata { /** * Required. The resource name of the engine that this tune applies to. * Format: * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}` */ engine?: string; } /** * Response associated with a tune operation. */ export interface GoogleCloudDiscoveryengineV1betaTuneEngineResponse { } /** * Metadata for UpdateSchema LRO. */ export interface GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.UpdateTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Information of an end user. */ export interface GoogleCloudDiscoveryengineV1betaUserInfo { /** * Optional. IANA time zone, e.g. Europe/Budapest. */ timeZone?: string; /** * User agent as included in the HTTP header. The field must be a UTF-8 * encoded string with a length limit of 1,000 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. This should not be set when using the * client side event reporting with GTM or JavaScript tag in * UserEventService.CollectUserEvent or if UserEvent.direct_user_request is * set. */ userAgent?: string; /** * Highly recommended for logged-in users. Unique identifier for logged-in * user, such as a user name. Don't set for anonymous users. Always use a * hashed value for this ID. Don't set the field to the same fixed ID for * different users. This mixes the event history of those users together, * which results in degraded model quality. The field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ userId?: string; } /** * User License information assigned by the admin. */ export interface GoogleCloudDiscoveryengineV1betaUserLicense { /** * Output only. User created timestamp. */ readonly createTime?: Date; /** * Output only. User last logged in time. If the user has not logged in yet, * this field will be empty. */ readonly lastLoginTime?: Date; /** * Output only. License assignment state of the user. If the user is assigned * with a license config, the user login will be assigned with the license; If * the user's license assignment state is unassigned or unspecified, no * license config will be associated to the user; */ readonly licenseAssignmentState?: | "LICENSE_ASSIGNMENT_STATE_UNSPECIFIED" | "ASSIGNED" | "UNASSIGNED" | "NO_LICENSE" | "NO_LICENSE_ATTEMPTED_LOGIN" | "BLOCKED"; /** * Optional. The full resource name of the Subscription(LicenseConfig) * assigned to the user. */ licenseConfig?: string; /** * Output only. User update timestamp. */ readonly updateTime?: Date; /** * Required. Immutable. The user principal of the User, could be email * address or other prinical identifier. This field is immutable. Admin assign * licenses based on the user principal. */ userPrincipal?: string; /** * Optional. The user profile. We user user full name(First name + Last name) * as user profile. */ userProfile?: string; } /** * Configures metadata that is used for End User entities. */ export interface GoogleCloudDiscoveryengineV1betaUserStore { /** * Optional. The default subscription LicenseConfig for the UserStore, if * UserStore.enable_license_auto_register is true, new users will * automatically register under the default subscription. If default * LicenseConfig doesn't have remaining license seats left, new users will not * be assigned with license and will be blocked for Vertex AI Search features. * This is used if `license_assignment_tier_rules` is not configured. */ defaultLicenseConfig?: string; /** * The display name of the User Store. */ displayName?: string; /** * Optional. Whether to enable license auto update for users in this User * Store. If true, users with expired licenses will automatically be updated * to use the default license config as long as the default license config has * seats left. */ enableExpiredLicenseAutoUpdate?: boolean; /** * Optional. Whether to enable license auto register for users in this User * Store. If true, new users will automatically register under the default * license config as long as the default license config has seats left. */ enableLicenseAutoRegister?: boolean; /** * Immutable. The full resource name of the User Store, in the format of * `projects/{project}/locations/{location}/userStores/{user_store}`. This * field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; } /** * Config to store data store type configuration for workspace data */ export interface GoogleCloudDiscoveryengineV1betaWorkspaceConfig { /** * Obfuscated Dasher customer ID. */ dasherCustomerId?: string; /** * Optional. The super admin email address for the workspace that will be * used for access token generation. For now we only use it for Native Google * Drive connector data ingestion. */ superAdminEmailAddress?: string; /** * Optional. The super admin service account for the workspace that will be * used for access token generation. For now we only use it for Native Google * Drive connector data ingestion. */ superAdminServiceAccount?: string; /** * The Google Workspace data source. */ type?: | "TYPE_UNSPECIFIED" | "GOOGLE_DRIVE" | "GOOGLE_MAIL" | "GOOGLE_SITES" | "GOOGLE_CALENDAR" | "GOOGLE_CHAT" | "GOOGLE_GROUPS" | "GOOGLE_KEEP" | "GOOGLE_PEOPLE"; } /** * BigQuery source import data from. */ export interface GoogleCloudDiscoveryengineV1BigQuerySource { /** * The schema to use when parsing the data from the source. Supported values * for user event imports: * `user_event` (default): One UserEvent per row. * Supported values for document imports: * `document` (default): One Document * format per row. Each document must have a valid Document.id and one of * Document.json_data or Document.struct_data. * `custom`: One custom data per * row in arbitrary format that conforms to the defined Schema of the data * store. This can only be used by the GENERIC Data Store vertical. */ dataSchema?: string; /** * Required. The BigQuery data set to copy the data from with a length limit * of 1,024 characters. */ datasetId?: string; /** * Intermediate Cloud Storage directory used for the import with a length * limit of 2,000 characters. Can be specified if one wants to have the * BigQuery export to a specific Cloud Storage directory. */ gcsStagingDir?: string; /** * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. */ partitionDate?: GoogleTypeDate; /** * The project ID or the project number that contains the BigQuery source. * Has a length limit of 128 characters. If not specified, inherits the * project ID from the parent request. */ projectId?: string; /** * Required. The BigQuery table to copy the data from with a length limit of * 1,024 characters. */ tableId?: string; } /** * The Bigtable Options object that contains information to support the import. */ export interface GoogleCloudDiscoveryengineV1BigtableOptions { /** * The mapping from family names to an object that contains column families * level information for the given column family. If a family is not present * in this map it will be ignored. */ families?: { [key: string]: GoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumnFamily }; /** * The field name used for saving row key value in the document. The name has * to match the pattern `a-zA-Z0-9*`. */ keyFieldName?: string; } function serializeGoogleCloudDiscoveryengineV1BigtableOptions(data: any): GoogleCloudDiscoveryengineV1BigtableOptions { return { ...data, families: data["families"] !== undefined ? Object.fromEntries(Object.entries(data["families"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumnFamily(v)]))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BigtableOptions(data: any): GoogleCloudDiscoveryengineV1BigtableOptions { return { ...data, families: data["families"] !== undefined ? Object.fromEntries(Object.entries(data["families"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumnFamily(v)]))) : undefined, }; } /** * The column of the Bigtable. */ export interface GoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumn { /** * The encoding mode of the values when the type is not `STRING`. Acceptable * encoding values are: * `TEXT`: indicates values are alphanumeric text * strings. * `BINARY`: indicates values are encoded using `HBase * Bytes.toBytes` family of functions. This can be overridden for a specific * column by listing that column in `columns` and specifying an encoding for * it. */ encoding?: | "ENCODING_UNSPECIFIED" | "TEXT" | "BINARY"; /** * The field name to use for this column in the document. The name has to * match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the qualifier * bytes with best effort. However, due to different naming patterns, field * name collisions could happen, where parsing behavior is undefined. */ fieldName?: string; /** * Required. Qualifier of the column. If it cannot be decoded with utf-8, use * a base-64 encoded string instead. */ qualifier?: Uint8Array; /** * The type of values in this column family. The values are expected to be * encoded using `HBase Bytes.toBytes` function when the encoding value is set * to `BINARY`. */ type?: | "TYPE_UNSPECIFIED" | "STRING" | "NUMBER" | "INTEGER" | "VAR_INTEGER" | "BIG_NUMERIC" | "BOOLEAN" | "JSON"; } function serializeGoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumn(data: any): GoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumn { return { ...data, qualifier: data["qualifier"] !== undefined ? encodeBase64(data["qualifier"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumn(data: any): GoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumn { return { ...data, qualifier: data["qualifier"] !== undefined ? decodeBase64(data["qualifier"] as string) : undefined, }; } /** * The column family of the Bigtable. */ export interface GoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumnFamily { /** * The list of objects that contains column level information for each * column. If a column is not present in this list it will be ignored. */ columns?: GoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumn[]; /** * The encoding mode of the values when the type is not STRING. Acceptable * encoding values are: * `TEXT`: indicates values are alphanumeric text * strings. * `BINARY`: indicates values are encoded using `HBase * Bytes.toBytes` family of functions. This can be overridden for a specific * column by listing that column in `columns` and specifying an encoding for * it. */ encoding?: | "ENCODING_UNSPECIFIED" | "TEXT" | "BINARY"; /** * The field name to use for this column family in the document. The name has * to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the family * name with best effort. However, due to different naming patterns, field * name collisions could happen, where parsing behavior is undefined. */ fieldName?: string; /** * The type of values in this column family. The values are expected to be * encoded using `HBase Bytes.toBytes` function when the encoding value is set * to `BINARY`. */ type?: | "TYPE_UNSPECIFIED" | "STRING" | "NUMBER" | "INTEGER" | "VAR_INTEGER" | "BIG_NUMERIC" | "BOOLEAN" | "JSON"; } function serializeGoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumnFamily(data: any): GoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumnFamily { return { ...data, columns: data["columns"] !== undefined ? data["columns"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumn(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumnFamily(data: any): GoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumnFamily { return { ...data, columns: data["columns"] !== undefined ? data["columns"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1BigtableOptionsBigtableColumn(item))) : undefined, }; } /** * The Cloud Bigtable source for importing data. */ export interface GoogleCloudDiscoveryengineV1BigtableSource { /** * Required. Bigtable options that contains information needed when parsing * data into typed structures. For example, column type annotations. */ bigtableOptions?: GoogleCloudDiscoveryengineV1BigtableOptions; /** * Required. The instance ID of the Cloud Bigtable that needs to be imported. */ instanceId?: string; /** * The project ID that contains the Bigtable source. Has a length limit of * 128 characters. If not specified, inherits the project ID from the parent * request. */ projectId?: string; /** * Required. The table ID of the Cloud Bigtable that needs to be imported. */ tableId?: string; } function serializeGoogleCloudDiscoveryengineV1BigtableSource(data: any): GoogleCloudDiscoveryengineV1BigtableSource { return { ...data, bigtableOptions: data["bigtableOptions"] !== undefined ? serializeGoogleCloudDiscoveryengineV1BigtableOptions(data["bigtableOptions"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1BigtableSource(data: any): GoogleCloudDiscoveryengineV1BigtableSource { return { ...data, bigtableOptions: data["bigtableOptions"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1BigtableOptions(data["bigtableOptions"]) : undefined, }; } /** * Request message for GroundedGenerationService.CheckGrounding method. */ export interface GoogleCloudDiscoveryengineV1CheckGroundingRequest { /** * Answer candidate to check. It can have a maximum length of 4096 tokens. */ answerCandidate?: string; /** * List of facts for the grounding check. We support up to 200 facts. */ facts?: GoogleCloudDiscoveryengineV1GroundingFact[]; /** * Configuration of the grounding check. */ groundingSpec?: GoogleCloudDiscoveryengineV1CheckGroundingSpec; /** * The user labels applied to a resource must meet the following * requirements: * Each resource can have multiple labels, up to a maximum of * 64. * Each label must be a key-value pair. * Keys have a minimum length of * 1 character and a maximum length of 63 characters and cannot be empty. * Values can be empty and have a maximum length of 63 characters. * Keys and * values can contain only lowercase letters, numeric characters, underscores, * and dashes. All characters must use UTF-8 encoding, and international * characters are allowed. * The key portion of a label must be unique. * However, you can use the same key with multiple resources. * Keys must * start with a lowercase letter or international character. See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. */ userLabels?: { [key: string]: string }; } /** * Response message for the GroundedGenerationService.CheckGrounding method. */ export interface GoogleCloudDiscoveryengineV1CheckGroundingResponse { /** * List of facts cited across all claims in the answer candidate. These are * derived from the facts supplied in the request. */ citedChunks?: GoogleCloudDiscoveryengineV1FactChunk[]; /** * List of facts cited across all claims in the answer candidate. These are * derived from the facts supplied in the request. */ citedFacts?: GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk[]; /** * Claim texts and citation info across all claims in the answer candidate. */ claims?: GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim[]; /** * The support score for the input answer candidate. Higher the score, higher * is the fraction of claims that are supported by the provided facts. This is * always set when a response is returned. */ supportScore?: number; } /** * Fact chunk for grounding check. */ export interface GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk { /** * Text content of the fact chunk. Can be at most 10K characters long. */ chunkText?: string; } /** * Text and citation info for a claim in the answer candidate. */ export interface GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim { /** * A list of indices (into 'cited_chunks') specifying the citations * associated with the claim. For instance [1,3,4] means that cited_chunks[1], * cited_chunks[3], cited_chunks[4] are the facts cited supporting for the * claim. A citation to a fact indicates that the claim is supported by the * fact. */ citationIndices?: number[]; /** * Text for the claim in the answer candidate. Always provided regardless of * whether citations or anti-citations are found. */ claimText?: string; /** * Position indicating the end of the claim in the answer candidate, * exclusive, in bytes. Note that this is not measured in characters and, * therefore, must be rendered as such. For example, if the claim text * contains non-ASCII characters, the start and end positions vary when * measured in characters (programming-language-dependent) and when measured * in bytes (programming-language-independent). */ endPos?: number; /** * Indicates that this claim required grounding check. When the system * decided this claim doesn't require attribution/grounding check, this field * will be set to false. In that case, no grounding check was done for the * claim and therefore citation_indices should not be returned. */ groundingCheckRequired?: boolean; /** * Confidence score for the claim in the answer candidate, in the range of * [0, 1]. This is set only when * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true. */ score?: number; /** * Position indicating the start of the claim in the answer candidate, * measured in bytes. Note that this is not measured in characters and, * therefore, must be rendered in the user interface keeping in mind that some * characters may take more than one byte. For example, if the claim text * contains non-ASCII characters, the start and end positions vary when * measured in characters (programming-language-dependent) and when measured * in bytes (programming-language-independent). */ startPos?: number; } /** * Specification for the grounding check. */ export interface GoogleCloudDiscoveryengineV1CheckGroundingSpec { /** * The threshold (in [0,1]) used for determining whether a fact must be cited * for a claim in the answer candidate. Choosing a higher threshold will lead * to fewer but very strong citations, while choosing a lower threshold may * lead to more but somewhat weaker citations. If unset, the threshold will * default to 0.6. */ citationThreshold?: number; /** * The control flag that enables claim-level grounding score in the response. */ enableClaimLevelScore?: boolean; } /** * Chunk captures all raw metadata information of items to be recommended or * searched in the chunk mode. */ export interface GoogleCloudDiscoveryengineV1Chunk { /** * Output only. Annotation contents if the current chunk contains * annotations. */ readonly annotationContents?: string[]; /** * Output only. The annotation metadata includes structured content in the * current chunk. */ readonly annotationMetadata?: GoogleCloudDiscoveryengineV1ChunkAnnotationMetadata[]; /** * Output only. Metadata of the current chunk. */ readonly chunkMetadata?: GoogleCloudDiscoveryengineV1ChunkChunkMetadata; /** * Content is a string from a document (parsed content). */ content?: string; /** * Output only. Image Data URLs if the current chunk contains images. Data * URLs are composed of four parts: a prefix (data:), a MIME type indicating * the type of data, an optional base64 token if non-textual, and the data * itself: data:, */ readonly dataUrls?: string[]; /** * Output only. This field is OUTPUT_ONLY. It contains derived data that are * not in the original input document. */ readonly derivedStructData?: { [key: string]: any }; /** * Metadata of the document from the current chunk. */ documentMetadata?: GoogleCloudDiscoveryengineV1ChunkDocumentMetadata; /** * Unique chunk ID of the current chunk. */ id?: string; /** * The full resource name of the chunk. Format: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * Page span of the chunk. */ pageSpan?: GoogleCloudDiscoveryengineV1ChunkPageSpan; /** * Output only. Represents the relevance score based on similarity. Higher * score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. * Only populated on SearchResponse. */ readonly relevanceScore?: number; } /** * The annotation metadata includes structured content in the current chunk. */ export interface GoogleCloudDiscoveryengineV1ChunkAnnotationMetadata { /** * Output only. Image id is provided if the structured content is based on an * image. */ readonly imageId?: string; /** * Output only. The structured content information. */ readonly structuredContent?: GoogleCloudDiscoveryengineV1ChunkStructuredContent; } /** * Metadata of the current chunk. This field is only populated on * SearchService.Search API. */ export interface GoogleCloudDiscoveryengineV1ChunkChunkMetadata { /** * The next chunks of the current chunk. The number is controlled by * SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is * only populated on SearchService.Search API. */ nextChunks?: GoogleCloudDiscoveryengineV1Chunk[]; /** * The previous chunks of the current chunk. The number is controlled by * SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This field * is only populated on SearchService.Search API. */ previousChunks?: GoogleCloudDiscoveryengineV1Chunk[]; } /** * Document metadata contains the information of the document of the current * chunk. */ export interface GoogleCloudDiscoveryengineV1ChunkDocumentMetadata { /** * The mime type of the document. * https://www.iana.org/assignments/media-types/media-types.xhtml. */ mimeType?: string; /** * Data representation. The structured JSON data for the document. It should * conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. */ structData?: { [key: string]: any }; /** * Title of the document. */ title?: string; /** * Uri of the document. */ uri?: string; } /** * Page span of the chunk. */ export interface GoogleCloudDiscoveryengineV1ChunkPageSpan { /** * The end page of the chunk. */ pageEnd?: number; /** * The start page of the chunk. */ pageStart?: number; } /** * The structured content information. */ export interface GoogleCloudDiscoveryengineV1ChunkStructuredContent { /** * Output only. The content of the structured content. */ readonly content?: string; /** * Output only. The structure type of the structured content. */ readonly structureType?: | "STRUCTURE_TYPE_UNSPECIFIED" | "SHAREHOLDER_STRUCTURE" | "SIGNATURE_STRUCTURE" | "CHECKBOX_STRUCTURE"; } /** * Source attributions for content. */ export interface GoogleCloudDiscoveryengineV1Citation { /** * Output only. End index into the content. */ readonly endIndex?: number; /** * Output only. License of the attribution. */ readonly license?: string; /** * Output only. Publication date of the attribution. */ readonly publicationDate?: GoogleTypeDate; /** * Output only. Start index into the content. */ readonly startIndex?: number; /** * Output only. Title of the attribution. */ readonly title?: string; /** * Output only. Url reference of the attribution. */ readonly uri?: string; } /** * A collection of source attributions for a piece of content. */ export interface GoogleCloudDiscoveryengineV1CitationMetadata { /** * Output only. List of citations. */ readonly citations?: GoogleCloudDiscoveryengineV1Citation[]; } /** * Cloud SQL source import data from. */ export interface GoogleCloudDiscoveryengineV1CloudSqlSource { /** * Required. The Cloud SQL database to copy the data from with a length limit * of 256 characters. */ databaseId?: string; /** * Intermediate Cloud Storage directory used for the import with a length * limit of 2,000 characters. Can be specified if one wants to have the Cloud * SQL export to a specific Cloud Storage directory. Ensure that the Cloud SQL * service account has the necessary Cloud Storage Admin permissions to access * the specified Cloud Storage directory. */ gcsStagingDir?: string; /** * Required. The Cloud SQL instance to copy the data from with a length limit * of 256 characters. */ instanceId?: string; /** * Option for serverless export. Enabling this option will incur additional * cost. More info can be found * [here](https://cloud.google.com/sql/pricing#serverless). */ offload?: boolean; /** * The project ID that contains the Cloud SQL source. Has a length limit of * 128 characters. If not specified, inherits the project ID from the parent * request. */ projectId?: string; /** * Required. The Cloud SQL table to copy the data from with a length limit of * 256 characters. */ tableId?: string; } /** * Configurations used to enable CMEK data encryption with Cloud KMS keys. */ export interface GoogleCloudDiscoveryengineV1CmekConfig { /** * Output only. The default CmekConfig for the Customer. */ readonly isDefault?: boolean; /** * Required. KMS key resource name which will be used to encrypt resources * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. */ kmsKey?: string; /** * Output only. KMS key version resource name which will be used to encrypt * resources `/cryptoKeyVersions/{keyVersion}`. */ readonly kmsKeyVersion?: string; /** * Output only. The timestamp of the last key rotation. */ readonly lastRotationTimestampMicros?: bigint; /** * Required. The name of the CmekConfig of the form * `projects/{project}/locations/{location}/cmekConfig` or * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. */ name?: string; /** * Output only. Whether the NotebookLM Corpus is ready to be used. */ readonly notebooklmState?: | "NOTEBOOK_LM_STATE_UNSPECIFIED" | "NOTEBOOK_LM_NOT_READY" | "NOTEBOOK_LM_READY" | "NOTEBOOK_LM_NOT_ENABLED"; /** * Optional. Single-regional CMEKs that are required for some VAIS features. */ singleRegionKeys?: GoogleCloudDiscoveryengineV1SingleRegionKey[]; /** * Output only. The states of the CmekConfig. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "KEY_ISSUE" | "DELETING" | "DELETE_FAILED" | "UNUSABLE" | "ACTIVE_ROTATING" | "DELETED" | "EXPIRED"; } /** * Collection is a container for configuring resources and access to a set of * DataStores. */ export interface GoogleCloudDiscoveryengineV1Collection { /** * Output only. Timestamp the Collection was created at. */ readonly createTime?: Date; /** * Required. The Collection display name. This field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * INVALID_ARGUMENT error is returned. */ displayName?: string; /** * Immutable. The full resource name of the Collection. Format: * `projects/{project}/locations/{location}/collections/{collection_id}`. This * field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; } /** * Response message for CompletionService.CompleteQuery method. */ export interface GoogleCloudDiscoveryengineV1CompleteQueryResponse { /** * Results of the matched query suggestions. The result list is ordered and * the first result is a top suggestion. */ querySuggestions?: GoogleCloudDiscoveryengineV1CompleteQueryResponseQuerySuggestion[]; /** * True if the returned suggestions are all tail suggestions. For tail * matching to be triggered, include_tail_suggestions in the request must be * true and there must be no suggestions that match the full query. */ tailMatchTriggered?: boolean; } /** * Suggestions as search queries. */ export interface GoogleCloudDiscoveryengineV1CompleteQueryResponseQuerySuggestion { /** * The unique document field paths that serve as the source of this * suggestion if it was generated from completable fields. This field is only * populated for the document-completable model. */ completableFieldPaths?: string[]; /** * The suggestion for the query. */ suggestion?: string; } /** * Detailed completion information including completion attribution token and * clicked completion info. */ export interface GoogleCloudDiscoveryengineV1CompletionInfo { /** * End user selected CompleteQueryResponse.QuerySuggestion.suggestion * position, starting from 0. */ selectedPosition?: number; /** * End user selected CompleteQueryResponse.QuerySuggestion.suggestion. */ selectedSuggestion?: string; } /** * Autocomplete suggestions that are imported from Customer. */ export interface GoogleCloudDiscoveryengineV1CompletionSuggestion { /** * Alternative matching phrases for this suggestion. */ alternativePhrases?: string[]; /** * Frequency of this suggestion. Will be used to rank suggestions when score * is not available. */ frequency?: bigint; /** * Global score of this suggestion. Control how this suggestion would be * scored / ranked. */ globalScore?: number; /** * If two suggestions have the same groupId, they will not be returned * together. Instead the one ranked higher will be returned. This can be used * to deduplicate semantically identical suggestions. */ groupId?: string; /** * The score of this suggestion within its group. */ groupScore?: number; /** * BCP-47 language code of this suggestion. */ languageCode?: string; /** * Required. The suggestion text. */ suggestion?: string; } function serializeGoogleCloudDiscoveryengineV1CompletionSuggestion(data: any): GoogleCloudDiscoveryengineV1CompletionSuggestion { return { ...data, frequency: data["frequency"] !== undefined ? String(data["frequency"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1CompletionSuggestion(data: any): GoogleCloudDiscoveryengineV1CompletionSuggestion { return { ...data, frequency: data["frequency"] !== undefined ? BigInt(data["frequency"]) : undefined, }; } /** * Defines circumstances to be checked before allowing a behavior */ export interface GoogleCloudDiscoveryengineV1Condition { /** * Range of time(s) specifying when condition is active. Maximum of 10 time * ranges. */ activeTimeRange?: GoogleCloudDiscoveryengineV1ConditionTimeRange[]; /** * Optional. Query regex to match the whole search query. Cannot be set when * Condition.query_terms is set. Only supported for Basic Site Search * promotion serving controls. */ queryRegex?: string; /** * Search only A list of terms to match the query on. Cannot be set when * Condition.query_regex is set. Maximum of 10 query terms. */ queryTerms?: GoogleCloudDiscoveryengineV1ConditionQueryTerm[]; } function serializeGoogleCloudDiscoveryengineV1Condition(data: any): GoogleCloudDiscoveryengineV1Condition { return { ...data, activeTimeRange: data["activeTimeRange"] !== undefined ? data["activeTimeRange"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1ConditionTimeRange(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1Condition(data: any): GoogleCloudDiscoveryengineV1Condition { return { ...data, activeTimeRange: data["activeTimeRange"] !== undefined ? data["activeTimeRange"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1ConditionTimeRange(item))) : undefined, }; } /** * Matcher for search request query */ export interface GoogleCloudDiscoveryengineV1ConditionQueryTerm { /** * Whether the search query needs to exactly match the query term. */ fullMatch?: boolean; /** * The specific query value to match against Must be lowercase, must be * UTF-8. Can have at most 3 space separated terms if full_match is true. * Cannot be an empty string. Maximum length of 5000 characters. */ value?: string; } /** * Used for time-dependent conditions. */ export interface GoogleCloudDiscoveryengineV1ConditionTimeRange { /** * End of time range. Range is inclusive. Must be in the future. */ endTime?: Date; /** * Start of time range. Range is inclusive. */ startTime?: Date; } function serializeGoogleCloudDiscoveryengineV1ConditionTimeRange(data: any): GoogleCloudDiscoveryengineV1ConditionTimeRange { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ConditionTimeRange(data: any): GoogleCloudDiscoveryengineV1ConditionTimeRange { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Defines a conditioned behavior to employ during serving. Must be attached to * a ServingConfig to be considered at serving time. Permitted actions dependent * on `SolutionType`. */ export interface GoogleCloudDiscoveryengineV1Control { /** * Output only. List of all ServingConfig IDs this control is attached to. * May take up to 10 minutes to update after changes. */ readonly associatedServingConfigIds?: string[]; /** * Defines a boost-type control */ boostAction?: GoogleCloudDiscoveryengineV1ControlBoostAction; /** * Determines when the associated action will trigger. Omit to always apply * the action. Currently only a single condition may be specified. Otherwise * an INVALID ARGUMENT error is thrown. */ conditions?: GoogleCloudDiscoveryengineV1Condition[]; /** * Required. Human readable name. The identifier used in UI views. Must be * UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID * ARGUMENT error is thrown. */ displayName?: string; /** * Defines a filter-type control Currently not supported by Recommendation */ filterAction?: GoogleCloudDiscoveryengineV1ControlFilterAction; /** * Immutable. Fully qualified name * `projects/*\/locations/global/dataStore/*\/controls/*` */ name?: string; /** * Promote certain links based on predefined trigger queries. */ promoteAction?: GoogleCloudDiscoveryengineV1ControlPromoteAction; /** * Defines a redirect-type control. */ redirectAction?: GoogleCloudDiscoveryengineV1ControlRedirectAction; /** * Required. Immutable. What solution the control belongs to. Must be * compatible with vertical of resource. Otherwise an INVALID ARGUMENT error * is thrown. */ solutionType?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"; /** * Treats a group of terms as synonyms of one another. */ synonymsAction?: GoogleCloudDiscoveryengineV1ControlSynonymsAction; /** * Specifies the use case for the control. Affects what condition fields can * be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use * case per control. Must be set when solution_type is * SolutionType.SOLUTION_TYPE_SEARCH. */ useCases?: | "SEARCH_USE_CASE_UNSPECIFIED" | "SEARCH_USE_CASE_SEARCH" | "SEARCH_USE_CASE_BROWSE"[]; } function serializeGoogleCloudDiscoveryengineV1Control(data: any): GoogleCloudDiscoveryengineV1Control { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1Condition(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1Control(data: any): GoogleCloudDiscoveryengineV1Control { return { ...data, conditions: data["conditions"] !== undefined ? data["conditions"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1Condition(item))) : undefined, }; } /** * Adjusts order of products in returned list. */ export interface GoogleCloudDiscoveryengineV1ControlBoostAction { /** * Strength of the boost, which should be in [-1, 1]. Negative boost means * demotion. Default is 0.0 (No-op). */ boost?: number; /** * Required. Specifies which data store's documents can be boosted by this * control. Full data store name e.g. * projects/123/locations/global/collections/default_collection/dataStores/default_data_store */ dataStore?: string; /** * Required. Specifies which products to apply the boost to. If no filter is * provided all products will be boosted (No-op). Syntax documentation: * https://cloud.google.com/retail/docs/filter-and-order Maximum length is * 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. */ filter?: string; /** * Optional. Strength of the boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0 (No-op). */ fixedBoost?: number; /** * Optional. Complex specification for custom ranking based on customer * defined attribute value. */ interpolationBoostSpec?: GoogleCloudDiscoveryengineV1ControlBoostActionInterpolationBoostSpec; } /** * Specification for custom ranking based on customer specified attribute * value. It provides more controls for customized ranking than the simple * (condition, boost) combination above. */ export interface GoogleCloudDiscoveryengineV1ControlBoostActionInterpolationBoostSpec { /** * Optional. The attribute type to be used to determine the boost amount. The * attribute value can be derived from the field value of the specified * field_name. In the case of numerical it is straightforward i.e. * attribute_value = numerical_field_value. In the case of freshness however, * attribute_value = (time.now() - datetime_field_value). */ attributeType?: | "ATTRIBUTE_TYPE_UNSPECIFIED" | "NUMERICAL" | "FRESHNESS"; /** * Optional. The control points used to define the curve. The monotonic * function (defined through the interpolation_type above) passes through the * control points listed here. */ controlPoints?: GoogleCloudDiscoveryengineV1ControlBoostActionInterpolationBoostSpecControlPoint[]; /** * Optional. The name of the field whose value will be used to determine the * boost amount. */ fieldName?: string; /** * Optional. The interpolation type to be applied to connect the control * points listed below. */ interpolationType?: | "INTERPOLATION_TYPE_UNSPECIFIED" | "LINEAR"; } /** * The control points used to define the curve. The curve defined through these * control points can only be monotonically increasing or decreasing(constant * values are acceptable). */ export interface GoogleCloudDiscoveryengineV1ControlBoostActionInterpolationBoostSpecControlPoint { /** * Optional. Can be one of: 1. The numerical field value. 2. The duration * spec for freshness: The value must be formatted as an XSD `dayTimeDuration` * value (a restricted subset of an ISO 8601 duration value). The pattern for * this is: `nDnM]`. */ attributeValue?: string; /** * Optional. The value between -1 to 1 by which to boost the score if the * attribute_value evaluates to the value specified above. */ boostAmount?: number; } /** * Specified which products may be included in results. Uses same filter as * boost. */ export interface GoogleCloudDiscoveryengineV1ControlFilterAction { /** * Required. Specifies which data store's documents can be filtered by this * control. Full data store name e.g. * projects/123/locations/global/collections/default_collection/dataStores/default_data_store */ dataStore?: string; /** * Required. A filter to apply on the matching condition results. Required * Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order * Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is * thrown. */ filter?: string; } /** * Promote certain links based on some trigger queries. Example: Promote shoe * store link when searching for `shoe` keyword. The link can be outside of * associated data store. */ export interface GoogleCloudDiscoveryengineV1ControlPromoteAction { /** * Required. Data store with which this promotion is attached to. */ dataStore?: string; /** * Required. Promotion attached to this action. */ searchLinkPromotion?: GoogleCloudDiscoveryengineV1SearchLinkPromotion; } /** * Redirects a shopper to the provided URI. */ export interface GoogleCloudDiscoveryengineV1ControlRedirectAction { /** * Required. The URI to which the shopper will be redirected. Required. URI * must have length equal or less than 2000 characters. Otherwise an INVALID * ARGUMENT error is thrown. */ redirectUri?: string; } /** * Creates a set of terms that will act as synonyms of one another. Example: * "happy" will also be considered as "glad", "glad" will also be considered as * "happy". */ export interface GoogleCloudDiscoveryengineV1ControlSynonymsAction { /** * Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at * least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. */ synonyms?: string[]; } /** * External conversation proto definition. */ export interface GoogleCloudDiscoveryengineV1Conversation { /** * Output only. The time the conversation finished. */ readonly endTime?: Date; /** * Conversation messages. */ messages?: GoogleCloudDiscoveryengineV1ConversationMessage[]; /** * Immutable. Fully qualified name * `projects/{project}/locations/global/collections/{collection}/dataStore/*\/conversations/*` * or * `projects/{project}/locations/global/collections/{collection}/engines/*\/conversations/*`. */ name?: string; /** * Output only. The time the conversation started. */ readonly startTime?: Date; /** * The state of the Conversation. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS" | "COMPLETED"; /** * A unique identifier for tracking users. */ userPseudoId?: string; } function serializeGoogleCloudDiscoveryengineV1Conversation(data: any): GoogleCloudDiscoveryengineV1Conversation { return { ...data, messages: data["messages"] !== undefined ? data["messages"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1ConversationMessage(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1Conversation(data: any): GoogleCloudDiscoveryengineV1Conversation { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, messages: data["messages"] !== undefined ? data["messages"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1ConversationMessage(item))) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Defines context of the conversation */ export interface GoogleCloudDiscoveryengineV1ConversationContext { /** * The current active document the user opened. It contains the document * resource reference. */ activeDocument?: string; /** * The current list of documents the user is seeing. It contains the document * resource references. */ contextDocuments?: string[]; } /** * Defines a conversation message. */ export interface GoogleCloudDiscoveryengineV1ConversationMessage { /** * Output only. Message creation timestamp. */ readonly createTime?: Date; /** * Search reply. */ reply?: GoogleCloudDiscoveryengineV1Reply; /** * User text input. */ userInput?: GoogleCloudDiscoveryengineV1TextInput; } function serializeGoogleCloudDiscoveryengineV1ConversationMessage(data: any): GoogleCloudDiscoveryengineV1ConversationMessage { return { ...data, reply: data["reply"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Reply(data["reply"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ConversationMessage(data: any): GoogleCloudDiscoveryengineV1ConversationMessage { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, reply: data["reply"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Reply(data["reply"]) : undefined, }; } /** * Request message for ConversationalSearchService.ConverseConversation method. */ export interface GoogleCloudDiscoveryengineV1ConverseConversationRequest { /** * Boost specification to boost certain documents in search results which may * affect the converse response. For more information on boosting, see * [Boosting](https://cloud.google.com/retail/docs/boosting#boost) */ boostSpec?: GoogleCloudDiscoveryengineV1SearchRequestBoostSpec; /** * The conversation to be used by auto session only. The name field will be * ignored as we automatically assign new name for the conversation in auto * session. */ conversation?: GoogleCloudDiscoveryengineV1Conversation; /** * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. Filter * expression is case-sensitive. This will be used to filter search results * which may affect the summary response. If this field is unrecognizable, an * `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by * mapping the LHS filter key to a key property defined in the Vertex AI * Search backend -- this mapping is defined by the customer in their schema. * For example a media customer might have a field 'name' in their schema. In * this case the filter would look like this: filter --> name:'ANY("king * kong")' For more information about filtering including syntax and filter * operators, see * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; /** * Required. Current user input. */ query?: GoogleCloudDiscoveryengineV1TextInput; /** * Whether to turn on safe search. */ safeSearch?: boolean; /** * The resource name of the Serving Config to use. Format: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` * If this is not set, the default serving config will be used. */ servingConfig?: string; /** * A specification for configuring the summary returned in the response. */ summarySpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec; /** * The user labels applied to a resource must meet the following * requirements: * Each resource can have multiple labels, up to a maximum of * 64. * Each label must be a key-value pair. * Keys have a minimum length of * 1 character and a maximum length of 63 characters and cannot be empty. * Values can be empty and have a maximum length of 63 characters. * Keys and * values can contain only lowercase letters, numeric characters, underscores, * and dashes. All characters must use UTF-8 encoding, and international * characters are allowed. * The key portion of a label must be unique. * However, you can use the same key with multiple resources. * Keys must * start with a lowercase letter or international character. See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. */ userLabels?: { [key: string]: string }; } function serializeGoogleCloudDiscoveryengineV1ConverseConversationRequest(data: any): GoogleCloudDiscoveryengineV1ConverseConversationRequest { return { ...data, conversation: data["conversation"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Conversation(data["conversation"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ConverseConversationRequest(data: any): GoogleCloudDiscoveryengineV1ConverseConversationRequest { return { ...data, conversation: data["conversation"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Conversation(data["conversation"]) : undefined, }; } /** * Response message for ConversationalSearchService.ConverseConversation * method. */ export interface GoogleCloudDiscoveryengineV1ConverseConversationResponse { /** * Updated conversation including the answer. */ conversation?: GoogleCloudDiscoveryengineV1Conversation; /** * Answer to the current query. */ reply?: GoogleCloudDiscoveryengineV1Reply; /** * Search Results. */ searchResults?: GoogleCloudDiscoveryengineV1SearchResponseSearchResult[]; } function serializeGoogleCloudDiscoveryengineV1ConverseConversationResponse(data: any): GoogleCloudDiscoveryengineV1ConverseConversationResponse { return { ...data, conversation: data["conversation"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Conversation(data["conversation"]) : undefined, reply: data["reply"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Reply(data["reply"]) : undefined, searchResults: data["searchResults"] !== undefined ? data["searchResults"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1SearchResponseSearchResult(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ConverseConversationResponse(data: any): GoogleCloudDiscoveryengineV1ConverseConversationResponse { return { ...data, conversation: data["conversation"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Conversation(data["conversation"]) : undefined, reply: data["reply"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Reply(data["reply"]) : undefined, searchResults: data["searchResults"] !== undefined ? data["searchResults"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1SearchResponseSearchResult(item))) : undefined, }; } /** * Metadata related to the progress of the DataStoreService.CreateDataStore * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1CreateDataStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1CreateDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1CreateDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1CreateDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1CreateDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the EngineService.CreateEngine * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1CreateEngineMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1CreateEngineMetadata(data: any): GoogleCloudDiscoveryengineV1CreateEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1CreateEngineMetadata(data: any): GoogleCloudDiscoveryengineV1CreateEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata for Create Schema LRO. */ export interface GoogleCloudDiscoveryengineV1CreateSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1CreateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1CreateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1CreateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1CreateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.CreateSitemap operation. This will be returned by the * google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1CreateSitemapMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1CreateSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1CreateSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1CreateSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1CreateSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.CreateTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1CreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1CreateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for SiteSearchEngineService.CreateTargetSite method. */ export interface GoogleCloudDiscoveryengineV1CreateTargetSiteRequest { /** * Required. Parent resource name of TargetSite, such as * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. */ parent?: string; /** * Required. The TargetSite to create. */ targetSite?: GoogleCloudDiscoveryengineV1TargetSite; } /** * A custom attribute that is not explicitly modeled in a resource, e.g. * UserEvent. */ export interface GoogleCloudDiscoveryengineV1CustomAttribute { /** * The numerical values of this custom attribute. For example, `[2.3, 15.4]` * when the key is "lengths_cm". Exactly one of CustomAttribute.text or * CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` * error is returned. */ numbers?: number[]; /** * The textual values of this custom attribute. For example, `["yellow", * "green"]` when the key is "color". Empty string is not allowed. Otherwise, * an `INVALID_ARGUMENT` error is returned. Exactly one of * CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, * an `INVALID_ARGUMENT` error is returned. */ text?: string[]; } /** * Metadata that describes a custom tuned model. */ export interface GoogleCloudDiscoveryengineV1CustomTuningModel { /** * Deprecated: Timestamp the Model was created at. */ createTime?: Date; /** * The display name of the model. */ displayName?: string; /** * Currently this is only populated if the model state is * `INPUT_VALIDATION_FAILED`. */ errorMessage?: string; /** * The metrics of the trained model. */ metrics?: { [key: string]: number }; /** * The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`). */ modelState?: | "MODEL_STATE_UNSPECIFIED" | "TRAINING_PAUSED" | "TRAINING" | "TRAINING_COMPLETE" | "READY_FOR_SERVING" | "TRAINING_FAILED" | "NO_IMPROVEMENT" | "INPUT_VALIDATION_FAILED"; /** * The version of the model. */ modelVersion?: bigint; /** * Required. The fully qualified resource name of the model. Format: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`. * Model must be an alpha-numerical string with limit of 40 characters. */ name?: string; /** * Timestamp the model training was initiated. */ trainingStartTime?: Date; } function serializeGoogleCloudDiscoveryengineV1CustomTuningModel(data: any): GoogleCloudDiscoveryengineV1CustomTuningModel { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, modelVersion: data["modelVersion"] !== undefined ? String(data["modelVersion"]) : undefined, trainingStartTime: data["trainingStartTime"] !== undefined ? data["trainingStartTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1CustomTuningModel(data: any): GoogleCloudDiscoveryengineV1CustomTuningModel { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, modelVersion: data["modelVersion"] !== undefined ? BigInt(data["modelVersion"]) : undefined, trainingStartTime: data["trainingStartTime"] !== undefined ? new Date(data["trainingStartTime"]) : undefined, }; } /** * Manages the connection to external data sources for all data stores grouped * under a Collection. It's a singleton resource of Collection. The * initialization is only supported through * DataConnectorService.SetUpDataConnector method, which will create a new * Collection and initialize its DataConnector. */ export interface GoogleCloudDiscoveryengineV1DataConnector { /** * Optional. Whether the connector will be created with an ACL config. * Currently this field only affects Cloud Storage and BigQuery connectors. */ aclEnabled?: boolean; /** * Optional. Action configurations to make the connector support actions. */ actionConfig?: GoogleCloudDiscoveryengineV1ActionConfig; /** * Output only. State of the action connector. This reflects whether the * action connector is initializing, active or has encountered errors. */ readonly actionState?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "FAILED" | "RUNNING" | "WARNING" | "INITIALIZATION_FAILED" | "UPDATING"; /** * Optional. The connector level alert config. */ alertPolicyConfigs?: GoogleCloudDiscoveryengineV1AlertPolicyConfig[]; /** * Optional. Indicates whether the connector is disabled for auto run. It can * be used to pause periodical and real time sync. Update: with the * introduction of incremental_sync_disabled, auto_run_disabled is used to * pause/disable only full syncs */ autoRunDisabled?: boolean; /** * Optional. The configuration for establishing a BAP connection. */ bapConfig?: GoogleCloudDiscoveryengineV1BAPConfig; /** * Output only. User actions that must be completed before the connector can * start syncing data. */ readonly blockingReasons?: | "BLOCKING_REASON_UNSPECIFIED" | "ALLOWLIST_STATIC_IP" | "ALLOWLIST_IN_SERVICE_ATTACHMENT" | "ALLOWLIST_SERVICE_ACCOUNT"[]; /** * Optional. The modes enabled for this connector. Default state is * CONNECTOR_MODE_UNSPECIFIED. */ connectorModes?: | "CONNECTOR_MODE_UNSPECIFIED" | "DATA_INGESTION" | "ACTIONS" | "FEDERATED" | "EUA" | "FEDERATED_AND_EUA"[]; /** * Output only. The type of connector. Each source can only map to one type. * For example, salesforce, confluence and jira have THIRD_PARTY connector * type. It is not mutable once set by system. */ readonly connectorType?: | "CONNECTOR_TYPE_UNSPECIFIED" | "THIRD_PARTY" | "GCP_FHIR" | "BIG_QUERY" | "GCS" | "GOOGLE_MAIL" | "GOOGLE_CALENDAR" | "GOOGLE_DRIVE" | "NATIVE_CLOUD_IDENTITY" | "THIRD_PARTY_FEDERATED" | "THIRD_PARTY_EUA" | "GCNV"; /** * Optional. Whether the END USER AUTHENTICATION connector is created in * SaaS. */ createEuaSaas?: boolean; /** * Output only. Timestamp the DataConnector was created at. */ readonly createTime?: Date; /** * Required. The name of the data source. Supported values: `salesforce`, * `jira`, `confluence`, `bigquery`. */ dataSource?: string; /** * Optional. Any target destinations used to connect to third-party services. */ destinationConfigs?: GoogleCloudDiscoveryengineV1DestinationConfig[]; /** * Optional. Any params and credentials used specifically for EUA connectors. */ endUserConfig?: GoogleCloudDiscoveryengineV1DataConnectorEndUserConfig; /** * List of entities from the connected data source to ingest. */ entities?: GoogleCloudDiscoveryengineV1DataConnectorSourceEntity[]; /** * Output only. The errors from initialization or from the latest connector * run. */ readonly errors?: GoogleRpcStatus[]; /** * Optional. Any params and credentials used specifically for hybrid * connectors supporting FEDERATED mode. This field should only be set if the * connector is a hybrid connector and we want to enable FEDERATED mode. */ federatedConfig?: GoogleCloudDiscoveryengineV1DataConnectorFederatedConfig; /** * Optional. If the connector is a hybrid connector, determines whether * ingestion is enabled and appropriate resources are provisioned during * connector creation. If the connector is not a hybrid connector, this field * is ignored. */ hybridIngestionDisabled?: boolean; /** * The refresh interval to sync the Access Control List information for the * documents ingested by this connector. If not set, the access control list * will be refreshed at the default interval of 30 minutes. The identity * refresh interval can be at least 30 minutes and at most 7 days. */ identityRefreshInterval?: number /* Duration */; /** * The configuration for the identity data synchronization runs. This * contains the refresh interval to sync the Access Control List information * for the documents ingested by this connector. */ identityScheduleConfig?: GoogleCloudDiscoveryengineV1IdentityScheduleConfig; /** * Optional. The refresh interval specifically for incremental data syncs. If * unset, incremental syncs will use the default from env, set to 3hrs. The * minimum is 30 minutes and maximum is 7 days. Applicable to only 3P * connectors. When the refresh interval is set to the same value as the * incremental refresh interval, incremental sync will be disabled. */ incrementalRefreshInterval?: number /* Duration */; /** * Optional. Indicates whether incremental syncs are paused for this * connector. This is independent of auto_run_disabled. Applicable to only 3P * connectors. When the refresh interval is set to the same value as the * incremental refresh interval, incremental sync will be disabled, i.e. set * to true. */ incrementalSyncDisabled?: boolean; /** * Required data connector parameters in json string format. */ jsonParams?: string; /** * Input only. The KMS key to be used to protect the DataStores managed by * this connector. Must be set for requests that need to comply with CMEK Org * Policy protections. If this field is set and processed successfully, the * DataStores created by this connector will be protected by the KMS key. */ kmsKeyName?: string; /** * Output only. For periodic connectors only, the last time a data sync was * completed. */ readonly lastSyncTime?: Date; /** * Output only. The most recent timestamp when this DataConnector was paused, * affecting all functionalities such as data synchronization. Pausing a * connector has the following effects: - All functionalities, including data * synchronization, are halted. - Any ongoing data synchronization job will be * canceled. - No future data synchronization runs will be scheduled nor can * be triggered. */ readonly latestPauseTime?: Date; /** * Output only. The full resource name of the Data Connector. Format: * `projects/*\/locations/*\/collections/*\/dataConnector`. */ readonly name?: string; /** * Defines the scheduled time for the next data synchronization. This field * requires hour , minute, and time_zone from the [IANA Time Zone * Database](https://www.iana.org/time-zones). This is utilized when the data * connector has a refresh interval greater than 1 day. When the hours or * minutes are not specified, we will assume a sync time of 0:00. The user * must provide a time zone to avoid ambiguity. */ nextSyncTime?: GoogleTypeDateTime; /** * Required data connector parameters in structured json format. */ params?: { [key: string]: any }; /** * Output only. The tenant project ID associated with private connectivity * connectors. This project must be allowlisted by in order for the connector * to function. */ readonly privateConnectivityProjectId?: string; /** * Output only. real-time sync state */ readonly realtimeState?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "FAILED" | "RUNNING" | "WARNING" | "INITIALIZATION_FAILED" | "UPDATING"; /** * Optional. The configuration for realtime sync. */ realtimeSyncConfig?: GoogleCloudDiscoveryengineV1DataConnectorRealtimeSyncConfig; /** * Required. The refresh interval for data sync. If duration is set to 0, the * data will be synced in real time. The streaming feature is not supported * yet. The minimum is 30 minutes and maximum is 7 days. When the refresh * interval is set to the same value as the incremental refresh interval, * incremental sync will be disabled. */ refreshInterval?: number /* Duration */; /** * Optional. Specifies keys to be removed from the 'params' field. This is * only active when 'params' is included in the 'update_mask' in an * UpdateDataConnectorRequest. Deletion takes precedence if a key is both in * 'remove_param_keys' and present in the 'params' field of the request. */ removeParamKeys?: string[]; /** * Output only. State of the connector. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "FAILED" | "RUNNING" | "WARNING" | "INITIALIZATION_FAILED" | "UPDATING"; /** * Output only. The static IP addresses used by this connector. */ readonly staticIpAddresses?: string[]; /** * Optional. Whether customer has enabled static IP addresses for this * connector. */ staticIpEnabled?: boolean; /** * The data synchronization mode supported by the data connector. */ syncMode?: | "PERIODIC" | "STREAMING" | "UNSPECIFIED"; /** * Output only. Timestamp the DataConnector was last updated. */ readonly updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DataConnector(data: any): GoogleCloudDiscoveryengineV1DataConnector { return { ...data, identityRefreshInterval: data["identityRefreshInterval"] !== undefined ? data["identityRefreshInterval"] : undefined, identityScheduleConfig: data["identityScheduleConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1IdentityScheduleConfig(data["identityScheduleConfig"]) : undefined, incrementalRefreshInterval: data["incrementalRefreshInterval"] !== undefined ? data["incrementalRefreshInterval"] : undefined, nextSyncTime: data["nextSyncTime"] !== undefined ? serializeGoogleTypeDateTime(data["nextSyncTime"]) : undefined, refreshInterval: data["refreshInterval"] !== undefined ? data["refreshInterval"] : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DataConnector(data: any): GoogleCloudDiscoveryengineV1DataConnector { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, identityRefreshInterval: data["identityRefreshInterval"] !== undefined ? data["identityRefreshInterval"] : undefined, identityScheduleConfig: data["identityScheduleConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1IdentityScheduleConfig(data["identityScheduleConfig"]) : undefined, incrementalRefreshInterval: data["incrementalRefreshInterval"] !== undefined ? data["incrementalRefreshInterval"] : undefined, lastSyncTime: data["lastSyncTime"] !== undefined ? new Date(data["lastSyncTime"]) : undefined, latestPauseTime: data["latestPauseTime"] !== undefined ? new Date(data["latestPauseTime"]) : undefined, nextSyncTime: data["nextSyncTime"] !== undefined ? deserializeGoogleTypeDateTime(data["nextSyncTime"]) : undefined, refreshInterval: data["refreshInterval"] !== undefined ? data["refreshInterval"] : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Any params and credentials used specifically for EUA connectors. */ export interface GoogleCloudDiscoveryengineV1DataConnectorEndUserConfig { /** * Optional. Any additional parameters needed for EUA. */ additionalParams?: { [key: string]: any }; /** * Optional. Any authentication parameters specific to EUA connectors. */ authParams?: { [key: string]: any }; /** * Optional. Any authentication parameters specific to EUA connectors in json * string format. */ jsonAuthParams?: string; /** * Optional. The tenant project the connector is connected to. */ tenant?: GoogleCloudDiscoveryengineV1Tenant; } /** * Any params and credentials used specifically for hybrid connectors * supporting FEDERATED mode. */ export interface GoogleCloudDiscoveryengineV1DataConnectorFederatedConfig { /** * Optional. Any additional parameters needed for FEDERATED. */ additionalParams?: { [key: string]: any }; /** * Optional. Any authentication parameters specific to FEDERATED connectors. */ authParams?: { [key: string]: any }; /** * Optional. Any authentication parameters specific to FEDERATED connectors * in json string format. */ jsonAuthParams?: string; } /** * The configuration for realtime sync to store additional params for realtime * sync. */ export interface GoogleCloudDiscoveryengineV1DataConnectorRealtimeSyncConfig { /** * Optional. The ID of the Secret Manager secret used for webhook secret. */ realtimeSyncSecret?: string; /** * Optional. Streaming error details. */ streamingError?: GoogleCloudDiscoveryengineV1DataConnectorRealtimeSyncConfigStreamingError; /** * Optional. Webhook url for the connector to specify additional params for * realtime sync. */ webhookUri?: string; } /** * Streaming error details. */ export interface GoogleCloudDiscoveryengineV1DataConnectorRealtimeSyncConfigStreamingError { /** * Optional. Error details. */ error?: GoogleRpcStatus; /** * Optional. Streaming error. */ streamingErrorReason?: | "STREAMING_ERROR_REASON_UNSPECIFIED" | "STREAMING_SETUP_ERROR" | "STREAMING_SYNC_ERROR" | "INGRESS_ENDPOINT_REQUIRED"; } /** * Represents an entity in the data source. For example, the `Account` object * in Salesforce. */ export interface GoogleCloudDiscoveryengineV1DataConnectorSourceEntity { /** * Output only. The full resource name of the associated data store for the * source entity. Format: * `projects/*\/locations/*\/collections/*\/dataStores/*`. When the connector * is initialized by the DataConnectorService.SetUpDataConnector method, a * DataStore is automatically created for each source entity. */ readonly dataStore?: string; /** * The name of the entity. Supported values by data source: * Salesforce: * `Lead`, `Opportunity`, `Contact`, `Account`, `Case`, `Contract`, `Campaign` * * Jira: `Issue` * Confluence: `Content`, `Space` */ entityName?: string; /** * Optional. Configuration for `HEALTHCARE_FHIR` vertical. */ healthcareFhirConfig?: GoogleCloudDiscoveryengineV1HealthcareFhirConfig; /** * The parameters for the entity to facilitate data ingestion in json string * format. */ jsonParams?: string; /** * Attributes for indexing. Key: Field name. Value: The key property to map a * field to, such as `title`, and `description`. Supported key properties: * * `title`: The title for data record. This would be displayed on search * results. * `description`: The description for data record. This would be * displayed on search results. */ keyPropertyMappings?: { [key: string]: string }; /** * The parameters for the entity to facilitate data ingestion in structured * json format. */ params?: { [key: string]: any }; /** * Optional. The start schema to use for the DataStore created from this * SourceEntity. If unset, a default vertical specialized schema will be used. * This field is only used by SetUpDataConnector API, and will be ignored if * used in other APIs. This field will be omitted from all API responses * including GetDataConnector API. To retrieve a schema of a DataStore, use * SchemaService.GetSchema API instead. The provided schema will be validated * against certain rules on schema. Learn more from [this * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). */ startingSchema?: GoogleCloudDiscoveryengineV1Schema; } /** * DataStore captures global settings and configs at the DataStore level. */ export interface GoogleCloudDiscoveryengineV1DataStore { /** * Immutable. Whether data in the DataStore has ACL information. If set to * `true`, the source data must have ACL. ACL will be ingested when data is * ingested by DocumentService.ImportDocuments methods. When ACL is enabled * for the DataStore, Document can't be accessed by calling * DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL * is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` * content config. */ aclEnabled?: boolean; /** * Optional. Configuration for advanced site search. */ advancedSiteSearchConfig?: GoogleCloudDiscoveryengineV1AdvancedSiteSearchConfig; /** * Output only. Data size estimation for billing. */ readonly billingEstimation?: GoogleCloudDiscoveryengineV1DataStoreBillingEstimation; /** * Output only. CMEK-related information for the DataStore. */ readonly cmekConfig?: GoogleCloudDiscoveryengineV1CmekConfig; /** * Optional. Configuration for configurable billing approach. See */ configurableBillingApproach?: | "CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED" | "CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE" | "CONFIGURABLE_CONSUMPTION_EMBEDDING"; /** * Output only. The timestamp when configurable_billing_approach was last * updated. */ readonly configurableBillingApproachUpdateTime?: Date; /** * Immutable. The content config of the data store. If this field is unset, * the server behavior defaults to ContentConfig.NO_CONTENT. */ contentConfig?: | "CONTENT_CONFIG_UNSPECIFIED" | "NO_CONTENT" | "CONTENT_REQUIRED" | "PUBLIC_WEBSITE" | "GOOGLE_WORKSPACE"; /** * Output only. Timestamp the DataStore was created at. */ readonly createTime?: Date; /** * Output only. The id of the default Schema associated to this data store. */ readonly defaultSchemaId?: string; /** * Required. The data store display name. This field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * INVALID_ARGUMENT error is returned. */ displayName?: string; /** * Configuration for Document understanding and enrichment. */ documentProcessingConfig?: GoogleCloudDiscoveryengineV1DocumentProcessingConfig; /** * Optional. Configuration for `HEALTHCARE_FHIR` vertical. */ healthcareFhirConfig?: GoogleCloudDiscoveryengineV1HealthcareFhirConfig; /** * Immutable. The fully qualified resource name of the associated * IdentityMappingStore. This field can only be set for acl_enabled DataStores * with `THIRD_PARTY` or `GSUITE` IdP. Format: * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`. */ identityMappingStore?: string; /** * Immutable. The industry vertical that the data store registers. */ industryVertical?: | "INDUSTRY_VERTICAL_UNSPECIFIED" | "GENERIC" | "MEDIA" | "HEALTHCARE_FHIR"; /** * Optional. If set, this DataStore is an Infobot FAQ DataStore. */ isInfobotFaqDataStore?: boolean; /** * Input only. The KMS key to be used to protect this DataStore at creation * time. Must be set for requests that need to comply with CMEK Org Policy * protections. If this field is set and processed successfully, the DataStore * will be protected by the KMS key, as indicated in the cmek_config field. */ kmsKeyName?: string; /** * Immutable. Identifier. The full resource name of the data store. Format: * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * Optional. Stores serving config at DataStore level. */ servingConfigDataStore?: GoogleCloudDiscoveryengineV1DataStoreServingConfigDataStore; /** * The solutions that the data store enrolls. Available solutions for each * industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and * `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is * automatically enrolled. Other solutions cannot be enrolled. */ solutionTypes?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"[]; /** * The start schema to use for this DataStore when provisioning it. If unset, * a default vertical specialized schema will be used. This field is only used * by CreateDataStore API, and will be ignored if used in other APIs. This * field will be omitted from all API responses including CreateDataStore API. * To retrieve a schema of a DataStore, use SchemaService.GetSchema API * instead. The provided schema will be validated against certain rules on * schema. Learn more from [this * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). */ startingSchema?: GoogleCloudDiscoveryengineV1Schema; /** * Config to store data store type configuration for workspace data. This * must be set when DataStore.content_config is set as * DataStore.ContentConfig.GOOGLE_WORKSPACE. */ workspaceConfig?: GoogleCloudDiscoveryengineV1WorkspaceConfig; } /** * Estimation of data size per data store. */ export interface GoogleCloudDiscoveryengineV1DataStoreBillingEstimation { /** * Data size for structured data in terms of bytes. */ structuredDataSize?: bigint; /** * Last updated timestamp for structured data. */ structuredDataUpdateTime?: Date; /** * Data size for unstructured data in terms of bytes. */ unstructuredDataSize?: bigint; /** * Last updated timestamp for unstructured data. */ unstructuredDataUpdateTime?: Date; /** * Data size for websites in terms of bytes. */ websiteDataSize?: bigint; /** * Last updated timestamp for websites. */ websiteDataUpdateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DataStoreBillingEstimation(data: any): GoogleCloudDiscoveryengineV1DataStoreBillingEstimation { return { ...data, structuredDataSize: data["structuredDataSize"] !== undefined ? String(data["structuredDataSize"]) : undefined, structuredDataUpdateTime: data["structuredDataUpdateTime"] !== undefined ? data["structuredDataUpdateTime"].toISOString() : undefined, unstructuredDataSize: data["unstructuredDataSize"] !== undefined ? String(data["unstructuredDataSize"]) : undefined, unstructuredDataUpdateTime: data["unstructuredDataUpdateTime"] !== undefined ? data["unstructuredDataUpdateTime"].toISOString() : undefined, websiteDataSize: data["websiteDataSize"] !== undefined ? String(data["websiteDataSize"]) : undefined, websiteDataUpdateTime: data["websiteDataUpdateTime"] !== undefined ? data["websiteDataUpdateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DataStoreBillingEstimation(data: any): GoogleCloudDiscoveryengineV1DataStoreBillingEstimation { return { ...data, structuredDataSize: data["structuredDataSize"] !== undefined ? BigInt(data["structuredDataSize"]) : undefined, structuredDataUpdateTime: data["structuredDataUpdateTime"] !== undefined ? new Date(data["structuredDataUpdateTime"]) : undefined, unstructuredDataSize: data["unstructuredDataSize"] !== undefined ? BigInt(data["unstructuredDataSize"]) : undefined, unstructuredDataUpdateTime: data["unstructuredDataUpdateTime"] !== undefined ? new Date(data["unstructuredDataUpdateTime"]) : undefined, websiteDataSize: data["websiteDataSize"] !== undefined ? BigInt(data["websiteDataSize"]) : undefined, websiteDataUpdateTime: data["websiteDataUpdateTime"] !== undefined ? new Date(data["websiteDataUpdateTime"]) : undefined, }; } /** * Stores information regarding the serving configurations at DataStore level. */ export interface GoogleCloudDiscoveryengineV1DataStoreServingConfigDataStore { /** * Optional. If set true, the DataStore will not be available for serving * search requests. */ disabledForServing?: boolean; } /** * Metadata related to the progress of the CmekConfigService.DeleteCmekConfig * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1DeleteCmekConfigMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DeleteCmekConfigMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteCmekConfigMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DeleteCmekConfigMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteCmekConfigMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the CollectionService.UpdateCollection * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1DeleteCollectionMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DeleteCollectionMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteCollectionMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DeleteCollectionMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteCollectionMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the DataStoreService.DeleteDataStore * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DeleteDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DeleteDataStoreMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the EngineService.DeleteEngine * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1DeleteEngineMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DeleteEngineMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DeleteEngineMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteEngineMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * IdentityMappingStoreService.DeleteIdentityMappingStore operation. This will * be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1DeleteIdentityMappingStoreMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DeleteIdentityMappingStoreMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteIdentityMappingStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DeleteIdentityMappingStoreMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteIdentityMappingStoreMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata for DeleteSchema LRO. */ export interface GoogleCloudDiscoveryengineV1DeleteSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DeleteSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DeleteSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.DeleteSitemap operation. This will be returned by the * google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1DeleteSitemapMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DeleteSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DeleteSitemapMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteSitemapMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.DeleteTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Defines target endpoints used to connect to third-party sources. */ export interface GoogleCloudDiscoveryengineV1DestinationConfig { /** * Optional. The destinations for the corresponding key. */ destinations?: GoogleCloudDiscoveryengineV1DestinationConfigDestination[]; /** * Additional parameters for this destination config in json string format. */ jsonParams?: string; /** * Optional. Unique destination identifier that is supported by the * connector. */ key?: string; /** * Optional. Additional parameters for this destination config in structured * json format. */ params?: { [key: string]: any }; } /** * Defines a target endpoint */ export interface GoogleCloudDiscoveryengineV1DestinationConfigDestination { /** * Publicly routable host. */ host?: string; /** * Optional. Target port number accepted by the destination. */ port?: number; } /** * Metadata related to the progress of the * SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for SiteSearchEngineService.DisableAdvancedSiteSearch * method. */ export interface GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchRequest { } /** * Response message for SiteSearchEngineService.DisableAdvancedSiteSearch * method. */ export interface GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse { } /** * Document captures all raw metadata information of items to be recommended or * searched. */ export interface GoogleCloudDiscoveryengineV1Document { /** * Access control information for the document. */ aclInfo?: GoogleCloudDiscoveryengineV1DocumentAclInfo; /** * The unstructured data linked to this document. Content can only be set and * must be set if this document is under a `CONTENT_REQUIRED` data store. */ content?: GoogleCloudDiscoveryengineV1DocumentContent; /** * Output only. This field is OUTPUT_ONLY. It contains derived data that are * not in the original input document. */ readonly derivedStructData?: { [key: string]: any }; /** * Immutable. The identifier of the document. Id should conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 128 characters. */ id?: string; /** * Output only. The index status of the document. * If document is indexed * successfully, the index_time field is populated. * Otherwise, if document * is not indexed due to errors, the error_samples field is populated. * * Otherwise, if document's index is in progress, the pending_message field is * populated. */ readonly indexStatus?: GoogleCloudDiscoveryengineV1DocumentIndexStatus; /** * Output only. The last time the document was indexed. If this field is set, * the document could be returned in search results. This field is * OUTPUT_ONLY. If this field is not populated, it means the document has * never been indexed. */ readonly indexTime?: Date; /** * The JSON string representation of the document. It should conform to the * registered Schema or an `INVALID_ARGUMENT` error is thrown. */ jsonData?: string; /** * Immutable. The full resource name of the document. Format: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * The identifier of the parent document. Currently supports at most two * level document hierarchy. Id should conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 63 characters. */ parentDocumentId?: string; /** * The identifier of the schema located in the same data store. */ schemaId?: string; /** * The structured JSON data for the document. It should conform to the * registered Schema or an `INVALID_ARGUMENT` error is thrown. */ structData?: { [key: string]: any }; } function serializeGoogleCloudDiscoveryengineV1Document(data: any): GoogleCloudDiscoveryengineV1Document { return { ...data, content: data["content"] !== undefined ? serializeGoogleCloudDiscoveryengineV1DocumentContent(data["content"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1Document(data: any): GoogleCloudDiscoveryengineV1Document { return { ...data, content: data["content"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1DocumentContent(data["content"]) : undefined, indexStatus: data["indexStatus"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1DocumentIndexStatus(data["indexStatus"]) : undefined, indexTime: data["indexTime"] !== undefined ? new Date(data["indexTime"]) : undefined, }; } /** * ACL Information of the Document. */ export interface GoogleCloudDiscoveryengineV1DocumentAclInfo { /** * Readers of the document. */ readers?: GoogleCloudDiscoveryengineV1DocumentAclInfoAccessRestriction[]; } /** * AclRestriction to model complex inheritance restrictions. Example: Modeling * a "Both Permit" inheritance, where to access a child document, user needs to * have access to parent document. Document Hierarchy - Space_S --> Page_P. * Readers: Space_S: group_1, user_1 Page_P: group_2, group_3, user_2 Space_S * ACL Restriction - { "acl_info": { "readers": [ { "principals": [ { * "group_id": "group_1" }, { "user_id": "user_1" } ] } ] } } Page_P ACL * Restriction. { "acl_info": { "readers": [ { "principals": [ { "group_id": * "group_2" }, { "group_id": "group_3" }, { "user_id": "user_2" } ], }, { * "principals": [ { "group_id": "group_1" }, { "user_id": "user_1" } ], } ] } } */ export interface GoogleCloudDiscoveryengineV1DocumentAclInfoAccessRestriction { /** * All users within the Identity Provider. */ idpWide?: boolean; /** * List of principals. */ principals?: GoogleCloudDiscoveryengineV1Principal[]; } /** * Unstructured data linked to this document. */ export interface GoogleCloudDiscoveryengineV1DocumentContent { /** * The MIME type of the content. Supported types: * `application/pdf` (PDF, * only native PDFs are supported for now) * `text/html` (HTML) * `text/plain` * (TXT) * `application/xml` or `text/xml` (XML) * `application/json` (JSON) * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` * (DOCX) * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` * (PPTX) * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` (XLSX) * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) The following * types are supported only if layout parser is enabled in the data store: * * `image/bmp` (BMP) * `image/gif` (GIF) * `image/jpeg` (JPEG) * `image/png` * (PNG) * `image/tiff` (TIFF) See * https://www.iana.org/assignments/media-types/media-types.xhtml. */ mimeType?: string; /** * The content represented as a stream of bytes. The maximum length is * 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this * field is represented as pure binary in Protocol Buffers and base64-encoded * string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See * https://developers.google.com/protocol-buffers/docs/proto3#json. */ rawBytes?: Uint8Array; /** * The URI of the content. Only Cloud Storage URIs (e.g. * `gs://bucket-name/path/to/file`) are supported. The maximum file size is * 2.5 MB for text-based formats, 200 MB for other formats. */ uri?: string; } function serializeGoogleCloudDiscoveryengineV1DocumentContent(data: any): GoogleCloudDiscoveryengineV1DocumentContent { return { ...data, rawBytes: data["rawBytes"] !== undefined ? encodeBase64(data["rawBytes"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DocumentContent(data: any): GoogleCloudDiscoveryengineV1DocumentContent { return { ...data, rawBytes: data["rawBytes"] !== undefined ? decodeBase64(data["rawBytes"] as string) : undefined, }; } /** * Index status of the document. */ export interface GoogleCloudDiscoveryengineV1DocumentIndexStatus { /** * A sample of errors encountered while indexing the document. If this field * is populated, the document is not indexed due to errors. */ errorSamples?: GoogleRpcStatus[]; /** * The time when the document was indexed. If this field is populated, it * means the document has been indexed. */ indexTime?: Date; /** * Immutable. The message indicates the document index is in progress. If * this field is populated, the document index is pending. */ pendingMessage?: string; } function serializeGoogleCloudDiscoveryengineV1DocumentIndexStatus(data: any): GoogleCloudDiscoveryengineV1DocumentIndexStatus { return { ...data, indexTime: data["indexTime"] !== undefined ? data["indexTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1DocumentIndexStatus(data: any): GoogleCloudDiscoveryengineV1DocumentIndexStatus { return { ...data, indexTime: data["indexTime"] !== undefined ? new Date(data["indexTime"]) : undefined, }; } /** * Detailed document information associated with a user event. */ export interface GoogleCloudDiscoveryengineV1DocumentInfo { /** * Optional. The conversion value associated with this Document. Must be set * if UserEvent.event_type is "conversion". For example, a value of 1000 * signifies that 1000 seconds were spent viewing a Document for the `watch` * conversion type. */ conversionValue?: number; /** * The Document resource ID. */ id?: string; /** * Output only. Whether the referenced Document can be found in the data * store. */ readonly joined?: boolean; /** * The Document resource full name, of the form: * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` */ name?: string; /** * The promotion IDs associated with this Document. Currently, this field is * restricted to at most one ID. */ promotionIds?: string[]; /** * Quantity of the Document associated with the user event. Defaults to 1. * For example, this field is 2 if two quantities of the same Document are * involved in a `add-to-cart` event. Required for events of the following * event types: * `add-to-cart` * `purchase` */ quantity?: number; /** * The Document URI - only allowed for website data stores. */ uri?: string; } /** * A singleton resource of DataStore. If it's empty when DataStore is created * and DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED, the default * parser will default to digital parser. */ export interface GoogleCloudDiscoveryengineV1DocumentProcessingConfig { /** * Whether chunking mode is enabled. */ chunkingConfig?: GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig; /** * Configurations for default Document parser. If not specified, we will * configure it as default DigitalParsingConfig, and the default parsing * config will be applied to all file types for Document parsing. */ defaultParsingConfig?: GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig; /** * The full resource name of the Document Processing Config. Format: * `projects/*\/locations/*\/collections/*\/dataStores/*\/documentProcessingConfig`. */ name?: string; /** * Map from file type to override the default parsing configuration based on * the file type. Supported keys: * `pdf`: Override parsing config for PDF * files, either digital parsing, ocr parsing or layout parsing is supported. * * `html`: Override parsing config for HTML files, only digital parsing and * layout parsing are supported. * `docx`: Override parsing config for DOCX * files, only digital parsing and layout parsing are supported. * `pptx`: * Override parsing config for PPTX files, only digital parsing and layout * parsing are supported. * `xlsm`: Override parsing config for XLSM files, * only digital parsing and layout parsing are supported. * `xlsx`: Override * parsing config for XLSX files, only digital parsing and layout parsing are * supported. */ parsingConfigOverrides?: { [key: string]: GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig }; } /** * Configuration for chunking config. */ export interface GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig { /** * Configuration for the layout based chunking. */ layoutBasedChunkingConfig?: GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig; } /** * Configuration for the layout based chunking. */ export interface GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig { /** * The token size limit for each chunk. Supported values: 100-500 * (inclusive). Default value: 500. */ chunkSize?: number; /** * Whether to include appending different levels of headings to chunks from * the middle of the document to prevent context loss. Default value: False. */ includeAncestorHeadings?: boolean; } /** * Related configurations applied to a specific type of document parser. */ export interface GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig { /** * Configurations applied to digital parser. */ digitalParsingConfig?: GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig; /** * Configurations applied to layout parser. */ layoutParsingConfig?: GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig; /** * Configurations applied to OCR parser. Currently it only applies to PDFs. */ ocrParsingConfig?: GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig; } /** * The digital parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig { } /** * The layout parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig { /** * Optional. If true, the processed document will be made available for the * GetProcessedDocument API. */ enableGetProcessedDocument?: boolean; /** * Optional. If true, the LLM based annotation is added to the image during * parsing. */ enableImageAnnotation?: boolean; /** * Optional. If true, the pdf layout will be refined using an LLM. */ enableLlmLayoutParsing?: boolean; /** * Optional. If true, the LLM based annotation is added to the table during * parsing. */ enableTableAnnotation?: boolean; /** * Optional. List of HTML classes to exclude from the parsed content. */ excludeHtmlClasses?: string[]; /** * Optional. List of HTML elements to exclude from the parsed content. */ excludeHtmlElements?: string[]; /** * Optional. List of HTML ids to exclude from the parsed content. */ excludeHtmlIds?: string[]; /** * Optional. Contains the required structure types to extract from the * document. Supported values: * `shareholder-structure` */ structuredContentTypes?: string[]; } /** * The OCR parsing configurations for documents. */ export interface GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig { /** * [DEPRECATED] This field is deprecated. To use the additional enhanced * document elements processing, please switch to `layout_parsing_config`. */ enhancedDocumentElements?: string[]; /** * If true, will use native text instead of OCR text on pages containing * native text. */ useNativeText?: boolean; } /** * Double list. */ export interface GoogleCloudDiscoveryengineV1DoubleList { /** * Double values. */ values?: number[]; } /** * Metadata related to the progress of the * SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata(data: any): GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for SiteSearchEngineService.EnableAdvancedSiteSearch method. */ export interface GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchRequest { } /** * Response message for SiteSearchEngineService.EnableAdvancedSiteSearch * method. */ export interface GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse { } /** * Metadata that describes the training and serving parameters of an Engine. */ export interface GoogleCloudDiscoveryengineV1Engine { /** * Optional. Immutable. This the application type which this engine resource * represents. NOTE: this is a new concept independ of existing industry * vertical or solution type. */ appType?: | "APP_TYPE_UNSPECIFIED" | "APP_TYPE_INTRANET"; /** * Configurations for the Chat Engine. Only applicable if solution_type is * SOLUTION_TYPE_CHAT. */ chatEngineConfig?: GoogleCloudDiscoveryengineV1EngineChatEngineConfig; /** * Output only. Additional information of the Chat Engine. Only applicable if * solution_type is SOLUTION_TYPE_CHAT. */ readonly chatEngineMetadata?: GoogleCloudDiscoveryengineV1EngineChatEngineMetadata; /** * Output only. CMEK-related information for the Engine. */ readonly cmekConfig?: GoogleCloudDiscoveryengineV1CmekConfig; /** * Common config spec that specifies the metadata of the engine. */ commonConfig?: GoogleCloudDiscoveryengineV1EngineCommonConfig; /** * Optional. Configuration for configurable billing approach. */ configurableBillingApproach?: | "CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED" | "CONFIGURABLE_BILLING_APPROACH_ENABLED"; /** * Output only. Timestamp the Recommendation Engine was created at. */ readonly createTime?: Date; /** * Optional. The data stores associated with this engine. For * SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they * can only associate with at most one data store. If solution_type is * SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be * associated here. Note that when used in CreateEngineRequest, one DataStore * id must be provided as the system will use it for necessary * initializations. */ dataStoreIds?: string[]; /** * Optional. Whether to disable analytics for searches performed on this * engine. */ disableAnalytics?: boolean; /** * Required. The display name of the engine. Should be human readable. UTF-8 * encoded string with limit of 1024 characters. */ displayName?: string; /** * 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` * `feedback` * * `session-sharing` * `personalization-memory` * `disable-agent-sharing` * * `disable-image-generation` * `disable-video-generation` * * `disable-onedrive-upload` * `disable-talk-to-content` * * `disable-google-drive-upload` */ features?: { [key: string]: | "FEATURE_STATE_UNSPECIFIED" | "FEATURE_STATE_ON" | "FEATURE_STATE_OFF" }; /** * Optional. The industry vertical that the engine registers. The restriction * of the Engine industry vertical is based on DataStore: Vertical on Engine * has to match vertical of the DataStore linked to the engine. */ industryVertical?: | "INDUSTRY_VERTICAL_UNSPECIFIED" | "GENERIC" | "MEDIA" | "HEALTHCARE_FHIR"; /** * Configurations for the Media Engine. Only applicable on the data stores * with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA * vertical. */ mediaRecommendationEngineConfig?: GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig; /** * 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. */ modelConfigs?: { [key: string]: | "MODEL_STATE_UNSPECIFIED" | "MODEL_ENABLED" | "MODEL_DISABLED" }; /** * 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-9*\/. * Otherwise, an INVALID_ARGUMENT error is returned. */ name?: string; /** * Configurations for the Search Engine. Only applicable if solution_type is * SOLUTION_TYPE_SEARCH. */ searchEngineConfig?: GoogleCloudDiscoveryengineV1EngineSearchEngineConfig; /** * Required. The solutions of the engine. */ solutionType?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"; /** * Output only. Timestamp the Recommendation Engine was last updated. */ readonly updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1Engine(data: any): GoogleCloudDiscoveryengineV1Engine { return { ...data, mediaRecommendationEngineConfig: data["mediaRecommendationEngineConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig(data["mediaRecommendationEngineConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1Engine(data: any): GoogleCloudDiscoveryengineV1Engine { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, mediaRecommendationEngineConfig: data["mediaRecommendationEngineConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig(data["mediaRecommendationEngineConfig"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Configurations for a Chat Engine. */ export interface GoogleCloudDiscoveryengineV1EngineChatEngineConfig { /** * The configurationt generate the Dialogflow agent that is associated to * this Engine. Note that these configurations are one-time consumed by and * passed to Dialogflow service. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. */ agentCreationConfig?: GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig; /** * Optional. If the flag set to true, we allow the agent and engine are in * different locations, otherwise the agent and engine are required to be in * the same location. The flag is set to false by default. Note that the * `allow_cross_region` are one-time consumed by and passed to * EngineService.CreateEngine. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. */ allowCrossRegion?: boolean; /** * The resource name of an exist Dialogflow agent to link to this Chat * Engine. Customers can either provide `agent_creation_config` to create * agent or provide an agent name that links the agent with the Chat engine. * Format: `projects//locations//agents/`. Note that the * `dialogflow_agent_to_link` are one-time consumed by and passed to * Dialogflow service. It means they cannot be retrieved using * EngineService.GetEngine or EngineService.ListEngines API after engine * creation. Use ChatEngineMetadata.dialogflow_agent for actual agent * association after Engine is created. */ dialogflowAgentToLink?: string; } /** * Configurations for generating a Dialogflow agent. Note that these * configurations are one-time consumed by and passed to Dialogflow service. It * means they cannot be retrieved using EngineService.GetEngine or * EngineService.ListEngines API after engine creation. */ export interface GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig { /** * Name of the company, organization or other entity that the agent * represents. Used for knowledge connector LLM prompt and for knowledge * search. */ business?: string; /** * Required. The default language of the agent as a language tag. See * [Language * Support](https://cloud.google.com/dialogflow/docs/reference/language) for a * list of the currently supported language codes. */ defaultLanguageCode?: string; /** * Agent location for Agent creation, supported values: global/us/eu. If not * provided, us Engine will create Agent using us-central-1 by default; eu * Engine will create Agent using eu-west-1 by default. */ location?: string; /** * Required. The time zone of the agent from the [time zone * database](https://www.iana.org/time-zones), e.g., America/New_York, * Europe/Paris. */ timeZone?: string; } /** * Additional information of a Chat Engine. Fields in this message are output * only. */ export interface GoogleCloudDiscoveryengineV1EngineChatEngineMetadata { /** * The resource name of a Dialogflow agent, that this Chat Engine refers to. * Format: `projects//locations//agents/`. */ dialogflowAgent?: string; } /** * Common configurations for an Engine. */ export interface GoogleCloudDiscoveryengineV1EngineCommonConfig { /** * The name of the company, business or entity that is associated with the * engine. Setting this may help improve LLM related features. */ companyName?: string; } /** * Additional config specs for a Media Recommendation engine. */ export interface GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig { /** * Optional. Additional engine features config. */ engineFeaturesConfig?: GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigEngineFeaturesConfig; /** * The optimization objective. e.g., `cvr`. This field together with * optimization_objective describe engine metadata to use to control engine * training and serving. Currently supported values: `ctr`, `cvr`. If not * specified, we choose default based on engine type. Default depends on type * of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => * `ctr` */ optimizationObjective?: string; /** * Name and value of the custom threshold for cvr optimization_objective. For * target_field `watch-time`, target_field_value must be an integer value * indicating the media progress time in seconds between (0, 86400] (excludes * 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the * target_field_value must be a valid float value between (0, 1.0] (excludes * 0, includes 1.0) (e.g., 0.5). */ optimizationObjectiveConfig?: GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigOptimizationObjectiveConfig; /** * The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). * Since part of the cost of running the service is frequency of training - * this can be used to determine when to train engine in order to control * cost. If not specified: the default value for `CreateEngine` method is * `TRAINING`. The default value for `UpdateEngine` method is to keep the * state the same as before. */ trainingState?: | "TRAINING_STATE_UNSPECIFIED" | "PAUSED" | "TRAINING"; /** * Required. The type of engine. e.g., `recommended-for-you`. This field * together with optimization_objective describe engine metadata to use to * control engine training and serving. Currently supported values: * `recommended-for-you`, `others-you-may-like`, `more-like-this`, * `most-popular-items`. */ type?: string; } function serializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig(data: any): GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig { return { ...data, engineFeaturesConfig: data["engineFeaturesConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigEngineFeaturesConfig(data["engineFeaturesConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig(data: any): GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfig { return { ...data, engineFeaturesConfig: data["engineFeaturesConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigEngineFeaturesConfig(data["engineFeaturesConfig"]) : undefined, }; } /** * More feature configs of the selected engine type. */ export interface GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigEngineFeaturesConfig { /** * Most popular engine feature config. */ mostPopularConfig?: GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigMostPopularFeatureConfig; /** * Recommended for you engine feature config. */ recommendedForYouConfig?: GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigRecommendedForYouFeatureConfig; } function serializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigEngineFeaturesConfig(data: any): GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigEngineFeaturesConfig { return { ...data, mostPopularConfig: data["mostPopularConfig"] !== undefined ? serializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data["mostPopularConfig"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigEngineFeaturesConfig(data: any): GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigEngineFeaturesConfig { return { ...data, mostPopularConfig: data["mostPopularConfig"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data["mostPopularConfig"]) : undefined, }; } /** * Feature configurations that are required for creating a Most Popular engine. */ export interface GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigMostPopularFeatureConfig { /** * The time window of which the engine is queried at training and prediction * time. Positive integers only. The value translates to the last X days of * events. Currently required for the `most-popular-items` engine. */ timeWindowDays?: bigint; } function serializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data: any): GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigMostPopularFeatureConfig { return { ...data, timeWindowDays: data["timeWindowDays"] !== undefined ? String(data["timeWindowDays"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigMostPopularFeatureConfig(data: any): GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigMostPopularFeatureConfig { return { ...data, timeWindowDays: data["timeWindowDays"] !== undefined ? BigInt(data["timeWindowDays"]) : undefined, }; } /** * Custom threshold for `cvr` optimization_objective. */ export interface GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigOptimizationObjectiveConfig { /** * Required. The name of the field to target. Currently supported values: * `watch-percentage`, `watch-time`. */ targetField?: string; /** * Required. The threshold to be applied to the target (e.g., 0.5). */ targetFieldValueFloat?: number; } /** * Additional feature configurations for creating a `recommended-for-you` * engine. */ export interface GoogleCloudDiscoveryengineV1EngineMediaRecommendationEngineConfigRecommendedForYouFeatureConfig { /** * The type of event with which the engine is queried at prediction time. If * set to `generic`, only `view-item`, `media-play`,and `media-complete` will * be used as `context-event` in engine training. If set to `view-home-page`, * `view-home-page` will also be used as `context-events` in addition to * `view-item`, `media-play`, and `media-complete`. Currently supported for * the `recommended-for-you` engine. Currently supported values: * `view-home-page`, `generic`. */ contextEventType?: string; } /** * Configurations for a Search Engine. */ export interface GoogleCloudDiscoveryengineV1EngineSearchEngineConfig { /** * The add-on that this search engine enables. */ searchAddOns?: | "SEARCH_ADD_ON_UNSPECIFIED" | "SEARCH_ADD_ON_LLM"[]; /** * The search feature tier of this engine. Different tiers might have * different pricing. To learn more, check the pricing documentation. Defaults * to SearchTier.SEARCH_TIER_STANDARD if not specified. */ searchTier?: | "SEARCH_TIER_UNSPECIFIED" | "SEARCH_TIER_STANDARD" | "SEARCH_TIER_ENTERPRISE"; } /** * Fact Chunk. */ export interface GoogleCloudDiscoveryengineV1FactChunk { /** * Text content of the fact chunk. Can be at most 10K characters long. */ chunkText?: string; /** * The domain of the source. */ domain?: string; /** * The index of this chunk. Currently, only used for the streaming mode. */ index?: number; /** * Source from which this fact chunk was retrieved. If it was retrieved from * the GroundingFacts provided in the request then this field will contain the * index of the specific fact from which this chunk was retrieved. */ source?: string; /** * More fine-grained information for the source reference. */ sourceMetadata?: { [key: string]: string }; /** * The title of the source. */ title?: string; /** * The URI of the source. */ uri?: string; } /** * Response message for SiteSearchEngineService.FetchDomainVerificationStatus * method. */ export interface GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse { /** * A token that can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * List of TargetSites containing the site verification status. */ targetSites?: GoogleCloudDiscoveryengineV1TargetSite[]; /** * The total number of items matching the request. This will always be * populated in the response. */ totalSize?: number; } /** * Response message for SiteSearchEngineService.FetchSitemaps method. */ export interface GoogleCloudDiscoveryengineV1FetchSitemapsResponse { /** * List of Sitemaps fetched. */ sitemapsMetadata?: GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata[]; } /** * Contains a Sitemap and its metadata. */ export interface GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata { /** * The Sitemap. */ sitemap?: GoogleCloudDiscoveryengineV1Sitemap; } /** * Cloud FhirStore source import data from. */ export interface GoogleCloudDiscoveryengineV1FhirStoreSource { /** * Required. The full resource name of the FHIR store to import data from, in * the format of * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. */ fhirStore?: string; /** * Intermediate Cloud Storage directory used for the import with a length * limit of 2,000 characters. Can be specified if one wants to have the * FhirStore export to a specific Cloud Storage directory. */ gcsStagingDir?: string; /** * The FHIR resource types to import. The resource types should be a subset * of all [supported FHIR resource * types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). * Default to all supported FHIR resource types if empty. */ resourceTypes?: string[]; /** * Optional. Whether to update the DataStore schema to the latest predefined * schema. If true, the DataStore schema will be updated to include any FHIR * fields or resource types that have been added since the last import and * corresponding FHIR resources will be imported from the FHIR store. Note * this field cannot be used in conjunction with `resource_types`. It should * be used after initial import. */ updateFromLatestPredefinedSchema?: boolean; } /** * Firestore source import data from. */ export interface GoogleCloudDiscoveryengineV1FirestoreSource { /** * Required. The Firestore collection (or entity) to copy the data from with * a length limit of 1,500 characters. */ collectionId?: string; /** * Required. The Firestore database to copy the data from with a length limit * of 256 characters. */ databaseId?: string; /** * Intermediate Cloud Storage directory used for the import with a length * limit of 2,000 characters. Can be specified if one wants to have the * Firestore export to a specific Cloud Storage directory. Ensure that the * Firestore service account has the necessary Cloud Storage Admin permissions * to access the specified Cloud Storage directory. */ gcsStagingDir?: string; /** * The project ID that the Cloud SQL source is in with a length limit of 128 * characters. If not specified, inherits the project ID from the parent * request. */ projectId?: string; } /** * Cloud Storage location for input content. */ export interface GoogleCloudDiscoveryengineV1GcsSource { /** * The schema to use when parsing the data from the source. Supported values * for document imports: * `document` (default): One JSON Document per line. * Each document must have a valid Document.id. * `content`: Unstructured data * (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, * with the ID set to the first 128 bits of SHA256(URI) encoded as a hex * string. * `custom`: One custom data JSON per row in arbitrary format that * conforms to the defined Schema of the data store. This can only be used by * the GENERIC Data Store vertical. * `csv`: A CSV file with header conforming * to the defined Schema of the data store. Each entry after the header is * imported as a Document. This can only be used by the GENERIC Data Store * vertical. Supported values for user event imports: * `user_event` * (default): One JSON UserEvent per line. */ dataSchema?: string; /** * Required. Cloud Storage URIs to input files. Each URI can be up to 2000 * characters long. URIs can match the full object path (for example, * `gs://bucket/directory/object.json`) or a pattern matching one or more * files, such as `gs://bucket/directory/*.json`. A request can contain at * most 100 files (or 100,000 files if `data_schema` is `content`). Each file * can be up to 2 GB (or 100 MB if `data_schema` is `content`). */ inputUris?: string[]; } /** * Grounding Fact. */ export interface GoogleCloudDiscoveryengineV1GroundingFact { /** * Attributes associated with the fact. Common attributes include `source` * (indicating where the fact was sourced from), `author` (indicating the * author of the fact), and so on. */ attributes?: { [key: string]: string }; /** * Text content of the fact. Can be at most 10K characters long. */ factText?: string; } /** * Config to data store for `HEALTHCARE_FHIR` vertical. */ export interface GoogleCloudDiscoveryengineV1HealthcareFhirConfig { /** * Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical. If * set to `true`, the predefined healthcare fhir schema can be extended for * more customized searching and filtering. */ enableConfigurableSchema?: boolean; /** * Whether to enable static indexing for `HEALTHCARE_FHIR` batch ingestion. * If set to `true`, the batch ingestion will be processed in a static * indexing mode which is slower but more capable of handling larger volume. */ enableStaticIndexingForBatchIngestion?: boolean; } /** * Identity Mapping Entry that maps an external identity to an internal * identity. */ export interface GoogleCloudDiscoveryengineV1IdentityMappingEntry { /** * Required. Identity outside the customer identity provider. The length * limit of external identity will be of 100 characters. */ externalIdentity?: string; /** * Group identifier. For Google Workspace user account, group_id should be * the google workspace group email. For non-google identity provider, * group_id is the mapped group identifier configured during the workforcepool * config. */ groupId?: string; /** * User identifier. For Google Workspace user account, user_id should be the * google workspace user email. For non-google identity provider, user_id is * the mapped user identifier configured during the workforcepool config. */ userId?: string; } /** * IdentityMappingEntry LongRunningOperation metadata for * IdentityMappingStoreService.ImportIdentityMappings and * IdentityMappingStoreService.PurgeIdentityMappings */ export interface GoogleCloudDiscoveryengineV1IdentityMappingEntryOperationMetadata { /** * The number of IdentityMappingEntries that failed to be processed. */ failureCount?: bigint; /** * The number of IdentityMappingEntries that were successfully processed. */ successCount?: bigint; /** * The total number of IdentityMappingEntries that were processed. */ totalCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1IdentityMappingEntryOperationMetadata(data: any): GoogleCloudDiscoveryengineV1IdentityMappingEntryOperationMetadata { return { ...data, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1IdentityMappingEntryOperationMetadata(data: any): GoogleCloudDiscoveryengineV1IdentityMappingEntryOperationMetadata { return { ...data, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, }; } /** * Identity Mapping Store which contains Identity Mapping Entries. */ export interface GoogleCloudDiscoveryengineV1IdentityMappingStore { /** * Output only. CMEK-related information for the Identity Mapping Store. */ readonly cmekConfig?: GoogleCloudDiscoveryengineV1CmekConfig; /** * Input only. The KMS key to be used to protect this Identity Mapping Store * at creation time. Must be set for requests that need to comply with CMEK * Org Policy protections. If this field is set and processed successfully, * the Identity Mapping Store will be protected by the KMS key, as indicated * in the cmek_config field. */ kmsKeyName?: string; /** * Immutable. The full resource name of the identity mapping store. Format: * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; } /** * The configuration for the identity data synchronization runs. */ export interface GoogleCloudDiscoveryengineV1IdentityScheduleConfig { /** * Optional. The UTC time when the next data sync is expected to start for * the Data Connector. Customers are only able to specify the hour and minute * to schedule the data sync. This is utilized when the data connector has a * refresh interval greater than 1 day. */ nextSyncTime?: GoogleTypeDateTime; /** * Optional. The refresh interval to sync the Access Control List information * for the documents ingested by this connector. If not set, the access * control list will be refreshed at the default interval of 30 minutes. The * identity refresh interval can be at least 30 minutes and at most 7 days. */ refreshInterval?: number /* Duration */; } function serializeGoogleCloudDiscoveryengineV1IdentityScheduleConfig(data: any): GoogleCloudDiscoveryengineV1IdentityScheduleConfig { return { ...data, nextSyncTime: data["nextSyncTime"] !== undefined ? serializeGoogleTypeDateTime(data["nextSyncTime"]) : undefined, refreshInterval: data["refreshInterval"] !== undefined ? data["refreshInterval"] : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1IdentityScheduleConfig(data: any): GoogleCloudDiscoveryengineV1IdentityScheduleConfig { return { ...data, nextSyncTime: data["nextSyncTime"] !== undefined ? deserializeGoogleTypeDateTime(data["nextSyncTime"]) : undefined, refreshInterval: data["refreshInterval"] !== undefined ? data["refreshInterval"] : undefined, }; } /** * Identity Provider Config. */ export interface GoogleCloudDiscoveryengineV1IdpConfig { /** * External Identity provider config. */ externalIdpConfig?: GoogleCloudDiscoveryengineV1IdpConfigExternalIdpConfig; /** * Identity provider type configured. */ idpType?: | "IDP_TYPE_UNSPECIFIED" | "GSUITE" | "THIRD_PARTY"; } /** * Third party IDP Config. */ export interface GoogleCloudDiscoveryengineV1IdpConfigExternalIdpConfig { /** * Workforce pool name. Example: "locations/global/workforcePools/pool_id" */ workforcePoolName?: string; } /** * Metadata related to the progress of the ImportCompletionSuggestions * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of CompletionSuggestions that failed to be imported. */ failureCount?: bigint; /** * Count of CompletionSuggestions successfully imported. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for CompletionService.ImportCompletionSuggestions method. */ export interface GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest { /** * BigQuery input source. */ bigquerySource?: GoogleCloudDiscoveryengineV1BigQuerySource; /** * The desired location of errors incurred during the Import. */ errorConfig?: GoogleCloudDiscoveryengineV1ImportErrorConfig; /** * Cloud Storage location for the input content. */ gcsSource?: GoogleCloudDiscoveryengineV1GcsSource; /** * The Inline source for suggestion entries. */ inlineSource?: GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequestInlineSource; } function serializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest(data: any): GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest { return { ...data, inlineSource: data["inlineSource"] !== undefined ? serializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequestInlineSource(data["inlineSource"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest(data: any): GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequest { return { ...data, inlineSource: data["inlineSource"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequestInlineSource(data["inlineSource"]) : undefined, }; } /** * The inline source for CompletionSuggestions. */ export interface GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequestInlineSource { /** * Required. A list of all denylist entries to import. Max of 1000 items. */ suggestions?: GoogleCloudDiscoveryengineV1CompletionSuggestion[]; } function serializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequestInlineSource(data: any): GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequestInlineSource { return { ...data, suggestions: data["suggestions"] !== undefined ? data["suggestions"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1CompletionSuggestion(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequestInlineSource(data: any): GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsRequestInlineSource { return { ...data, suggestions: data["suggestions"] !== undefined ? data["suggestions"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1CompletionSuggestion(item))) : undefined, }; } /** * Response of the CompletionService.ImportCompletionSuggestions method. If the * long running operation is done, this message is returned by the * google.longrunning.Operations.response field if the operation is successful. */ export interface GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse { /** * The desired location of errors incurred during the Import. */ errorConfig?: GoogleCloudDiscoveryengineV1ImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Metadata related to the progress of the ImportDocuments operation. This is * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1ImportDocumentsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were processed successfully. */ successCount?: bigint; /** * Total count of entries that were processed. */ totalCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1ImportDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1ImportDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? String(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1ImportDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, totalCount: data["totalCount"] !== undefined ? BigInt(data["totalCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for Import methods. */ export interface GoogleCloudDiscoveryengineV1ImportDocumentsRequest { /** * AlloyDB input source. */ alloyDbSource?: GoogleCloudDiscoveryengineV1AlloyDbSource; /** * Whether to automatically generate IDs for the documents if absent. If set * to `true`, Document.ids are automatically generated based on the hash of * the payload, where IDs may not be consistent during multiple imports. In * which case ReconciliationMode.FULL is highly recommended to avoid duplicate * contents. If unset or set to `false`, Document.ids have to be specified * using id_field, otherwise, documents without IDs fail to be imported. * Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` * or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. * BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an * INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * * FirestoreSource. * BigtableSource. */ autoGenerateIds?: boolean; /** * BigQuery input source. */ bigquerySource?: GoogleCloudDiscoveryengineV1BigQuerySource; /** * Cloud Bigtable input source. */ bigtableSource?: GoogleCloudDiscoveryengineV1BigtableSource; /** * Cloud SQL input source. */ cloudSqlSource?: GoogleCloudDiscoveryengineV1CloudSqlSource; /** * The desired location of errors incurred during the Import. */ errorConfig?: GoogleCloudDiscoveryengineV1ImportErrorConfig; /** * FhirStore input source. */ fhirStoreSource?: GoogleCloudDiscoveryengineV1FhirStoreSource; /** * Firestore input source. */ firestoreSource?: GoogleCloudDiscoveryengineV1FirestoreSource; /** * Optional. Whether to force refresh the unstructured content of the * documents. If set to `true`, the content part of the documents will be * refreshed regardless of the update status of the referencing content. */ forceRefreshContent?: boolean; /** * Cloud Storage location for the input content. */ gcsSource?: GoogleCloudDiscoveryengineV1GcsSource; /** * The field indicates the ID field or column to be used as unique IDs of the * documents. For GcsSource it is the key of the JSON field. For instance, * `my_id` for JSON `{"my_id": "some_uuid"}`. For others, it may be the column * name of the table where the unique ids are stored. The values of the JSON * field or the table column are used as the Document.ids. The JSON field or * the table column must be of string type, and the values must be set as * valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) * with 1-63 characters. Otherwise, documents without valid IDs fail to be * imported. Only set this field when auto_generate_ids is unset or set as * `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a * default value `_id` is used when importing from the allowed data sources. * Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` * or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. * BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an * INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * * BigtableSource. */ idField?: string; /** * The Inline source for the input content for documents. */ inlineSource?: GoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource; /** * The mode of reconciliation between existing documents and the documents to * be imported. Defaults to ReconciliationMode.INCREMENTAL. */ reconciliationMode?: | "RECONCILIATION_MODE_UNSPECIFIED" | "INCREMENTAL" | "FULL"; /** * Spanner input source. */ spannerSource?: GoogleCloudDiscoveryengineV1SpannerSource; /** * Indicates which fields in the provided imported documents to update. If * not set, the default is to update all fields. */ updateMask?: string /* FieldMask */; } function serializeGoogleCloudDiscoveryengineV1ImportDocumentsRequest(data: any): GoogleCloudDiscoveryengineV1ImportDocumentsRequest { return { ...data, bigtableSource: data["bigtableSource"] !== undefined ? serializeGoogleCloudDiscoveryengineV1BigtableSource(data["bigtableSource"]) : undefined, inlineSource: data["inlineSource"] !== undefined ? serializeGoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource(data["inlineSource"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportDocumentsRequest(data: any): GoogleCloudDiscoveryengineV1ImportDocumentsRequest { return { ...data, bigtableSource: data["bigtableSource"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1BigtableSource(data["bigtableSource"]) : undefined, inlineSource: data["inlineSource"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource(data["inlineSource"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * The inline source for the input config for ImportDocuments method. */ export interface GoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource { /** * Required. A list of documents to update/create. Each document must have a * valid Document.id. Recommended max of 100 items. */ documents?: GoogleCloudDiscoveryengineV1Document[]; } function serializeGoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource(data: any): GoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource { return { ...data, documents: data["documents"] !== undefined ? data["documents"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1Document(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource(data: any): GoogleCloudDiscoveryengineV1ImportDocumentsRequestInlineSource { return { ...data, documents: data["documents"] !== undefined ? data["documents"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1Document(item))) : undefined, }; } /** * Response of the ImportDocumentsRequest. If the long running operation is * done, then this message is returned by the * google.longrunning.Operations.response field if the operation was successful. */ export interface GoogleCloudDiscoveryengineV1ImportDocumentsResponse { /** * Echoes the destination for the complete errors in the request if set. */ errorConfig?: GoogleCloudDiscoveryengineV1ImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Configuration of destination for Import related errors. */ export interface GoogleCloudDiscoveryengineV1ImportErrorConfig { /** * Cloud Storage prefix for import errors. This must be an empty, existing * Cloud Storage directory. Import errors are written to sharded files in this * directory, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string; } /** * Request message for IdentityMappingStoreService.ImportIdentityMappings */ export interface GoogleCloudDiscoveryengineV1ImportIdentityMappingsRequest { /** * The inline source to import identity mapping entries from. */ inlineSource?: GoogleCloudDiscoveryengineV1ImportIdentityMappingsRequestInlineSource; } /** * The inline source to import identity mapping entries from. */ export interface GoogleCloudDiscoveryengineV1ImportIdentityMappingsRequestInlineSource { /** * A maximum of 10000 entries can be imported at one time */ identityMappingEntries?: GoogleCloudDiscoveryengineV1IdentityMappingEntry[]; } /** * Response message for IdentityMappingStoreService.ImportIdentityMappings */ export interface GoogleCloudDiscoveryengineV1ImportIdentityMappingsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; } /** * Metadata related to the progress of the ImportSuggestionDenyListEntries * operation. This is returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for CompletionService.ImportSuggestionDenyListEntries * method. */ export interface GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequest { /** * Cloud Storage location for the input content. Only 1 file can be specified * that contains all entries to import. Supported values `gcs_source.schema` * for autocomplete suggestion deny list entry imports: * * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] per * line. */ gcsSource?: GoogleCloudDiscoveryengineV1GcsSource; /** * The Inline source for the input content for suggestion deny list entries. */ inlineSource?: GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequestInlineSource; } /** * The inline source for SuggestionDenyListEntry. */ export interface GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequestInlineSource { /** * Required. A list of all denylist entries to import. Max of 1000 items. */ entries?: GoogleCloudDiscoveryengineV1SuggestionDenyListEntry[]; } /** * Response message for CompletionService.ImportSuggestionDenyListEntries * method. */ export interface GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Count of deny list entries that failed to be imported. */ failedEntriesCount?: bigint; /** * Count of deny list entries successfully imported. */ importedEntriesCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse { return { ...data, failedEntriesCount: data["failedEntriesCount"] !== undefined ? String(data["failedEntriesCount"]) : undefined, importedEntriesCount: data["importedEntriesCount"] !== undefined ? String(data["importedEntriesCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse { return { ...data, failedEntriesCount: data["failedEntriesCount"] !== undefined ? BigInt(data["failedEntriesCount"]) : undefined, importedEntriesCount: data["importedEntriesCount"] !== undefined ? BigInt(data["importedEntriesCount"]) : undefined, }; } /** * Metadata related to the progress of the Import operation. This is returned * by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1ImportUserEventsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were processed successfully. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1ImportUserEventsMetadata(data: any): GoogleCloudDiscoveryengineV1ImportUserEventsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportUserEventsMetadata(data: any): GoogleCloudDiscoveryengineV1ImportUserEventsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for the ImportUserEvents request. */ export interface GoogleCloudDiscoveryengineV1ImportUserEventsRequest { /** * BigQuery input source. */ bigquerySource?: GoogleCloudDiscoveryengineV1BigQuerySource; /** * The desired location of errors incurred during the Import. Cannot be set * for inline user event imports. */ errorConfig?: GoogleCloudDiscoveryengineV1ImportErrorConfig; /** * Cloud Storage location for the input content. */ gcsSource?: GoogleCloudDiscoveryengineV1GcsSource; /** * The Inline source for the input content for UserEvents. */ inlineSource?: GoogleCloudDiscoveryengineV1ImportUserEventsRequestInlineSource; } function serializeGoogleCloudDiscoveryengineV1ImportUserEventsRequest(data: any): GoogleCloudDiscoveryengineV1ImportUserEventsRequest { return { ...data, inlineSource: data["inlineSource"] !== undefined ? serializeGoogleCloudDiscoveryengineV1ImportUserEventsRequestInlineSource(data["inlineSource"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportUserEventsRequest(data: any): GoogleCloudDiscoveryengineV1ImportUserEventsRequest { return { ...data, inlineSource: data["inlineSource"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1ImportUserEventsRequestInlineSource(data["inlineSource"]) : undefined, }; } /** * The inline source for the input config for ImportUserEvents method. */ export interface GoogleCloudDiscoveryengineV1ImportUserEventsRequestInlineSource { /** * Required. A list of user events to import. Recommended max of 10k items. */ userEvents?: GoogleCloudDiscoveryengineV1UserEvent[]; } function serializeGoogleCloudDiscoveryengineV1ImportUserEventsRequestInlineSource(data: any): GoogleCloudDiscoveryengineV1ImportUserEventsRequestInlineSource { return { ...data, userEvents: data["userEvents"] !== undefined ? data["userEvents"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1UserEvent(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportUserEventsRequestInlineSource(data: any): GoogleCloudDiscoveryengineV1ImportUserEventsRequestInlineSource { return { ...data, userEvents: data["userEvents"] !== undefined ? data["userEvents"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1UserEvent(item))) : undefined, }; } /** * Response of the ImportUserEventsRequest. If the long running operation was * successful, then this message is returned by the * google.longrunning.Operations.response field if the operation was successful. */ export interface GoogleCloudDiscoveryengineV1ImportUserEventsResponse { /** * Echoes the destination for the complete errors if this field was set in * the request. */ errorConfig?: GoogleCloudDiscoveryengineV1ImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Count of user events imported with complete existing Documents. */ joinedEventsCount?: bigint; /** * Count of user events imported, but with Document information not found in * the existing Branch. */ unjoinedEventsCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1ImportUserEventsResponse(data: any): GoogleCloudDiscoveryengineV1ImportUserEventsResponse { return { ...data, joinedEventsCount: data["joinedEventsCount"] !== undefined ? String(data["joinedEventsCount"]) : undefined, unjoinedEventsCount: data["unjoinedEventsCount"] !== undefined ? String(data["unjoinedEventsCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ImportUserEventsResponse(data: any): GoogleCloudDiscoveryengineV1ImportUserEventsResponse { return { ...data, joinedEventsCount: data["joinedEventsCount"] !== undefined ? BigInt(data["joinedEventsCount"]) : undefined, unjoinedEventsCount: data["unjoinedEventsCount"] !== undefined ? BigInt(data["unjoinedEventsCount"]) : undefined, }; } /** * A floating point interval. */ export interface GoogleCloudDiscoveryengineV1Interval { /** * Exclusive upper bound. */ exclusiveMaximum?: number; /** * Exclusive lower bound. */ exclusiveMinimum?: number; /** * Inclusive upper bound. */ maximum?: number; /** * Inclusive lower bound. */ minimum?: number; } /** * Information about users' licenses. */ export interface GoogleCloudDiscoveryengineV1LicenseConfig { /** * Optional. Whether the license config should be auto renewed when it * reaches the end date. */ autoRenew?: boolean; /** * Optional. The planed end date. */ endDate?: GoogleTypeDate; /** * Optional. Whether the license config is for free trial. */ freeTrial?: boolean; /** * Output only. Whether the license config is for Gemini bundle. */ readonly geminiBundle?: boolean; /** * Required. Number of licenses purchased. */ licenseCount?: bigint; /** * Immutable. Identifier. The fully qualified resource name of the license * config. Format: * `projects/{project}/locations/{location}/licenseConfigs/{license_config}` */ name?: string; /** * Required. The start date. */ startDate?: GoogleTypeDate; /** * Output only. The state of the license config. */ readonly state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "EXPIRED" | "NOT_STARTED"; /** * Required. Subscription term. */ subscriptionTerm?: | "SUBSCRIPTION_TERM_UNSPECIFIED" | "SUBSCRIPTION_TERM_ONE_MONTH" | "SUBSCRIPTION_TERM_ONE_YEAR" | "SUBSCRIPTION_TERM_THREE_YEARS"; /** * Required. Subscription tier information for the license config. */ subscriptionTier?: | "SUBSCRIPTION_TIER_UNSPECIFIED" | "SUBSCRIPTION_TIER_SEARCH" | "SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT" | "SUBSCRIPTION_TIER_NOTEBOOK_LM" | "SUBSCRIPTION_TIER_FRONTLINE_WORKER" | "SUBSCRIPTION_TIER_AGENTSPACE_STARTER" | "SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS" | "SUBSCRIPTION_TIER_ENTERPRISE" | "SUBSCRIPTION_TIER_EDU" | "SUBSCRIPTION_TIER_EDU_PRO" | "SUBSCRIPTION_TIER_EDU_EMERGING" | "SUBSCRIPTION_TIER_EDU_PRO_EMERGING"; } function serializeGoogleCloudDiscoveryengineV1LicenseConfig(data: any): GoogleCloudDiscoveryengineV1LicenseConfig { return { ...data, licenseCount: data["licenseCount"] !== undefined ? String(data["licenseCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1LicenseConfig(data: any): GoogleCloudDiscoveryengineV1LicenseConfig { return { ...data, licenseCount: data["licenseCount"] !== undefined ? BigInt(data["licenseCount"]) : undefined, }; } /** * Stats about users' licenses. */ export interface GoogleCloudDiscoveryengineV1LicenseConfigUsageStats { /** * Required. The LicenseConfig name. */ licenseConfig?: string; /** * Required. The number of licenses used. */ usedLicenseCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1LicenseConfigUsageStats(data: any): GoogleCloudDiscoveryengineV1LicenseConfigUsageStats { return { ...data, usedLicenseCount: data["usedLicenseCount"] !== undefined ? String(data["usedLicenseCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1LicenseConfigUsageStats(data: any): GoogleCloudDiscoveryengineV1LicenseConfigUsageStats { return { ...data, usedLicenseCount: data["usedLicenseCount"] !== undefined ? BigInt(data["usedLicenseCount"]) : undefined, }; } /** * Response message for CmekConfigService.ListCmekConfigs method. */ export interface GoogleCloudDiscoveryengineV1ListCmekConfigsResponse { /** * All the customer's CmekConfigs. */ cmekConfigs?: GoogleCloudDiscoveryengineV1CmekConfig[]; } /** * Response for ListControls method. */ export interface GoogleCloudDiscoveryengineV1ListControlsResponse { /** * All the Controls for a given data store. */ controls?: GoogleCloudDiscoveryengineV1Control[]; /** * Pagination token, if not returned indicates the last page. */ nextPageToken?: string; } function serializeGoogleCloudDiscoveryengineV1ListControlsResponse(data: any): GoogleCloudDiscoveryengineV1ListControlsResponse { return { ...data, controls: data["controls"] !== undefined ? data["controls"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1Control(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ListControlsResponse(data: any): GoogleCloudDiscoveryengineV1ListControlsResponse { return { ...data, controls: data["controls"] !== undefined ? data["controls"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1Control(item))) : undefined, }; } /** * Response for ListConversations method. */ export interface GoogleCloudDiscoveryengineV1ListConversationsResponse { /** * All the Conversations for a given data store. */ conversations?: GoogleCloudDiscoveryengineV1Conversation[]; /** * Pagination token, if not returned indicates the last page. */ nextPageToken?: string; } function serializeGoogleCloudDiscoveryengineV1ListConversationsResponse(data: any): GoogleCloudDiscoveryengineV1ListConversationsResponse { return { ...data, conversations: data["conversations"] !== undefined ? data["conversations"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1Conversation(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ListConversationsResponse(data: any): GoogleCloudDiscoveryengineV1ListConversationsResponse { return { ...data, conversations: data["conversations"] !== undefined ? data["conversations"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1Conversation(item))) : undefined, }; } /** * Response message for SearchTuningService.ListCustomModels method. */ export interface GoogleCloudDiscoveryengineV1ListCustomModelsResponse { /** * List of custom tuning models. */ models?: GoogleCloudDiscoveryengineV1CustomTuningModel[]; } function serializeGoogleCloudDiscoveryengineV1ListCustomModelsResponse(data: any): GoogleCloudDiscoveryengineV1ListCustomModelsResponse { return { ...data, models: data["models"] !== undefined ? data["models"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1CustomTuningModel(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ListCustomModelsResponse(data: any): GoogleCloudDiscoveryengineV1ListCustomModelsResponse { return { ...data, models: data["models"] !== undefined ? data["models"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1CustomTuningModel(item))) : undefined, }; } /** * Response message for DataStoreService.ListDataStores method. */ export interface GoogleCloudDiscoveryengineV1ListDataStoresResponse { /** * All the customer's DataStores. */ dataStores?: GoogleCloudDiscoveryengineV1DataStore[]; /** * A token that can be sent as ListDataStoresRequest.page_token to retrieve * the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Response message for DocumentService.ListDocuments method. */ export interface GoogleCloudDiscoveryengineV1ListDocumentsResponse { /** * The Documents. */ documents?: GoogleCloudDiscoveryengineV1Document[]; /** * A token that can be sent as ListDocumentsRequest.page_token to retrieve * the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } function serializeGoogleCloudDiscoveryengineV1ListDocumentsResponse(data: any): GoogleCloudDiscoveryengineV1ListDocumentsResponse { return { ...data, documents: data["documents"] !== undefined ? data["documents"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1Document(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ListDocumentsResponse(data: any): GoogleCloudDiscoveryengineV1ListDocumentsResponse { return { ...data, documents: data["documents"] !== undefined ? data["documents"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1Document(item))) : undefined, }; } /** * Response message for EngineService.ListEngines method. */ export interface GoogleCloudDiscoveryengineV1ListEnginesResponse { /** * All the customer's Engines. */ engines?: GoogleCloudDiscoveryengineV1Engine[]; /** * Not supported. */ nextPageToken?: string; } function serializeGoogleCloudDiscoveryengineV1ListEnginesResponse(data: any): GoogleCloudDiscoveryengineV1ListEnginesResponse { return { ...data, engines: data["engines"] !== undefined ? data["engines"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1Engine(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ListEnginesResponse(data: any): GoogleCloudDiscoveryengineV1ListEnginesResponse { return { ...data, engines: data["engines"] !== undefined ? data["engines"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1Engine(item))) : undefined, }; } /** * Response message for IdentityMappingStoreService.ListIdentityMappings */ export interface GoogleCloudDiscoveryengineV1ListIdentityMappingsResponse { /** * The Identity Mapping Entries. */ identityMappingEntries?: GoogleCloudDiscoveryengineV1IdentityMappingEntry[]; /** * A token that can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Response message for IdentityMappingStoreService.ListIdentityMappingStores */ export interface GoogleCloudDiscoveryengineV1ListIdentityMappingStoresResponse { /** * The Identity Mapping Stores. */ identityMappingStores?: GoogleCloudDiscoveryengineV1IdentityMappingStore[]; /** * A token that can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Response message for UserLicenseService.ListLicenseConfigUsageStats method. */ export interface GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse { /** * All the customer's LicenseConfigUsageStats. */ licenseConfigUsageStats?: GoogleCloudDiscoveryengineV1LicenseConfigUsageStats[]; } function serializeGoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse(data: any): GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse { return { ...data, licenseConfigUsageStats: data["licenseConfigUsageStats"] !== undefined ? data["licenseConfigUsageStats"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1LicenseConfigUsageStats(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse(data: any): GoogleCloudDiscoveryengineV1ListLicenseConfigsUsageStatsResponse { return { ...data, licenseConfigUsageStats: data["licenseConfigUsageStats"] !== undefined ? data["licenseConfigUsageStats"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1LicenseConfigUsageStats(item))) : undefined, }; } /** * Response message for SchemaService.ListSchemas method. */ export interface GoogleCloudDiscoveryengineV1ListSchemasResponse { /** * A token that can be sent as ListSchemasRequest.page_token to retrieve the * next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The Schemas. */ schemas?: GoogleCloudDiscoveryengineV1Schema[]; } /** * Response for ListServingConfigs method. */ export interface GoogleCloudDiscoveryengineV1ListServingConfigsResponse { /** * Pagination token, if not returned indicates the last page. */ nextPageToken?: string; /** * All the ServingConfigs for a given dataStore. */ servingConfigs?: GoogleCloudDiscoveryengineV1ServingConfig[]; } function serializeGoogleCloudDiscoveryengineV1ListServingConfigsResponse(data: any): GoogleCloudDiscoveryengineV1ListServingConfigsResponse { return { ...data, servingConfigs: data["servingConfigs"] !== undefined ? data["servingConfigs"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1ServingConfig(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ListServingConfigsResponse(data: any): GoogleCloudDiscoveryengineV1ListServingConfigsResponse { return { ...data, servingConfigs: data["servingConfigs"] !== undefined ? data["servingConfigs"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1ServingConfig(item))) : undefined, }; } /** * Response for ListSessions method. */ export interface GoogleCloudDiscoveryengineV1ListSessionsResponse { /** * Pagination token, if not returned indicates the last page. */ nextPageToken?: string; /** * All the Sessions for a given data store. */ sessions?: GoogleCloudDiscoveryengineV1Session[]; } /** * Response message for SiteSearchEngineService.ListTargetSites method. */ export interface GoogleCloudDiscoveryengineV1ListTargetSitesResponse { /** * A token that can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * List of TargetSites. */ targetSites?: GoogleCloudDiscoveryengineV1TargetSite[]; /** * The total number of items matching the request. This will always be * populated in the response. */ totalSize?: number; } /** * Response message for UserLicenseService.ListUserLicenses. */ export interface GoogleCloudDiscoveryengineV1ListUserLicensesResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * All the customer's UserLicenses. */ userLicenses?: GoogleCloudDiscoveryengineV1UserLicense[]; } /** * Media-specific user event information. */ export interface GoogleCloudDiscoveryengineV1MediaInfo { /** * The media progress time in seconds, if applicable. For example, if the end * user has finished 90 seconds of a playback video, then * MediaInfo.media_progress_duration.seconds should be set to 90. */ mediaProgressDuration?: number /* Duration */; /** * Media progress should be computed using only the media_progress_duration * relative to the media total length. This value must be between `[0, 1.0]` * inclusive. If this is not a playback or the progress cannot be computed * (e.g. ongoing livestream), this field should be unset. */ mediaProgressPercentage?: number; } function serializeGoogleCloudDiscoveryengineV1MediaInfo(data: any): GoogleCloudDiscoveryengineV1MediaInfo { return { ...data, mediaProgressDuration: data["mediaProgressDuration"] !== undefined ? data["mediaProgressDuration"] : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1MediaInfo(data: any): GoogleCloudDiscoveryengineV1MediaInfo { return { ...data, mediaProgressDuration: data["mediaProgressDuration"] !== undefined ? data["mediaProgressDuration"] : undefined, }; } /** * Detailed page information. */ export interface GoogleCloudDiscoveryengineV1PageInfo { /** * The most specific category associated with a category page. To represent * full path of category, use '>' sign to separate different hierarchies. If * '>' is part of the category name, replace it with other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: * `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for * `view-category-page` events. Other event types should not set this field. * Otherwise, an `INVALID_ARGUMENT` error is returned. */ pageCategory?: string; /** * A unique ID of a web page view. This should be kept the same for all user * events triggered from the same pageview. For example, an item detail page * view could trigger multiple events as the user is browsing the page. The * `pageview_id` property should be kept the same for all these events so that * they can be grouped together properly. When using the client side event * reporting with JavaScript pixel and Google Tag Manager, this value is * filled in automatically. */ pageviewId?: string; /** * The referrer URL of the current page. When using the client side event * reporting with JavaScript pixel and Google Tag Manager, this value is * filled in automatically. However, some browser privacy restrictions may * cause this field to be empty. */ referrerUri?: string; /** * Complete URL (window.location.href) of the user's current page. When using * the client side event reporting with JavaScript pixel and Google Tag * Manager, this value is filled in automatically. Maximum length 5,000 * characters. */ uri?: string; } /** * Detailed panel information associated with a user event. */ export interface GoogleCloudDiscoveryengineV1PanelInfo { /** * The display name of the panel. */ displayName?: string; /** * Optional. The document IDs associated with this panel. */ documents?: GoogleCloudDiscoveryengineV1DocumentInfo[]; /** * Required. The panel ID. */ panelId?: string; /** * The ordered position of the panel, if shown to the user with other panels. * If set, then total_panels must also be set. */ panelPosition?: number; /** * The total number of panels, including this one, shown to the user. Must be * set if panel_position is set. */ totalPanels?: number; } /** * Principal identifier of a user or a group. */ export interface GoogleCloudDiscoveryengineV1Principal { /** * For 3P application identities which are not present in the customer * identity provider. */ externalEntityId?: string; /** * Group identifier. For Google Workspace user account, group_id should be * the google workspace group email. For non-google identity provider user * account, group_id is the mapped group identifier configured during the * workforcepool config. */ groupId?: string; /** * User identifier. For Google Workspace user account, user_id should be the * google workspace user email. For non-google identity provider user account, * user_id is the mapped user identifier configured during the workforcepool * config. */ userId?: string; } /** * Metadata and configurations for a Google Cloud project in the service. */ export interface GoogleCloudDiscoveryengineV1Project { /** * Output only. The current status of the project's configurable billing. */ readonly configurableBillingStatus?: GoogleCloudDiscoveryengineV1ProjectConfigurableBillingStatus; /** * Output only. The timestamp when this project is created. */ readonly createTime?: Date; /** * Optional. Customer provided configurations. */ customerProvidedConfig?: GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfig; /** * Output only. Full resource name of the project, for example * `projects/{project}`. Note that when making requests, project number and * project id are both acceptable, but the server will always respond in * project number. */ readonly name?: string; /** * Output only. The timestamp when this project is successfully provisioned. * Empty value means this project is still provisioning and is not ready for * use. */ readonly provisionCompletionTime?: Date; /** * Output only. A map of terms of services. The key is the `id` of * ServiceTerms. */ readonly serviceTermsMap?: { [key: string]: GoogleCloudDiscoveryengineV1ProjectServiceTerms }; } /** * Represents the currently effective configurable billing parameters. These * values are derived from the customer's subscription history stored internally * and reflect the thresholds actively being used for billing purposes at the * time of the GetProject call. This includes the start_time of the subscription * and may differ from the values in `customer_provided_config` due to billing * rules (e.g., scale-downs taking effect only at the start of a new month). */ export interface GoogleCloudDiscoveryengineV1ProjectConfigurableBillingStatus { /** * Optional. The currently effective Indexing Core threshold. This is the * threshold against which Indexing Core usage is compared for overage * calculations. */ effectiveIndexingCoreThreshold?: bigint; /** * Optional. The currently effective Search QPM threshold in queries per * minute. This is the threshold against which QPM usage is compared for * overage calculations. */ effectiveSearchQpmThreshold?: bigint; /** * Optional. The start time of the currently active billing subscription. */ startTime?: Date; } function serializeGoogleCloudDiscoveryengineV1ProjectConfigurableBillingStatus(data: any): GoogleCloudDiscoveryengineV1ProjectConfigurableBillingStatus { return { ...data, effectiveIndexingCoreThreshold: data["effectiveIndexingCoreThreshold"] !== undefined ? String(data["effectiveIndexingCoreThreshold"]) : undefined, effectiveSearchQpmThreshold: data["effectiveSearchQpmThreshold"] !== undefined ? String(data["effectiveSearchQpmThreshold"]) : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ProjectConfigurableBillingStatus(data: any): GoogleCloudDiscoveryengineV1ProjectConfigurableBillingStatus { return { ...data, effectiveIndexingCoreThreshold: data["effectiveIndexingCoreThreshold"] !== undefined ? BigInt(data["effectiveIndexingCoreThreshold"]) : undefined, effectiveSearchQpmThreshold: data["effectiveSearchQpmThreshold"] !== undefined ? BigInt(data["effectiveSearchQpmThreshold"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Customer provided configurations. */ export interface GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfig { /** * Optional. Configuration for NotebookLM settings. */ notebooklmConfig?: GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfigNotebooklmConfig; } /** * Configuration for NotebookLM. */ export interface GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfigNotebooklmConfig { /** * Model Armor configuration to be used for sanitizing user prompts and LLM * responses. */ modelArmorConfig?: GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfigNotebooklmConfigModelArmorConfig; /** * Optional. Whether to disable the notebook sharing feature for the project. * Default to false if not specified. */ optOutNotebookSharing?: boolean; } /** * Configuration for customer defined Model Armor templates to be used for * sanitizing user prompts and LLM responses. */ export interface GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfigNotebooklmConfigModelArmorConfig { /** * Optional. The resource name of the Model Armor Template for sanitizing LLM * responses. Format: * projects/{project}/locations/{location}/templates/{template_id} If not * specified, no sanitization will be applied to the LLM response. */ responseTemplate?: string; /** * Optional. The resource name of the Model Armor Template for sanitizing * user prompts. Format: * projects/{project}/locations/{location}/templates/{template_id} If not * specified, no sanitization will be applied to the user prompt. */ userPromptTemplate?: string; } /** * Metadata about the terms of service. */ export interface GoogleCloudDiscoveryengineV1ProjectServiceTerms { /** * The last time when the project agreed to the terms of service. */ acceptTime?: Date; /** * The last time when the project declined or revoked the agreement to terms * of service. */ declineTime?: Date; /** * The unique identifier of this terms of service. Available terms: * * `GA_DATA_USE_TERMS`: [Terms for data * use](https://cloud.google.com/retail/data-use-terms). When using this as * `id`, the acceptable version to provide is `2022-11-23`. */ id?: string; /** * Whether the project has accepted/rejected the service terms or it is still * pending. */ state?: | "STATE_UNSPECIFIED" | "TERMS_ACCEPTED" | "TERMS_PENDING" | "TERMS_DECLINED"; /** * The version string of the terms of service. For acceptable values, see the * comments for id above. */ version?: string; } function serializeGoogleCloudDiscoveryengineV1ProjectServiceTerms(data: any): GoogleCloudDiscoveryengineV1ProjectServiceTerms { return { ...data, acceptTime: data["acceptTime"] !== undefined ? data["acceptTime"].toISOString() : undefined, declineTime: data["declineTime"] !== undefined ? data["declineTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ProjectServiceTerms(data: any): GoogleCloudDiscoveryengineV1ProjectServiceTerms { return { ...data, acceptTime: data["acceptTime"] !== undefined ? new Date(data["acceptTime"]) : undefined, declineTime: data["declineTime"] !== undefined ? new Date(data["declineTime"]) : undefined, }; } /** * Metadata associated with a project provision operation. */ export interface GoogleCloudDiscoveryengineV1ProvisionProjectMetadata { } /** * Request for ProjectService.ProvisionProject method. */ export interface GoogleCloudDiscoveryengineV1ProvisionProjectRequest { /** * Required. Set to `true` to specify that caller has read and would like to * give consent to the [Terms for data * use](https://cloud.google.com/retail/data-use-terms). */ acceptDataUseTerms?: boolean; /** * Required. The version of the [Terms for data * use](https://cloud.google.com/retail/data-use-terms) that caller has read * and would like to give consent to. Acceptable version is `2022-11-23`, and * this may change over time. */ dataUseTermsVersion?: string; /** * Optional. Parameters for Agentspace. */ saasParams?: GoogleCloudDiscoveryengineV1ProvisionProjectRequestSaasParams; } /** * Parameters for Agentspace. */ export interface GoogleCloudDiscoveryengineV1ProvisionProjectRequestSaasParams { /** * Optional. Set to `true` to specify that caller has read and would like to * give consent to the [Terms for Agent Space quality of service]. */ acceptBizQos?: boolean; /** * Optional. Indicates if the current request is for Biz edition (= true) or * not (= false). */ isBiz?: boolean; } /** * Metadata related to the progress of the PurgeCompletionSuggestions * operation. This is returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata(data: any): GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for CompletionService.PurgeCompletionSuggestions method. */ export interface GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsRequest { } /** * Response message for CompletionService.PurgeCompletionSuggestions method. */ export interface GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Whether the completion suggestions were successfully purged. */ purgeSucceeded?: boolean; } /** * Metadata related to the progress of the PurgeDocuments operation. This will * be returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata { /** * Operation create time. */ createTime?: Date; /** * Count of entries that encountered errors while processing. */ failureCount?: bigint; /** * Count of entries that were ignored as entries were not found. */ ignoredCount?: bigint; /** * Count of entries that were deleted successfully. */ successCount?: bigint; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1PurgeDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, failureCount: data["failureCount"] !== undefined ? String(data["failureCount"]) : undefined, ignoredCount: data["ignoredCount"] !== undefined ? String(data["ignoredCount"]) : undefined, successCount: data["successCount"] !== undefined ? String(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1PurgeDocumentsMetadata(data: any): GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, failureCount: data["failureCount"] !== undefined ? BigInt(data["failureCount"]) : undefined, ignoredCount: data["ignoredCount"] !== undefined ? BigInt(data["ignoredCount"]) : undefined, successCount: data["successCount"] !== undefined ? BigInt(data["successCount"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for DocumentService.PurgeDocuments method. */ export interface GoogleCloudDiscoveryengineV1PurgeDocumentsRequest { /** * The desired location of errors incurred during the purge. */ errorConfig?: GoogleCloudDiscoveryengineV1PurgeErrorConfig; /** * Required. Filter matching documents to purge. Only currently supported * value is `*` (all items). */ filter?: string; /** * Actually performs the purge. If `force` is set to false, return the * expected purge count without deleting any documents. */ force?: boolean; /** * Cloud Storage location for the input content. Supported `data_schema`: * * `document_id`: One valid Document.id per line. */ gcsSource?: GoogleCloudDiscoveryengineV1GcsSource; /** * Inline source for the input content for purge. */ inlineSource?: GoogleCloudDiscoveryengineV1PurgeDocumentsRequestInlineSource; } /** * The inline source for the input config for DocumentService.PurgeDocuments * method. */ export interface GoogleCloudDiscoveryengineV1PurgeDocumentsRequestInlineSource { /** * Required. A list of full resource name of documents to purge. In the * format * `projects/*\/locations/*\/collections/*\/dataStores/*\/branches/*\/documents/*`. * Recommended max of 100 items. */ documents?: string[]; } /** * Response message for DocumentService.PurgeDocuments method. If the long * running operation is successfully done, then this message is returned by the * google.longrunning.Operations.response field. */ export interface GoogleCloudDiscoveryengineV1PurgeDocumentsResponse { /** * The total count of documents purged as a result of the operation. */ purgeCount?: bigint; /** * A sample of document names that will be deleted. Only populated if `force` * is set to false. A max of 100 names will be returned and the names are * chosen at random. */ purgeSample?: string[]; } function serializeGoogleCloudDiscoveryengineV1PurgeDocumentsResponse(data: any): GoogleCloudDiscoveryengineV1PurgeDocumentsResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? String(data["purgeCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1PurgeDocumentsResponse(data: any): GoogleCloudDiscoveryengineV1PurgeDocumentsResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? BigInt(data["purgeCount"]) : undefined, }; } /** * Configuration of destination for Purge related errors. */ export interface GoogleCloudDiscoveryengineV1PurgeErrorConfig { /** * Cloud Storage prefix for purge errors. This must be an empty, existing * Cloud Storage directory. Purge errors are written to sharded files in this * directory, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string; } /** * Request message for IdentityMappingStoreService.PurgeIdentityMappings */ export interface GoogleCloudDiscoveryengineV1PurgeIdentityMappingsRequest { /** * Filter matching identity mappings to purge. The eligible field for * filtering is: * `update_time`: in ISO 8601 "zulu" format. * `external_id` * Examples: * Deleting all identity mappings updated in a time range: * `update_time > "2012-04-23T18:25:43.511Z" AND update_time < * "2012-04-23T18:30:43.511Z"` * Deleting all identity mappings for a given * external_id: `external_id = "id1"` * Deleting all identity mappings inside * an identity mapping store: `*` The filtering fields are assumed to have an * implicit AND. Should not be used with source. An error will be thrown, if * both are provided. */ filter?: string; /** * Actually performs the purge. If `force` is set to false, return the * expected purge count without deleting any identity mappings. This field is * only supported for purge with filter. For input source this field is * ignored and data will be purged regardless of the value of this field. */ force?: boolean; /** * The inline source to purge identity mapping entries from. */ inlineSource?: GoogleCloudDiscoveryengineV1PurgeIdentityMappingsRequestInlineSource; } /** * The inline source to purge identity mapping entries from. */ export interface GoogleCloudDiscoveryengineV1PurgeIdentityMappingsRequestInlineSource { /** * A maximum of 10000 entries can be purged at one time */ identityMappingEntries?: GoogleCloudDiscoveryengineV1IdentityMappingEntry[]; } /** * Metadata related to the progress of the PurgeSuggestionDenyListEntries * operation. This is returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata(data: any): GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for CompletionService.PurgeSuggestionDenyListEntries method. */ export interface GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesRequest { } /** * Response message for CompletionService.PurgeSuggestionDenyListEntries * method. */ export interface GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: GoogleRpcStatus[]; /** * Number of suggestion deny list entries purged. */ purgeCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? String(data["purgeCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse(data: any): GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse { return { ...data, purgeCount: data["purgeCount"] !== undefined ? BigInt(data["purgeCount"]) : undefined, }; } /** * Request message for PurgeUserEvents method. */ export interface GoogleCloudDiscoveryengineV1PurgeUserEventsRequest { /** * Required. The filter string to specify the events to be deleted with a * length limit of 5,000 characters. The eligible fields for filtering are: * * `eventType`: Double quoted UserEvent.event_type string. * `eventTime`: in * ISO 8601 "zulu" format. * `userPseudoId`: Double quoted string. Specifying * this will delete all events associated with a visitor. * `userId`: Double * quoted string. Specifying this will delete all events associated with a * user. Note: This API only supports purging a max range of 30 days. * Examples: * Deleting all events in a time range: `eventTime > * "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"` * * Deleting specific eventType in a time range: `eventTime > * "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" eventType * = "search"` * Deleting all events for a specific visitor in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" eventTime < * "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` * Deleting the * past 30 days of events inside a DataStore: `*` The filtering fields are * assumed to have an implicit AND. */ filter?: string; /** * The `force` field is currently not supported. Purge user event requests * will permanently delete all purgeable events. Once the development is * complete: If `force` is set to false, the method will return the expected * purge count without deleting any user events. This field will default to * false if not included in the request. */ force?: boolean; } /** * Defines a user inputed query. */ export interface GoogleCloudDiscoveryengineV1Query { /** * Output only. Unique Id for the query. */ readonly queryId?: string; /** * Plain text. */ text?: string; } /** * Record message for RankService.Rank method. */ export interface GoogleCloudDiscoveryengineV1RankingRecord { /** * The content of the record. Empty by default. At least one of title or * content should be set otherwise an INVALID_ARGUMENT error is thrown. */ content?: string; /** * The unique ID to represent the record. */ id?: string; /** * The score of this record based on the given query and selected model. The * score will be rounded to 2 decimal places. If the score is close to 0, it * will be rounded to 0.0001 to avoid returning unset. */ score?: number; /** * The title of the record. Empty by default. At least one of title or * content should be set otherwise an INVALID_ARGUMENT error is thrown. */ title?: string; } /** * Request message for RankService.Rank method. */ export interface GoogleCloudDiscoveryengineV1RankRequest { /** * If true, the response will contain only record ID and score. By default, * it is false, the response will contain record details. */ ignoreRecordDetailsInResponse?: boolean; /** * The identifier of the model to use. It is one of: * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input * token size 512. It is set to `semantic-ranker-512@latest` by default if * unspecified. */ model?: string; /** * The query to use. */ query?: string; /** * Required. A list of records to rank. */ records?: GoogleCloudDiscoveryengineV1RankingRecord[]; /** * The number of results to return. If this is unset or no bigger than zero, * returns all results. */ topN?: number; /** * The user labels applied to a resource must meet the following * requirements: * Each resource can have multiple labels, up to a maximum of * 64. * Each label must be a key-value pair. * Keys have a minimum length of * 1 character and a maximum length of 63 characters and cannot be empty. * Values can be empty and have a maximum length of 63 characters. * Keys and * values can contain only lowercase letters, numeric characters, underscores, * and dashes. All characters must use UTF-8 encoding, and international * characters are allowed. * The key portion of a label must be unique. * However, you can use the same key with multiple resources. * Keys must * start with a lowercase letter or international character. See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. */ userLabels?: { [key: string]: string }; } /** * Response message for RankService.Rank method. */ export interface GoogleCloudDiscoveryengineV1RankResponse { /** * A list of records sorted by descending score. */ records?: GoogleCloudDiscoveryengineV1RankingRecord[]; } /** * Request message for Recommend method. */ export interface GoogleCloudDiscoveryengineV1RecommendRequest { /** * Filter for restricting recommendation results with a length limit of 5,000 * characters. Currently, only filter expressions on the `filter_tags` * attribute is supported. Examples: * `(filter_tags: ANY("Red", "Blue") OR * filter_tags: ANY("Hot", "Cold"))` * `(filter_tags: ANY("Red", "Blue")) AND * NOT (filter_tags: ANY("Green"))` If `attributeFilteringSyntax` is set to * true under the `params` field, then attribute-based expressions are * expected instead of the above described tag-based syntax. Examples: * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND (language: ANY("en", "es")) OR (categories: * ANY("Movie")) If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching * the filters, set `strictFiltering` to `true` in RecommendRequest.params to * receive empty results instead. Note that the API never returns Documents * with `storageStatus` as `EXPIRED` or `DELETED` regardless of filter * choices. */ filter?: string; /** * Maximum number of results to return. Set this property to the number of * recommendation results needed. If zero, the service chooses a reasonable * default. The maximum allowed value is 100. Values above 100 are set to 100. */ pageSize?: number; /** * Additional domain specific parameters for the recommendations. Allowed * values: * `returnDocument`: Boolean. If set to `true`, the associated * Document object is returned in * RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. * If set to true, the recommendation score corresponding to each returned * Document is set in RecommendResponse.RecommendationResult.metadata. The * given score indicates the probability of a Document conversion given the * user's context and history. * `strictFiltering`: Boolean. True by default. * If set to `false`, the service returns generic (unfiltered) popular * Documents instead of empty if your filter blocks all recommendation * results. * `diversityLevel`: String. Default empty. If set to be non-empty, * then it needs to be one of: * `no-diversity` * `low-diversity` * * `medium-diversity` * `high-diversity` * `auto-diversity` This gives * request-level control and adjusts recommendation results based on Document * category. * `attributeFilteringSyntax`: Boolean. False by default. If set * to true, the `filter` field is interpreted according to the new, * attribute-based syntax. */ params?: { [key: string]: any }; /** * Required. Context about the user, what they are looking at and what action * they took to trigger the Recommend request. Note that this user event * detail won't be ingested to userEvent logs. Thus, a separate userEvent * write request is required for event logging. Don't set * UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed * ID for different users. If you are trying to receive non-personalized * recommendations (not recommended; this can negatively impact model * performance), instead set UserEvent.user_pseudo_id to a random unique ID * and leave UserEvent.user_info.user_id unset. */ userEvent?: GoogleCloudDiscoveryengineV1UserEvent; /** * The user labels applied to a resource must meet the following * requirements: * Each resource can have multiple labels, up to a maximum of * 64. * Each label must be a key-value pair. * Keys have a minimum length of * 1 character and a maximum length of 63 characters and cannot be empty. * Values can be empty and have a maximum length of 63 characters. * Keys and * values can contain only lowercase letters, numeric characters, underscores, * and dashes. All characters must use UTF-8 encoding, and international * characters are allowed. * The key portion of a label must be unique. * However, you can use the same key with multiple resources. * Keys must * start with a lowercase letter or international character. See [Requirements * for * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. */ userLabels?: { [key: string]: string }; /** * Use validate only mode for this recommendation query. If set to `true`, a * fake model is used that returns arbitrary Document IDs. Note that the * validate only mode should only be used for testing the API, or if the model * is not ready. */ validateOnly?: boolean; } function serializeGoogleCloudDiscoveryengineV1RecommendRequest(data: any): GoogleCloudDiscoveryengineV1RecommendRequest { return { ...data, userEvent: data["userEvent"] !== undefined ? serializeGoogleCloudDiscoveryengineV1UserEvent(data["userEvent"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1RecommendRequest(data: any): GoogleCloudDiscoveryengineV1RecommendRequest { return { ...data, userEvent: data["userEvent"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1UserEvent(data["userEvent"]) : undefined, }; } /** * Response message for Recommend method. */ export interface GoogleCloudDiscoveryengineV1RecommendResponse { /** * A unique attribution token. This should be included in the UserEvent logs * resulting from this recommendation, which enables accurate attribution of * recommendation model performance. */ attributionToken?: string; /** * IDs of documents in the request that were missing from the default Branch * associated with the requested ServingConfig. */ missingIds?: string[]; /** * A list of recommended Documents. The order represents the ranking (from * the most relevant Document to the least). */ results?: GoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult[]; /** * True if RecommendRequest.validate_only was set. */ validateOnly?: boolean; } function serializeGoogleCloudDiscoveryengineV1RecommendResponse(data: any): GoogleCloudDiscoveryengineV1RecommendResponse { return { ...data, results: data["results"] !== undefined ? data["results"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1RecommendResponse(data: any): GoogleCloudDiscoveryengineV1RecommendResponse { return { ...data, results: data["results"] !== undefined ? data["results"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult(item))) : undefined, }; } /** * RecommendationResult represents a generic recommendation result with * associated metadata. */ export interface GoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult { /** * Set if `returnDocument` is set to true in RecommendRequest.params. */ document?: GoogleCloudDiscoveryengineV1Document; /** * Resource ID of the recommended Document. */ id?: string; /** * Additional Document metadata or annotations. Possible values: * `score`: * Recommendation score in double value. Is set if `returnScore` is set to * true in RecommendRequest.params. */ metadata?: { [key: string]: any }; } function serializeGoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult(data: any): GoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult { return { ...data, document: data["document"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Document(data["document"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult(data: any): GoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult { return { ...data, document: data["document"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Document(data["document"]) : undefined, }; } /** * Request message for SiteSearchEngineService.RecrawlUris method. */ export interface GoogleCloudDiscoveryengineV1RecrawlUrisRequest { /** * Optional. Credential id to use for crawling. */ siteCredential?: string; /** * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise * an INVALID_ARGUMENT error is thrown. Each URI should match at least one * TargetSite in `site_search_engine`. */ uris?: string[]; } /** * Defines a reply message to user. */ export interface GoogleCloudDiscoveryengineV1Reply { /** * Summary based on search results. */ summary?: GoogleCloudDiscoveryengineV1SearchResponseSummary; } function serializeGoogleCloudDiscoveryengineV1Reply(data: any): GoogleCloudDiscoveryengineV1Reply { return { ...data, summary: data["summary"] !== undefined ? serializeGoogleCloudDiscoveryengineV1SearchResponseSummary(data["summary"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1Reply(data: any): GoogleCloudDiscoveryengineV1Reply { return { ...data, summary: data["summary"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1SearchResponseSummary(data["summary"]) : undefined, }; } /** * Safety rating corresponding to the generated content. */ export interface GoogleCloudDiscoveryengineV1SafetyRating { /** * Output only. Indicates whether the content was filtered out because of * this rating. */ readonly blocked?: boolean; /** * Output only. Harm category. */ readonly category?: | "HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY"; /** * Output only. Harm probability levels in the content. */ readonly probability?: | "HARM_PROBABILITY_UNSPECIFIED" | "NEGLIGIBLE" | "LOW" | "MEDIUM" | "HIGH"; /** * Output only. Harm probability score. */ readonly probabilityScore?: number; /** * Output only. Harm severity levels in the content. */ readonly severity?: | "HARM_SEVERITY_UNSPECIFIED" | "HARM_SEVERITY_NEGLIGIBLE" | "HARM_SEVERITY_LOW" | "HARM_SEVERITY_MEDIUM" | "HARM_SEVERITY_HIGH"; /** * Output only. Harm severity score. */ readonly severityScore?: number; } /** * Defines the structure and layout of a type of document data. */ export interface GoogleCloudDiscoveryengineV1Schema { /** * The JSON representation of the schema. */ jsonSchema?: string; /** * Immutable. The full resource name of the schema, in the format of * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * The structured representation of the schema. */ structSchema?: { [key: string]: any }; } /** * Detailed search information. */ export interface GoogleCloudDiscoveryengineV1SearchInfo { /** * An integer that specifies the current offset for pagination (the 0-indexed * starting location, amongst the products deemed by the API as relevant). See * SearchRequest.offset for definition. If this field is negative, an * `INVALID_ARGUMENT` is returned. This can only be set for `search` events. * Other event types should not set this field. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ offset?: number; /** * The order in which products are returned, if applicable. See * SearchRequest.order_by for definition and syntax. The value must be a UTF-8 * encoded string with a length limit of 1,000 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. This can only be set for `search` * events. Other event types should not set this field. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ orderBy?: string; /** * The user's search query. See SearchRequest.query for definition. The value * must be a UTF-8 encoded string with a length limit of 5,000 characters. * Otherwise, an `INVALID_ARGUMENT` error is returned. At least one of * search_query or PageInfo.page_category is required for `search` events. * Other event types should not set this field. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ searchQuery?: string; } /** * Promotion proto includes uri and other helping information to display the * promotion. */ export interface GoogleCloudDiscoveryengineV1SearchLinkPromotion { /** * Optional. The Promotion description. Maximum length: 200 characters. */ description?: string; /** * Optional. The Document the user wants to promote. For site search, leave * unset and only populate uri. Can be set along with uri. */ document?: string; /** * Optional. The enabled promotion will be returned for any serving configs * associated with the parent of the control this promotion is attached to. * This flag is used for basic site search only. */ enabled?: boolean; /** * Optional. The promotion thumbnail image url. */ imageUri?: string; /** * Required. The title of the promotion. Maximum length: 160 characters. */ title?: string; /** * Optional. The URL for the page the user wants to promote. Must be set for * site search. For other verticals, this is optional. */ uri?: string; } /** * Request message for SearchService.Search method. */ export interface GoogleCloudDiscoveryengineV1SearchRequest { /** * Boost specification to boost certain documents. For more information on * boosting, see * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) */ boostSpec?: GoogleCloudDiscoveryengineV1SearchRequestBoostSpec; /** * The branch resource name, such as * `projects/*\/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. * Use `default_branch` as the branch ID or leave this field empty, to search * documents under the default branch. */ branch?: string; /** * The default filter that is applied when a user performs a search without * checking any filters on the search page. The filter applied to every search * request when quality improvement such as query expansion is needed. In the * case a query does not have a sufficient amount of results this filter will * be used to determine whether or not to enable the query expansion flow. The * original filter will still be used for the query expanded search. This * field is strongly recommended to achieve high search quality. For more * information about filter syntax, see SearchRequest.filter. */ canonicalFilter?: string; /** * A specification for configuring the behavior of content search. */ contentSearchSpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec; /** * Specifications that define the specific DataStores to be searched, along * with configurations for those data stores. This is only considered for * Engines with multiple data stores. For engines with a single data store, * the specs directly under SearchRequest should be used. */ dataStoreSpecs?: GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec[]; /** * Optional. Config for display feature, like match highlighting on search * results. */ displaySpec?: GoogleCloudDiscoveryengineV1SearchRequestDisplaySpec; /** * Facet specifications for faceted search. If empty, no facets are returned. * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error * is returned. */ facetSpecs?: GoogleCloudDiscoveryengineV1SearchRequestFacetSpec[]; /** * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. Filter * expression is case-sensitive. If this field is unrecognizable, an * `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by * mapping the LHS filter key to a key property defined in the Vertex AI * Search backend -- this mapping is defined by the customer in their schema. * For example a media customer might have a field 'name' in their schema. In * this case the filter would look like this: filter --> name:'ANY("king * kong")' For more information about filtering including syntax and filter * operators, see * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; /** * Raw image query. */ imageQuery?: GoogleCloudDiscoveryengineV1SearchRequestImageQuery; /** * The BCP-47 language code, such as "en-US" or "sr-Latn". For more * information, see [Standard * fields](https://cloud.google.com/apis/design/standard_fields). This field * helps to better interpret the query. If a value isn't specified, the query * language code is automatically detected, which may not be accurate. */ languageCode?: string; /** * Optional. Config for natural language query understanding capabilities, * such as extracting structured field filters from the query. Refer to [this * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) * for more information. If `naturalLanguageQueryUnderstandingSpec` is not * specified, no additional natural language query understanding will be done. */ naturalLanguageQueryUnderstandingSpec?: GoogleCloudDiscoveryengineV1SearchRequestNaturalLanguageQueryUnderstandingSpec; /** * A 0-indexed integer that specifies the current offset (that is, starting * result location, amongst the Documents deemed by the API as relevant) in * search results. This field is only considered if page_token is unset. If * this field is negative, an `INVALID_ARGUMENT` is returned. A large offset * may be capped to a reasonable threshold. */ offset?: number; /** * The maximum number of results to return for OneBox. This applies to each * OneBox type individually. Default number is 10. */ oneBoxPageSize?: number; /** * The order in which documents are returned. Documents can be ordered by a * field in an Document object. Leave it unset if ordered by relevance. * `order_by` expression is case-sensitive. For more information on ordering * the website search results, see [Order web search * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results). * For more information on ordering the healthcare search results, see [Order * healthcare search * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results). * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. */ orderBy?: string; /** * Maximum number of Documents to return. The maximum allowed value depends * on the data type. Values above the maximum value are coerced to the maximum * value. * Websites with basic indexing: Default `10`, Maximum `25`. * * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: * Default `50`, Maximum `100`. If this field is negative, an * `INVALID_ARGUMENT` is returned. */ pageSize?: number; /** * A page token received from a previous SearchService.Search call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to SearchService.Search must match the call that provided the page * token. Otherwise, an `INVALID_ARGUMENT` error is returned. */ pageToken?: string; /** * Additional search parameters. For public website search only, supported * values are: * `user_country_code`: string. Default empty. If set to * non-empty, results are restricted or boosted based on the location * provided. For example, `user_country_code: "au"` For available codes see * [Country * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * * `search_type`: double. Default empty. Enables non-webpage searching * depending on the value. The only valid non-default value is 1, which * enables image searching. For example, `search_type: 1` */ params?: { [key: string]: any }; /** * Raw search query. */ query?: string; /** * The query expansion specification that specifies the conditions under * which query expansion occurs. */ queryExpansionSpec?: GoogleCloudDiscoveryengineV1SearchRequestQueryExpansionSpec; /** * Optional. The ranking expression controls the customized ranking on * retrieval documents. This overrides ServingConfig.ranking_expression. The * syntax and supported features depend on the `ranking_expression_backend` * value. If `ranking_expression_backend` is not provided, it defaults to * `RANK_BY_EMBEDDING`. If ranking_expression_backend is not provided or set * to `RANK_BY_EMBEDDING`, it should be a single function or multiple * functions that are joined by "+". * ranking_expression = function, { " + ", * function }; Supported functions: * double * relevance_score * double * * dotProduct(embedding_field_path) Function variables: * `relevance_score`: * pre-defined keywords, used for measure relevance between query and * document. * `embedding_field_path`: the document embedding field used with * query embedding vector. * `dotProduct`: embedding function between * `embedding_field_path` and query embedding vector. Example ranking * expression: If document has an embedding field doc_embedding, the ranking * expression could be `0.5 * relevance_score + 0.3 * * dotProduct(doc_embedding)`. If ranking_expression_backend is set to * `RANK_BY_FORMULA`, the following expression types (and combinations of * those chained using + or * operators) are supported: * `double` * `signal` * * `log(signal)` * `exp(signal)` * `rr(signal, double > 0)` -- reciprocal * rank transformation with second argument being a denominator constant. * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise. * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns signal2 * | double, else returns signal1. Here are a few examples of ranking formulas * that use the supported ranking expression types: - `0.2 * * semantic_similarity_score + 0.8 * log(keyword_similarity_score)` -- mostly * rank by the logarithm of `keyword_similarity_score` with slight * `semantic_smilarity_score` adjustment. - `0.2 * * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * * is_nan(keyword_similarity_score)` -- rank by the exponent of * `semantic_similarity_score` filling the value with 0 if it's NaN, also add * constant 0.3 adjustment to the final score if `semantic_similarity_score` * is NaN. - `0.2 * rr(semantic_similarity_score, 16) + 0.8 * * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank of * `keyword_similarity_score` with slight adjustment of reciprocal rank of * `semantic_smilarity_score`. The following signals are supported: * * `semantic_similarity_score`: semantic similarity adjustment that is * calculated using the embeddings generated by a proprietary Google model. * This score determines how semantically similar a search query is to a * document. * `keyword_similarity_score`: keyword match adjustment uses the * Best Match 25 (BM25) ranking function. This score is calculated using a * probabilistic model to estimate the probability that a document is relevant * to a given query. * `relevance_score`: semantic relevance adjustment that * uses a proprietary Google model to determine the meaning and intent behind * a user's query in context with the content in the documents. * `pctr_rank`: * predicted conversion rate adjustment as a rank use predicted Click-through * rate (pCTR) to gauge the relevance and attractiveness of a search result * from a user's perspective. A higher pCTR suggests that the result is more * likely to satisfy the user's query and intent, making it a valuable signal * for ranking. * `freshness_rank`: freshness adjustment as a rank * * `document_age`: The time in hours elapsed since the document was last * updated, a floating-point number (e.g., 0.25 means 15 minutes). * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary Google * model to determine the keyword-based overlap between the query and the * document. * `base_rank`: the default rank of the result */ rankingExpression?: string; /** * Optional. The backend to use for the ranking expression evaluation. */ rankingExpressionBackend?: | "RANKING_EXPRESSION_BACKEND_UNSPECIFIED" | "BYOE" | "CLEARBOX" | "RANK_BY_EMBEDDING" | "RANK_BY_FORMULA"; /** * Optional. The specification for returning the relevance score. */ relevanceScoreSpec?: GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec; /** * The relevance threshold of the search results. Default to Google defined * threshold, leveraging a balance of precision and recall to deliver both * highly accurate results and comprehensive coverage of relevant information. * This feature is not supported for healthcare search. */ relevanceThreshold?: | "RELEVANCE_THRESHOLD_UNSPECIFIED" | "LOWEST" | "LOW" | "MEDIUM" | "HIGH"; /** * Whether to turn on safe search. This is only supported for website search. */ safeSearch?: boolean; /** * Search as you type configuration. Only supported for the * IndustryVertical.MEDIA vertical. */ searchAsYouTypeSpec?: GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec; /** * The session resource name. Optional. Session allows users to do multi-turn * /search API calls or coordination between /search API calls and /answer API * calls. Example #1 (multi-turn /search API calls): Call /search API with the * session ID generated in the first call. Here, the previous search query * gets considered in query standing. I.e., if the first query is "How did * Alphabet do in 2022?" and the current query is "How about 2023?", the * current query will be interpreted as "How did Alphabet do in 2023?". * Example #2 (coordination between /search API calls and /answer API calls): * Call /answer API with the session ID generated in the first call. Here, the * answer generation happens in the context of the search results from the * first search call. Multi-turn Search feature is currently at private GA * stage. Please use v1alpha or v1beta version instead before we launch this * feature to public GA. Or ask for allowlisting through Google Support team. */ session?: string; /** * Session specification. Can be used only when `session` is set. */ sessionSpec?: GoogleCloudDiscoveryengineV1SearchRequestSessionSpec; /** * The spell correction specification that specifies the mode under which * spell correction takes effect. */ spellCorrectionSpec?: GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec; /** * Information about the end user. Highly recommended for analytics and * personalization. UserInfo.user_agent is used to deduce `device_type` for * analytics. */ userInfo?: GoogleCloudDiscoveryengineV1UserInfo; /** * The user labels applied to a resource must meet the following * requirements: * Each resource can have multiple labels, up to a maximum of * 64. * Each label must be a key-value pair. * Keys have a minimum length of * 1 character and a maximum length of 63 characters and cannot be empty. * Values can be empty and have a maximum length of 63 characters. * Keys and * values can contain only lowercase letters, numeric characters, underscores, * and dashes. All characters must use UTF-8 encoding, and international * characters are allowed. * The key portion of a label must be unique. * However, you can use the same key with multiple resources. * Keys must * start with a lowercase letter or international character. See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. */ userLabels?: { [key: string]: string }; /** * Optional. A unique identifier for tracking visitors. For example, this * could be implemented with an HTTP cookie, which should be able to uniquely * identify a visitor on a single device. This unique identifier should not * change if the visitor logs in or out of the website. This field should NOT * have a fixed value such as `unknown_visitor`. This should be the same * identifier as UserEvent.user_pseudo_id and * CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ userPseudoId?: string; } /** * Boost specification to boost certain documents. */ export interface GoogleCloudDiscoveryengineV1SearchRequestBoostSpec { /** * Condition boost specifications. If a document matches multiple conditions * in the specifications, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of specifications * is 20. */ conditionBoostSpecs?: GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpec[]; } /** * Boost applies to documents which match a condition. */ export interface GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpec { /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. Setting to 1.0 gives the document a * big promotion. However, it does not necessarily mean that the boosted * document will be the top result at all times, nor that other documents will * be excluded. Results could still be shown even when none of them matches * the condition. And results that are significantly more relevant to the * search query can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results that * are deeply relevant might still be shown. The document will have an * upstream battle to get a fairly high ranking, but it is not blocked out * completely. Setting to 0.0 means no boost applied. The boosting condition * is ignored. Only one of the (condition, boost) combination or the * boost_control_spec below are set. If both are set then the global boost is * ignored and the more fine-grained boost_control_spec is applied. */ boost?: number; /** * Complex specification for custom ranking based on customer defined * attribute value. */ boostControlSpec?: GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec; /** * An expression which specifies a boost condition. The syntax and supported * fields are the same as a filter expression. See SearchRequest.filter for * detail syntax and limitations. Examples: * To boost documents with document * ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: * ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` */ condition?: string; } /** * Specification for custom ranking based on customer specified attribute * value. It provides more controls for customized ranking than the simple * (condition, boost) combination above. */ export interface GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec { /** * The attribute type to be used to determine the boost amount. The attribute * value can be derived from the field value of the specified field_name. In * the case of numerical it is straightforward i.e. attribute_value = * numerical_field_value. In the case of freshness however, attribute_value = * (time.now() - datetime_field_value). */ attributeType?: | "ATTRIBUTE_TYPE_UNSPECIFIED" | "NUMERICAL" | "FRESHNESS"; /** * The control points used to define the curve. The monotonic function * (defined through the interpolation_type above) passes through the control * points listed here. */ controlPoints?: GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint[]; /** * The name of the field whose value will be used to determine the boost * amount. */ fieldName?: string; /** * The interpolation type to be applied to connect the control points listed * below. */ interpolationType?: | "INTERPOLATION_TYPE_UNSPECIFIED" | "LINEAR"; } /** * The control points used to define the curve. The curve defined through these * control points can only be monotonically increasing or decreasing(constant * values are acceptable). */ export interface GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint { /** * Can be one of: 1. The numerical field value. 2. The duration spec for * freshness: The value must be formatted as an XSD `dayTimeDuration` value (a * restricted subset of an ISO 8601 duration value). The pattern for this is: * `nDnM]`. */ attributeValue?: string; /** * The value between -1 to 1 by which to boost the score if the * attribute_value evaluates to the value specified above. */ boostAmount?: number; } /** * A specification for configuring the behavior of content search. */ export interface GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec { /** * Specifies the chunk spec to be returned from the search response. Only * available if the SearchRequest.ContentSearchSpec.search_result_mode is set * to CHUNKS */ chunkSpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec; /** * If there is no extractive_content_spec provided, there will be no * extractive answer in the search response. */ extractiveContentSpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec; /** * Specifies the search result mode. If unspecified, the search result mode * defaults to `DOCUMENTS`. */ searchResultMode?: | "SEARCH_RESULT_MODE_UNSPECIFIED" | "DOCUMENTS" | "CHUNKS"; /** * If `snippetSpec` is not specified, snippets are not included in the search * response. */ snippetSpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec; /** * If `summarySpec` is not specified, summaries are not included in the * search response. */ summarySpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec; } /** * Specifies the chunk spec to be returned from the search response. Only * available if the SearchRequest.ContentSearchSpec.search_result_mode is set to * CHUNKS */ export interface GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec { /** * The number of next chunks to be returned of the current chunk. The maximum * allowed value is 3. If not specified, no next chunks will be returned. */ numNextChunks?: number; /** * The number of previous chunks to be returned of the current chunk. The * maximum allowed value is 3. If not specified, no previous chunks will be * returned. */ numPreviousChunks?: number; } /** * A specification for configuring the extractive content in a search response. */ export interface GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec { /** * The maximum number of extractive answers returned in each search result. * An extractive answer is a verbatim answer extracted from the original * document, which provides a precise and contextually relevant answer to the * search query. If the number of matching answers is less than the * `max_extractive_answer_count`, return all of the answers. Otherwise, return * the `max_extractive_answer_count`. At most five answers are returned for * each SearchResult. */ maxExtractiveAnswerCount?: number; /** * The max number of extractive segments returned in each search result. Only * applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED * or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is * a text segment extracted from the original document that is relevant to the * search query, and, in general, more verbose than an extractive answer. The * segment could then be used as input for LLMs to generate summaries and * answers. If the number of matching segments is less than * `max_extractive_segment_count`, return all of the segments. Otherwise, * return the `max_extractive_segment_count`. */ maxExtractiveSegmentCount?: number; /** * Return at most `num_next_segments` segments after each selected segments. */ numNextSegments?: number; /** * Specifies whether to also include the adjacent from each selected * segments. Return at most `num_previous_segments` segments before each * selected segments. */ numPreviousSegments?: number; /** * Specifies whether to return the confidence score from the extractive * segments in each search result. This feature is available only for new or * allowlisted data stores. To allowlist your data store, contact your * Customer Engineer. The default value is `false`. */ returnExtractiveSegmentScore?: boolean; } /** * A specification for configuring snippets in a search response. */ export interface GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec { /** * [DEPRECATED] This field is deprecated. To control snippet return, use * `return_snippet` field. For backwards compatibility, we will return snippet * if max_snippet_count > 0. */ maxSnippetCount?: number; /** * [DEPRECATED] This field is deprecated and will have no affect on the * snippet. */ referenceOnly?: boolean; /** * If `true`, then return snippet. If no snippet can be generated, we return * "No snippet is available for this page." A `snippet_status` with `SUCCESS` * or `NO_SNIPPET_AVAILABLE` will also be returned. */ returnSnippet?: boolean; } /** * A specification for configuring a summary returned in a search response. */ export interface GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec { /** * Specifies whether to filter out adversarial queries. The default value is * `false`. Google employs search-query classification to detect adversarial * queries. No summary is returned if the search query is classified as an * adversarial query. For example, a user might ask a question regarding * negative comments about the company or submit a query designed to generate * unsafe, policy-violating output. If this field is set to `true`, we skip * generating summaries for adversarial queries and return fallback messages * instead. */ ignoreAdversarialQuery?: boolean; /** * Optional. Specifies whether to filter out jail-breaking queries. The * default value is `false`. Google employs search-query classification to * detect jail-breaking queries. No summary is returned if the search query is * classified as a jail-breaking query. A user might add instructions to the * query to change the tone, style, language, content of the answer, or ask * the model to act as a different entity, e.g. "Reply in the tone of a * competing company's CEO". If this field is set to `true`, we skip * generating summaries for jail-breaking queries and return fallback messages * instead. */ ignoreJailBreakingQuery?: boolean; /** * Specifies whether to filter out queries that have low relevance. The * default value is `false`. If this field is set to `false`, all search * results are used regardless of relevance to generate answers. If set to * `true`, only queries with high relevance search results will generate * answers. */ ignoreLowRelevantContent?: boolean; /** * Specifies whether to filter out queries that are not summary-seeking. The * default value is `false`. Google employs search-query classification to * detect summary-seeking queries. No summary is returned if the search query * is classified as a non-summary seeking query. For example, `why is the sky * blue` and `Who is the best soccer player in the world?` are summary-seeking * queries, but `SFO airport` and `world cup 2026` are not. They are most * likely navigational queries. If this field is set to `true`, we skip * generating summaries for non-summary seeking queries and return fallback * messages instead. */ ignoreNonSummarySeekingQuery?: boolean; /** * Specifies whether to include citations in the summary. The default value * is `false`. When this field is set to `true`, summaries include in-line * citation numbers. Example summary including citations: BigQuery is Google * Cloud's fully managed and completely serverless enterprise data warehouse * [1]. BigQuery supports all data types, works across clouds, and has * built-in machine learning and business intelligence, all within a unified * platform [2, 3]. The citation numbers refer to the returned search results * and are 1-indexed. For example, [1] means that the sentence is attributed * to the first search result. [2, 3] means that the sentence is attributed to * both the second and third search results. */ includeCitations?: boolean; /** * Language code for Summary. Use language tags defined by * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an * experimental feature. */ languageCode?: string; /** * If specified, the spec will be used to modify the prompt provided to the * LLM. */ modelPromptSpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec; /** * If specified, the spec will be used to modify the model specification * provided to the LLM. */ modelSpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec; /** * The number of top results to generate the summary from. If the number of * results returned is less than `summaryResultCount`, the summary is * generated from all of the results. At most 10 results for documents mode, * or 50 for chunks mode, can be used to generate a summary. The chunks mode * is used when SearchRequest.ContentSearchSpec.search_result_mode is set to * CHUNKS. */ summaryResultCount?: number; /** * If true, answer will be generated from most relevant chunks from top * search results. This feature will improve summary quality. Note that with * this feature enabled, not all top search results will be referenced and * included in the reference list, so the citation source index only points to * the search results listed in the reference list. */ useSemanticChunks?: boolean; } /** * Specification of the prompt to use with the model. */ export interface GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec { /** * Text at the beginning of the prompt that instructs the assistant. Examples * are available in the user guide. */ preamble?: string; } /** * Specification of the model. */ export interface GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec { /** * The model version used to generate the summary. Supported values are: * * `stable`: string. Default value when no value is specified. Uses a * generally available, fine-tuned model. For more information, see [Answer * generation model versions and * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * `preview`: string. (Public preview) Uses a preview model. For more * information, see [Answer generation model versions and * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). */ version?: string; } /** * A struct to define data stores to filter on in a search call and * configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error * is returned. */ export interface GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec { /** * Optional. Boost specification to boost certain documents. For more * information on boosting, see * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) */ boostSpec?: GoogleCloudDiscoveryengineV1SearchRequestBoostSpec; /** * Optional. Custom search operators which if specified will be used to * filter results from workspace data stores. For more information on custom * search operators, see * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299). */ customSearchOperators?: string; /** * Required. Full resource name of DataStore, such as * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * The path must include the project number, project id is not supported for * this field. */ dataStore?: string; /** * Optional. Filter specification to filter documents in the data store * specified by data_store field. For more information on filtering, see * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; } /** * Specifies features for display, like match highlighting. */ export interface GoogleCloudDiscoveryengineV1SearchRequestDisplaySpec { /** * The condition under which match highlighting should occur. */ matchHighlightingCondition?: | "MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED" | "MATCH_HIGHLIGHTING_DISABLED" | "MATCH_HIGHLIGHTING_ENABLED"; } /** * A facet specification to perform faceted search. */ export interface GoogleCloudDiscoveryengineV1SearchRequestFacetSpec { /** * Enables dynamic position for this facet. If set to true, the position of * this facet among all facets in the response is determined automatically. If * dynamic facets are enabled, it is ordered together. If set to false, the * position of this facet in the response is the same as in the request, and * it is ranked before the facets with dynamic position enable and all dynamic * facets. For example, you may always want to have rating facet returned in * the response, but it's not necessarily to always display the rating facet * at the top. In that case, you can set enable_dynamic_position to true so * that the position of rating facet in response is determined automatically. * Another example, assuming you have the following facets in the request: * * "rating", enable_dynamic_position = true * "price", enable_dynamic_position * = false * "brands", enable_dynamic_position = false And also you have a * dynamic facets enabled, which generates a facet `gender`. Then the final * order of the facets in the response can be ("price", "brands", "rating", * "gender") or ("price", "brands", "gender", "rating") depends on how API * orders "gender" and "rating" facets. However, notice that "price" and * "brands" are always ranked at first and second position because their * enable_dynamic_position is false. */ enableDynamicPosition?: boolean; /** * List of keys to exclude when faceting. By default, FacetKey.key is not * excluded from the filter unless it is listed in this field. Listing a facet * key in this field allows its values to appear as facet results, even when * they are filtered out of search results. Using this field does not affect * what search results are returned. For example, suppose there are 100 * documents with the color facet "Red" and 200 documents with the color facet * "Blue". A query containing the filter "color:ANY("Red")" and having "color" * as FacetKey.key would by default return only "Red" documents in the search * results, and also return "Red" with count 100 as the only color facet. * Although there are also blue documents available, "Blue" would not be shown * as an available facet value. If "color" is listed in "excludedFilterKeys", * then the query returns the facet values "Red" with count 100 and "Blue" * with count 200, because the "color" key is now excluded from the filter. * Because this field doesn't affect search results, the search results are * still correctly filtered to return only "Red" documents. A maximum of 100 * values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. */ excludedFilterKeys?: string[]; /** * Required. The facet key specification. */ facetKey?: GoogleCloudDiscoveryengineV1SearchRequestFacetSpecFacetKey; /** * Maximum facet values that are returned for this facet. If unspecified, * defaults to 20. The maximum allowed value is 300. Values above 300 are * coerced to 300. For aggregation in healthcare search, when the * [FacetKey.key] is "healthcare_aggregation_key", the limit will be * overridden to 10,000 internally, regardless of the value set here. If this * field is negative, an `INVALID_ARGUMENT` is returned. */ limit?: number; } /** * Specifies how a facet is computed. */ export interface GoogleCloudDiscoveryengineV1SearchRequestFacetSpecFacetKey { /** * True to make facet keys case insensitive when getting faceting values with * prefixes or contains; false otherwise. */ caseInsensitive?: boolean; /** * Only get facet values that contain the given strings. For example, suppose * "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > * 2022". If set "contains" to "2022", the "category" facet only contains * "Action > 2022" and "Sci-Fi > 2022". Only supported on textual fields. * Maximum is 10. */ contains?: string[]; /** * Set only if values should be bucketed into intervals. Must be set for * facets with numerical values. Must not be set for facet with text values. * Maximum number of intervals is 30. */ intervals?: GoogleCloudDiscoveryengineV1Interval[]; /** * Required. Supported textual and numerical facet keys in Document object, * over which the facet values are computed. Facet key is case-sensitive. */ key?: string; /** * The order in which documents are returned. Allowed values are: * "count * desc", which means order by SearchResponse.Facet.values.count descending. * * "value desc", which means order by SearchResponse.Facet.values.value * descending. Only applies to textual facets. If not set, textual values are * sorted in [natural * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical * intervals are sorted in the order given by FacetSpec.FacetKey.intervals. */ orderBy?: string; /** * Only get facet values that start with the given string prefix. For * example, suppose "category" has three values "Action > 2022", "Action > * 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" * facet only contains "Action > 2022" and "Action > 2021". Only supported on * textual fields. Maximum is 10. */ prefixes?: string[]; /** * Only get facet for the given restricted values. Only supported on textual * fields. For example, suppose "category" has three values "Action > 2022", * "Action > 2021" and "Sci-Fi > 2022". If set "restricted_values" to "Action * > 2022", the "category" facet only contains "Action > 2022". Only supported * on textual fields. Maximum is 10. */ restrictedValues?: string[]; } /** * Specifies the image query input. */ export interface GoogleCloudDiscoveryengineV1SearchRequestImageQuery { /** * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP. */ imageBytes?: string; } /** * Specification to enable natural language understanding capabilities for * search requests. */ export interface GoogleCloudDiscoveryengineV1SearchRequestNaturalLanguageQueryUnderstandingSpec { /** * Optional. Allowlist of fields that can be used for natural language filter * extraction. By default, if this is unspecified, all indexable fields are * eligible for natural language filter extraction (but are not guaranteed to * be used). If any fields are specified in allowed_field_names, only the * fields that are both marked as indexable in the schema and specified in the * allowlist will be eligible for natural language filter extraction. Note: * for multi-datastore search, this is not yet supported, and will be ignored. */ allowedFieldNames?: string[]; /** * Optional. Controls behavior of how extracted filters are applied to the * search. The default behavior depends on the request. For single datastore * structured search, the default is `HARD_FILTER`. For multi-datastore * search, the default behavior is `SOFT_BOOST`. Location-based filters are * always applied as hard filters, and the `SOFT_BOOST` setting will not * affect them. This field is only used if * SearchRequest.natural_language_query_understanding_spec.filter_extraction_condition * is set to FilterExtractionCondition.ENABLED. */ extractedFilterBehavior?: | "EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED" | "HARD_FILTER" | "SOFT_BOOST"; /** * The condition under which filter extraction should occur. Server behavior * defaults to `DISABLED`. */ filterExtractionCondition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "ENABLED"; /** * Field names used for location-based filtering, where geolocation filters * are detected in natural language search queries. Only valid when the * FilterExtractionCondition is set to `ENABLED`. If this field is set, it * overrides the field names set in * ServingConfig.geo_search_query_detection_field_names. */ geoSearchQueryDetectionFieldNames?: string[]; } /** * Specification to determine under which conditions query expansion should * occur. */ export interface GoogleCloudDiscoveryengineV1SearchRequestQueryExpansionSpec { /** * The condition under which query expansion should occur. Default to * Condition.DISABLED. */ condition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "AUTO"; /** * Whether to pin unexpanded results. If this field is set to true, * unexpanded products are always at the top of the search results, followed * by the expanded results. */ pinUnexpandedResults?: boolean; } /** * The specification for returning the document relevance score. */ export interface GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec { /** * Optional. Whether to return the relevance score for search results. The * higher the score, the more relevant the document is to the query. */ returnRelevanceScore?: boolean; } /** * Specification for search as you type in search requests. */ export interface GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec { /** * The condition under which search as you type should occur. Default to * Condition.DISABLED. */ condition?: | "CONDITION_UNSPECIFIED" | "DISABLED" | "ENABLED" | "AUTO"; } /** * Session specification. Multi-turn Search feature is currently at private GA * stage. Please use v1alpha or v1beta version instead before we launch this * feature to public GA. Or ask for allowlisting through Google Support team. */ export interface GoogleCloudDiscoveryengineV1SearchRequestSessionSpec { /** * If set, the search result gets stored to the "turn" specified by this * query ID. Example: Let's say the session looks like this: session { name: * ".../sessions/xxx" turns { query { text: "What is foo?" query_id: * ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How * about bar then?" query_id: ".../questions/zzz" } } } The user can call * /search API with a request like this: session: ".../sessions/xxx" * session_spec { query_id: ".../questions/zzz" } Then, the API stores the * search result, associated with the last turn. The stored search result can * be used by a subsequent /answer API call (with the session ID and the query * ID specified). Also, it is possible to call /search and /answer in parallel * with the same session ID & query ID. */ queryId?: string; /** * The number of top search results to persist. The persisted search results * can be used for the subsequent /answer api call. This field is similar to * the `summary_result_count` field in * SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most * 10 results for documents mode, or 50 for chunks mode. */ searchResultPersistenceCount?: number; } /** * The specification for query spell correction. */ export interface GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec { /** * The mode under which spell correction replaces the original search query. * Defaults to Mode.AUTO. */ mode?: | "MODE_UNSPECIFIED" | "SUGGESTION_ONLY" | "AUTO"; } /** * Response message for SearchService.Search method. */ export interface GoogleCloudDiscoveryengineV1SearchResponse { /** * A unique search token. This should be included in the UserEvent logs * resulting from this search, which enables accurate attribution of search * model performance. This also helps to identify a request during the * customer support scenarios. */ attributionToken?: string; /** * Contains the spell corrected query, if found. If the spell correction type * is AUTOMATIC, then the search results are based on corrected_query. * Otherwise the original query is used for search. */ correctedQuery?: string; /** * Results of facets requested by user. */ facets?: GoogleCloudDiscoveryengineV1SearchResponseFacet[]; /** * A token that can be sent as SearchRequest.page_token to retrieve the next * page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * Query expansion information for the returned results. */ queryExpansionInfo?: GoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo; /** * The URI of a customer-defined redirect page. If redirect action is * triggered, no search is performed, and only redirect_uri and * attribution_token are set in the response. */ redirectUri?: string; /** * A list of matched documents. The order represents the ranking. */ results?: GoogleCloudDiscoveryengineV1SearchResponseSearchResult[]; /** * Promotions for site search. */ searchLinkPromotions?: GoogleCloudDiscoveryengineV1SearchLinkPromotion[]; /** * Session information. Only set if SearchRequest.session is provided. See * its description for more details. */ sessionInfo?: GoogleCloudDiscoveryengineV1SearchResponseSessionInfo; /** * A summary as part of the search results. This field is only returned if * SearchRequest.ContentSearchSpec.summary_spec is set. */ summary?: GoogleCloudDiscoveryengineV1SearchResponseSummary; /** * The estimated total count of matched items irrespective of pagination. The * count of results returned by pagination may be less than the total_size * that matches. */ totalSize?: number; } function serializeGoogleCloudDiscoveryengineV1SearchResponse(data: any): GoogleCloudDiscoveryengineV1SearchResponse { return { ...data, facets: data["facets"] !== undefined ? data["facets"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1SearchResponseFacet(item))) : undefined, queryExpansionInfo: data["queryExpansionInfo"] !== undefined ? serializeGoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo(data["queryExpansionInfo"]) : undefined, results: data["results"] !== undefined ? data["results"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1SearchResponseSearchResult(item))) : undefined, summary: data["summary"] !== undefined ? serializeGoogleCloudDiscoveryengineV1SearchResponseSummary(data["summary"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponse(data: any): GoogleCloudDiscoveryengineV1SearchResponse { return { ...data, facets: data["facets"] !== undefined ? data["facets"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1SearchResponseFacet(item))) : undefined, queryExpansionInfo: data["queryExpansionInfo"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo(data["queryExpansionInfo"]) : undefined, results: data["results"] !== undefined ? data["results"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1SearchResponseSearchResult(item))) : undefined, summary: data["summary"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1SearchResponseSummary(data["summary"]) : undefined, }; } /** * A facet result. */ export interface GoogleCloudDiscoveryengineV1SearchResponseFacet { /** * Whether the facet is dynamically generated. */ dynamicFacet?: boolean; /** * The key for this facet. For example, `"colors"` or `"price"`. It matches * SearchRequest.FacetSpec.FacetKey.key. */ key?: string; /** * The facet values for this field. */ values?: GoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue[]; } function serializeGoogleCloudDiscoveryengineV1SearchResponseFacet(data: any): GoogleCloudDiscoveryengineV1SearchResponseFacet { return { ...data, values: data["values"] !== undefined ? data["values"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseFacet(data: any): GoogleCloudDiscoveryengineV1SearchResponseFacet { return { ...data, values: data["values"] !== undefined ? data["values"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue(item))) : undefined, }; } /** * A facet value which contains value names and their count. */ export interface GoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue { /** * Number of items that have this facet value. */ count?: bigint; /** * Interval value for a facet, such as 10, 20) for facet "price". It matches * [SearchRequest.FacetSpec.FacetKey.intervals. */ interval?: GoogleCloudDiscoveryengineV1Interval; /** * Text value of a facet, such as "Black" for facet "colors". */ value?: string; } function serializeGoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue(data: any): GoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue { return { ...data, count: data["count"] !== undefined ? String(data["count"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue(data: any): GoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue { return { ...data, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, }; } /** * Information describing query expansion including whether expansion has * occurred. */ export interface GoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo { /** * Bool describing whether query expansion has occurred. */ expandedQuery?: boolean; /** * Number of pinned results. This field will only be set when expansion * happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set * to true. */ pinnedResultCount?: bigint; } function serializeGoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo(data: any): GoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo { return { ...data, pinnedResultCount: data["pinnedResultCount"] !== undefined ? String(data["pinnedResultCount"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo(data: any): GoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo { return { ...data, pinnedResultCount: data["pinnedResultCount"] !== undefined ? BigInt(data["pinnedResultCount"]) : undefined, }; } /** * Represents the search results. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSearchResult { /** * The chunk data in the search response if the * SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. */ chunk?: GoogleCloudDiscoveryengineV1Chunk; /** * The document data snippet in the search response. Only fields that are * marked as `retrievable` are populated. */ document?: GoogleCloudDiscoveryengineV1Document; /** * Document.id of the searched Document. */ id?: string; /** * Output only. Google provided available scores. */ readonly modelScores?: { [key: string]: GoogleCloudDiscoveryengineV1DoubleList }; /** * Optional. A set of ranking signals associated with the result. */ rankSignals?: GoogleCloudDiscoveryengineV1SearchResponseSearchResultRankSignals; } function serializeGoogleCloudDiscoveryengineV1SearchResponseSearchResult(data: any): GoogleCloudDiscoveryengineV1SearchResponseSearchResult { return { ...data, document: data["document"] !== undefined ? serializeGoogleCloudDiscoveryengineV1Document(data["document"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseSearchResult(data: any): GoogleCloudDiscoveryengineV1SearchResponseSearchResult { return { ...data, document: data["document"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1Document(data["document"]) : undefined, }; } /** * A set of ranking signals. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSearchResultRankSignals { /** * Optional. Combined custom boosts for a doc. */ boostingFactor?: number; /** * Optional. A list of custom clearbox signals. */ customSignals?: GoogleCloudDiscoveryengineV1SearchResponseSearchResultRankSignalsCustomSignal[]; /** * Optional. The default rank of the result. */ defaultRank?: number; /** * Optional. Age of the document in hours. */ documentAge?: number; /** * Optional. Keyword matching adjustment. */ keywordSimilarityScore?: number; /** * Optional. Predicted conversion rate adjustment as a rank. */ pctrRank?: number; /** * Optional. Semantic relevance adjustment. */ relevanceScore?: number; /** * Optional. Semantic similarity adjustment. */ semanticSimilarityScore?: number; /** * Optional. Topicality adjustment as a rank. */ topicalityRank?: number; } /** * Custom clearbox signal represented by name and value pair. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSearchResultRankSignalsCustomSignal { /** * Optional. Name of the signal. */ name?: string; /** * Optional. Float value representing the ranking signal (e.g. 1.25 for * BM25). */ value?: number; } /** * Information about the session. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSessionInfo { /** * Name of the session. If the auto-session mode is used (when * SearchRequest.session ends with "-"), this field holds the newly generated * session name. */ name?: string; /** * Query ID that corresponds to this search API call. One session can have * multiple turns, each with a unique query ID. By specifying the session name * and this query ID in the Answer API call, the answer generation happens in * the context of the search results from this search call. */ queryId?: string; } /** * Summary of the top N search results specified by the summary spec. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSummary { /** * A collection of Safety Attribute categories and their associated * confidence scores. */ safetyAttributes?: GoogleCloudDiscoveryengineV1SearchResponseSummarySafetyAttributes; /** * Additional summary-skipped reasons. This provides the reason for ignored * cases. If nothing is skipped, this field is not set. */ summarySkippedReasons?: | "SUMMARY_SKIPPED_REASON_UNSPECIFIED" | "ADVERSARIAL_QUERY_IGNORED" | "NON_SUMMARY_SEEKING_QUERY_IGNORED" | "OUT_OF_DOMAIN_QUERY_IGNORED" | "POTENTIAL_POLICY_VIOLATION" | "LLM_ADDON_NOT_ENABLED" | "NO_RELEVANT_CONTENT" | "JAIL_BREAKING_QUERY_IGNORED" | "CUSTOMER_POLICY_VIOLATION" | "NON_SUMMARY_SEEKING_QUERY_IGNORED_V2" | "TIME_OUT"[]; /** * The summary content. */ summaryText?: string; /** * Summary with metadata information. */ summaryWithMetadata?: GoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata; } function serializeGoogleCloudDiscoveryengineV1SearchResponseSummary(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummary { return { ...data, summaryWithMetadata: data["summaryWithMetadata"] !== undefined ? serializeGoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata(data["summaryWithMetadata"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseSummary(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummary { return { ...data, summaryWithMetadata: data["summaryWithMetadata"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata(data["summaryWithMetadata"]) : undefined, }; } /** * Citation info for a segment. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSummaryCitation { /** * End of the attributed segment, exclusive. */ endIndex?: bigint; /** * Citation sources for the attributed segment. */ sources?: GoogleCloudDiscoveryengineV1SearchResponseSummaryCitationSource[]; /** * Index indicates the start of the segment, measured in bytes/unicode. */ startIndex?: bigint; } function serializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitation(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummaryCitation { return { ...data, endIndex: data["endIndex"] !== undefined ? String(data["endIndex"]) : undefined, sources: data["sources"] !== undefined ? data["sources"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitationSource(item))) : undefined, startIndex: data["startIndex"] !== undefined ? String(data["startIndex"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitation(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummaryCitation { return { ...data, endIndex: data["endIndex"] !== undefined ? BigInt(data["endIndex"]) : undefined, sources: data["sources"] !== undefined ? data["sources"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitationSource(item))) : undefined, startIndex: data["startIndex"] !== undefined ? BigInt(data["startIndex"]) : undefined, }; } /** * Citation metadata. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSummaryCitationMetadata { /** * Citations for segments. */ citations?: GoogleCloudDiscoveryengineV1SearchResponseSummaryCitation[]; } function serializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitationMetadata(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummaryCitationMetadata { return { ...data, citations: data["citations"] !== undefined ? data["citations"].map((item: any) => (serializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitation(item))) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitationMetadata(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummaryCitationMetadata { return { ...data, citations: data["citations"] !== undefined ? data["citations"].map((item: any) => (deserializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitation(item))) : undefined, }; } /** * Citation source. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSummaryCitationSource { /** * Document reference index from SummaryWithMetadata.references. It is * 0-indexed and the value will be zero if the reference_index is not set * explicitly. */ referenceIndex?: bigint; } function serializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitationSource(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummaryCitationSource { return { ...data, referenceIndex: data["referenceIndex"] !== undefined ? String(data["referenceIndex"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitationSource(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummaryCitationSource { return { ...data, referenceIndex: data["referenceIndex"] !== undefined ? BigInt(data["referenceIndex"]) : undefined, }; } /** * Document reference. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSummaryReference { /** * List of cited chunk contents derived from document content. */ chunkContents?: GoogleCloudDiscoveryengineV1SearchResponseSummaryReferenceChunkContent[]; /** * Required. Document.name of the document. Full resource name of the * referenced document, in the format * `projects/*\/locations/*\/collections/*\/dataStores/*\/branches/*\/documents/*`. */ document?: string; /** * Title of the document. */ title?: string; /** * Cloud Storage or HTTP uri for the document. */ uri?: string; } /** * Chunk content. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSummaryReferenceChunkContent { /** * Chunk textual content. */ content?: string; /** * Page identifier. */ pageIdentifier?: string; } /** * Safety Attribute categories and their associated confidence scores. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSummarySafetyAttributes { /** * The display names of Safety Attribute categories associated with the * generated content. Order matches the Scores. */ categories?: string[]; /** * The confidence scores of the each category, higher value means higher * confidence. Order matches the Categories. */ scores?: number[]; } /** * Summary with metadata information. */ export interface GoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata { /** * Citation metadata for given summary. */ citationMetadata?: GoogleCloudDiscoveryengineV1SearchResponseSummaryCitationMetadata; /** * Document References. */ references?: GoogleCloudDiscoveryengineV1SearchResponseSummaryReference[]; /** * Summary text with no citation information. */ summary?: string; } function serializeGoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata { return { ...data, citationMetadata: data["citationMetadata"] !== undefined ? serializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitationMetadata(data["citationMetadata"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata(data: any): GoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata { return { ...data, citationMetadata: data["citationMetadata"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1SearchResponseSummaryCitationMetadata(data["citationMetadata"]) : undefined, }; } /** * Configures metadata that is used to generate serving time results (e.g. * search results or recommendation predictions). The ServingConfig is passed in * the search and predict request and generates results. */ export interface GoogleCloudDiscoveryengineV1ServingConfig { /** * Optional. The specification for answer generation. */ answerGenerationSpec?: GoogleCloudDiscoveryengineV1AnswerGenerationSpec; /** * Boost controls to use in serving path. All triggered boost controls will * be applied. Boost controls must be in the same data store as the serving * config. Maximum of 20 boost controls. */ boostControlIds?: string[]; /** * Output only. ServingConfig created timestamp. */ readonly createTime?: Date; /** * Required. The human readable serving config display name. Used in * Discovery UI. This field must be a UTF-8 encoded string with a length limit * of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ displayName?: string; /** * Condition do not associate specifications. If multiple do not associate * conditions match, all matching do not associate controls in the list will * execute. Order does not matter. Maximum number of specifications is 100. * Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. */ dissociateControlIds?: string[]; /** * How much diversity to use in recommendation model results e.g. * `medium-diversity` or `high-diversity`. Currently supported values: * * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * * `auto-diversity` If not specified, we choose default based on * recommendation model type. Default value: `no-diversity`. Can only be set * if SolutionType is SOLUTION_TYPE_RECOMMENDATION. */ diversityLevel?: string; /** * Filter controls to use in serving path. All triggered filter controls will * be applied. Filter controls must be in the same data store as the serving * config. Maximum of 20 filter controls. */ filterControlIds?: string[]; /** * The GenericConfig of the serving configuration. */ genericConfig?: GoogleCloudDiscoveryengineV1ServingConfigGenericConfig; /** * Condition ignore specifications. If multiple ignore conditions match, all * matching ignore controls in the list will execute. Order does not matter. * Maximum number of specifications is 100. */ ignoreControlIds?: string[]; /** * The MediaConfig of the serving configuration. */ mediaConfig?: GoogleCloudDiscoveryengineV1ServingConfigMediaConfig; /** * The id of the model to use at serving time. Currently only * RecommendationModels are supported. Can be changed but only to a compatible * model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required * when SolutionType is SOLUTION_TYPE_RECOMMENDATION. */ modelId?: string; /** * Immutable. Fully qualified name * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` */ name?: string; /** * Condition oneway synonyms specifications. If multiple oneway synonyms * conditions match, all matching oneway synonyms controls in the list will * execute. Maximum number of specifications is 100. Can only be set if * SolutionType is SOLUTION_TYPE_SEARCH. */ onewaySynonymsControlIds?: string[]; /** * Condition promote specifications. Maximum number of specifications is 100. */ promoteControlIds?: string[]; /** * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served * by the serving config. However, if `SearchRequest.ranking_expression` is * specified, it overrides the ServingConfig ranking expression. The ranking * expression is a single function or multiple functions that are joined by * "+". * ranking_expression = function, { " + ", function }; Supported * functions: * double * relevance_score * double * * dotProduct(embedding_field_path) Function variables: * `relevance_score`: * pre-defined keywords, used for measure relevance between query and * document. * `embedding_field_path`: the document embedding field used with * query embedding vector. * `dotProduct`: embedding function between * embedding_field_path and query embedding vector. Example ranking * expression: If document has an embedding field doc_embedding, the ranking * expression could be `0.5 * relevance_score + 0.3 * * dotProduct(doc_embedding)`. */ rankingExpression?: string; /** * IDs of the redirect controls. Only the first triggered redirect action is * applied, even if multiple apply. Maximum number of specifications is 100. * Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. */ redirectControlIds?: string[]; /** * Condition replacement specifications. Applied according to the order in * the list. A previously replaced term can not be re-replaced. Maximum number * of specifications is 100. Can only be set if SolutionType is * SOLUTION_TYPE_SEARCH. */ replacementControlIds?: string[]; /** * Required. Immutable. Specifies the solution type that a serving config can * be associated with. */ solutionType?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"; /** * Condition synonyms specifications. If multiple synonyms conditions match, * all matching synonyms controls in the list will execute. Maximum number of * specifications is 100. Can only be set if SolutionType is * SOLUTION_TYPE_SEARCH. */ synonymsControlIds?: string[]; /** * Output only. ServingConfig updated timestamp. */ readonly updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1ServingConfig(data: any): GoogleCloudDiscoveryengineV1ServingConfig { return { ...data, answerGenerationSpec: data["answerGenerationSpec"] !== undefined ? serializeGoogleCloudDiscoveryengineV1AnswerGenerationSpec(data["answerGenerationSpec"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1ServingConfig(data: any): GoogleCloudDiscoveryengineV1ServingConfig { return { ...data, answerGenerationSpec: data["answerGenerationSpec"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1AnswerGenerationSpec(data["answerGenerationSpec"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Specifies the configurations needed for Generic Discovery.Currently we * support: * `content_search_spec`: configuration for generic content search. */ export interface GoogleCloudDiscoveryengineV1ServingConfigGenericConfig { /** * Specifies the expected behavior of content search. Only valid for * content-search enabled data store. */ contentSearchSpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec; } /** * Specifies the configurations needed for Media Discovery. Currently we * support: * `demote_content_watched`: Threshold for watched content demotion. * Customers can specify if using watched content demotion or use viewed detail * page. Using the content watched demotion, customers need to specify the * watched minutes or percentage exceeds the threshold, the content will be * demoted in the recommendation result. * `promote_fresh_content`: cutoff days * for fresh content promotion. Customers can specify if using content freshness * promotion. If the content was published within the cutoff days, the content * will be promoted in the recommendation result. Can only be set if * SolutionType is SOLUTION_TYPE_RECOMMENDATION. */ export interface GoogleCloudDiscoveryengineV1ServingConfigMediaConfig { /** * Specifies the content freshness used for recommendation result. Contents * will be demoted if contents were published for more than content freshness * cutoff days. */ contentFreshnessCutoffDays?: number; /** * Specifies the content watched percentage threshold for demotion. Threshold * value must be between [0, 1.0] inclusive. */ contentWatchedPercentageThreshold?: number; /** * Specifies the content watched minutes threshold for demotion. */ contentWatchedSecondsThreshold?: number; /** * Optional. Specifies the number of days to look back for demoting watched * content. If set to zero or unset, defaults to the maximum of 365 days. */ demoteContentWatchedPastDays?: number; /** * Specifies the event type used for demoting recommendation result. * Currently supported values: * `view-item`: Item viewed. * `media-play`: * Start/resume watching a video, playing a song, etc. * `media-complete`: * Finished or stopped midway through a video, song, etc. If unset, watch * history demotion will not be applied. Content freshness demotion will still * be applied. */ demotionEventType?: string; } /** * External session proto definition. */ export interface GoogleCloudDiscoveryengineV1Session { /** * Optional. The display name of the session. This field is used to identify * the session in the UI. By default, the display name is the first turn query * text in the session. */ displayName?: string; /** * Output only. The time the session finished. */ readonly endTime?: Date; /** * Optional. Whether the session is pinned, pinned session will be displayed * on the top of the session list. */ isPinned?: boolean; /** * Optional. The labels for the session. Can be set as filter in * ListSessionsRequest. */ labels?: string[]; /** * Immutable. Fully qualified name * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` */ name?: string; /** * Output only. The time the session started. */ readonly startTime?: Date; /** * The state of the session. */ state?: | "STATE_UNSPECIFIED" | "IN_PROGRESS"; /** * Turns. */ turns?: GoogleCloudDiscoveryengineV1SessionTurn[]; /** * A unique identifier for tracking users. */ userPseudoId?: string; } /** * Represents a turn, including a query from the user and a answer from * service. */ export interface GoogleCloudDiscoveryengineV1SessionTurn { /** * Optional. The resource name of the answer to the user query. Only set if * the answer generation (/answer API call) happened in this turn. */ answer?: string; /** * Output only. In ConversationalSearchService.GetSession API, if * GetSessionRequest.include_answer_details is set to true, this field will be * populated when getting answer query session. */ readonly detailedAnswer?: GoogleCloudDiscoveryengineV1Answer; /** * Output only. In ConversationalSearchService.GetSession API, if * GetSessionRequest.include_answer_details is set to true, this field will be * populated when getting assistant session. */ readonly detailedAssistAnswer?: GoogleCloudDiscoveryengineV1AssistAnswer; /** * Optional. The user query. May not be set if this turn is merely * regenerating an answer to a different turn */ query?: GoogleCloudDiscoveryengineV1Query; /** * Optional. Represents metadata related to the query config, for example LLM * model and version used, model parameters (temperature, grounding * parameters, etc.). The prefix "google." is reserved for Google-developed * functionality. */ queryConfig?: { [key: string]: string }; } /** * Metadata for DataConnectorService.SetUpDataConnector method. */ export interface GoogleCloudDiscoveryengineV1SetUpDataConnectorMetadata { } /** * Request for DataConnectorService.SetUpDataConnector method. */ export interface GoogleCloudDiscoveryengineV1SetUpDataConnectorRequest { /** * Required. The display name of the Collection. Should be human readable, * used to display collections in the Console Dashboard. UTF-8 encoded string * with limit of 1024 characters. */ collectionDisplayName?: string; /** * Required. The ID to use for the Collection, which will become the final * component of the Collection's resource name. A new Collection is created as * part of the DataConnector setup. DataConnector is a singleton resource * under Collection, managing all DataStores of the Collection. This field * must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard * with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error * is returned. */ collectionId?: string; /** * Required. The DataConnector to initialize in the newly created Collection. */ dataConnector?: GoogleCloudDiscoveryengineV1DataConnector; } function serializeGoogleCloudDiscoveryengineV1SetUpDataConnectorRequest(data: any): GoogleCloudDiscoveryengineV1SetUpDataConnectorRequest { return { ...data, dataConnector: data["dataConnector"] !== undefined ? serializeGoogleCloudDiscoveryengineV1DataConnector(data["dataConnector"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SetUpDataConnectorRequest(data: any): GoogleCloudDiscoveryengineV1SetUpDataConnectorRequest { return { ...data, dataConnector: data["dataConnector"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1DataConnector(data["dataConnector"]) : undefined, }; } /** * Metadata for single-regional CMEKs. */ export interface GoogleCloudDiscoveryengineV1SingleRegionKey { /** * Required. Single-regional kms key resource name which will be used to * encrypt resources * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. */ kmsKey?: string; } /** * A sitemap for the SiteSearchEngine. */ export interface GoogleCloudDiscoveryengineV1Sitemap { /** * Output only. The sitemap's creation time. */ readonly createTime?: Date; /** * Output only. The fully qualified resource name of the sitemap. * `projects/*\/locations/*\/collections/*\/dataStores/*\/siteSearchEngine/sitemaps/*` * The `sitemap_id` suffix is system-generated. */ readonly name?: string; /** * Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`. */ uri?: string; } /** * SiteSearchEngine captures DataStore level site search persisting * configurations. It is a singleton value per data store. */ export interface GoogleCloudDiscoveryengineV1SiteSearchEngine { /** * The fully qualified resource name of the site search engine. Format: * `projects/*\/locations/*\/dataStores/*\/siteSearchEngine` */ name?: string; } /** * Verification information for target sites in advanced site search. */ export interface GoogleCloudDiscoveryengineV1SiteVerificationInfo { /** * Site verification state indicating the ownership and validity. */ siteVerificationState?: | "SITE_VERIFICATION_STATE_UNSPECIFIED" | "VERIFIED" | "UNVERIFIED" | "EXEMPTED"; /** * Latest site verification time. */ verifyTime?: Date; } function serializeGoogleCloudDiscoveryengineV1SiteVerificationInfo(data: any): GoogleCloudDiscoveryengineV1SiteVerificationInfo { return { ...data, verifyTime: data["verifyTime"] !== undefined ? data["verifyTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1SiteVerificationInfo(data: any): GoogleCloudDiscoveryengineV1SiteVerificationInfo { return { ...data, verifyTime: data["verifyTime"] !== undefined ? new Date(data["verifyTime"]) : undefined, }; } /** * The Spanner source for importing data */ export interface GoogleCloudDiscoveryengineV1SpannerSource { /** * Required. The database ID of the source Spanner table. */ databaseId?: string; /** * Whether to apply data boost on Spanner export. Enabling this option will * incur additional cost. More info can be found * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). */ enableDataBoost?: boolean; /** * Required. The instance ID of the source Spanner table. */ instanceId?: string; /** * The project ID that contains the Spanner source. Has a length limit of 128 * characters. If not specified, inherits the project ID from the parent * request. */ projectId?: string; /** * Required. The table name of the Spanner database that needs to be * imported. */ tableId?: string; } /** * Request for the AssistantService.StreamAssist method. */ export interface GoogleCloudDiscoveryengineV1StreamAssistRequest { /** * Optional. Specification of the generation configuration for the request. */ generationSpec?: GoogleCloudDiscoveryengineV1StreamAssistRequestGenerationSpec; /** * Optional. Current user query. Empty query is only supported if `file_ids` * are provided. In this case, the answer will be generated based on those * context files. */ query?: GoogleCloudDiscoveryengineV1Query; /** * Optional. The session to use for the request. If specified, the assistant * has access to the session history, and the query and the answer are stored * there. If `-` is specified as the session ID, or it is left empty, then a * new session is created with an automatically generated ID. Format: * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` */ session?: string; /** * Optional. Specification of tools that are used to serve the request. */ toolsSpec?: GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpec; /** * Optional. Information about the user initiating the query. */ userMetadata?: GoogleCloudDiscoveryengineV1AssistUserMetadata; } /** * Assistant generation specification for the request. This allows to override * the default generation configuration at the engine level. */ export interface GoogleCloudDiscoveryengineV1StreamAssistRequestGenerationSpec { /** * Optional. The Vertex AI model_id used for the generative model. If not * set, the default Assistant model will be used. */ modelId?: string; } /** * Specification of tools that are used to serve the request. */ export interface GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpec { /** * Optional. Specification of the image generation tool. */ imageGenerationSpec?: GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecImageGenerationSpec; /** * Optional. Specification of the Vertex AI Search tool. */ vertexAiSearchSpec?: GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecVertexAiSearchSpec; /** * Optional. Specification of the video generation tool. */ videoGenerationSpec?: GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecVideoGenerationSpec; /** * Optional. Specification of the web grounding tool. If field is present, * enables grounding with web search. Works only if * Assistant.web_grounding_type is WEB_GROUNDING_TYPE_GOOGLE_SEARCH or * WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH. */ webGroundingSpec?: GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecWebGroundingSpec; } /** * Specification of the image generation tool. */ export interface GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecImageGenerationSpec { } /** * Specification of the Vertex AI Search tool. */ export interface GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecVertexAiSearchSpec { /** * Optional. Specs defining DataStores to filter on in a search call and * configurations for those data stores. This is only considered for Engines * with multiple data stores. */ dataStoreSpecs?: GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec[]; /** * Optional. The filter syntax consists of an expression language for * constructing a predicate from one or more fields of the documents being * filtered. Filter expression is case-sensitive. If this field is * unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI * Search is done by mapping the LHS filter key to a key property defined in * the Vertex AI Search backend -- this mapping is defined by the customer in * their schema. For example a media customer might have a field 'name' in * their schema. In this case the filter would look like this: filter --> * name:'ANY("king kong")' For more information about filtering including * syntax and filter operators, see * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */ filter?: string; } /** * Specification of the video generation tool. */ export interface GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecVideoGenerationSpec { } /** * Specification of the web grounding tool. */ export interface GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecWebGroundingSpec { } /** * Response for the AssistantService.StreamAssist method. */ export interface GoogleCloudDiscoveryengineV1StreamAssistResponse { /** * Assist answer resource object containing parts of the assistant's final * answer for the user's query. Not present if the current response doesn't * add anything to previously sent AssistAnswer.replies. Observe * AssistAnswer.state to see if more parts are to be expected. While the state * is `IN_PROGRESS`, the AssistAnswer.replies field in each response will * contain replies (reply fragments) to be appended to the ones received in * previous responses. AssistAnswer.name won't be filled. If the state is * `SUCCEEDED`, `FAILED` or `SKIPPED`, the response is the last response and * AssistAnswer.name will have a value. */ answer?: GoogleCloudDiscoveryengineV1AssistAnswer; /** * A global unique ID that identifies the current pair of request and stream * of responses. Used for feedback and support. */ assistToken?: string; /** * Session information. Only included in the final StreamAssistResponse of * the response stream. */ sessionInfo?: GoogleCloudDiscoveryengineV1StreamAssistResponseSessionInfo; } function serializeGoogleCloudDiscoveryengineV1StreamAssistResponse(data: any): GoogleCloudDiscoveryengineV1StreamAssistResponse { return { ...data, answer: data["answer"] !== undefined ? serializeGoogleCloudDiscoveryengineV1AssistAnswer(data["answer"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1StreamAssistResponse(data: any): GoogleCloudDiscoveryengineV1StreamAssistResponse { return { ...data, answer: data["answer"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1AssistAnswer(data["answer"]) : undefined, }; } /** * Information about the session. */ export interface GoogleCloudDiscoveryengineV1StreamAssistResponseSessionInfo { /** * Name of the newly generated or continued session. Format: * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`. */ session?: string; } /** * Suggestion deny list entry identifying the phrase to block from suggestions * and the applied operation for the phrase. */ export interface GoogleCloudDiscoveryengineV1SuggestionDenyListEntry { /** * Required. Phrase to block from suggestions served. Can be maximum 125 * characters. */ blockPhrase?: string; /** * Required. The match operator to apply for this phrase. Whether to block * the exact phrase, or block any suggestions containing this phrase. */ matchOperator?: | "MATCH_OPERATOR_UNSPECIFIED" | "EXACT_MATCH" | "CONTAINS"; } /** * A target site for the SiteSearchEngine. */ export interface GoogleCloudDiscoveryengineV1TargetSite { /** * Immutable. If set to false, a uri_pattern is generated to include all * pages whose address contains the provided_uri_pattern. If set to true, an * uri_pattern is generated to try to be an exact match of the * provided_uri_pattern or just the specific page if the provided_uri_pattern * is a specific one. provided_uri_pattern is always normalized to generate * the URI pattern to be used by the search engine. */ exactMatch?: boolean; /** * Output only. Failure reason. */ readonly failureReason?: GoogleCloudDiscoveryengineV1TargetSiteFailureReason; /** * Output only. This is system-generated based on the provided_uri_pattern. */ readonly generatedUriPattern?: string; /** * Output only. Indexing status. */ readonly indexingStatus?: | "INDEXING_STATUS_UNSPECIFIED" | "PENDING" | "FAILED" | "SUCCEEDED" | "DELETING" | "CANCELLABLE" | "CANCELLED"; /** * Output only. The fully qualified resource name of the target site. * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` * The `target_site_id` is system-generated. */ readonly name?: string; /** * Required. Input only. The user provided URI pattern from which the * `generated_uri_pattern` is generated. */ providedUriPattern?: string; /** * Output only. Root domain of the provided_uri_pattern. */ readonly rootDomainUri?: string; /** * Output only. Site ownership and validity verification status. */ readonly siteVerificationInfo?: GoogleCloudDiscoveryengineV1SiteVerificationInfo; /** * The type of the target site, e.g., whether the site is to be included or * excluded. */ type?: | "TYPE_UNSPECIFIED" | "INCLUDE" | "EXCLUDE"; /** * Output only. The target site's last updated time. */ readonly updateTime?: Date; } /** * Site search indexing failure reasons. */ export interface GoogleCloudDiscoveryengineV1TargetSiteFailureReason { /** * Failed due to insufficient quota. */ quotaFailure?: GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure; } function serializeGoogleCloudDiscoveryengineV1TargetSiteFailureReason(data: any): GoogleCloudDiscoveryengineV1TargetSiteFailureReason { return { ...data, quotaFailure: data["quotaFailure"] !== undefined ? serializeGoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure(data["quotaFailure"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1TargetSiteFailureReason(data: any): GoogleCloudDiscoveryengineV1TargetSiteFailureReason { return { ...data, quotaFailure: data["quotaFailure"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure(data["quotaFailure"]) : undefined, }; } /** * Failed due to insufficient quota. */ export interface GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure { /** * This number is an estimation on how much total quota this project needs to * successfully complete indexing. */ totalRequiredQuota?: bigint; } function serializeGoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure(data: any): GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure { return { ...data, totalRequiredQuota: data["totalRequiredQuota"] !== undefined ? String(data["totalRequiredQuota"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure(data: any): GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure { return { ...data, totalRequiredQuota: data["totalRequiredQuota"] !== undefined ? BigInt(data["totalRequiredQuota"]) : undefined, }; } /** * Tenant information for a connector source. This includes some of the same * information stored in the Credential message, but is limited to only what is * needed to provide a list of accessible tenants to the user. */ export interface GoogleCloudDiscoveryengineV1Tenant { /** * Optional display name for the tenant, e.g. "My Slack Team". */ displayName?: string; /** * The tenant's instance ID. Examples: Jira * ("8594f221-9797-5f78-1fa4-485e198d7cd0"), Slack ("T123456"). */ id?: string; /** * The URI of the tenant, if applicable. For example, the URI of a Jira * instance is https://my-jira-instance.atlassian.net, and a Slack tenant does * not have a URI. */ uri?: string; } /** * Defines text input. */ export interface GoogleCloudDiscoveryengineV1TextInput { /** * Conversation context of the input. */ context?: GoogleCloudDiscoveryengineV1ConversationContext; /** * Text input. */ input?: string; } /** * Metadata related to the progress of the TrainCustomModel operation. This is * returned by the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1TrainCustomModelMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1TrainCustomModelMetadata(data: any): GoogleCloudDiscoveryengineV1TrainCustomModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1TrainCustomModelMetadata(data: any): GoogleCloudDiscoveryengineV1TrainCustomModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Request message for SearchTuningService.TrainCustomModel method. */ export interface GoogleCloudDiscoveryengineV1TrainCustomModelRequest { /** * The desired location of errors incurred during the data ingestion and * training. */ errorConfig?: GoogleCloudDiscoveryengineV1ImportErrorConfig; /** * Cloud Storage training input. */ gcsTrainingInput?: GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput; /** * If not provided, a UUID will be generated. */ modelId?: string; /** * Model to be trained. Supported values are: * **search-tuning**: Fine * tuning the search system based on data provided. */ modelType?: string; } /** * Cloud Storage training data input. */ export interface GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput { /** * The Cloud Storage corpus data which could be associated in train data. The * data path format is `gs:///`. A newline delimited jsonl/ndjson file. For * search-tuning model, each line should have the _id, title and text. * Example: `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` */ corpusDataPath?: string; /** * The gcs query data which could be associated in train data. The data path * format is `gs:///`. A newline delimited jsonl/ndjson file. For * search-tuning model, each line should have the _id and text. Example: * {"_id": "query1", "text": "example query"} */ queryDataPath?: string; /** * Cloud Storage test data. Same format as train_data_path. If not provided, * a random 80/20 train/test split will be performed on train_data_path. */ testDataPath?: string; /** * Cloud Storage training data path whose format should be `gs:///`. The file * should be in tsv format. Each line should have the doc_id and query_id and * score (number). For search-tuning model, it should have the query-id * corpus-id score as tsv file header. The score should be a number in `[0, * inf+)`. The larger the number is, the more relevant the pair is. Example: * * `query-id\tcorpus-id\tscore` * `query1\tdoc1\t1` */ trainDataPath?: string; } /** * Response of the TrainCustomModelRequest. This message is returned by the * google.longrunning.Operations.response field. */ export interface GoogleCloudDiscoveryengineV1TrainCustomModelResponse { /** * Echoes the destination for the complete errors in the request if set. */ errorConfig?: GoogleCloudDiscoveryengineV1ImportErrorConfig; /** * A sample of errors encountered while processing the data. */ errorSamples?: GoogleRpcStatus[]; /** * The metrics of the trained model. */ metrics?: { [key: string]: number }; /** * Fully qualified name of the CustomTuningModel. */ modelName?: string; /** * The trained model status. Possible values are: * **bad-data**: The * training data quality is bad. * **no-improvement**: Tuning didn't improve * performance. Won't deploy. * **in-progress**: Model training job creation * is in progress. * **training**: Model is actively training. * * **evaluating**: The model is evaluating trained metrics. * **indexing**: * The model trained metrics are indexing. * **ready**: The model is ready for * serving. */ modelStatus?: string; } /** * A transaction represents the entire purchase transaction. */ export interface GoogleCloudDiscoveryengineV1TransactionInfo { /** * All the costs associated with the products. These can be manufacturing * costs, shipping expenses not borne by the end user, or any other costs, * such that: * Profit = value - tax - cost */ cost?: number; /** * Required. Currency code. Use three-character ISO-4217 code. */ currency?: string; /** * The total discount(s) value applied to this transaction. This figure * should be excluded from TransactionInfo.value For example, if a user paid * TransactionInfo.value amount, then nominal (pre-discount) value of the * transaction is the sum of TransactionInfo.value and * TransactionInfo.discount_value This means that profit is calculated the * same way, regardless of the discount value, and that * TransactionInfo.discount_value can be larger than TransactionInfo.value: * * Profit = value - tax - cost */ discountValue?: number; /** * All the taxes associated with the transaction. */ tax?: number; /** * The transaction ID with a length limit of 128 characters. */ transactionId?: string; /** * Required. Total non-zero value associated with the transaction. This value * may include shipping, tax, or other adjustments to the total value that you * want to include. */ value?: number; } /** * Metadata related to the progress of the CmekConfigService.UpdateCmekConfig * operation. This will be returned by the google.longrunning.Operation.metadata * field. */ export interface GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata(data: any): GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata(data: any): GoogleCloudDiscoveryengineV1UpdateCmekConfigMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata for UpdateSchema LRO. */ export interface GoogleCloudDiscoveryengineV1UpdateSchemaMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1UpdateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1UpdateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1UpdateSchemaMetadata(data: any): GoogleCloudDiscoveryengineV1UpdateSchemaMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Metadata related to the progress of the * SiteSearchEngineService.UpdateTargetSite operation. This will be returned by * the google.longrunning.Operation.metadata field. */ export interface GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata { /** * Operation create time. */ createTime?: Date; /** * Operation last update time. If the operation is done, this is also the * finish time. */ updateTime?: Date; } function serializeGoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata(data: any): GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * UserEvent captures all metadata information Discovery Engine API needs to * know about how end users interact with your website. */ export interface GoogleCloudDiscoveryengineV1UserEvent { /** * Extra user event features to include in the recommendation model. These * attributes must NOT contain data that needs to be parsed or processed * further, e.g. JSON or other encodings. If you provide custom attributes for * ingested user events, also include them in the user events that you * associate with prediction requests. Custom attribute formatting must be * consistent between imported events and events provided with prediction * requests. This lets the Discovery Engine API use those custom attributes * when training models and serving predictions, which helps improve * recommendation quality. This field needs to pass all below criteria, * otherwise an `INVALID_ARGUMENT` error is returned: * The key must be a * UTF-8 encoded string with a length limit of 5,000 characters. * For text * attributes, at most 400 values are allowed. Empty values are not allowed. * Each value must be a UTF-8 encoded string with a length limit of 256 * characters. * For number attributes, at most 400 values are allowed. For * product recommendations, an example of extra user information is * `traffic_channel`, which is how a user arrives at the site. Users can * arrive at the site by coming to the site directly, coming through Google * search, or in other ways. */ attributes?: { [key: string]: GoogleCloudDiscoveryengineV1CustomAttribute }; /** * Token to attribute an API response to user action(s) to trigger the event. * Highly recommended for user events that are the result of * RecommendationService.Recommend. This field enables accurate attribution of * recommendation model performance. The value must be one of: * * RecommendResponse.attribution_token for events that are the result of * RecommendationService.Recommend. * SearchResponse.attribution_token for * events that are the result of SearchService.Search. This token enables us * to accurately attribute page view or conversion completion back to the * event and the particular predict response containing this clicked/purchased * product. If user clicks on product K in the recommendation results, pass * RecommendResponse.attribution_token as a URL parameter to product K's page. * When recording events on product K's page, log the * RecommendResponse.attribution_token to this field. */ attributionToken?: string; /** * CompletionService.CompleteQuery details related to the event. This field * should be set for `search` event when autocomplete function is enabled and * the user clicks a suggestion for search. */ completionInfo?: GoogleCloudDiscoveryengineV1CompletionInfo; /** * Optional. Conversion type. Required if UserEvent.event_type is * `conversion`. This is a customer-defined conversion name in lowercase * letters or numbers separated by "-", such as "watch", "good-visit" etc. Do * not set the field if UserEvent.event_type is not `conversion`. This mixes * the custom conversion event with predefined events like `search`, * `view-item` etc. */ conversionType?: string; /** * The DataStore resource full name, of the form * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * Optional. Only required for user events whose data store can't by * determined by UserEvent.engine or UserEvent.documents. If data store is set * in the parent of write/import/collect user event requests, this field can * be omitted. */ dataStore?: string; /** * Should set to true if the request is made directly from the end user, in * which case the UserEvent.user_info.user_agent can be populated from the * HTTP request. This flag should be set only if the API request is made * directly from the end user such as a mobile app (and not if a gateway or a * server is processing and pushing the user events). This should not be set * when using the JavaScript tag in UserEventService.CollectUserEvent. */ directUserRequest?: boolean; /** * List of Documents associated with this user event. This field is optional * except for the following event types: * `view-item` * `add-to-cart` * * `purchase` * `media-play` * `media-complete` In a `search` event, this * field represents the documents returned to the end user on the current page * (the end user may have not finished browsing the whole page yet). When a * new page is returned to the end user, after pagination/filtering/ordering * even for the same query, a new `search` event with different * UserEvent.documents is desired. */ documents?: GoogleCloudDiscoveryengineV1DocumentInfo[]; /** * The Engine resource name, in the form of * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. * Optional. Only required for Engine produced user events. For example, user * events from blended search. */ engine?: string; /** * Only required for UserEventService.ImportUserEvents method. Timestamp of * when the user event happened. */ eventTime?: Date; /** * Required. User event type. Allowed values are: Generic values: * `search`: * Search for Documents. * `view-item`: Detailed page view of a Document. * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * `view-category-page`: View of a * category page, e.g. Home > Men > Jeans Retail-related values: * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * * `purchase`: Purchase an item(s) Media-related values: * `media-play`: * Start/resume watching a video, playing a song, etc. * `media-complete`: * Finished or stopped midway through a video, song, etc. Custom conversion * value: * `conversion`: Customer defined conversion event. */ eventType?: string; /** * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. One * example is for `search` events, the associated SearchRequest may contain a * filter expression in SearchRequest.filter conforming to * https://google.aip.dev/160#filtering. Similarly, for `view-item-list` * events that are generated from a RecommendRequest, this field may be * populated directly from RecommendRequest.filter conforming to * https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded * string with a length limit of 1,000 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ filter?: string; /** * Media-specific info. */ mediaInfo?: GoogleCloudDiscoveryengineV1MediaInfo; /** * Page metadata such as categories and other critical information for * certain event types such as `view-category-page`. */ pageInfo?: GoogleCloudDiscoveryengineV1PageInfo; /** * Panel metadata associated with this user event. */ panel?: GoogleCloudDiscoveryengineV1PanelInfo; /** * Optional. List of panels associated with this event. Used for page-level * impression data. */ panels?: GoogleCloudDiscoveryengineV1PanelInfo[]; /** * The promotion IDs if this is an event associated with promotions. * Currently, this field is restricted to at most one ID. */ promotionIds?: string[]; /** * SearchService.Search details related to the event. This field should be * set for `search` event. */ searchInfo?: GoogleCloudDiscoveryengineV1SearchInfo; /** * A unique identifier for tracking a visitor session with a length limit of * 128 bytes. A session is an aggregation of an end user behavior in a time * span. A general guideline to populate the session_id: 1. If user has no * activity for 30 min, a new session_id should be assigned. 2. The session_id * should be unique across users, suggest use uuid or add * UserEvent.user_pseudo_id as prefix. */ sessionId?: string; /** * A list of identifiers for the independent experiment groups this user * event belongs to. This is used to distinguish between user events * associated with different experiment setups. */ tagIds?: string[]; /** * The transaction metadata (if any) associated with this user event. */ transactionInfo?: GoogleCloudDiscoveryengineV1TransactionInfo; /** * Information about the end user. */ userInfo?: GoogleCloudDiscoveryengineV1UserInfo; /** * Required. A unique identifier for tracking visitors. For example, this * could be implemented with an HTTP cookie, which should be able to uniquely * identify a visitor on a single device. This unique identifier should not * change if the visitor log in/out of the website. Do not set the field to * the same fixed ID for different users. This mixes the event history of * those users together, which results in degraded model quality. The field * must be a UTF-8 encoded string with a length limit of 128 characters. * Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not * contain PII or user-data. We recommend to use Google Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. */ userPseudoId?: string; } function serializeGoogleCloudDiscoveryengineV1UserEvent(data: any): GoogleCloudDiscoveryengineV1UserEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, mediaInfo: data["mediaInfo"] !== undefined ? serializeGoogleCloudDiscoveryengineV1MediaInfo(data["mediaInfo"]) : undefined, }; } function deserializeGoogleCloudDiscoveryengineV1UserEvent(data: any): GoogleCloudDiscoveryengineV1UserEvent { return { ...data, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, mediaInfo: data["mediaInfo"] !== undefined ? deserializeGoogleCloudDiscoveryengineV1MediaInfo(data["mediaInfo"]) : undefined, }; } /** * Information of an end user. */ export interface GoogleCloudDiscoveryengineV1UserInfo { /** * Optional. IANA time zone, e.g. Europe/Budapest. */ timeZone?: string; /** * User agent as included in the HTTP header. The field must be a UTF-8 * encoded string with a length limit of 1,000 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. This should not be set when using the * client side event reporting with GTM or JavaScript tag in * UserEventService.CollectUserEvent or if UserEvent.direct_user_request is * set. */ userAgent?: string; /** * Highly recommended for logged-in users. Unique identifier for logged-in * user, such as a user name. Don't set for anonymous users. Always use a * hashed value for this ID. Don't set the field to the same fixed ID for * different users. This mixes the event history of those users together, * which results in degraded model quality. The field must be a UTF-8 encoded * string with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. */ userId?: string; } /** * User License information assigned by the admin. */ export interface GoogleCloudDiscoveryengineV1UserLicense { /** * Output only. User created timestamp. */ readonly createTime?: Date; /** * Output only. User last logged in time. If the user has not logged in yet, * this field will be empty. */ readonly lastLoginTime?: Date; /** * Output only. License assignment state of the user. If the user is assigned * with a license config, the user login will be assigned with the license; If * the user's license assignment state is unassigned or unspecified, no * license config will be associated to the user; */ readonly licenseAssignmentState?: | "LICENSE_ASSIGNMENT_STATE_UNSPECIFIED" | "ASSIGNED" | "UNASSIGNED" | "NO_LICENSE" | "NO_LICENSE_ATTEMPTED_LOGIN" | "BLOCKED"; /** * Optional. The full resource name of the Subscription(LicenseConfig) * assigned to the user. */ licenseConfig?: string; /** * Output only. User update timestamp. */ readonly updateTime?: Date; /** * Required. Immutable. The user principal of the User, could be email * address or other prinical identifier. This field is immutable. Admin assign * licenses based on the user principal. */ userPrincipal?: string; /** * Optional. The user profile. We user user full name(First name + Last name) * as user profile. */ userProfile?: string; } /** * Configures metadata that is used for End User entities. */ export interface GoogleCloudDiscoveryengineV1UserStore { /** * Optional. The default subscription LicenseConfig for the UserStore, if * UserStore.enable_license_auto_register is true, new users will * automatically register under the default subscription. If default * LicenseConfig doesn't have remaining license seats left, new users will not * be assigned with license and will be blocked for Vertex AI Search features. * This is used if `license_assignment_tier_rules` is not configured. */ defaultLicenseConfig?: string; /** * The display name of the User Store. */ displayName?: string; /** * Optional. Whether to enable license auto update for users in this User * Store. If true, users with expired licenses will automatically be updated * to use the default license config as long as the default license config has * seats left. */ enableExpiredLicenseAutoUpdate?: boolean; /** * Optional. Whether to enable license auto register for users in this User * Store. If true, new users will automatically register under the default * license config as long as the default license config has seats left. */ enableLicenseAutoRegister?: boolean; /** * Immutable. The full resource name of the User Store, in the format of * `projects/{project}/locations/{location}/userStores/{user_store}`. This * field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; } /** * WidgetConfig captures configs at the Widget level. */ export interface GoogleCloudDiscoveryengineV1WidgetConfig { /** * Will be used for all widget access settings seen in cloud console * integration page. Replaces top deprecated top level properties. */ accessSettings?: GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings; /** * Allowlisted domains that can load this widget. */ allowlistedDomains?: string[]; /** * Whether allow no-auth integration with widget. If set true, public access * to search or other solutions from widget is allowed without authenication * token provided by customer hosted backend server. */ allowPublicAccess?: boolean; /** * Optional. Output only. Describes the assistant settings of the widget. */ readonly assistantSettings?: GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings; /** * Output only. Collection components that lists all collections and child * data stores associated with the widget config, those data sources can be * used for filtering in widget service APIs, users can return results that * from selected data sources. */ readonly collectionComponents?: GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent[]; /** * Output only. Unique obfuscated identifier of a WidgetConfig. */ readonly configId?: string; /** * The content search spec that configs the desired behavior of content * search. */ contentSearchSpec?: GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec; /** * Output only. Timestamp the WidgetConfig was created. */ readonly createTime?: Date; /** * Optional. Output only. Describes the customer related configurations, * currently only used for government customers. This field cannot be modified * after project onboarding. */ readonly customerProvidedConfig?: GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig; /** * Output only. The type of the parent data store. */ readonly dataStoreType?: | "DATA_STORE_TYPE_UNSPECIFIED" | "SITE_SEARCH" | "STRUCTURED" | "UNSTRUCTURED" | "BLENDED"; /** * Configurable UI configurations per data store. */ dataStoreUiConfigs?: GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig[]; /** * The default ordering for search results if specified. Used to set * SearchRequest#order_by on applicable requests. * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.dataStores.servingConfigs/search#request-body */ defaultSearchRequestOrderBy?: string; /** * Required. The human readable widget config display name. Used in Discovery * UI. This field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. */ displayName?: string; /** * Whether or not to enable autocomplete. */ enableAutocomplete?: boolean; /** * Whether to allow conversational search (LLM, multi-turn) or not (non-LLM, * single-turn). */ enableConversationalSearch?: boolean; /** * Optional. Output only. Whether to enable private knowledge graph. */ readonly enablePrivateKnowledgeGraph?: boolean; /** * Turn on or off collecting the search result quality feedback from end * users. */ enableQualityFeedback?: boolean; /** * Whether to show the result score. */ enableResultScore?: boolean; /** * Whether to enable safe search. */ enableSafeSearch?: boolean; /** * Whether to enable search-as-you-type behavior for the search widget */ enableSearchAsYouType?: boolean; /** * Turn on or off summary for each snippets result. */ enableSnippetResultSummary?: boolean; /** * Turn on or off summarization for the search response. */ enableSummarization?: boolean; /** * Whether to enable standalone web app. */ enableWebApp?: boolean; /** * The configuration and appearance of facets in the end user view. */ facetField?: GoogleCloudDiscoveryengineV1WidgetConfigFacetField[]; /** * The key is the UI component. Mock. Currently supported `title`, * `thumbnail`, `url`, `custom1`, `custom2`, `custom3`. The value is the name * of the field along with its device visibility. The 3 custom fields are * optional and can be added or removed. `title`, `thumbnail`, `url` are * required UI components that cannot be removed. */ fieldsUiComponentsMap?: { [key: string]: GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField }; /** * Output only. Whether the subscription is gemini bundle or not. */ readonly geminiBundle?: boolean; /** * Optional. Describes the homepage settings of the widget. */ homepageSetting?: GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting; /** * Output only. The industry vertical that the WidgetConfig registers. The * WidgetConfig industry vertical is based on the associated Engine. */ readonly industryVertical?: | "INDUSTRY_VERTICAL_UNSPECIFIED" | "GENERIC" | "MEDIA" | "HEALTHCARE_FHIR"; /** * Output only. Whether LLM is enabled in the corresponding data store. */ readonly llmEnabled?: boolean; /** * Output only. Whether the customer accepted data use terms. */ readonly minimumDataTermAccepted?: boolean; /** * Immutable. The full resource name of the widget config. Format: * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: string; /** * The type of snippet to display in UCS widget. - * RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new * non-enterprise search users. - EXTRACTIVE_ANSWER for new enterprise search * users. */ resultDisplayType?: | "RESULT_DISPLAY_TYPE_UNSPECIFIED" | "SNIPPET" | "EXTRACTIVE_ANSWER"; /** * Required. Immutable. Specifies the solution type that this WidgetConfig * can be used for. */ solutionType?: | "SOLUTION_TYPE_UNSPECIFIED" | "SOLUTION_TYPE_RECOMMENDATION" | "SOLUTION_TYPE_SEARCH" | "SOLUTION_TYPE_CHAT" | "SOLUTION_TYPE_GENERATIVE_CHAT"; /** * Describes search widget UI branding settings, such as the widget title, * logo, favicons, and colors. */ uiBranding?: GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings; /** * Describes general widget search settings as seen in cloud console widget * configuration page. Replaces top deprecated top level properties. */ uiSettings?: GoogleCloudDiscoveryengineV1WidgetConfigUiSettings; /** * Output only. Timestamp the WidgetConfig was updated. */ readonly updateTime?: Date; } /** * Describes widget access settings. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigAccessSettings { /** * List of domains that are allowed to integrate the search widget. */ allowlistedDomains?: string[]; /** * Whether public unauthenticated access is allowed. */ allowPublicAccess?: boolean; /** * Whether web app access is enabled. */ enableWebApp?: boolean; /** * Optional. Language code for user interface. Use language tags defined by * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). If unset, the * default language code is "en-US". */ languageCode?: string; /** * Optional. The workforce identity pool provider used to access the widget. */ workforceIdentityPoolProvider?: string; } /** * Describes the assistant settings of the widget. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigAssistantSettings { /** * Output only. This field controls the default web grounding toggle for end * users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is * set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web * grounding enabled by default on UI. If true, grounding toggle will be * disabled by default on UI. End users can still enable web grounding in the * UI if web grounding is enabled. */ readonly defaultWebGroundingToggleOff?: boolean; /** * Optional. Output only. Whether to disable user location context. */ readonly disableLocationContext?: boolean; /** * Whether or not the Google search grounding toggle is shown. Deprecated. * Use web_grounding_type instead. */ googleSearchGroundingEnabled?: boolean; /** * Optional. The type of web grounding to use. */ webGroundingType?: | "WEB_GROUNDING_TYPE_UNSPECIFIED" | "WEB_GROUNDING_TYPE_DISABLED" | "WEB_GROUNDING_TYPE_GOOGLE_SEARCH" | "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH"; } /** * Read-only collection component that contains data store collections fields * that may be used for filtering */ export interface GoogleCloudDiscoveryengineV1WidgetConfigCollectionComponent { /** * Output only. The icon link of the connector source. */ readonly connectorIconLink?: string; /** * The name of the data source, retrieved from * `Collection.data_connector.data_source`. */ dataSource?: string; /** * Output only. The display name of the data source. */ readonly dataSourceDisplayName?: string; /** * For the data store collection, list of the children data stores. */ dataStoreComponents?: GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent[]; /** * The display name of the collection. */ displayName?: string; /** * Output only. the identifier of the collection, used for widget service. * For now it refers to collection_id, in the future we will migrate the field * to encrypted collection name UUID. */ readonly id?: string; /** * The name of the collection. It should be collection resource name. Format: * `projects/{project}/locations/{location}/collections/{collection_id}`. For * APIs under WidgetService, such as WidgetService.LookUpWidgetConfig, the * project number and location part is erased in this field. */ name?: string; } /** * Customer provided configurations. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigCustomerProvidedConfig { /** * Customer type. */ customerType?: | "DEFAULT_CUSTOMER" | "GOVERNMENT_CUSTOMER"; } /** * Read-only data store component that contains data stores fields that may be * used for filtering, it's the child of `CollectionComponent`. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigDataStoreComponent { /** * Output only. The type of the data store config. */ readonly dataStoreConfigType?: | "DATA_STORE_CONFIG_TYPE_UNSPECIFIED" | "ALLOW_DB_CONFIG" | "THIRD_PARTY_OAUTH_CONFIG" | "NOTEBOOKLM_CONFIG"; /** * The display name of the data store. */ displayName?: string; /** * The name of the entity, retrieved from * `Collection.data_connector.entities.entityName`. */ entityName?: string; /** * Output only. the identifier of the data store, used for widget service. * For now it refers to data_store_id, in the future we will migrate the field * to encrypted data store name UUID. */ readonly id?: string; /** * The name of the data store. It should be data store resource name Format: * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * For APIs under WidgetService, such as WidgetService.LookUpWidgetConfig, the * project number and location part is erased in this field. */ name?: string; } /** * UI component configuration for data store. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig { /** * Facet fields that store the mapping of fields to end user widget * appearance. */ facetField?: GoogleCloudDiscoveryengineV1WidgetConfigFacetField[]; /** * The key is the UI component. Mock. Currently supported `title`, * `thumbnail`, `url`, `custom1`, `custom2`, `custom3`. The value is the name * of the field along with its device visibility. The 3 custom fields are * optional and can be added or removed. `title`, `thumbnail`, `url` are * required UI components that cannot be removed. */ fieldsUiComponentsMap?: { [key: string]: GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField }; /** * Output only. the identifier of the data store, used for widget service. * For now it refers to data_store_id, in the future we will migrate the field * to encrypted data store name UUID. */ readonly id?: string; /** * The name of the data store. It should be data store resource name Format: * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. * For APIs under WidgetService, such as WidgetService.LookUpWidgetConfig, the * project number and location part is erased in this field. */ name?: string; } /** * Facet fields that store the mapping of fields to end user widget appearance. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigFacetField { /** * Optional. The field name that end users will see. */ displayName?: string; /** * Required. Registered field name. The format is `field.abc`. */ field?: string; } /** * Describes the homepage setting of the widget. It includes all homepage * related settings and configurations, such as shortcuts. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigHomepageSetting { /** * Optional. The shortcuts to display on the homepage. */ shortcuts?: GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut[]; } /** * Describes an entity of shortcut (aka pinned content) on the homepage. The * home page will render these shortcuts in the same order as what the API * returns. If a customer wants to reorder or remove a shortcut, the UI should * always provide the new full list of shortcuts. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigHomepageSettingShortcut { /** * Optional. Destination URL of shortcut. */ destinationUri?: string; /** * Optional. Icon URL of shortcut. */ icon?: GoogleCloudDiscoveryengineV1WidgetConfigImage; /** * Optional. Title of the shortcut. */ title?: string; } /** * Options to store an image. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigImage { /** * Image URL. */ url?: string; } /** * Describes widget UI branding settings. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigUiBrandingSettings { /** * Logo image. */ logo?: GoogleCloudDiscoveryengineV1WidgetConfigImage; } /** * Facet field that maps to a UI Component. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigUIComponentField { /** * The field visibility on different types of devices. */ deviceVisibility?: | "DEVICE_VISIBILITY_UNSPECIFIED" | "MOBILE" | "DESKTOP"[]; /** * The template to customize how the field is displayed. An example value * would be a string that looks like: "Price: {value}". */ displayTemplate?: string; /** * Required. Registered field name. The format is `field.abc`. */ field?: string; } /** * Describes general widget (or web app) UI settings as seen in the cloud * console UI configuration page. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigUiSettings { /** * Per data store configuration. */ dataStoreUiConfigs?: GoogleCloudDiscoveryengineV1WidgetConfigDataStoreUiConfig[]; /** * The default ordering for search results if specified. Used to set * SearchRequest#order_by on applicable requests. * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.dataStores.servingConfigs/search#request-body */ defaultSearchRequestOrderBy?: string; /** * If set to true, the widget will not collect user events. */ disableUserEventsCollection?: boolean; /** * Whether or not to enable autocomplete. */ enableAutocomplete?: boolean; /** * Optional. If set to true, the widget will enable the create agent button. */ enableCreateAgentButton?: boolean; /** * Optional. If set to true, the widget will enable people search. */ enablePeopleSearch?: boolean; /** * Turn on or off collecting the search result quality feedback from end * users. */ enableQualityFeedback?: boolean; /** * Whether to enable safe search. */ enableSafeSearch?: boolean; /** * Whether to enable search-as-you-type behavior for the search widget. */ enableSearchAsYouType?: boolean; /** * If set to true, the widget will enable visual content summary on * applicable search requests. Only used by healthcare search. */ enableVisualContentSummary?: boolean; /** * Output only. Feature config for the engine to opt in or opt out of * features. Supported keys: * `agent-gallery` * `no-code-agent-builder` * * `prompt-gallery` * `model-selector` * `notebook-lm` * `people-search` * * `people-search-org-chart` * `bi-directional-audio` * `feedback` * * `session-sharing` * `personalization-memory` * `disable-agent-sharing` * * `disable-image-generation` * `disable-video-generation` * * `disable-onedrive-upload` * `disable-talk-to-content` * * `disable-google-drive-upload` */ readonly features?: { [key: string]: | "FEATURE_STATE_UNSPECIFIED" | "FEATURE_STATE_ON" | "FEATURE_STATE_OFF" }; /** * Describes generative answer configuration. */ generativeAnswerConfig?: GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig; /** * Describes widget (or web app) interaction type */ interactionType?: | "INTERACTION_TYPE_UNSPECIFIED" | "SEARCH_ONLY" | "SEARCH_WITH_ANSWER" | "SEARCH_WITH_FOLLOW_UPS"; /** * 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. */ readonly modelConfigs?: { [key: string]: | "MODEL_STATE_UNSPECIFIED" | "MODEL_ENABLED" | "MODEL_DISABLED" }; /** * Controls whether result extract is display and how (snippet or extractive * answer). Default to no result if unspecified. */ resultDescriptionType?: | "RESULT_DISPLAY_TYPE_UNSPECIFIED" | "SNIPPET" | "EXTRACTIVE_ANSWER"; } /** * Describes configuration for generative answer. */ export interface GoogleCloudDiscoveryengineV1WidgetConfigUiSettingsGenerativeAnswerConfig { /** * Whether generated answer contains suggested related questions. */ disableRelatedQuestions?: boolean; /** * Optional. Specifies whether to filter out queries that are adversarial. */ ignoreAdversarialQuery?: boolean; /** * Optional. Specifies whether to filter out queries that are not relevant to * the content. */ ignoreLowRelevantContent?: boolean; /** * Optional. Specifies whether to filter out queries that are not * answer-seeking. The default value is `false`. No answer is returned if the * search query is classified as a non-answer seeking query. If this field is * set to `true`, we skip generating answers for non-answer seeking queries * and return fallback messages instead. */ ignoreNonAnswerSeekingQuery?: boolean; /** * Optional. Source of image returned in the answer. */ imageSource?: | "IMAGE_SOURCE_UNSPECIFIED" | "ALL_AVAILABLE_SOURCES" | "CORPUS_IMAGE_ONLY" | "FIGURE_GENERATION_ONLY"; /** * Language code for Summary. Use language tags defined by * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an * experimental feature. */ languageCode?: string; /** * Max rephrase steps. The max number is 5 steps. If not set or set to < 1, * it will be set to 1 by default. */ maxRephraseSteps?: number; /** * Text at the beginning of the prompt that instructs the model that * generates the answer. */ modelPromptPreamble?: string; /** * The model version used to generate the answer. */ modelVersion?: string; /** * The number of top results to generate the answer from. Up to 10. */ resultCount?: number; } /** * Config to store data store type configuration for workspace data */ export interface GoogleCloudDiscoveryengineV1WorkspaceConfig { /** * Obfuscated Dasher customer ID. */ dasherCustomerId?: string; /** * Optional. The super admin email address for the workspace that will be * used for access token generation. For now we only use it for Native Google * Drive connector data ingestion. */ superAdminEmailAddress?: string; /** * Optional. The super admin service account for the workspace that will be * used for access token generation. For now we only use it for Native Google * Drive connector data ingestion. */ superAdminServiceAccount?: string; /** * The Google Workspace data source. */ type?: | "TYPE_UNSPECIFIED" | "GOOGLE_DRIVE" | "GOOGLE_MAIL" | "GOOGLE_SITES" | "GOOGLE_CALENDAR" | "GOOGLE_CHAT" | "GOOGLE_GROUPS" | "GOOGLE_KEEP" | "GOOGLE_PEOPLE"; } /** * The request message for Operations.CancelOperation. */ export interface GoogleLongrunningCancelOperationRequest { } /** * The response message for Operations.ListOperations. */ export interface GoogleLongrunningListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: GoogleLongrunningOperation[]; /** * Unordered list. Unreachable resources. Populated when the request sets * `ListOperationsRequest.return_partial_success` and reads across collections * e.g. when attempting to list all resources across all supported locations. */ unreachable?: string[]; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface GoogleLongrunningOperation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: GoogleRpcStatus; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * A single data point in a time series. */ export interface GoogleMonitoringV3Point { /** * The time interval to which the data point applies. For `GAUGE` metrics, * the start time is optional, but if it is supplied, it must equal the end * time. For `DELTA` metrics, the start and end time should specify a non-zero * interval, with subsequent points specifying contiguous and non-overlapping * intervals. For `CUMULATIVE` metrics, the start and end time should specify * a non-zero interval, with subsequent points specifying the same start time * and increasing end times, until an event resets the cumulative value to * zero and sets a new start time for the following points. */ interval?: GoogleMonitoringV3TimeInterval; /** * The value of the data point. */ value?: GoogleMonitoringV3TypedValue; } function serializeGoogleMonitoringV3Point(data: any): GoogleMonitoringV3Point { return { ...data, interval: data["interval"] !== undefined ? serializeGoogleMonitoringV3TimeInterval(data["interval"]) : undefined, value: data["value"] !== undefined ? serializeGoogleMonitoringV3TypedValue(data["value"]) : undefined, }; } function deserializeGoogleMonitoringV3Point(data: any): GoogleMonitoringV3Point { return { ...data, interval: data["interval"] !== undefined ? deserializeGoogleMonitoringV3TimeInterval(data["interval"]) : undefined, value: data["value"] !== undefined ? deserializeGoogleMonitoringV3TypedValue(data["value"]) : undefined, }; } /** * A time interval extending just after a start time through an end time. If * the start time is the same as the end time, then the interval represents a * single point in time. */ export interface GoogleMonitoringV3TimeInterval { /** * Required. The end of the time interval. */ endTime?: Date; /** * Optional. The beginning of the time interval. The default value for the * start time is the end time. The start time must not be later than the end * time. */ startTime?: Date; } function serializeGoogleMonitoringV3TimeInterval(data: any): GoogleMonitoringV3TimeInterval { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleMonitoringV3TimeInterval(data: any): GoogleMonitoringV3TimeInterval { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * A collection of data points that describes the time-varying values of a * metric. A time series is identified by a combination of a fully-specified * monitored resource and a fully-specified metric. This type is used for both * listing and creating time series. */ export interface GoogleMonitoringV3TimeSeries { /** * Input only. A detailed description of the time series that will be * associated with the google.api.MetricDescriptor for the metric. Once set, * this field cannot be changed through CreateTimeSeries. */ description?: string; /** * Output only. The associated monitored resource metadata. When reading a * time series, this field will include metadata labels that are explicitly * named in the reduction. When creating a time series, this field is ignored. */ metadata?: GoogleApiMonitoredResourceMetadata; /** * The associated metric. A fully-specified metric used to identify the time * series. */ metric?: GoogleApiMetric; /** * The metric kind of the time series. When listing time series, this metric * kind might be different from the metric kind of the associated metric if * this time series is an alignment or reduction of other time series. When * creating a time series, this field is optional. If present, it must be the * same as the metric kind of the associated metric. If the associated * metric's descriptor must be auto-created, then this field specifies the * metric kind of the new descriptor and must be either `GAUGE` (the default) * or `CUMULATIVE`. */ metricKind?: | "METRIC_KIND_UNSPECIFIED" | "GAUGE" | "DELTA" | "CUMULATIVE"; /** * The data points of this time series. When listing time series, points are * returned in reverse time order. When creating a time series, this field * must contain exactly one point and the point's type must be the same as the * value type of the associated metric. If the associated metric's descriptor * must be auto-created, then the value type of the descriptor is determined * by the point's type, which must be `BOOL`, `INT64`, `DOUBLE`, or * `DISTRIBUTION`. */ points?: GoogleMonitoringV3Point[]; /** * The associated monitored resource. Custom metrics can use only certain * monitored resource types in their time series data. For more information, * see [Monitored resources for custom * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). */ resource?: GoogleApiMonitoredResource; /** * The units in which the metric value is reported. It is only applicable if * the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` * defines the representation of the stored metric values. This field can only * be changed through CreateTimeSeries when it is empty. */ unit?: string; /** * The value type of the time series. When listing time series, this value * type might be different from the value type of the associated metric if * this time series is an alignment or reduction of other time series. When * creating a time series, this field is optional. If present, it must be the * same as the type of the data in the `points` field. */ valueType?: | "VALUE_TYPE_UNSPECIFIED" | "BOOL" | "INT64" | "DOUBLE" | "STRING" | "DISTRIBUTION" | "MONEY"; } function serializeGoogleMonitoringV3TimeSeries(data: any): GoogleMonitoringV3TimeSeries { return { ...data, points: data["points"] !== undefined ? data["points"].map((item: any) => (serializeGoogleMonitoringV3Point(item))) : undefined, }; } function deserializeGoogleMonitoringV3TimeSeries(data: any): GoogleMonitoringV3TimeSeries { return { ...data, points: data["points"] !== undefined ? data["points"].map((item: any) => (deserializeGoogleMonitoringV3Point(item))) : undefined, }; } /** * A single strongly-typed value. */ export interface GoogleMonitoringV3TypedValue { /** * A Boolean value: `true` or `false`. */ boolValue?: boolean; /** * A distribution value. */ distributionValue?: GoogleApiDistribution; /** * A 64-bit double-precision floating-point number. Its magnitude is * approximately ±10±300 and it has 16 significant digits of precision. */ doubleValue?: number; /** * A 64-bit integer. Its range is approximately ±9.2x1018. */ int64Value?: bigint; /** * A variable-length string value. */ stringValue?: string; } function serializeGoogleMonitoringV3TypedValue(data: any): GoogleMonitoringV3TypedValue { return { ...data, distributionValue: data["distributionValue"] !== undefined ? serializeGoogleApiDistribution(data["distributionValue"]) : undefined, int64Value: data["int64Value"] !== undefined ? String(data["int64Value"]) : undefined, }; } function deserializeGoogleMonitoringV3TypedValue(data: any): GoogleMonitoringV3TypedValue { return { ...data, distributionValue: data["distributionValue"] !== undefined ? deserializeGoogleApiDistribution(data["distributionValue"]) : undefined, int64Value: data["int64Value"] !== undefined ? BigInt(data["int64Value"]) : undefined, }; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface GoogleProtobufEmpty { } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface GoogleRpcStatus { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * Represents a whole or partial calendar date, such as a birthday. The time of * day and time zone are either specified elsewhere or are insignificant. The * date is relative to the Gregorian Calendar. This can represent one of the * following: * A full date, with non-zero year, month, and day values. * A * month and day, with a zero year (for example, an anniversary). * A year on * its own, with a zero month and a zero day. * A year and month, with a zero * day (for example, a credit card expiration date). Related types: * * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */ export interface GoogleTypeDate { /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or * 0 to specify a year by itself or a year and month where the day isn't * significant. */ day?: number; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a * month and day. */ month?: number; /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a * year. */ year?: number; } /** * Represents civil time (or occasionally physical time). This type can * represent a civil time in one of a few possible ways: * When utc_offset is * set and time_zone is unset: a civil time on a calendar day with a particular * offset from UTC. * When time_zone is set and utc_offset is unset: a civil * time on a calendar day in a particular time zone. * When neither time_zone * nor utc_offset is set: a civil time on a calendar day in local time. The date * is relative to the Proleptic Gregorian Calendar. If year, month, or day are * 0, the DateTime is considered not to have a specific year, month, or day * respectively. This type may also be used to represent a physical time if all * the date and time fields are set and either case of the `time_offset` oneof * is set. Consider using `Timestamp` message for physical time instead. If your * use case also would like to store the user's timezone, that can be done in * another field. This type is more flexible than some applications may want. * Make sure to document and validate your application's limitations. */ export interface GoogleTypeDateTime { /** * Optional. Day of month. Must be from 1 to 31 and valid for the year and * month, or 0 if specifying a datetime without a day. */ day?: number; /** * Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults * to 0 (midnight). An API may choose to allow the value "24:00:00" for * scenarios like business closing time. */ hours?: number; /** * Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. */ minutes?: number; /** * Optional. Month of year. Must be from 1 to 12, or 0 if specifying a * datetime without a month. */ month?: number; /** * Optional. Fractions of seconds in nanoseconds. Must be from 0 to * 999,999,999, defaults to 0. */ nanos?: number; /** * Optional. Seconds of minutes of the time. Must normally be from 0 to 59, * defaults to 0. An API may allow the value 60 if it allows leap-seconds. */ seconds?: number; /** * Time zone. */ timeZone?: GoogleTypeTimeZone; /** * UTC offset. Must be whole seconds, between -18 hours and +18 hours. For * example, a UTC offset of -4:00 would be represented as { seconds: -14400 }. */ utcOffset?: number /* Duration */; /** * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a * datetime without a year. */ year?: number; } function serializeGoogleTypeDateTime(data: any): GoogleTypeDateTime { return { ...data, utcOffset: data["utcOffset"] !== undefined ? data["utcOffset"] : undefined, }; } function deserializeGoogleTypeDateTime(data: any): GoogleTypeDateTime { return { ...data, utcOffset: data["utcOffset"] !== undefined ? data["utcOffset"] : undefined, }; } /** * Represents a time zone from the [IANA Time Zone * Database](https://www.iana.org/time-zones). */ export interface GoogleTypeTimeZone { /** * IANA Time Zone Database time zone. For example "America/New_York". */ id?: string; /** * Optional. IANA Time Zone Database version number. For example "2019a". */ version?: string; } /** * Additional options for DiscoveryEngine#mediaDownload. */ export interface MediaDownloadOptions { /** * Required. The ID of the file to be downloaded. */ fileId?: string; /** * Optional. The ID of the view to be downloaded. */ viewId?: string; } /** * Additional options for DiscoveryEngine#projectsLocationsCmekConfigsPatch. */ export interface ProjectsLocationsCmekConfigsPatchOptions { /** * Set the following CmekConfig as the default to be used for child resources * if one is not specified. */ setDefault?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataConnectorOperationsList. */ export interface ProjectsLocationsCollectionsDataConnectorOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadata. */ export interface ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataOptions { /** * Required. The FHIR resources to match by. Format: * projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id} */ ["matcher.fhirMatcher.fhirResources"]?: string; /** * The exact URIs to match by. */ ["matcher.urisMatcher.uris"]?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresBranchesDocumentsCreate. */ export interface ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateOptions { /** * Required. The ID to use for the Document, which becomes the final * component of the Document.name. If the caller does not have permission to * create the Document, regardless of whether or not it exists, a * `PERMISSION_DENIED` error is returned. This field must be unique among all * Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is * returned. This field must conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is * returned. */ documentId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresBranchesDocumentsList. */ export interface ProjectsLocationsCollectionsDataStoresBranchesDocumentsListOptions { /** * Maximum number of Documents to return. If unspecified, defaults to 100. * The maximum allowed value is 1000. Values above 1000 are set to 1000. If * this field is negative, an `INVALID_ARGUMENT` error is returned. */ pageSize?: number; /** * A page token ListDocumentsResponse.next_page_token, received from a * previous DocumentService.ListDocuments call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * DocumentService.ListDocuments must match the call that provided the page * token. Otherwise, an `INVALID_ARGUMENT` error is returned. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresBranchesDocumentsPatch. */ export interface ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchOptions { /** * If set to `true` and the Document is not found, a new Document is be * created. */ allowMissing?: boolean; /** * Indicates which fields in the provided imported 'document' to update. If * not set, by default updates all fields. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresBranchesOperationsList. */ export interface ProjectsLocationsCollectionsDataStoresBranchesOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresCompleteQuery. */ export interface ProjectsLocationsCollectionsDataStoresCompleteQueryOptions { /** * Indicates if tail suggestions should be returned if there are no * suggestions that match the full query. Even if set to true, if there are * suggestions that match the full query, those are returned and no tail * suggestions are returned. */ includeTailSuggestions?: boolean; /** * Required. The typeahead input used to fetch suggestions. Maximum length is * 128 characters. */ query?: string; /** * Specifies the autocomplete data model. This overrides any model specified * in the Configuration > Autocomplete section of the Cloud console. Currently * supported values: * `document` - Using suggestions generated from * user-imported documents. * `search-history` - Using suggestions generated * from the past history of SearchService.Search API calls. Do not use it when * there is no traffic for Search API. * `user-event` - Using suggestions * generated from user-imported search events. * `document-completable` - * Using suggestions taken directly from user-imported document fields marked * as completable. Default values: * `document` is the default model for * regular dataStores. * `search-history` is the default model for site search * dataStores. */ queryModel?: string; /** * Optional. A unique identifier for tracking visitors. For example, this * could be implemented with an HTTP cookie, which should be able to uniquely * identify a visitor on a single device. This unique identifier should not * change if the visitor logs in or out of the website. This field should NOT * have a fixed value such as `unknown_visitor`. This should be the same * identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. */ userPseudoId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresControlsCreate. */ export interface ProjectsLocationsCollectionsDataStoresControlsCreateOptions { /** * Required. The ID to use for the Control, which will become the final * component of the Control's resource name. This value must be within 1-63 * characters. Valid characters are /a-z-_/. */ controlId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresControlsList. */ export interface ProjectsLocationsCollectionsDataStoresControlsListOptions { /** * Optional. A filter to apply on the list results. Supported features: * * List all the products under the parent branch if filter is unset. Currently * this field is unsupported. */ filter?: string; /** * Optional. Maximum number of results to return. If unspecified, defaults to * 50. Max allowed value is 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListControls` call. * Provide this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresControlsPatch. */ export interface ProjectsLocationsCollectionsDataStoresControlsPatchOptions { /** * Optional. Indicates which fields in the provided Control to update. The * following are NOT supported: * Control.name * Control.solution_type If not * set or empty, all supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsDataStoresControlsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresControlsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsDataStoresControlsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresControlsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresConversationsList. */ export interface ProjectsLocationsCollectionsDataStoresConversationsListOptions { /** * A filter to apply on the list results. The supported features are: * user_pseudo_id, state. Example: "user_pseudo_id = some_id" */ filter?: string; /** * 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` * `create_time` * `conversation_name` Example: "update_time * desc" "create_time" */ orderBy?: string; /** * Maximum number of results to return. If unspecified, defaults to 50. Max * allowed value is 1000. */ pageSize?: number; /** * A page token, received from a previous `ListConversations` call. Provide * this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresConversationsPatch. */ export interface ProjectsLocationsCollectionsDataStoresConversationsPatchOptions { /** * Indicates which fields in the provided Conversation to update. The * following are NOT supported: * Conversation.name If not set or empty, all * supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsDataStoresConversationsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresConversationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsDataStoresConversationsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresConversationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresCreate. */ export interface ProjectsLocationsCollectionsDataStoresCreateOptions { /** * Resource name of the CmekConfig to use for protecting this DataStore. */ cmekConfigName?: string; /** * A boolean flag indicating whether user want to directly create an advanced * data store for site search. If the data store is not configured as site * search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will * be ignored. */ createAdvancedSiteSearch?: boolean; /** * Required. The ID to use for the DataStore, which will become the final * component of the DataStore's resource name. This field must conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ dataStoreId?: string; /** * DataStore without CMEK protections. If a default CmekConfig is set for the * project, setting this field will override the default CmekConfig as well. */ disableCmek?: boolean; /** * A boolean flag indicating whether to skip the default schema creation for * the data store. Only enable this flag if you are certain that the default * schema is incompatible with your use case. If set to true, you must * manually create a schema for the data store before any documents can be * ingested. This flag cannot be specified if `data_store.starting_schema` is * specified. */ skipDefaultSchemaCreation?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresList. */ export interface ProjectsLocationsCollectionsDataStoresListOptions { /** * Filter by solution type . For example: `filter = * 'solution_type:SOLUTION_TYPE_SEARCH'` */ filter?: string; /** * Maximum number of DataStores to return. If unspecified, defaults to 10. * The maximum allowed value is 50. Values above 50 will be coerced to 50. If * this field is negative, an INVALID_ARGUMENT is returned. */ pageSize?: number; /** * A page token ListDataStoresResponse.next_page_token, received from a * previous DataStoreService.ListDataStores call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * DataStoreService.ListDataStores must match the call that provided the page * token. Otherwise, an INVALID_ARGUMENT error is returned. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresModelsOperationsList. */ export interface ProjectsLocationsCollectionsDataStoresModelsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresOperationsList. */ export interface ProjectsLocationsCollectionsDataStoresOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresPatch. */ export interface ProjectsLocationsCollectionsDataStoresPatchOptions { /** * Indicates which fields in the provided DataStore to update. If an * unsupported or unknown field is provided, an INVALID_ARGUMENT error is * returned. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsDataStoresPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsDataStoresPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSchemasCreate. */ export interface ProjectsLocationsCollectionsDataStoresSchemasCreateOptions { /** * Required. The ID to use for the Schema, which becomes the final component * of the Schema.name. This field should conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 63 characters. */ schemaId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSchemasList. */ export interface ProjectsLocationsCollectionsDataStoresSchemasListOptions { /** * The maximum number of Schemas to return. The service may return fewer than * this value. If unspecified, at most 100 Schemas are returned. The maximum * value is 1000; values above 1000 are set to 1000. */ pageSize?: number; /** * A page token, received from a previous SchemaService.ListSchemas call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to SchemaService.ListSchemas must match the call that * provided the page token. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSchemasOperationsList. */ export interface ProjectsLocationsCollectionsDataStoresSchemasOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSchemasPatch. */ export interface ProjectsLocationsCollectionsDataStoresSchemasPatchOptions { /** * If set to true, and the Schema is not found, a new Schema is created. In * this situation, `update_mask` is ignored. */ allowMissing?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresServingConfigsList. */ export interface ProjectsLocationsCollectionsDataStoresServingConfigsListOptions { /** * Optional. Maximum number of results to return. If unspecified, defaults to * 100. If a value greater than 100 is provided, at most 100 results are * returned. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListServingConfigs` * call. Provide this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresServingConfigsPatch. */ export interface ProjectsLocationsCollectionsDataStoresServingConfigsPatchOptions { /** * Indicates which fields in the provided ServingConfig to update. The * following are NOT supported: * ServingConfig.name If not set, all supported * fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsDataStoresServingConfigsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresServingConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsDataStoresServingConfigsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresServingConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSessionsGet. */ export interface ProjectsLocationsCollectionsDataStoresSessionsGetOptions { /** * Optional. If set to true, the full session including all answer details * will be returned. */ includeAnswerDetails?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSessionsList. */ export interface ProjectsLocationsCollectionsDataStoresSessionsListOptions { /** * A comma-separated list of fields to filter by, in EBNF grammar. The * supported fields are: * `user_pseudo_id` * `state` * `display_name` * * `starred` * `is_pinned` * `labels` * `create_time` * `update_time` * Examples: * `user_pseudo_id = some_id` * `display_name = "some_name"` * * `starred = true` * `is_pinned=true AND (NOT labels:hidden)` * `create_time * > "1970-01-01T12:00:00Z"` */ filter?: string; /** * 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` * `create_time` * `session_name` * `is_pinned` Example: * * `update_time desc` * `create_time` * `is_pinned desc,update_time desc`: * list sessions by is_pinned first, then by update_time. */ orderBy?: string; /** * Maximum number of results to return. If unspecified, defaults to 50. Max * allowed value is 1000. */ pageSize?: number; /** * A page token, received from a previous `ListSessions` call. Provide this * to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSessionsPatch. */ export interface ProjectsLocationsCollectionsDataStoresSessionsPatchOptions { /** * Indicates which fields in the provided Session to update. The following * are NOT supported: * Session.name If not set or empty, all supported fields * are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsDataStoresSessionsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresSessionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsDataStoresSessionsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresSessionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatus. */ export interface ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusOptions { /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. The maximum value is * 1000; values above 1000 will be coerced to 1000. If this field is negative, * an INVALID_ARGUMENT error is returned. */ pageSize?: number; /** * A page token, received from a previous `FetchDomainVerificationStatus` * call. Provide this to retrieve the subsequent page. When paginating, all * other parameters provided to `FetchDomainVerificationStatus` must match the * call that provided the page token. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSiteSearchEngineOperationsList. */ export interface ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetch. */ export interface ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchOptions { /** * The Sitemap uris. */ ["matcher.urisMatcher.uris"]?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesList. */ export interface ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListOptions { /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. The maximum value is * 1000; values above 1000 will be coerced to 1000. If this field is negative, * an INVALID_ARGUMENT error is returned. */ pageSize?: number; /** * A page token, received from a previous `ListTargetSites` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListTargetSites` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsList. */ export interface ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresUserEventsCollect. */ export interface ProjectsLocationsCollectionsDataStoresUserEventsCollectOptions { /** * The event timestamp in milliseconds. This prevents browser caching of * otherwise identical get requests. The name is abbreviated to reduce the * payload bytes. */ ets?: bigint; /** * The URL including cgi-parameters but excluding the hash fragment with a * length limit of 5,000 characters. This is often more useful than the * referer URL, because many browsers only send the domain for third-party * requests. */ uri?: string; /** * Required. URL encoded UserEvent proto with a length limit of 2,000,000 * characters. */ userEvent?: string; } function serializeProjectsLocationsCollectionsDataStoresUserEventsCollectOptions(data: any): ProjectsLocationsCollectionsDataStoresUserEventsCollectOptions { return { ...data, ets: data["ets"] !== undefined ? String(data["ets"]) : undefined, }; } function deserializeProjectsLocationsCollectionsDataStoresUserEventsCollectOptions(data: any): ProjectsLocationsCollectionsDataStoresUserEventsCollectOptions { return { ...data, ets: data["ets"] !== undefined ? BigInt(data["ets"]) : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresUserEventsWrite. */ export interface ProjectsLocationsCollectionsDataStoresUserEventsWriteOptions { /** * If set to true, the user event is written asynchronously after validation, * and the API responds without waiting for the write. */ writeAsync?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresWidgetConfigsGet. */ export interface ProjectsLocationsCollectionsDataStoresWidgetConfigsGetOptions { /** * Optional. Whether it's acceptable to load the widget config from cache. If * set to true, recent changes on widget configs may take a few minutes to * reflect on the end user's view. It's recommended to set to true for * maturely developed widgets, as it improves widget performance. Set to false * to see changes reflected in prod right away, if your widget is under * development. */ acceptCache?: boolean; /** * Optional. Whether to turn off collection_components in WidgetConfig to * reduce latency and data transmission. */ ["getWidgetConfigRequestOption.turnOffCollectionComponents"]?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsDataStoresWidgetConfigsPatch. */ export interface ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchOptions { /** * Indicates which fields in the provided WidgetConfig to update. The * following are the only supported fields: * WidgetConfig.enable_autocomplete * If not set, all supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsDataStoresWidgetConfigsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsDataStoresWidgetConfigsPatchOptions(data: any): ProjectsLocationsCollectionsDataStoresWidgetConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesAssistantsPatch. */ export interface ProjectsLocationsCollectionsEnginesAssistantsPatchOptions { /** * The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsEnginesAssistantsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesAssistantsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsEnginesAssistantsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesAssistantsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesControlsCreate. */ export interface ProjectsLocationsCollectionsEnginesControlsCreateOptions { /** * Required. The ID to use for the Control, which will become the final * component of the Control's resource name. This value must be within 1-63 * characters. Valid characters are /a-z-_/. */ controlId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesControlsList. */ export interface ProjectsLocationsCollectionsEnginesControlsListOptions { /** * Optional. A filter to apply on the list results. Supported features: * * List all the products under the parent branch if filter is unset. Currently * this field is unsupported. */ filter?: string; /** * Optional. Maximum number of results to return. If unspecified, defaults to * 50. Max allowed value is 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListControls` call. * Provide this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesControlsPatch. */ export interface ProjectsLocationsCollectionsEnginesControlsPatchOptions { /** * Optional. Indicates which fields in the provided Control to update. The * following are NOT supported: * Control.name * Control.solution_type If not * set or empty, all supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsEnginesControlsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesControlsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsEnginesControlsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesControlsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesConversationsList. */ export interface ProjectsLocationsCollectionsEnginesConversationsListOptions { /** * A filter to apply on the list results. The supported features are: * user_pseudo_id, state. Example: "user_pseudo_id = some_id" */ filter?: string; /** * 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` * `create_time` * `conversation_name` Example: "update_time * desc" "create_time" */ orderBy?: string; /** * Maximum number of results to return. If unspecified, defaults to 50. Max * allowed value is 1000. */ pageSize?: number; /** * A page token, received from a previous `ListConversations` call. Provide * this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesConversationsPatch. */ export interface ProjectsLocationsCollectionsEnginesConversationsPatchOptions { /** * Indicates which fields in the provided Conversation to update. The * following are NOT supported: * Conversation.name If not set or empty, all * supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsEnginesConversationsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesConversationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsEnginesConversationsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesConversationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesCreate. */ export interface ProjectsLocationsCollectionsEnginesCreateOptions { /** * Required. The ID to use for the Engine, which will become the final * component of the Engine's resource name. This field must conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ engineId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesList. */ export interface ProjectsLocationsCollectionsEnginesListOptions { /** * Optional. Filter by solution type. For example: * solution_type=SOLUTION_TYPE_SEARCH */ filter?: string; /** * Optional. Not supported. */ pageSize?: number; /** * Optional. Not supported. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesOperationsList. */ export interface ProjectsLocationsCollectionsEnginesOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesPatch. */ export interface ProjectsLocationsCollectionsEnginesPatchOptions { /** * Indicates which fields in the provided Engine to update. If an unsupported * or unknown field is provided, an INVALID_ARGUMENT error is returned. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsEnginesPatchOptions(data: any): ProjectsLocationsCollectionsEnginesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsEnginesPatchOptions(data: any): ProjectsLocationsCollectionsEnginesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesServingConfigsList. */ export interface ProjectsLocationsCollectionsEnginesServingConfigsListOptions { /** * Optional. Maximum number of results to return. If unspecified, defaults to * 100. If a value greater than 100 is provided, at most 100 results are * returned. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListServingConfigs` * call. Provide this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesServingConfigsPatch. */ export interface ProjectsLocationsCollectionsEnginesServingConfigsPatchOptions { /** * Indicates which fields in the provided ServingConfig to update. The * following are NOT supported: * ServingConfig.name If not set, all supported * fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsEnginesServingConfigsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesServingConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsEnginesServingConfigsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesServingConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesSessionsGet. */ export interface ProjectsLocationsCollectionsEnginesSessionsGetOptions { /** * Optional. If set to true, the full session including all answer details * will be returned. */ includeAnswerDetails?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesSessionsList. */ export interface ProjectsLocationsCollectionsEnginesSessionsListOptions { /** * A comma-separated list of fields to filter by, in EBNF grammar. The * supported fields are: * `user_pseudo_id` * `state` * `display_name` * * `starred` * `is_pinned` * `labels` * `create_time` * `update_time` * Examples: * `user_pseudo_id = some_id` * `display_name = "some_name"` * * `starred = true` * `is_pinned=true AND (NOT labels:hidden)` * `create_time * > "1970-01-01T12:00:00Z"` */ filter?: string; /** * 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` * `create_time` * `session_name` * `is_pinned` Example: * * `update_time desc` * `create_time` * `is_pinned desc,update_time desc`: * list sessions by is_pinned first, then by update_time. */ orderBy?: string; /** * Maximum number of results to return. If unspecified, defaults to 50. Max * allowed value is 1000. */ pageSize?: number; /** * A page token, received from a previous `ListSessions` call. Provide this * to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesSessionsPatch. */ export interface ProjectsLocationsCollectionsEnginesSessionsPatchOptions { /** * Indicates which fields in the provided Session to update. The following * are NOT supported: * Session.name If not set or empty, all supported fields * are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsEnginesSessionsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesSessionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsEnginesSessionsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesSessionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesWidgetConfigsGet. */ export interface ProjectsLocationsCollectionsEnginesWidgetConfigsGetOptions { /** * Optional. Whether it's acceptable to load the widget config from cache. If * set to true, recent changes on widget configs may take a few minutes to * reflect on the end user's view. It's recommended to set to true for * maturely developed widgets, as it improves widget performance. Set to false * to see changes reflected in prod right away, if your widget is under * development. */ acceptCache?: boolean; /** * Optional. Whether to turn off collection_components in WidgetConfig to * reduce latency and data transmission. */ ["getWidgetConfigRequestOption.turnOffCollectionComponents"]?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsEnginesWidgetConfigsPatch. */ export interface ProjectsLocationsCollectionsEnginesWidgetConfigsPatchOptions { /** * Indicates which fields in the provided WidgetConfig to update. The * following are the only supported fields: * WidgetConfig.enable_autocomplete * If not set, all supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsEnginesWidgetConfigsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesWidgetConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsEnginesWidgetConfigsPatchOptions(data: any): ProjectsLocationsCollectionsEnginesWidgetConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsOperationsList. */ export interface ProjectsLocationsCollectionsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsCollectionsUpdateDataConnector. */ export interface ProjectsLocationsCollectionsUpdateDataConnectorOptions { /** * Indicates which fields in the provided DataConnector to update. Supported * field paths include: - refresh_interval - params - auto_run_disabled - * action_config - action_config.action_params - action_config.service_name - * destination_configs - blocking_reasons - sync_mode - * incremental_sync_disabled - incremental_refresh_interval Note: Support for * these fields may vary depending on the connector type. For example, not all * connectors support `destination_configs`. If an unsupported or unknown * field path is provided, the request will return an INVALID_ARGUMENT error. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsCollectionsUpdateDataConnectorOptions(data: any): ProjectsLocationsCollectionsUpdateDataConnectorOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsCollectionsUpdateDataConnectorOptions(data: any): ProjectsLocationsCollectionsUpdateDataConnectorOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresBranchesBatchGetDocumentsMetadata. */ export interface ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataOptions { /** * Required. The FHIR resources to match by. Format: * projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id} */ ["matcher.fhirMatcher.fhirResources"]?: string; /** * The exact URIs to match by. */ ["matcher.urisMatcher.uris"]?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresBranchesDocumentsCreate. */ export interface ProjectsLocationsDataStoresBranchesDocumentsCreateOptions { /** * Required. The ID to use for the Document, which becomes the final * component of the Document.name. If the caller does not have permission to * create the Document, regardless of whether or not it exists, a * `PERMISSION_DENIED` error is returned. This field must be unique among all * Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is * returned. This field must conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is * returned. */ documentId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresBranchesDocumentsList. */ export interface ProjectsLocationsDataStoresBranchesDocumentsListOptions { /** * Maximum number of Documents to return. If unspecified, defaults to 100. * The maximum allowed value is 1000. Values above 1000 are set to 1000. If * this field is negative, an `INVALID_ARGUMENT` error is returned. */ pageSize?: number; /** * A page token ListDocumentsResponse.next_page_token, received from a * previous DocumentService.ListDocuments call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * DocumentService.ListDocuments must match the call that provided the page * token. Otherwise, an `INVALID_ARGUMENT` error is returned. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresBranchesDocumentsPatch. */ export interface ProjectsLocationsDataStoresBranchesDocumentsPatchOptions { /** * If set to `true` and the Document is not found, a new Document is be * created. */ allowMissing?: boolean; /** * Indicates which fields in the provided imported 'document' to update. If * not set, by default updates all fields. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDataStoresBranchesDocumentsPatchOptions(data: any): ProjectsLocationsDataStoresBranchesDocumentsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDataStoresBranchesDocumentsPatchOptions(data: any): ProjectsLocationsDataStoresBranchesDocumentsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresBranchesOperationsList. */ export interface ProjectsLocationsDataStoresBranchesOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresCompleteQuery. */ export interface ProjectsLocationsDataStoresCompleteQueryOptions { /** * Indicates if tail suggestions should be returned if there are no * suggestions that match the full query. Even if set to true, if there are * suggestions that match the full query, those are returned and no tail * suggestions are returned. */ includeTailSuggestions?: boolean; /** * Required. The typeahead input used to fetch suggestions. Maximum length is * 128 characters. */ query?: string; /** * Specifies the autocomplete data model. This overrides any model specified * in the Configuration > Autocomplete section of the Cloud console. Currently * supported values: * `document` - Using suggestions generated from * user-imported documents. * `search-history` - Using suggestions generated * from the past history of SearchService.Search API calls. Do not use it when * there is no traffic for Search API. * `user-event` - Using suggestions * generated from user-imported search events. * `document-completable` - * Using suggestions taken directly from user-imported document fields marked * as completable. Default values: * `document` is the default model for * regular dataStores. * `search-history` is the default model for site search * dataStores. */ queryModel?: string; /** * Optional. A unique identifier for tracking visitors. For example, this * could be implemented with an HTTP cookie, which should be able to uniquely * identify a visitor on a single device. This unique identifier should not * change if the visitor logs in or out of the website. This field should NOT * have a fixed value such as `unknown_visitor`. This should be the same * identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. */ userPseudoId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresControlsCreate. */ export interface ProjectsLocationsDataStoresControlsCreateOptions { /** * Required. The ID to use for the Control, which will become the final * component of the Control's resource name. This value must be within 1-63 * characters. Valid characters are /a-z-_/. */ controlId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresControlsList. */ export interface ProjectsLocationsDataStoresControlsListOptions { /** * Optional. A filter to apply on the list results. Supported features: * * List all the products under the parent branch if filter is unset. Currently * this field is unsupported. */ filter?: string; /** * Optional. Maximum number of results to return. If unspecified, defaults to * 50. Max allowed value is 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListControls` call. * Provide this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresControlsPatch. */ export interface ProjectsLocationsDataStoresControlsPatchOptions { /** * Optional. Indicates which fields in the provided Control to update. The * following are NOT supported: * Control.name * Control.solution_type If not * set or empty, all supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDataStoresControlsPatchOptions(data: any): ProjectsLocationsDataStoresControlsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDataStoresControlsPatchOptions(data: any): ProjectsLocationsDataStoresControlsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresConversationsList. */ export interface ProjectsLocationsDataStoresConversationsListOptions { /** * A filter to apply on the list results. The supported features are: * user_pseudo_id, state. Example: "user_pseudo_id = some_id" */ filter?: string; /** * 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` * `create_time` * `conversation_name` Example: "update_time * desc" "create_time" */ orderBy?: string; /** * Maximum number of results to return. If unspecified, defaults to 50. Max * allowed value is 1000. */ pageSize?: number; /** * A page token, received from a previous `ListConversations` call. Provide * this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresConversationsPatch. */ export interface ProjectsLocationsDataStoresConversationsPatchOptions { /** * Indicates which fields in the provided Conversation to update. The * following are NOT supported: * Conversation.name If not set or empty, all * supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDataStoresConversationsPatchOptions(data: any): ProjectsLocationsDataStoresConversationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDataStoresConversationsPatchOptions(data: any): ProjectsLocationsDataStoresConversationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for DiscoveryEngine#projectsLocationsDataStoresCreate. */ export interface ProjectsLocationsDataStoresCreateOptions { /** * Resource name of the CmekConfig to use for protecting this DataStore. */ cmekConfigName?: string; /** * A boolean flag indicating whether user want to directly create an advanced * data store for site search. If the data store is not configured as site * search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will * be ignored. */ createAdvancedSiteSearch?: boolean; /** * Required. The ID to use for the DataStore, which will become the final * component of the DataStore's resource name. This field must conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ dataStoreId?: string; /** * DataStore without CMEK protections. If a default CmekConfig is set for the * project, setting this field will override the default CmekConfig as well. */ disableCmek?: boolean; /** * A boolean flag indicating whether to skip the default schema creation for * the data store. Only enable this flag if you are certain that the default * schema is incompatible with your use case. If set to true, you must * manually create a schema for the data store before any documents can be * ingested. This flag cannot be specified if `data_store.starting_schema` is * specified. */ skipDefaultSchemaCreation?: boolean; } /** * Additional options for DiscoveryEngine#projectsLocationsDataStoresList. */ export interface ProjectsLocationsDataStoresListOptions { /** * Filter by solution type . For example: `filter = * 'solution_type:SOLUTION_TYPE_SEARCH'` */ filter?: string; /** * Maximum number of DataStores to return. If unspecified, defaults to 10. * The maximum allowed value is 50. Values above 50 will be coerced to 50. If * this field is negative, an INVALID_ARGUMENT is returned. */ pageSize?: number; /** * A page token ListDataStoresResponse.next_page_token, received from a * previous DataStoreService.ListDataStores call. Provide this to retrieve the * subsequent page. When paginating, all other parameters provided to * DataStoreService.ListDataStores must match the call that provided the page * token. Otherwise, an INVALID_ARGUMENT error is returned. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresModelsOperationsList. */ export interface ProjectsLocationsDataStoresModelsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresOperationsList. */ export interface ProjectsLocationsDataStoresOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for DiscoveryEngine#projectsLocationsDataStoresPatch. */ export interface ProjectsLocationsDataStoresPatchOptions { /** * Indicates which fields in the provided DataStore to update. If an * unsupported or unknown field is provided, an INVALID_ARGUMENT error is * returned. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDataStoresPatchOptions(data: any): ProjectsLocationsDataStoresPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDataStoresPatchOptions(data: any): ProjectsLocationsDataStoresPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresSchemasCreate. */ export interface ProjectsLocationsDataStoresSchemasCreateOptions { /** * Required. The ID to use for the Schema, which becomes the final component * of the Schema.name. This field should conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length * limit of 63 characters. */ schemaId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresSchemasList. */ export interface ProjectsLocationsDataStoresSchemasListOptions { /** * The maximum number of Schemas to return. The service may return fewer than * this value. If unspecified, at most 100 Schemas are returned. The maximum * value is 1000; values above 1000 are set to 1000. */ pageSize?: number; /** * A page token, received from a previous SchemaService.ListSchemas call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to SchemaService.ListSchemas must match the call that * provided the page token. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresSchemasPatch. */ export interface ProjectsLocationsDataStoresSchemasPatchOptions { /** * If set to true, and the Schema is not found, a new Schema is created. In * this situation, `update_mask` is ignored. */ allowMissing?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresServingConfigsList. */ export interface ProjectsLocationsDataStoresServingConfigsListOptions { /** * Optional. Maximum number of results to return. If unspecified, defaults to * 100. If a value greater than 100 is provided, at most 100 results are * returned. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListServingConfigs` * call. Provide this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresServingConfigsPatch. */ export interface ProjectsLocationsDataStoresServingConfigsPatchOptions { /** * Indicates which fields in the provided ServingConfig to update. The * following are NOT supported: * ServingConfig.name If not set, all supported * fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDataStoresServingConfigsPatchOptions(data: any): ProjectsLocationsDataStoresServingConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDataStoresServingConfigsPatchOptions(data: any): ProjectsLocationsDataStoresServingConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresSessionsGet. */ export interface ProjectsLocationsDataStoresSessionsGetOptions { /** * Optional. If set to true, the full session including all answer details * will be returned. */ includeAnswerDetails?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresSessionsList. */ export interface ProjectsLocationsDataStoresSessionsListOptions { /** * A comma-separated list of fields to filter by, in EBNF grammar. The * supported fields are: * `user_pseudo_id` * `state` * `display_name` * * `starred` * `is_pinned` * `labels` * `create_time` * `update_time` * Examples: * `user_pseudo_id = some_id` * `display_name = "some_name"` * * `starred = true` * `is_pinned=true AND (NOT labels:hidden)` * `create_time * > "1970-01-01T12:00:00Z"` */ filter?: string; /** * 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` * `create_time` * `session_name` * `is_pinned` Example: * * `update_time desc` * `create_time` * `is_pinned desc,update_time desc`: * list sessions by is_pinned first, then by update_time. */ orderBy?: string; /** * Maximum number of results to return. If unspecified, defaults to 50. Max * allowed value is 1000. */ pageSize?: number; /** * A page token, received from a previous `ListSessions` call. Provide this * to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresSessionsPatch. */ export interface ProjectsLocationsDataStoresSessionsPatchOptions { /** * Indicates which fields in the provided Session to update. The following * are NOT supported: * Session.name If not set or empty, all supported fields * are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDataStoresSessionsPatchOptions(data: any): ProjectsLocationsDataStoresSessionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDataStoresSessionsPatchOptions(data: any): ProjectsLocationsDataStoresSessionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresSiteSearchEngineSitemapsFetch. */ export interface ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchOptions { /** * The Sitemap uris. */ ["matcher.urisMatcher.uris"]?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresSiteSearchEngineTargetSitesList. */ export interface ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListOptions { /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. The maximum value is * 1000; values above 1000 will be coerced to 1000. If this field is negative, * an INVALID_ARGUMENT error is returned. */ pageSize?: number; /** * A page token, received from a previous `ListTargetSites` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListTargetSites` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresUserEventsCollect. */ export interface ProjectsLocationsDataStoresUserEventsCollectOptions { /** * The event timestamp in milliseconds. This prevents browser caching of * otherwise identical get requests. The name is abbreviated to reduce the * payload bytes. */ ets?: bigint; /** * The URL including cgi-parameters but excluding the hash fragment with a * length limit of 5,000 characters. This is often more useful than the * referer URL, because many browsers only send the domain for third-party * requests. */ uri?: string; /** * Required. URL encoded UserEvent proto with a length limit of 2,000,000 * characters. */ userEvent?: string; } function serializeProjectsLocationsDataStoresUserEventsCollectOptions(data: any): ProjectsLocationsDataStoresUserEventsCollectOptions { return { ...data, ets: data["ets"] !== undefined ? String(data["ets"]) : undefined, }; } function deserializeProjectsLocationsDataStoresUserEventsCollectOptions(data: any): ProjectsLocationsDataStoresUserEventsCollectOptions { return { ...data, ets: data["ets"] !== undefined ? BigInt(data["ets"]) : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresUserEventsWrite. */ export interface ProjectsLocationsDataStoresUserEventsWriteOptions { /** * If set to true, the user event is written asynchronously after validation, * and the API responds without waiting for the write. */ writeAsync?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresWidgetConfigsGet. */ export interface ProjectsLocationsDataStoresWidgetConfigsGetOptions { /** * Optional. Whether it's acceptable to load the widget config from cache. If * set to true, recent changes on widget configs may take a few minutes to * reflect on the end user's view. It's recommended to set to true for * maturely developed widgets, as it improves widget performance. Set to false * to see changes reflected in prod right away, if your widget is under * development. */ acceptCache?: boolean; /** * Optional. Whether to turn off collection_components in WidgetConfig to * reduce latency and data transmission. */ ["getWidgetConfigRequestOption.turnOffCollectionComponents"]?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsDataStoresWidgetConfigsPatch. */ export interface ProjectsLocationsDataStoresWidgetConfigsPatchOptions { /** * Indicates which fields in the provided WidgetConfig to update. The * following are the only supported fields: * WidgetConfig.enable_autocomplete * If not set, all supported fields are updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsDataStoresWidgetConfigsPatchOptions(data: any): ProjectsLocationsDataStoresWidgetConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsDataStoresWidgetConfigsPatchOptions(data: any): ProjectsLocationsDataStoresWidgetConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsIdentityMappingStoresCreate. */ export interface ProjectsLocationsIdentityMappingStoresCreateOptions { /** * Resource name of the CmekConfig to use for protecting this Identity * Mapping Store. */ cmekConfigName?: string; /** * Identity Mapping Store without CMEK protections. If a default CmekConfig * is set for the project, setting this field will override the default * CmekConfig as well. */ disableCmek?: boolean; /** * Required. The ID of the Identity Mapping Store to create. The ID must * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and * hyphens (-). The maximum length is 63 characters. */ identityMappingStoreId?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsIdentityMappingStoresListIdentityMappings. */ export interface ProjectsLocationsIdentityMappingStoresListIdentityMappingsOptions { /** * Maximum number of IdentityMappings to return. If unspecified, defaults to * 2000. The maximum allowed value is 10000. Values above 10000 will be * coerced to 10000. */ pageSize?: number; /** * A page token, received from a previous `ListIdentityMappings` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListIdentityMappings` must match the call that * provided the page token. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsIdentityMappingStoresList. */ export interface ProjectsLocationsIdentityMappingStoresListOptions { /** * Maximum number of IdentityMappingStores to return. If unspecified, * defaults to 100. The maximum allowed value is 1000. Values above 1000 will * be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListIdentityMappingStores` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListIdentityMappingStores` must match the call that * provided the page token. */ pageToken?: string; } /** * Additional options for * DiscoveryEngine#projectsLocationsIdentityMappingStoresOperationsList. */ export interface ProjectsLocationsIdentityMappingStoresOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsLicenseConfigsCreate. */ export interface ProjectsLocationsLicenseConfigsCreateOptions { /** * Optional. The ID to use for the LicenseConfig, which will become the final * component of the LicenseConfig's resource name. We are using the tier * (product edition) name as the license config id such as `search` or * `search_and_assistant`. */ licenseConfigId?: string; } /** * Additional options for DiscoveryEngine#projectsLocationsLicenseConfigsPatch. */ export interface ProjectsLocationsLicenseConfigsPatchOptions { /** * Optional. Indicates which fields in the provided LicenseConfig to update. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsLicenseConfigsPatchOptions(data: any): ProjectsLocationsLicenseConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsLicenseConfigsPatchOptions(data: any): ProjectsLocationsLicenseConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for DiscoveryEngine#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Additional options for * DiscoveryEngine#projectsLocationsSetUpDataConnectorV2. */ export interface ProjectsLocationsSetUpDataConnectorV2Options { /** * Required. The display name of the Collection. Should be human readable, * used to display collections in the Console Dashboard. UTF-8 encoded string * with limit of 1024 characters. */ collectionDisplayName?: string; /** * Required. The ID to use for the Collection, which will become the final * component of the Collection's resource name. A new Collection is created as * part of the DataConnector setup. DataConnector is a singleton resource * under Collection, managing all DataStores of the Collection. This field * must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard * with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error * is returned. */ collectionId?: string; } /** * Additional options for DiscoveryEngine#projectsLocationsUpdateCmekConfig. */ export interface ProjectsLocationsUpdateCmekConfigOptions { /** * Set the following CmekConfig as the default to be used for child resources * if one is not specified. */ setDefault?: boolean; } /** * Additional options for DiscoveryEngine#projectsLocationsUserEventsCollect. */ export interface ProjectsLocationsUserEventsCollectOptions { /** * The event timestamp in milliseconds. This prevents browser caching of * otherwise identical get requests. The name is abbreviated to reduce the * payload bytes. */ ets?: bigint; /** * The URL including cgi-parameters but excluding the hash fragment with a * length limit of 5,000 characters. This is often more useful than the * referer URL, because many browsers only send the domain for third-party * requests. */ uri?: string; /** * Required. URL encoded UserEvent proto with a length limit of 2,000,000 * characters. */ userEvent?: string; } function serializeProjectsLocationsUserEventsCollectOptions(data: any): ProjectsLocationsUserEventsCollectOptions { return { ...data, ets: data["ets"] !== undefined ? String(data["ets"]) : undefined, }; } function deserializeProjectsLocationsUserEventsCollectOptions(data: any): ProjectsLocationsUserEventsCollectOptions { return { ...data, ets: data["ets"] !== undefined ? BigInt(data["ets"]) : undefined, }; } /** * Additional options for DiscoveryEngine#projectsLocationsUserEventsWrite. */ export interface ProjectsLocationsUserEventsWriteOptions { /** * If set to true, the user event is written asynchronously after validation, * and the API responds without waiting for the write. */ writeAsync?: boolean; } /** * Additional options for DiscoveryEngine#projectsLocationsUserStoresCreate. */ export interface ProjectsLocationsUserStoresCreateOptions { /** * Required. The ID of the User Store to create. The ID must contain only * letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The * maximum length is 63 characters. */ userStoreId?: string; } /** * Additional options for DiscoveryEngine#projectsLocationsUserStoresPatch. */ export interface ProjectsLocationsUserStoresPatchOptions { /** * Optional. The list of fields to update. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsUserStoresPatchOptions(data: any): ProjectsLocationsUserStoresPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsUserStoresPatchOptions(data: any): ProjectsLocationsUserStoresPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DiscoveryEngine#projectsLocationsUserStoresUserLicensesList. */ export interface ProjectsLocationsUserStoresUserLicensesListOptions { /** * 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. */ filter?: string; /** * 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. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListUserLicenses` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListUserLicenses` must match the call that provided * the page token. */ pageToken?: string; } /** * Additional options for DiscoveryEngine#projectsOperationsList. */ export interface ProjectsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * [ListOperationsResponse.unreachable] field. This can only be `true` when * reading across collections e.g. when `parent` is set to * `"projects/example/locations/-"`. This field is not by default supported * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } function decodeBase64(b64: string): Uint8Array { const binString = atob(b64); const size = binString.length; const bytes = new Uint8Array(size); for (let i = 0; i < size; i++) { bytes[i] = binString.charCodeAt(i); } return bytes; } const base64abc = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"]; /** * CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 * Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation * @param data */ function encodeBase64(uint8: Uint8Array): string { let result = "", i; const l = uint8.length; for (i = 2; i < l; i += 3) { result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[((uint8[i - 1] & 0x0f) << 2) | (uint8[i] >> 6)]; result += base64abc[uint8[i] & 0x3f]; } if (i === l + 1) { // 1 octet yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[(uint8[i - 2] & 0x03) << 4]; result += "=="; } if (i === l) { // 2 octets yet to write result += base64abc[uint8[i - 2] >> 2]; result += base64abc[((uint8[i - 2] & 0x03) << 4) | (uint8[i - 1] >> 4)]; result += base64abc[(uint8[i - 1] & 0x0f) << 2]; result += "="; } return result; }