From b0dc1b2ef66334394613c6e92a4c5b0ebb8e0faf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:49:25 -0400 Subject: [PATCH] feat: [discoveryengine] add Chunk resource in the search response (#5526) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add Chunk resource in the search response feat: add NO_RELEVANT_CONTENT to Answer API feat: support AlloyDB Connector docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 649156977 Source-Link: https://github.com/googleapis/googleapis/commit/ff081c977ecd64c60e31d365a05f2cb17d0b8b0b Source-Link: https://github.com/googleapis/googleapis-gen/commit/bbee86257e17d550e7956d42a95d9c1fe5021c88 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiYmJlZTg2MjU3ZTE3ZDU1MGU3OTU2ZDQyYTk1ZDljMWZlNTAyMWM4OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google-cloud-discoveryengine/README.md | 2 + .../cloud/discoveryengine/v1/answer.proto | 13 + .../cloud/discoveryengine/v1/chunk.proto | 119 + .../cloud/discoveryengine/v1/common.proto | 5 - .../cloud/discoveryengine/v1/completion.proto | 31 + .../v1/completion_service.proto | 38 + .../v1/conversational_search_service.proto | 35 + .../cloud/discoveryengine/v1/document.proto | 2 +- .../v1/document_processing_config.proto | 39 +- .../discoveryengine/v1/import_config.proto | 108 + .../discoveryengine/v1/purge_config.proto | 38 + .../discoveryengine/v1/search_service.proto | 204 +- .../v1/user_event_service.proto | 3 + .../protos/protos.d.ts | 5378 ++-- .../protos/protos.js | 22269 ++++++++++------ .../protos/protos.json | 556 +- .../samples/README.md | 36 + ...n_service.import_completion_suggestions.js | 80 + ...on_service.purge_completion_suggestions.js | 64 + ...versational_search_service.answer_query.js | 18 + .../v1/document_service.import_documents.js | 4 + .../generated/v1/search_service.search.js | 43 + ...adata_google.cloud.discoveryengine.v1.json | 126 +- .../src/v1/completion_service_client.ts | 597 + .../v1/completion_service_client_config.json | 10 + .../src/v1/completion_service_proto_list.json | 1 + .../src/v1/control_service_client.ts | 268 + .../src/v1/control_service_proto_list.json | 1 + .../conversational_search_service_client.ts | 286 + ...versational_search_service_proto_list.json | 1 + .../src/v1/data_store_service_client.ts | 268 + .../src/v1/data_store_service_proto_list.json | 1 + .../src/v1/document_service_client.ts | 270 + .../src/v1/document_service_proto_list.json | 1 + .../src/v1/engine_service_client.ts | 268 + .../src/v1/engine_service_proto_list.json | 1 + .../src/v1/gapic_metadata.json | 20 + .../v1/grounded_generation_service_client.ts | 268 + ...rounded_generation_service_proto_list.json | 1 + .../src/v1/project_service_client.ts | 268 + .../src/v1/project_service_proto_list.json | 1 + .../src/v1/rank_service_client.ts | 268 + .../src/v1/rank_service_proto_list.json | 1 + .../src/v1/recommendation_service_client.ts | 268 + .../v1/recommendation_service_proto_list.json | 1 + .../src/v1/schema_service_client.ts | 268 + .../src/v1/schema_service_proto_list.json | 1 + .../src/v1/search_service_client.ts | 391 + .../src/v1/search_service_proto_list.json | 1 + .../v1/site_search_engine_service_client.ts | 268 + ...site_search_engine_service_proto_list.json | 1 + .../src/v1/user_event_service_client.ts | 268 + .../src/v1/user_event_service_proto_list.json | 1 + .../test/gapic_completion_service_v1.ts | 706 + .../test/gapic_control_service_v1.ts | 310 + .../gapic_conversational_search_service_v1.ts | 316 + .../test/gapic_data_store_service_v1.ts | 310 + .../test/gapic_document_service_v1.ts | 310 + .../test/gapic_engine_service_v1.ts | 310 + .../gapic_grounded_generation_service_v1.ts | 312 + .../test/gapic_project_service_v1.ts | 310 + .../test/gapic_rank_service_v1.ts | 310 + .../test/gapic_recommendation_service_v1.ts | 312 + .../test/gapic_schema_service_v1.ts | 310 + .../test/gapic_search_service_v1.ts | 310 + .../gapic_site_search_engine_service_v1.ts | 312 + .../test/gapic_user_event_service_v1.ts | 310 + 67 files changed, 28464 insertions(+), 9763 deletions(-) create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/chunk.proto create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js diff --git a/packages/google-cloud-discoveryengine/README.md b/packages/google-cloud-discoveryengine/README.md index 3f96c07417f..b5a1c926592 100644 --- a/packages/google-cloud-discoveryengine/README.md +++ b/packages/google-cloud-discoveryengine/README.md @@ -126,7 +126,9 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | | Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.complete_query.js,packages/google-cloud-discoveryengine/samples/README.md) | +| Completion_service.import_completion_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js,packages/google-cloud-discoveryengine/samples/README.md) | | Completion_service.import_suggestion_deny_list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js,packages/google-cloud-discoveryengine/samples/README.md) | +| Completion_service.purge_completion_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js,packages/google-cloud-discoveryengine/samples/README.md) | | Completion_service.purge_suggestion_deny_list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js,packages/google-cloud-discoveryengine/samples/README.md) | | Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/control_service.create_control.js,packages/google-cloud-discoveryengine/samples/README.md) | | Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/control_service.delete_control.js,packages/google-cloud-discoveryengine/samples/README.md) | diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/answer.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/answer.proto index c555f66e87b..f24e88174ed 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/answer.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/answer.proto @@ -188,6 +188,13 @@ message Answer { // If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, // populate chunk info. repeated ChunkInfo chunk_info = 5; + + // Data representation. + // The structured JSON data for the document. + // It's populated from the struct data from the Document (code + // pointer: http://shortn/_objzAfIiHq), or the Chunk in search result + // (code pointer: http://shortn/_Ipo6KFFGBL). + google.protobuf.Struct struct_data = 6; } // Search results observed by the search action, it can be snippets info @@ -296,6 +303,12 @@ message Answer { // Google skips the answer if there is a potential policy violation // detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4; + + // The no relevant content case. + // + // Google skips the answer if there is no relevant content in the + // retrieved search results. + NO_RELEVANT_CONTENT = 5; } // Immutable. Fully qualified name diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/chunk.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/chunk.proto new file mode 100644 index 00000000000..06541029e65 --- /dev/null +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/chunk.proto @@ -0,0 +1,119 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "ChunkProto"; +option java_package = "com.google.cloud.discoveryengine.v1"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1"; + +// Chunk captures all raw metadata information of items to be recommended or +// searched in the chunk mode. +message Chunk { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/Chunk" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" + }; + + // Document metadata contains the information of the document of the current + // chunk. + message DocumentMetadata { + // Uri of the document. + string uri = 1; + + // Title of the document. + string title = 2; + + // Data representation. + // The structured JSON data for the document. It should conform to the + // registered [Schema][google.cloud.discoveryengine.v1.Schema] or an + // `INVALID_ARGUMENT` error is thrown. + google.protobuf.Struct struct_data = 3; + } + + // Page span of the chunk. + message PageSpan { + // The start page of the chunk. + int32 page_start = 1; + + // The end page of the chunk. + int32 page_end = 2; + } + + // Metadata of the current chunk. This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + // API. + message ChunkMetadata { + // The previous chunks of the current chunk. The number is controlled by + // [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks]. + // This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + // API. + repeated Chunk previous_chunks = 1; + + // The next chunks of the current chunk. The number is controlled by + // [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks]. + // This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + // API. + repeated Chunk next_chunks = 2; + } + + // 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. + string name = 1; + + // Unique chunk ID of the current chunk. + string id = 2; + + // Content is a string from a document (parsed content). + string content = 3; + + // 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 [SearchService.SearchResponse][]. + optional double relevance_score = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Metadata of the document from the current chunk. + DocumentMetadata document_metadata = 5; + + // Output only. This field is OUTPUT_ONLY. + // It contains derived data that are not in the original input document. + google.protobuf.Struct derived_struct_data = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Page span of the chunk. + PageSpan page_span = 6; + + // Output only. Metadata of the current chunk. + ChunkMetadata chunk_metadata = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/common.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/common.proto index 06bf007b923..f4891639aa5 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/common.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/common.proto @@ -57,11 +57,6 @@ option (google.api.resource_definition) = { type: "healthcare.googleapis.com/FhirStore" pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}" }; -option (google.api.resource_definition) = { - type: "discoveryengine.googleapis.com/Chunk" - pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" - pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" -}; // The industry vertical associated with the // [DataStore][google.cloud.discoveryengine.v1.DataStore]. diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion.proto index 1c5c6a6eca3..17fbd56bbb0 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion.proto @@ -50,3 +50,34 @@ message SuggestionDenyListEntry { // exact phrase, or block any suggestions containing this phrase. MatchOperator match_operator = 2 [(google.api.field_behavior) = REQUIRED]; } + +// Autocomplete suggestions that are imported from Customer. +message CompletionSuggestion { + // Ranking metrics of this suggestion. + oneof ranking_info { + // Global score of this suggestion. Control how this suggestion would be + // scored / ranked. + double global_score = 2; + + // Frequency of this suggestion. Will be used to rank suggestions when score + // is not available. + int64 frequency = 3; + } + + // Required. The suggestion text. + string suggestion = 1 [(google.api.field_behavior) = REQUIRED]; + + // BCP-47 language code of this suggestion. + string language_code = 4; + + // 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. + string group_id = 5; + + // The score of this suggestion within its group. + double group_score = 6; + + // Alternative matching phrases for this suggestion. + repeated string alternative_phrases = 7; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion_service.proto index 72c8eb86eed..c498a2db951 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion_service.proto @@ -86,6 +86,44 @@ service CompletionService { metadata_type: "google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata" }; } + + // Imports + // [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + // for a DataStore. + rpc ImportCompletionSuggestions(ImportCompletionSuggestionsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:import" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:import" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse" + metadata_type: "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata" + }; + } + + // Permanently deletes all + // [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + // for a DataStore. + rpc PurgeCompletionSuggestions(PurgeCompletionSuggestionsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:purge" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:purge" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse" + metadata_type: "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata" + }; + } } // Request message for diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto index e8f57b2576f..7bb0bc12c73 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto @@ -583,6 +583,17 @@ message AnswerQueryRequest { // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. string order_by = 4; + // Specifies the search result mode. If unspecified, the + // search result mode is based on + // [DataStore.DocumentProcessingConfig.chunking_config][]: + // * If [DataStore.DocumentProcessingConfig.chunking_config][] is + // specified, + // it defaults to `CHUNKS`. + // * Otherwise, it defaults to `DOCUMENTS`. + // See [parse and chunk + // documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) + SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + // 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 @@ -706,6 +717,11 @@ message AnswerQueryRequest { message QueryRephraserSpec { // Disable query rephraser. bool disable = 1; + + // Max rephrase steps. + // The max number is 5 steps. + // If not set or set to < 1, it will be set to 1 by default. + int32 max_rephrase_steps = 2; } // Query classification specification. @@ -777,6 +793,25 @@ message AnswerQueryRequest { // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. string user_pseudo_id = 12; + + // 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. + map user_labels = 13; } // Response message for diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document.proto index d6fbcec3dcf..5c9af32e8e0 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document.proto @@ -54,7 +54,7 @@ message Document { // 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, 100 MB for other formats. + // is 2.5 MB for text-based formats, 200 MB for other formats. string uri = 3; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document_processing_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document_processing_config.proto index e9ab67ef89b..cef0e861db4 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document_processing_config.proto @@ -41,6 +41,30 @@ message DocumentProcessingConfig { pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig" }; + // Configuration for chunking config. + message ChunkingConfig { + // Configuration for the layout based chunking. + message LayoutBasedChunkingConfig { + // The token size limit for each chunk. + // + // Supported values: 100-500 (inclusive). + // Default value: 500. + int32 chunk_size = 1; + + // Whether to include appending different levels of headings to chunks + // from the middle of the document to prevent context loss. + // + // Default value: False. + bool include_ancestor_headings = 2; + } + + // Additional configs that defines the behavior of the chunking. + oneof chunk_mode { + // Configuration for the layout based chunking. + LayoutBasedChunkingConfig layout_based_chunking_config = 1; + } + } + // Related configurations applied to a specific type of document parser. message ParsingConfig { // The digital parsing configurations for documents. @@ -57,6 +81,9 @@ message DocumentProcessingConfig { bool use_native_text = 2; } + // The layout parsing configurations for documents. + message LayoutParsingConfig {} + // Configs for document processing types. oneof type_dedicated_config { // Configurations applied to digital parser. @@ -65,6 +92,9 @@ message DocumentProcessingConfig { // Configurations applied to OCR parser. Currently it only applies to // PDFs. OcrParsingConfig ocr_parsing_config = 2; + + // Configurations applied to layout parser. + LayoutParsingConfig layout_parsing_config = 3; } } @@ -73,6 +103,9 @@ message DocumentProcessingConfig { // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. string name = 1; + // Whether chunking mode is enabled. + ChunkingConfig chunking_config = 3; + // 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 @@ -85,8 +118,10 @@ message DocumentProcessingConfig { // * `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 - // or layout parsing are supported. + // layout parsing are supported. // * `docx`: Override parsing config for DOCX files, only digital parsing and - // or layout parsing are supported. + // layout parsing are supported. + // * `pptx`: Override parsing config for PPTX files, only digital parsing and + // layout parsing are supported. map parsing_config_overrides = 5; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/import_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/import_config.proto index 386f22ac444..171a0c1dc8e 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/import_config.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/import_config.proto @@ -325,6 +325,38 @@ message CloudSqlSource { bool offload = 6; } +// AlloyDB source import data from. +message AlloyDbSource { + // The project ID that the AlloyDB source is in + // with a length limit of 128 characters. If not specified, inherits the + // project ID from the parent request. + string project_id = 1; + + // Required. The AlloyDB location to copy the data from with a length limit of + // 256 characters. + string location_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AlloyDB cluster to copy the data from with a length limit of + // 256 characters. + string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AlloyDB database to copy the data from with a length limit of + // 256 characters. + string database_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AlloyDB table to copy the data from with a length limit of + // 256 characters. + string table_id = 5 [(google.api.field_behavior) = REQUIRED]; + + // 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. + string gcs_staging_dir = 6; +} + // Firestore source import data from. message FirestoreSource { // The project ID that the Cloud SQL source is in with a length limit of 128 @@ -498,6 +530,9 @@ message ImportDocumentsRequest { // Firestore input source. FirestoreSource firestore_source = 13; + // AlloyDB input source. + AlloyDbSource alloy_db_source = 14; + // Cloud Bigtable input source. BigtableSource bigtable_source = 15; } @@ -662,3 +697,76 @@ message ImportSuggestionDenyListEntriesMetadata { // finish time. google.protobuf.Timestamp update_time = 2; } + +// Request message for +// [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] +// method. +message ImportCompletionSuggestionsRequest { + // The inline source for CompletionSuggestions. + message InlineSource { + // Required. A list of all denylist entries to import. Max of 1000 items. + repeated CompletionSuggestion suggestions = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // The source of the autocomplete suggestions. + oneof source { + // The Inline source for suggestion entries. + InlineSource inline_source = 2; + + // Cloud Storage location for the input content. + GcsSource gcs_source = 3; + + // BigQuery input source. + BigQuerySource bigquery_source = 4; + } + + // Required. The parent data store resource name for which to import customer + // autocomplete suggestions. + // + // Follows pattern `projects/*/locations/*/collections/*/dataStores/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // The desired location of errors incurred during the Import. + ImportErrorConfig error_config = 5; +} + +// Response of the +// [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.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. +message ImportCompletionSuggestionsResponse { + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 1; + + // The desired location of errors incurred during the Import. + ImportErrorConfig error_config = 2; +} + +// Metadata related to the progress of the ImportCompletionSuggestions +// operation. This will be returned by the google.longrunning.Operation.metadata +// field. +message ImportCompletionSuggestionsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of + // [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + // successfully imported. + int64 success_count = 3; + + // Count of + // [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + // that failed to be imported. + int64 failure_count = 4; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/purge_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/purge_config.proto index 2db39b26d00..2101b695264 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/purge_config.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/purge_config.proto @@ -125,3 +125,41 @@ message PurgeSuggestionDenyListEntriesMetadata { // finish time. google.protobuf.Timestamp update_time = 2; } + +// Request message for +// [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] +// method. +message PurgeCompletionSuggestionsRequest { + // Required. The parent data store resource name for which to purge completion + // suggestions. Follows pattern + // projects/*/locations/*/collections/*/dataStores/*. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; +} + +// Response message for +// [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] +// method. +message PurgeCompletionSuggestionsResponse { + // Whether the completion suggestions were successfully purged. + bool purge_succeeded = 1; + + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 2; +} + +// Metadata related to the progress of the PurgeCompletionSuggestions +// operation. This is returned by the google.longrunning.Operation.metadata +// field. +message PurgeCompletionSuggestionsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/search_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/search_service.proto index 098a4b67ca6..290f1e4550f 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/search_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/search_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1/chunk.proto"; import "google/cloud/discoveryengine/v1/common.proto"; import "google/cloud/discoveryengine/v1/document.proto"; import "google/protobuf/struct.proto"; @@ -70,8 +71,8 @@ message SearchRequest { } // A struct to define data stores to filter on in a search call and - // configurations for those data stores. A maximum of 1 DataStoreSpec per - // data_store is allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. + // configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` + // error is returned. message DataStoreSpec { // Required. Full resource name of // [DataStore][google.cloud.discoveryengine.v1.DataStore], such as @@ -150,6 +151,9 @@ message SearchRequest { // 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. int32 limit = 2; @@ -367,8 +371,9 @@ message SearchRequest { // // 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][SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. int32 summary_result_count = 1; // Specifies whether to include citations in the summary. The default @@ -491,6 +496,41 @@ message SearchRequest { int32 num_next_segments = 5; } + // Specifies the chunk spec to be returned from the search response. + // Only available if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + message ChunkSpec { + // 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. + int32 num_previous_chunks = 1; + + // 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. + int32 num_next_chunks = 2; + } + + // Specifies the search result mode. If unspecified, the + // search result mode is based on + // [DataStore.DocumentProcessingConfig.chunking_config][]: + // * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified, + // it defaults to `CHUNKS`. + // * Otherwise, it defaults to `DOCUMENTS`. + enum SearchResultMode { + // Default value. + SEARCH_RESULT_MODE_UNSPECIFIED = 0; + + // Returns documents in the search result. + DOCUMENTS = 1; + + // Returns chunks in the search result. Only available if the + // [DataStore.DocumentProcessingConfig.chunking_config][] is specified. + CHUNKS = 2; + } + // If `snippetSpec` is not specified, snippets are not included in the // search response. SnippetSpec snippet_spec = 1; @@ -502,6 +542,85 @@ message SearchRequest { // If there is no extractive_content_spec provided, there will be no // extractive answer in the search response. ExtractiveContentSpec extractive_content_spec = 3; + + // Specifies the search result mode. If unspecified, the + // search result mode is based on + // [DataStore.DocumentProcessingConfig.chunking_config][]: + // * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified, + // it defaults to `CHUNKS`. + // * Otherwise, it defaults to `DOCUMENTS`. + SearchResultMode search_result_mode = 4; + + // Specifies the chunk spec to be returned from the search response. + // Only available if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + ChunkSpec chunk_spec = 5; + } + + // Specification for search as you type in search requests. + message SearchAsYouTypeSpec { + // Enum describing under which condition search as you type should occur. + enum Condition { + // Server behavior defaults to + // [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + CONDITION_UNSPECIFIED = 0; + + // Disables Search As You Type. + DISABLED = 1; + + // Enables Search As You Type. + ENABLED = 2; + } + + // The condition under which search as you type should occur. + // Default to + // [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + Condition condition = 1; + } + + // 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. + message SessionSpec { + // 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. + string query_id = 1; + + // The number of top search results to persist. The persisted search results + // can be used for the subsequent /answer api call. + // + // This field is simliar to the `summary_result_count` field in + // [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. + // + // At most 10 results for documents mode, or 50 for chunks mode. + optional int32 search_result_persistence_count = 2; } // Required. The resource name of the Search serving config, such as @@ -617,6 +736,13 @@ message SearchRequest { // is used to deduce `device_type` for analytics. UserInfo user_info = 21; + // 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. + string language_code = 35; + // Facet specifications for faceted search. If empty, no facets are returned. // // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` @@ -694,6 +820,46 @@ message SearchRequest { // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) // for more details. map user_labels = 22; + + // Search as you type configuration. Only supported for the + // [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1.IndustryVertical.MEDIA] + // vertical. + SearchAsYouTypeSpec search_as_you_type_spec = 31; + + // 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): + // 1. Call /search API with the auto-session mode (see below). + // 2. 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): + // 1. Call /search API with the auto-session mode (see below). + // 2. 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. + // + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. + // + // 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. + string session = 41 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Session" + }]; + + // Session specification. + // + // Can be used only when `session` is set. + SessionSpec session_spec = 42; } // Response message for @@ -709,6 +875,12 @@ message SearchResponse { // The document data snippet in the search response. Only fields that are // marked as `retrievable` are populated. Document document = 2; + + // The chunk data in the search response if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + Chunk chunk = 18; } // A facet result. @@ -890,6 +1062,23 @@ message SearchResponse { int64 pinned_result_count = 2; } + // Information about the session. + message SessionInfo { + // Name of the session. + // If the auto-session mode is used (when + // [SearchRequest.session][google.cloud.discoveryengine.v1.SearchRequest.session] + // ends with "-"), this field holds the newly generated session name. + string name = 1; + + // 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. + string query_id = 2; + } + // A list of matched documents. The order represents the ranking. repeated SearchResult results = 1; @@ -936,4 +1125,11 @@ message SearchResponse { // Query expansion information for the returned results. QueryExpansionInfo query_expansion_info = 14; + + // Session information. + // + // Only set if + // [SearchRequest.session][google.cloud.discoveryengine.v1.SearchRequest.session] + // is provided. See its description for more details. + SessionInfo session_info = 19; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/user_event_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/user_event_service.proto index 942912ee0d3..7ec0f7ca633 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/user_event_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/user_event_service.proto @@ -67,6 +67,9 @@ service UserEventService { additional_bindings { get: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/userEvents:collect" + } }; } diff --git a/packages/google-cloud-discoveryengine/protos/protos.d.ts b/packages/google-cloud-discoveryengine/protos/protos.d.ts index 175cc758ead..30d1e8a47d1 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.d.ts +++ b/packages/google-cloud-discoveryengine/protos/protos.d.ts @@ -1407,6 +1407,9 @@ export namespace google { /** SearchResult chunkInfo */ chunkInfo?: (google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.IChunkInfo[]|null); + + /** SearchResult structData */ + structData?: (google.protobuf.IStruct|null); } /** Represents a SearchResult. */ @@ -1433,6 +1436,9 @@ export namespace google { /** SearchResult chunkInfo. */ public chunkInfo: google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.IChunkInfo[]; + /** SearchResult structData. */ + public structData?: (google.protobuf.IStruct|null); + /** * Creates a new SearchResult instance using the specified properties. * @param [properties] Properties to set @@ -1967,256 +1973,717 @@ export namespace google { ADVERSARIAL_QUERY_IGNORED = 1, NON_ANSWER_SEEKING_QUERY_IGNORED = 2, OUT_OF_DOMAIN_QUERY_IGNORED = 3, - POTENTIAL_POLICY_VIOLATION = 4 + POTENTIAL_POLICY_VIOLATION = 4, + NO_RELEVANT_CONTENT = 5 } } - /** IndustryVertical enum. */ - enum IndustryVertical { - INDUSTRY_VERTICAL_UNSPECIFIED = 0, - GENERIC = 1, - MEDIA = 2, - HEALTHCARE_FHIR = 7 - } - - /** SolutionType enum. */ - enum SolutionType { - SOLUTION_TYPE_UNSPECIFIED = 0, - SOLUTION_TYPE_RECOMMENDATION = 1, - SOLUTION_TYPE_SEARCH = 2, - SOLUTION_TYPE_CHAT = 3, - SOLUTION_TYPE_GENERATIVE_CHAT = 4 - } + /** Properties of a Chunk. */ + interface IChunk { - /** SearchUseCase enum. */ - enum SearchUseCase { - SEARCH_USE_CASE_UNSPECIFIED = 0, - SEARCH_USE_CASE_SEARCH = 1, - SEARCH_USE_CASE_BROWSE = 2 - } + /** Chunk name */ + name?: (string|null); - /** SearchTier enum. */ - enum SearchTier { - SEARCH_TIER_UNSPECIFIED = 0, - SEARCH_TIER_STANDARD = 1, - SEARCH_TIER_ENTERPRISE = 2 - } + /** Chunk id */ + id?: (string|null); - /** SearchAddOn enum. */ - enum SearchAddOn { - SEARCH_ADD_ON_UNSPECIFIED = 0, - SEARCH_ADD_ON_LLM = 1 - } + /** Chunk content */ + content?: (string|null); - /** Properties of an Interval. */ - interface IInterval { + /** Chunk relevanceScore */ + relevanceScore?: (number|null); - /** Interval minimum */ - minimum?: (number|null); + /** Chunk documentMetadata */ + documentMetadata?: (google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata|null); - /** Interval exclusiveMinimum */ - exclusiveMinimum?: (number|null); + /** Chunk derivedStructData */ + derivedStructData?: (google.protobuf.IStruct|null); - /** Interval maximum */ - maximum?: (number|null); + /** Chunk pageSpan */ + pageSpan?: (google.cloud.discoveryengine.v1.Chunk.IPageSpan|null); - /** Interval exclusiveMaximum */ - exclusiveMaximum?: (number|null); + /** Chunk chunkMetadata */ + chunkMetadata?: (google.cloud.discoveryengine.v1.Chunk.IChunkMetadata|null); } - /** Represents an Interval. */ - class Interval implements IInterval { + /** Represents a Chunk. */ + class Chunk implements IChunk { /** - * Constructs a new Interval. + * Constructs a new Chunk. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IInterval); + constructor(properties?: google.cloud.discoveryengine.v1.IChunk); - /** Interval minimum. */ - public minimum?: (number|null); + /** Chunk name. */ + public name: string; - /** Interval exclusiveMinimum. */ - public exclusiveMinimum?: (number|null); + /** Chunk id. */ + public id: string; - /** Interval maximum. */ - public maximum?: (number|null); + /** Chunk content. */ + public content: string; - /** Interval exclusiveMaximum. */ - public exclusiveMaximum?: (number|null); + /** Chunk relevanceScore. */ + public relevanceScore?: (number|null); - /** Interval min. */ - public min?: ("minimum"|"exclusiveMinimum"); + /** Chunk documentMetadata. */ + public documentMetadata?: (google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata|null); - /** Interval max. */ - public max?: ("maximum"|"exclusiveMaximum"); + /** Chunk derivedStructData. */ + public derivedStructData?: (google.protobuf.IStruct|null); + + /** Chunk pageSpan. */ + public pageSpan?: (google.cloud.discoveryengine.v1.Chunk.IPageSpan|null); + + /** Chunk chunkMetadata. */ + public chunkMetadata?: (google.cloud.discoveryengine.v1.Chunk.IChunkMetadata|null); + + /** Chunk _relevanceScore. */ + public _relevanceScore?: "relevanceScore"; /** - * Creates a new Interval instance using the specified properties. + * Creates a new Chunk instance using the specified properties. * @param [properties] Properties to set - * @returns Interval instance + * @returns Chunk instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IInterval): google.cloud.discoveryengine.v1.Interval; + public static create(properties?: google.cloud.discoveryengine.v1.IChunk): google.cloud.discoveryengine.v1.Chunk; /** - * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. - * @param message Interval message or plain object to encode + * Encodes the specified Chunk message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.verify|verify} messages. + * @param message Chunk message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IChunk, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. - * @param message Interval message or plain object to encode + * Encodes the specified Chunk message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.verify|verify} messages. + * @param message Chunk message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IChunk, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Interval message from the specified reader or buffer. + * Decodes a Chunk message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Interval + * @returns Chunk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.Interval; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.Chunk; /** - * Decodes an Interval message from the specified reader or buffer, length delimited. + * Decodes a Chunk message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Interval + * @returns Chunk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Interval; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Chunk; /** - * Verifies an Interval message. + * Verifies a Chunk message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * Creates a Chunk message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Interval + * @returns Chunk */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Interval; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Chunk; /** - * Creates a plain object from an Interval message. Also converts values to other types if specified. - * @param message Interval + * Creates a plain object from a Chunk message. Also converts values to other types if specified. + * @param message Chunk * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.Chunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Interval to JSON. + * Converts this Chunk to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Interval + * Gets the default type url for Chunk * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomAttribute. */ - interface ICustomAttribute { + namespace Chunk { - /** CustomAttribute text */ - text?: (string[]|null); + /** Properties of a DocumentMetadata. */ + interface IDocumentMetadata { - /** CustomAttribute numbers */ - numbers?: (number[]|null); - } + /** DocumentMetadata uri */ + uri?: (string|null); - /** Represents a CustomAttribute. */ - class CustomAttribute implements ICustomAttribute { + /** DocumentMetadata title */ + title?: (string|null); - /** - * Constructs a new CustomAttribute. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1.ICustomAttribute); + /** DocumentMetadata structData */ + structData?: (google.protobuf.IStruct|null); + } - /** CustomAttribute text. */ - public text: string[]; + /** Represents a DocumentMetadata. */ + class DocumentMetadata implements IDocumentMetadata { - /** CustomAttribute numbers. */ - public numbers: number[]; + /** + * Constructs a new DocumentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata); - /** - * Creates a new CustomAttribute instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomAttribute instance - */ - public static create(properties?: google.cloud.discoveryengine.v1.ICustomAttribute): google.cloud.discoveryengine.v1.CustomAttribute; + /** DocumentMetadata uri. */ + public uri: string; - /** - * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. - * @param message CustomAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + /** DocumentMetadata title. */ + public title: string; - /** - * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. - * @param message CustomAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + /** DocumentMetadata structData. */ + public structData?: (google.protobuf.IStruct|null); - /** - * Decodes a CustomAttribute message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.CustomAttribute; + /** + * Creates a new DocumentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata): google.cloud.discoveryengine.v1.Chunk.DocumentMetadata; - /** - * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.CustomAttribute; + /** + * Encodes the specified DocumentMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify|verify} messages. + * @param message DocumentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a CustomAttribute message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified DocumentMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify|verify} messages. + * @param message DocumentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomAttribute - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CustomAttribute; + /** + * Decodes a DocumentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.Chunk.DocumentMetadata; - /** - * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. - * @param message CustomAttribute - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1.CustomAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a DocumentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Chunk.DocumentMetadata; + + /** + * Verifies a DocumentMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DocumentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Chunk.DocumentMetadata; + + /** + * Creates a plain object from a DocumentMetadata message. Also converts values to other types if specified. + * @param message DocumentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Chunk.DocumentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PageSpan. */ + interface IPageSpan { + + /** PageSpan pageStart */ + pageStart?: (number|null); + + /** PageSpan pageEnd */ + pageEnd?: (number|null); + } + + /** Represents a PageSpan. */ + class PageSpan implements IPageSpan { + + /** + * Constructs a new PageSpan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.Chunk.IPageSpan); + + /** PageSpan pageStart. */ + public pageStart: number; + + /** PageSpan pageEnd. */ + public pageEnd: number; + + /** + * Creates a new PageSpan instance using the specified properties. + * @param [properties] Properties to set + * @returns PageSpan instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.Chunk.IPageSpan): google.cloud.discoveryengine.v1.Chunk.PageSpan; + + /** + * Encodes the specified PageSpan message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.PageSpan.verify|verify} messages. + * @param message PageSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.Chunk.IPageSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PageSpan message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.PageSpan.verify|verify} messages. + * @param message PageSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.Chunk.IPageSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PageSpan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PageSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.Chunk.PageSpan; + + /** + * Decodes a PageSpan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PageSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Chunk.PageSpan; + + /** + * Verifies a PageSpan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PageSpan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PageSpan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Chunk.PageSpan; + + /** + * Creates a plain object from a PageSpan message. Also converts values to other types if specified. + * @param message PageSpan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Chunk.PageSpan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PageSpan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PageSpan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChunkMetadata. */ + interface IChunkMetadata { + + /** ChunkMetadata previousChunks */ + previousChunks?: (google.cloud.discoveryengine.v1.IChunk[]|null); + + /** ChunkMetadata nextChunks */ + nextChunks?: (google.cloud.discoveryengine.v1.IChunk[]|null); + } + + /** Represents a ChunkMetadata. */ + class ChunkMetadata implements IChunkMetadata { + + /** + * Constructs a new ChunkMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.Chunk.IChunkMetadata); + + /** ChunkMetadata previousChunks. */ + public previousChunks: google.cloud.discoveryengine.v1.IChunk[]; + + /** ChunkMetadata nextChunks. */ + public nextChunks: google.cloud.discoveryengine.v1.IChunk[]; + + /** + * Creates a new ChunkMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ChunkMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.Chunk.IChunkMetadata): google.cloud.discoveryengine.v1.Chunk.ChunkMetadata; + + /** + * Encodes the specified ChunkMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify|verify} messages. + * @param message ChunkMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.Chunk.IChunkMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChunkMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify|verify} messages. + * @param message ChunkMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.Chunk.IChunkMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChunkMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChunkMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.Chunk.ChunkMetadata; + + /** + * Decodes a ChunkMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChunkMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Chunk.ChunkMetadata; + + /** + * Verifies a ChunkMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChunkMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChunkMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Chunk.ChunkMetadata; + + /** + * Creates a plain object from a ChunkMetadata message. Also converts values to other types if specified. + * @param message ChunkMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Chunk.ChunkMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChunkMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChunkMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** IndustryVertical enum. */ + enum IndustryVertical { + INDUSTRY_VERTICAL_UNSPECIFIED = 0, + GENERIC = 1, + MEDIA = 2, + HEALTHCARE_FHIR = 7 + } + + /** SolutionType enum. */ + enum SolutionType { + SOLUTION_TYPE_UNSPECIFIED = 0, + SOLUTION_TYPE_RECOMMENDATION = 1, + SOLUTION_TYPE_SEARCH = 2, + SOLUTION_TYPE_CHAT = 3, + SOLUTION_TYPE_GENERATIVE_CHAT = 4 + } + + /** SearchUseCase enum. */ + enum SearchUseCase { + SEARCH_USE_CASE_UNSPECIFIED = 0, + SEARCH_USE_CASE_SEARCH = 1, + SEARCH_USE_CASE_BROWSE = 2 + } + + /** SearchTier enum. */ + enum SearchTier { + SEARCH_TIER_UNSPECIFIED = 0, + SEARCH_TIER_STANDARD = 1, + SEARCH_TIER_ENTERPRISE = 2 + } + + /** SearchAddOn enum. */ + enum SearchAddOn { + SEARCH_ADD_ON_UNSPECIFIED = 0, + SEARCH_ADD_ON_LLM = 1 + } + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval minimum */ + minimum?: (number|null); + + /** Interval exclusiveMinimum */ + exclusiveMinimum?: (number|null); + + /** Interval maximum */ + maximum?: (number|null); + + /** Interval exclusiveMaximum */ + exclusiveMaximum?: (number|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IInterval); + + /** Interval minimum. */ + public minimum?: (number|null); + + /** Interval exclusiveMinimum. */ + public exclusiveMinimum?: (number|null); + + /** Interval maximum. */ + public maximum?: (number|null); + + /** Interval exclusiveMaximum. */ + public exclusiveMaximum?: (number|null); + + /** Interval min. */ + public min?: ("minimum"|"exclusiveMinimum"); + + /** Interval max. */ + public max?: ("maximum"|"exclusiveMaximum"); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IInterval): google.cloud.discoveryengine.v1.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Interval; + + /** + * Verifies an Interval message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomAttribute. */ + interface ICustomAttribute { + + /** CustomAttribute text */ + text?: (string[]|null); + + /** CustomAttribute numbers */ + numbers?: (number[]|null); + } + + /** Represents a CustomAttribute. */ + class CustomAttribute implements ICustomAttribute { + + /** + * Constructs a new CustomAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.ICustomAttribute); + + /** CustomAttribute text. */ + public text: string[]; + + /** CustomAttribute numbers. */ + public numbers: number[]; + + /** + * Creates a new CustomAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomAttribute instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ICustomAttribute): google.cloud.discoveryengine.v1.CustomAttribute; + + /** + * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * @param message CustomAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * @param message CustomAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.CustomAttribute; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.CustomAttribute; + + /** + * Verifies a CustomAttribute message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomAttribute + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CustomAttribute; + + /** + * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. + * @param message CustomAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.CustomAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this CustomAttribute to JSON. @@ -2448,6 +2915,142 @@ export namespace google { } } + /** Properties of a CompletionSuggestion. */ + interface ICompletionSuggestion { + + /** CompletionSuggestion globalScore */ + globalScore?: (number|null); + + /** CompletionSuggestion frequency */ + frequency?: (number|Long|string|null); + + /** CompletionSuggestion suggestion */ + suggestion?: (string|null); + + /** CompletionSuggestion languageCode */ + languageCode?: (string|null); + + /** CompletionSuggestion groupId */ + groupId?: (string|null); + + /** CompletionSuggestion groupScore */ + groupScore?: (number|null); + + /** CompletionSuggestion alternativePhrases */ + alternativePhrases?: (string[]|null); + } + + /** Represents a CompletionSuggestion. */ + class CompletionSuggestion implements ICompletionSuggestion { + + /** + * Constructs a new CompletionSuggestion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.ICompletionSuggestion); + + /** CompletionSuggestion globalScore. */ + public globalScore?: (number|null); + + /** CompletionSuggestion frequency. */ + public frequency?: (number|Long|string|null); + + /** CompletionSuggestion suggestion. */ + public suggestion: string; + + /** CompletionSuggestion languageCode. */ + public languageCode: string; + + /** CompletionSuggestion groupId. */ + public groupId: string; + + /** CompletionSuggestion groupScore. */ + public groupScore: number; + + /** CompletionSuggestion alternativePhrases. */ + public alternativePhrases: string[]; + + /** CompletionSuggestion rankingInfo. */ + public rankingInfo?: ("globalScore"|"frequency"); + + /** + * Creates a new CompletionSuggestion instance using the specified properties. + * @param [properties] Properties to set + * @returns CompletionSuggestion instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ICompletionSuggestion): google.cloud.discoveryengine.v1.CompletionSuggestion; + + /** + * Encodes the specified CompletionSuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionSuggestion.verify|verify} messages. + * @param message CompletionSuggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ICompletionSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompletionSuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionSuggestion.verify|verify} messages. + * @param message CompletionSuggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICompletionSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompletionSuggestion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompletionSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.CompletionSuggestion; + + /** + * Decodes a CompletionSuggestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompletionSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.CompletionSuggestion; + + /** + * Verifies a CompletionSuggestion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompletionSuggestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompletionSuggestion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CompletionSuggestion; + + /** + * Creates a plain object from a CompletionSuggestion message. Also converts values to other types if specified. + * @param message CompletionSuggestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.CompletionSuggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompletionSuggestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompletionSuggestion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents a CompletionService */ class CompletionService extends $protobuf.rpc.Service { @@ -2509,6 +3112,34 @@ export namespace google { * @returns Promise */ public purgeSuggestionDenyListEntries(request: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest): Promise; + + /** + * Calls ImportCompletionSuggestions. + * @param request ImportCompletionSuggestionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importCompletionSuggestions(request: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, callback: google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestionsCallback): void; + + /** + * Calls ImportCompletionSuggestions. + * @param request ImportCompletionSuggestionsRequest message or plain object + * @returns Promise + */ + public importCompletionSuggestions(request: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest): Promise; + + /** + * Calls PurgeCompletionSuggestions. + * @param request PurgeCompletionSuggestionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public purgeCompletionSuggestions(request: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, callback: google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestionsCallback): void; + + /** + * Calls PurgeCompletionSuggestions. + * @param request PurgeCompletionSuggestionsRequest message or plain object + * @returns Promise + */ + public purgeCompletionSuggestions(request: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest): Promise; } namespace CompletionService { @@ -2533,6 +3164,20 @@ export namespace google { * @param [response] Operation */ type PurgeSuggestionDenyListEntriesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|importCompletionSuggestions}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportCompletionSuggestionsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|purgeCompletionSuggestions}. + * @param error Error, if any + * @param [response] Operation + */ + type PurgeCompletionSuggestionsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a CompleteQueryRequest. */ @@ -3838,81 +4483,208 @@ export namespace google { /** CloudSqlSource gcsStagingDir. */ public gcsStagingDir: string; - /** CloudSqlSource offload. */ - public offload: boolean; + /** CloudSqlSource offload. */ + public offload: boolean; + + /** + * Creates a new CloudSqlSource instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlSource instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ICloudSqlSource): google.cloud.discoveryengine.v1.CloudSqlSource; + + /** + * Encodes the specified CloudSqlSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. + * @param message CloudSqlSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ICloudSqlSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. + * @param message CloudSqlSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICloudSqlSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.CloudSqlSource; + + /** + * Decodes a CloudSqlSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.CloudSqlSource; + + /** + * Verifies a CloudSqlSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CloudSqlSource; + + /** + * Creates a plain object from a CloudSqlSource message. Also converts values to other types if specified. + * @param message CloudSqlSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.CloudSqlSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AlloyDbSource. */ + interface IAlloyDbSource { + + /** AlloyDbSource projectId */ + projectId?: (string|null); + + /** AlloyDbSource locationId */ + locationId?: (string|null); + + /** AlloyDbSource clusterId */ + clusterId?: (string|null); + + /** AlloyDbSource databaseId */ + databaseId?: (string|null); + + /** AlloyDbSource tableId */ + tableId?: (string|null); + + /** AlloyDbSource gcsStagingDir */ + gcsStagingDir?: (string|null); + } + + /** Represents an AlloyDbSource. */ + class AlloyDbSource implements IAlloyDbSource { + + /** + * Constructs a new AlloyDbSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IAlloyDbSource); + + /** AlloyDbSource projectId. */ + public projectId: string; + + /** AlloyDbSource locationId. */ + public locationId: string; + + /** AlloyDbSource clusterId. */ + public clusterId: string; + + /** AlloyDbSource databaseId. */ + public databaseId: string; + + /** AlloyDbSource tableId. */ + public tableId: string; + + /** AlloyDbSource gcsStagingDir. */ + public gcsStagingDir: string; /** - * Creates a new CloudSqlSource instance using the specified properties. + * Creates a new AlloyDbSource instance using the specified properties. * @param [properties] Properties to set - * @returns CloudSqlSource instance + * @returns AlloyDbSource instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ICloudSqlSource): google.cloud.discoveryengine.v1.CloudSqlSource; + public static create(properties?: google.cloud.discoveryengine.v1.IAlloyDbSource): google.cloud.discoveryengine.v1.AlloyDbSource; /** - * Encodes the specified CloudSqlSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. - * @param message CloudSqlSource message or plain object to encode + * Encodes the specified AlloyDbSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.AlloyDbSource.verify|verify} messages. + * @param message AlloyDbSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ICloudSqlSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IAlloyDbSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudSqlSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. - * @param message CloudSqlSource message or plain object to encode + * Encodes the specified AlloyDbSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.AlloyDbSource.verify|verify} messages. + * @param message AlloyDbSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICloudSqlSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IAlloyDbSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudSqlSource message from the specified reader or buffer. + * Decodes an AlloyDbSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudSqlSource + * @returns AlloyDbSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.CloudSqlSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.AlloyDbSource; /** - * Decodes a CloudSqlSource message from the specified reader or buffer, length delimited. + * Decodes an AlloyDbSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudSqlSource + * @returns AlloyDbSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.CloudSqlSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.AlloyDbSource; /** - * Verifies a CloudSqlSource message. + * Verifies an AlloyDbSource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CloudSqlSource message from a plain object. Also converts values to their respective internal types. + * Creates an AlloyDbSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudSqlSource + * @returns AlloyDbSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CloudSqlSource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.AlloyDbSource; /** - * Creates a plain object from a CloudSqlSource message. Also converts values to other types if specified. - * @param message CloudSqlSource + * Creates a plain object from an AlloyDbSource message. Also converts values to other types if specified. + * @param message AlloyDbSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.CloudSqlSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.AlloyDbSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudSqlSource to JSON. + * Converts this AlloyDbSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudSqlSource + * Gets the default type url for AlloyDbSource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -4343,557 +5115,885 @@ export namespace google { */ public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this InlineSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ImportUserEventsResponse. */ + interface IImportUserEventsResponse { + + /** ImportUserEventsResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); + + /** ImportUserEventsResponse errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportUserEventsResponse joinedEventsCount */ + joinedEventsCount?: (number|Long|string|null); + + /** ImportUserEventsResponse unjoinedEventsCount */ + unjoinedEventsCount?: (number|Long|string|null); + } + + /** Represents an ImportUserEventsResponse. */ + class ImportUserEventsResponse implements IImportUserEventsResponse { + + /** + * Constructs a new ImportUserEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IImportUserEventsResponse); + + /** ImportUserEventsResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; + + /** ImportUserEventsResponse errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportUserEventsResponse joinedEventsCount. */ + public joinedEventsCount: (number|Long|string); + + /** ImportUserEventsResponse unjoinedEventsCount. */ + public unjoinedEventsCount: (number|Long|string); + + /** + * Creates a new ImportUserEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportUserEventsResponse instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IImportUserEventsResponse): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + + /** + * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. + * @param message ImportUserEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. + * @param message ImportUserEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportUserEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportUserEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + + /** + * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportUserEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + + /** + * Verifies an ImportUserEventsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportUserEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + + /** + * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. + * @param message ImportUserEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportUserEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportUserEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportUserEventsMetadata. */ + interface IImportUserEventsMetadata { + + /** ImportUserEventsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ImportUserEventsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ImportUserEventsMetadata successCount */ + successCount?: (number|Long|string|null); + + /** ImportUserEventsMetadata failureCount */ + failureCount?: (number|Long|string|null); + } + + /** Represents an ImportUserEventsMetadata. */ + class ImportUserEventsMetadata implements IImportUserEventsMetadata { + + /** + * Constructs a new ImportUserEventsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IImportUserEventsMetadata); + + /** ImportUserEventsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ImportUserEventsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ImportUserEventsMetadata successCount. */ + public successCount: (number|Long|string); + + /** ImportUserEventsMetadata failureCount. */ + public failureCount: (number|Long|string); + + /** + * Creates a new ImportUserEventsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportUserEventsMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IImportUserEventsMetadata): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + + /** + * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. + * @param message ImportUserEventsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. + * @param message ImportUserEventsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportUserEventsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + + /** + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportUserEventsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + + /** + * Verifies an ImportUserEventsMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportUserEventsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + + /** + * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. + * @param message ImportUserEventsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportUserEventsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for InlineSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for ImportUserEventsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportUserEventsResponse. */ - interface IImportUserEventsResponse { + /** Properties of an ImportDocumentsMetadata. */ + interface IImportDocumentsMetadata { - /** ImportUserEventsResponse errorSamples */ - errorSamples?: (google.rpc.IStatus[]|null); + /** ImportDocumentsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ImportUserEventsResponse errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** ImportDocumentsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** ImportUserEventsResponse joinedEventsCount */ - joinedEventsCount?: (number|Long|string|null); + /** ImportDocumentsMetadata successCount */ + successCount?: (number|Long|string|null); - /** ImportUserEventsResponse unjoinedEventsCount */ - unjoinedEventsCount?: (number|Long|string|null); + /** ImportDocumentsMetadata failureCount */ + failureCount?: (number|Long|string|null); + + /** ImportDocumentsMetadata totalCount */ + totalCount?: (number|Long|string|null); } - /** Represents an ImportUserEventsResponse. */ - class ImportUserEventsResponse implements IImportUserEventsResponse { + /** Represents an ImportDocumentsMetadata. */ + class ImportDocumentsMetadata implements IImportDocumentsMetadata { /** - * Constructs a new ImportUserEventsResponse. + * Constructs a new ImportDocumentsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportUserEventsResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsMetadata); - /** ImportUserEventsResponse errorSamples. */ - public errorSamples: google.rpc.IStatus[]; + /** ImportDocumentsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ImportUserEventsResponse errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** ImportDocumentsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** ImportUserEventsResponse joinedEventsCount. */ - public joinedEventsCount: (number|Long|string); + /** ImportDocumentsMetadata successCount. */ + public successCount: (number|Long|string); - /** ImportUserEventsResponse unjoinedEventsCount. */ - public unjoinedEventsCount: (number|Long|string); + /** ImportDocumentsMetadata failureCount. */ + public failureCount: (number|Long|string); + + /** ImportDocumentsMetadata totalCount. */ + public totalCount: (number|Long|string); /** - * Creates a new ImportUserEventsResponse instance using the specified properties. + * Creates a new ImportDocumentsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ImportUserEventsResponse instance + * @returns ImportDocumentsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportUserEventsResponse): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsMetadata): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; /** - * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. - * @param message ImportUserEventsResponse message or plain object to encode + * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. + * @param message ImportDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. - * @param message ImportUserEventsResponse message or plain object to encode + * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. + * @param message ImportDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportUserEventsResponse + * @returns ImportDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportUserEventsResponse + * @returns ImportDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; /** - * Verifies an ImportUserEventsResponse message. + * Verifies an ImportDocumentsMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportUserEventsResponse + * @returns ImportDocumentsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; /** - * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. - * @param message ImportUserEventsResponse + * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * @param message ImportDocumentsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportUserEventsResponse to JSON. + * Converts this ImportDocumentsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportUserEventsResponse + * Gets the default type url for ImportDocumentsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportUserEventsMetadata. */ - interface IImportUserEventsMetadata { + /** Properties of an ImportDocumentsRequest. */ + interface IImportDocumentsRequest { - /** ImportUserEventsMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsRequest inlineSource */ + inlineSource?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null); - /** ImportUserEventsMetadata updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsRequest gcsSource */ + gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportUserEventsMetadata successCount */ - successCount?: (number|Long|string|null); + /** ImportDocumentsRequest bigquerySource */ + bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); - /** ImportUserEventsMetadata failureCount */ - failureCount?: (number|Long|string|null); + /** ImportDocumentsRequest fhirStoreSource */ + fhirStoreSource?: (google.cloud.discoveryengine.v1.IFhirStoreSource|null); + + /** ImportDocumentsRequest spannerSource */ + spannerSource?: (google.cloud.discoveryengine.v1.ISpannerSource|null); + + /** ImportDocumentsRequest cloudSqlSource */ + cloudSqlSource?: (google.cloud.discoveryengine.v1.ICloudSqlSource|null); + + /** ImportDocumentsRequest firestoreSource */ + firestoreSource?: (google.cloud.discoveryengine.v1.IFirestoreSource|null); + + /** ImportDocumentsRequest alloyDbSource */ + alloyDbSource?: (google.cloud.discoveryengine.v1.IAlloyDbSource|null); + + /** ImportDocumentsRequest bigtableSource */ + bigtableSource?: (google.cloud.discoveryengine.v1.IBigtableSource|null); + + /** ImportDocumentsRequest parent */ + parent?: (string|null); + + /** ImportDocumentsRequest errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportDocumentsRequest reconciliationMode */ + reconciliationMode?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|null); + + /** ImportDocumentsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** ImportDocumentsRequest autoGenerateIds */ + autoGenerateIds?: (boolean|null); + + /** ImportDocumentsRequest idField */ + idField?: (string|null); } - /** Represents an ImportUserEventsMetadata. */ - class ImportUserEventsMetadata implements IImportUserEventsMetadata { + /** Represents an ImportDocumentsRequest. */ + class ImportDocumentsRequest implements IImportDocumentsRequest { /** - * Constructs a new ImportUserEventsMetadata. + * Constructs a new ImportDocumentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportUserEventsMetadata); + constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsRequest); - /** ImportUserEventsMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsRequest inlineSource. */ + public inlineSource?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null); - /** ImportUserEventsMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsRequest gcsSource. */ + public gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportUserEventsMetadata successCount. */ - public successCount: (number|Long|string); + /** ImportDocumentsRequest bigquerySource. */ + public bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); - /** ImportUserEventsMetadata failureCount. */ - public failureCount: (number|Long|string); + /** ImportDocumentsRequest fhirStoreSource. */ + public fhirStoreSource?: (google.cloud.discoveryengine.v1.IFhirStoreSource|null); + + /** ImportDocumentsRequest spannerSource. */ + public spannerSource?: (google.cloud.discoveryengine.v1.ISpannerSource|null); + + /** ImportDocumentsRequest cloudSqlSource. */ + public cloudSqlSource?: (google.cloud.discoveryengine.v1.ICloudSqlSource|null); + + /** ImportDocumentsRequest firestoreSource. */ + public firestoreSource?: (google.cloud.discoveryengine.v1.IFirestoreSource|null); + + /** ImportDocumentsRequest alloyDbSource. */ + public alloyDbSource?: (google.cloud.discoveryengine.v1.IAlloyDbSource|null); + + /** ImportDocumentsRequest bigtableSource. */ + public bigtableSource?: (google.cloud.discoveryengine.v1.IBigtableSource|null); + + /** ImportDocumentsRequest parent. */ + public parent: string; + + /** ImportDocumentsRequest errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportDocumentsRequest reconciliationMode. */ + public reconciliationMode: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode); + + /** ImportDocumentsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** ImportDocumentsRequest autoGenerateIds. */ + public autoGenerateIds: boolean; + + /** ImportDocumentsRequest idField. */ + public idField: string; + + /** ImportDocumentsRequest source. */ + public source?: ("inlineSource"|"gcsSource"|"bigquerySource"|"fhirStoreSource"|"spannerSource"|"cloudSqlSource"|"firestoreSource"|"alloyDbSource"|"bigtableSource"); /** - * Creates a new ImportUserEventsMetadata instance using the specified properties. + * Creates a new ImportDocumentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportUserEventsMetadata instance + * @returns ImportDocumentsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportUserEventsMetadata): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsRequest): google.cloud.discoveryengine.v1.ImportDocumentsRequest; /** - * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. - * @param message ImportUserEventsMetadata message or plain object to encode + * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. + * @param message ImportDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. - * @param message ImportUserEventsMetadata message or plain object to encode + * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. + * @param message ImportDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportUserEventsMetadata + * @returns ImportDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsRequest; /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportUserEventsMetadata + * @returns ImportDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsRequest; /** - * Verifies an ImportUserEventsMetadata message. + * Verifies an ImportDocumentsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportUserEventsMetadata + * @returns ImportDocumentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsRequest; /** - * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. - * @param message ImportUserEventsMetadata + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * @param message ImportDocumentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportUserEventsMetadata to JSON. + * Converts this ImportDocumentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportUserEventsMetadata + * Gets the default type url for ImportDocumentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportDocumentsMetadata. */ - interface IImportDocumentsMetadata { + namespace ImportDocumentsRequest { - /** ImportDocumentsMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Properties of an InlineSource. */ + interface IInlineSource { - /** ImportDocumentsMetadata updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** InlineSource documents */ + documents?: (google.cloud.discoveryengine.v1.IDocument[]|null); + } - /** ImportDocumentsMetadata successCount */ - successCount?: (number|Long|string|null); + /** Represents an InlineSource. */ + class InlineSource implements IInlineSource { - /** ImportDocumentsMetadata failureCount */ - failureCount?: (number|Long|string|null); + /** + * Constructs a new InlineSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource); - /** ImportDocumentsMetadata totalCount */ - totalCount?: (number|Long|string|null); + /** InlineSource documents. */ + public documents: google.cloud.discoveryengine.v1.IDocument[]; + + /** + * Creates a new InlineSource instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSource instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + + /** + * Verifies an InlineSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @param message InlineSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ReconciliationMode enum. */ + enum ReconciliationMode { + RECONCILIATION_MODE_UNSPECIFIED = 0, + INCREMENTAL = 1, + FULL = 2 + } } - /** Represents an ImportDocumentsMetadata. */ - class ImportDocumentsMetadata implements IImportDocumentsMetadata { + /** Properties of an ImportDocumentsResponse. */ + interface IImportDocumentsResponse { - /** - * Constructs a new ImportDocumentsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsMetadata); + /** ImportDocumentsResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); - /** ImportDocumentsMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsResponse errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + } - /** ImportDocumentsMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Represents an ImportDocumentsResponse. */ + class ImportDocumentsResponse implements IImportDocumentsResponse { - /** ImportDocumentsMetadata successCount. */ - public successCount: (number|Long|string); + /** + * Constructs a new ImportDocumentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsResponse); - /** ImportDocumentsMetadata failureCount. */ - public failureCount: (number|Long|string); + /** ImportDocumentsResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; - /** ImportDocumentsMetadata totalCount. */ - public totalCount: (number|Long|string); + /** ImportDocumentsResponse errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); /** - * Creates a new ImportDocumentsMetadata instance using the specified properties. + * Creates a new ImportDocumentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsMetadata instance + * @returns ImportDocumentsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsMetadata): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsResponse): google.cloud.discoveryengine.v1.ImportDocumentsResponse; /** - * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. - * @param message ImportDocumentsMetadata message or plain object to encode + * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. + * @param message ImportDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. - * @param message ImportDocumentsMetadata message or plain object to encode + * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. + * @param message ImportDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsMetadata + * @returns ImportDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsResponse; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsMetadata + * @returns ImportDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsResponse; /** - * Verifies an ImportDocumentsMetadata message. + * Verifies an ImportDocumentsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsMetadata + * @returns ImportDocumentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsResponse; /** - * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. - * @param message ImportDocumentsMetadata + * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. + * @param message ImportDocumentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsMetadata to JSON. + * Converts this ImportDocumentsResponse to JSON. * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportDocumentsMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportDocumentsRequest. */ - interface IImportDocumentsRequest { - - /** ImportDocumentsRequest inlineSource */ - inlineSource?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null); - - /** ImportDocumentsRequest gcsSource */ - gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - - /** ImportDocumentsRequest bigquerySource */ - bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); - - /** ImportDocumentsRequest fhirStoreSource */ - fhirStoreSource?: (google.cloud.discoveryengine.v1.IFhirStoreSource|null); - - /** ImportDocumentsRequest spannerSource */ - spannerSource?: (google.cloud.discoveryengine.v1.ISpannerSource|null); - - /** ImportDocumentsRequest cloudSqlSource */ - cloudSqlSource?: (google.cloud.discoveryengine.v1.ICloudSqlSource|null); - - /** ImportDocumentsRequest firestoreSource */ - firestoreSource?: (google.cloud.discoveryengine.v1.IFirestoreSource|null); - - /** ImportDocumentsRequest bigtableSource */ - bigtableSource?: (google.cloud.discoveryengine.v1.IBigtableSource|null); - - /** ImportDocumentsRequest parent */ - parent?: (string|null); + */ + public toJSON(): { [k: string]: any }; - /** ImportDocumentsRequest errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** + * Gets the default type url for ImportDocumentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ImportDocumentsRequest reconciliationMode */ - reconciliationMode?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|null); + /** Properties of an ImportSuggestionDenyListEntriesRequest. */ + interface IImportSuggestionDenyListEntriesRequest { - /** ImportDocumentsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ImportSuggestionDenyListEntriesRequest inlineSource */ + inlineSource?: (google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null); - /** ImportDocumentsRequest autoGenerateIds */ - autoGenerateIds?: (boolean|null); + /** ImportSuggestionDenyListEntriesRequest gcsSource */ + gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportDocumentsRequest idField */ - idField?: (string|null); + /** ImportSuggestionDenyListEntriesRequest parent */ + parent?: (string|null); } - /** Represents an ImportDocumentsRequest. */ - class ImportDocumentsRequest implements IImportDocumentsRequest { + /** Represents an ImportSuggestionDenyListEntriesRequest. */ + class ImportSuggestionDenyListEntriesRequest implements IImportSuggestionDenyListEntriesRequest { /** - * Constructs a new ImportDocumentsRequest. + * Constructs a new ImportSuggestionDenyListEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsRequest); + constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest); - /** ImportDocumentsRequest inlineSource. */ - public inlineSource?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null); + /** ImportSuggestionDenyListEntriesRequest inlineSource. */ + public inlineSource?: (google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null); - /** ImportDocumentsRequest gcsSource. */ + /** ImportSuggestionDenyListEntriesRequest gcsSource. */ public gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportDocumentsRequest bigquerySource. */ - public bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); - - /** ImportDocumentsRequest fhirStoreSource. */ - public fhirStoreSource?: (google.cloud.discoveryengine.v1.IFhirStoreSource|null); - - /** ImportDocumentsRequest spannerSource. */ - public spannerSource?: (google.cloud.discoveryengine.v1.ISpannerSource|null); - - /** ImportDocumentsRequest cloudSqlSource. */ - public cloudSqlSource?: (google.cloud.discoveryengine.v1.ICloudSqlSource|null); - - /** ImportDocumentsRequest firestoreSource. */ - public firestoreSource?: (google.cloud.discoveryengine.v1.IFirestoreSource|null); - - /** ImportDocumentsRequest bigtableSource. */ - public bigtableSource?: (google.cloud.discoveryengine.v1.IBigtableSource|null); - - /** ImportDocumentsRequest parent. */ + /** ImportSuggestionDenyListEntriesRequest parent. */ public parent: string; - /** ImportDocumentsRequest errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); - - /** ImportDocumentsRequest reconciliationMode. */ - public reconciliationMode: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode); - - /** ImportDocumentsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** ImportDocumentsRequest autoGenerateIds. */ - public autoGenerateIds: boolean; - - /** ImportDocumentsRequest idField. */ - public idField: string; - - /** ImportDocumentsRequest source. */ - public source?: ("inlineSource"|"gcsSource"|"bigquerySource"|"fhirStoreSource"|"spannerSource"|"cloudSqlSource"|"firestoreSource"|"bigtableSource"); + /** ImportSuggestionDenyListEntriesRequest source. */ + public source?: ("inlineSource"|"gcsSource"); /** - * Creates a new ImportDocumentsRequest instance using the specified properties. + * Creates a new ImportSuggestionDenyListEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsRequest instance + * @returns ImportSuggestionDenyListEntriesRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsRequest): google.cloud.discoveryengine.v1.ImportDocumentsRequest; + public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; /** - * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. - * @param message ImportDocumentsRequest message or plain object to encode + * Encodes the specified ImportSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. - * @param message ImportDocumentsRequest message or plain object to encode + * Encodes the specified ImportSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer. + * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsRequest + * @returns ImportSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsRequest + * @returns ImportSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; /** - * Verifies an ImportDocumentsRequest message. + * Verifies an ImportSuggestionDenyListEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsRequest + * @returns ImportSuggestionDenyListEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. - * @param message ImportDocumentsRequest + * Creates a plain object from an ImportSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. + * @param message ImportSuggestionDenyListEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsRequest to JSON. + * Converts this ImportSuggestionDenyListEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportDocumentsRequest + * Gets the default type url for ImportSuggestionDenyListEntriesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportDocumentsRequest { + namespace ImportSuggestionDenyListEntriesRequest { /** Properties of an InlineSource. */ interface IInlineSource { - /** InlineSource documents */ - documents?: (google.cloud.discoveryengine.v1.IDocument[]|null); + /** InlineSource entries */ + entries?: (google.cloud.discoveryengine.v1.ISuggestionDenyListEntry[]|null); } /** Represents an InlineSource. */ @@ -4903,33 +6003,33 @@ export namespace google { * Constructs a new InlineSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource); + constructor(properties?: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource); - /** InlineSource documents. */ - public documents: google.cloud.discoveryengine.v1.IDocument[]; + /** InlineSource entries. */ + public entries: google.cloud.discoveryengine.v1.ISuggestionDenyListEntry[]; /** * Creates a new InlineSource instance using the specified properties. * @param [properties] Properties to set * @returns InlineSource instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + public static create(properties?: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an InlineSource message from the specified reader or buffer. @@ -4939,7 +6039,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. @@ -4948,7 +6048,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; /** * Verifies an InlineSource message. @@ -4962,7 +6062,7 @@ export namespace google { * @param object Plain object * @returns InlineSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. @@ -4970,252 +6070,366 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ImportSuggestionDenyListEntriesResponse. */ + interface IImportSuggestionDenyListEntriesResponse { + + /** ImportSuggestionDenyListEntriesResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); + + /** ImportSuggestionDenyListEntriesResponse importedEntriesCount */ + importedEntriesCount?: (number|Long|string|null); + + /** ImportSuggestionDenyListEntriesResponse failedEntriesCount */ + failedEntriesCount?: (number|Long|string|null); + } + + /** Represents an ImportSuggestionDenyListEntriesResponse. */ + class ImportSuggestionDenyListEntriesResponse implements IImportSuggestionDenyListEntriesResponse { + + /** + * Constructs a new ImportSuggestionDenyListEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse); + + /** ImportSuggestionDenyListEntriesResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; + + /** ImportSuggestionDenyListEntriesResponse importedEntriesCount. */ + public importedEntriesCount: (number|Long|string); + + /** ImportSuggestionDenyListEntriesResponse failedEntriesCount. */ + public failedEntriesCount: (number|Long|string); + + /** + * Creates a new ImportSuggestionDenyListEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportSuggestionDenyListEntriesResponse instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + + /** + * Encodes the specified ImportSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportSuggestionDenyListEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + + /** + * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportSuggestionDenyListEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + + /** + * Verifies an ImportSuggestionDenyListEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportSuggestionDenyListEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; - /** - * Converts this InlineSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an ImportSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * @param message ImportSuggestionDenyListEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for InlineSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this ImportSuggestionDenyListEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ReconciliationMode enum. */ - enum ReconciliationMode { - RECONCILIATION_MODE_UNSPECIFIED = 0, - INCREMENTAL = 1, - FULL = 2 - } + /** + * Gets the default type url for ImportSuggestionDenyListEntriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportDocumentsResponse. */ - interface IImportDocumentsResponse { + /** Properties of an ImportSuggestionDenyListEntriesMetadata. */ + interface IImportSuggestionDenyListEntriesMetadata { - /** ImportDocumentsResponse errorSamples */ - errorSamples?: (google.rpc.IStatus[]|null); + /** ImportSuggestionDenyListEntriesMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ImportDocumentsResponse errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** ImportSuggestionDenyListEntriesMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents an ImportDocumentsResponse. */ - class ImportDocumentsResponse implements IImportDocumentsResponse { + /** Represents an ImportSuggestionDenyListEntriesMetadata. */ + class ImportSuggestionDenyListEntriesMetadata implements IImportSuggestionDenyListEntriesMetadata { /** - * Constructs a new ImportDocumentsResponse. + * Constructs a new ImportSuggestionDenyListEntriesMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata); - /** ImportDocumentsResponse errorSamples. */ - public errorSamples: google.rpc.IStatus[]; + /** ImportSuggestionDenyListEntriesMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ImportDocumentsResponse errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** ImportSuggestionDenyListEntriesMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ImportDocumentsResponse instance using the specified properties. + * Creates a new ImportSuggestionDenyListEntriesMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsResponse instance + * @returns ImportSuggestionDenyListEntriesMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsResponse): google.cloud.discoveryengine.v1.ImportDocumentsResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; /** - * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. - * @param message ImportDocumentsResponse message or plain object to encode + * Encodes the specified ImportSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. - * @param message ImportDocumentsResponse message or plain object to encode + * Encodes the specified ImportSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsResponse + * @returns ImportSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsResponse + * @returns ImportSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; /** - * Verifies an ImportDocumentsResponse message. + * Verifies an ImportSuggestionDenyListEntriesMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsResponse + * @returns ImportSuggestionDenyListEntriesMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; /** - * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. - * @param message ImportDocumentsResponse + * Creates a plain object from an ImportSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. + * @param message ImportSuggestionDenyListEntriesMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsResponse to JSON. + * Converts this ImportSuggestionDenyListEntriesMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportDocumentsResponse + * Gets the default type url for ImportSuggestionDenyListEntriesMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportSuggestionDenyListEntriesRequest. */ - interface IImportSuggestionDenyListEntriesRequest { + /** Properties of an ImportCompletionSuggestionsRequest. */ + interface IImportCompletionSuggestionsRequest { - /** ImportSuggestionDenyListEntriesRequest inlineSource */ - inlineSource?: (google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null); + /** ImportCompletionSuggestionsRequest inlineSource */ + inlineSource?: (google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource|null); - /** ImportSuggestionDenyListEntriesRequest gcsSource */ + /** ImportCompletionSuggestionsRequest gcsSource */ gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportSuggestionDenyListEntriesRequest parent */ + /** ImportCompletionSuggestionsRequest bigquerySource */ + bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); + + /** ImportCompletionSuggestionsRequest parent */ parent?: (string|null); + + /** ImportCompletionSuggestionsRequest errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); } - /** Represents an ImportSuggestionDenyListEntriesRequest. */ - class ImportSuggestionDenyListEntriesRequest implements IImportSuggestionDenyListEntriesRequest { + /** Represents an ImportCompletionSuggestionsRequest. */ + class ImportCompletionSuggestionsRequest implements IImportCompletionSuggestionsRequest { /** - * Constructs a new ImportSuggestionDenyListEntriesRequest. + * Constructs a new ImportCompletionSuggestionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest); + constructor(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest); - /** ImportSuggestionDenyListEntriesRequest inlineSource. */ - public inlineSource?: (google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null); + /** ImportCompletionSuggestionsRequest inlineSource. */ + public inlineSource?: (google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource|null); - /** ImportSuggestionDenyListEntriesRequest gcsSource. */ + /** ImportCompletionSuggestionsRequest gcsSource. */ public gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportSuggestionDenyListEntriesRequest parent. */ + /** ImportCompletionSuggestionsRequest bigquerySource. */ + public bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); + + /** ImportCompletionSuggestionsRequest parent. */ public parent: string; - /** ImportSuggestionDenyListEntriesRequest source. */ - public source?: ("inlineSource"|"gcsSource"); + /** ImportCompletionSuggestionsRequest errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportCompletionSuggestionsRequest source. */ + public source?: ("inlineSource"|"gcsSource"|"bigquerySource"); /** - * Creates a new ImportSuggestionDenyListEntriesRequest instance using the specified properties. + * Creates a new ImportCompletionSuggestionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportSuggestionDenyListEntriesRequest instance + * @returns ImportCompletionSuggestionsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; + public static create(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest; /** - * Encodes the specified ImportSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesRequest message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.verify|verify} messages. + * @param message ImportCompletionSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesRequest message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.verify|verify} messages. + * @param message ImportCompletionSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportSuggestionDenyListEntriesRequest + * @returns ImportCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest; /** - * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportSuggestionDenyListEntriesRequest + * @returns ImportCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest; /** - * Verifies an ImportSuggestionDenyListEntriesRequest message. + * Verifies an ImportCompletionSuggestionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImportSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportSuggestionDenyListEntriesRequest + * @returns ImportCompletionSuggestionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. - * @param message ImportSuggestionDenyListEntriesRequest + * Creates a plain object from an ImportCompletionSuggestionsRequest message. Also converts values to other types if specified. + * @param message ImportCompletionSuggestionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportSuggestionDenyListEntriesRequest to JSON. + * Converts this ImportCompletionSuggestionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesRequest + * Gets the default type url for ImportCompletionSuggestionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportSuggestionDenyListEntriesRequest { + namespace ImportCompletionSuggestionsRequest { /** Properties of an InlineSource. */ interface IInlineSource { - /** InlineSource entries */ - entries?: (google.cloud.discoveryengine.v1.ISuggestionDenyListEntry[]|null); + /** InlineSource suggestions */ + suggestions?: (google.cloud.discoveryengine.v1.ICompletionSuggestion[]|null); } /** Represents an InlineSource. */ @@ -5225,33 +6439,33 @@ export namespace google { * Constructs a new InlineSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource); + constructor(properties?: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource); - /** InlineSource entries. */ - public entries: google.cloud.discoveryengine.v1.ISuggestionDenyListEntry[]; + /** InlineSource suggestions. */ + public suggestions: google.cloud.discoveryengine.v1.ICompletionSuggestion[]; /** * Creates a new InlineSource instance using the specified properties. * @param [properties] Properties to set * @returns InlineSource instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; + public static create(properties?: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an InlineSource message from the specified reader or buffer. @@ -5261,7 +6475,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource; /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. @@ -5270,7 +6484,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource; /** * Verifies an InlineSource message. @@ -5284,7 +6498,7 @@ export namespace google { * @param object Plain object * @returns InlineSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource; /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. @@ -5292,7 +6506,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this InlineSource to JSON. @@ -5309,212 +6523,218 @@ export namespace google { } } - /** Properties of an ImportSuggestionDenyListEntriesResponse. */ - interface IImportSuggestionDenyListEntriesResponse { + /** Properties of an ImportCompletionSuggestionsResponse. */ + interface IImportCompletionSuggestionsResponse { - /** ImportSuggestionDenyListEntriesResponse errorSamples */ + /** ImportCompletionSuggestionsResponse errorSamples */ errorSamples?: (google.rpc.IStatus[]|null); - /** ImportSuggestionDenyListEntriesResponse importedEntriesCount */ - importedEntriesCount?: (number|Long|string|null); - - /** ImportSuggestionDenyListEntriesResponse failedEntriesCount */ - failedEntriesCount?: (number|Long|string|null); + /** ImportCompletionSuggestionsResponse errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); } - /** Represents an ImportSuggestionDenyListEntriesResponse. */ - class ImportSuggestionDenyListEntriesResponse implements IImportSuggestionDenyListEntriesResponse { + /** Represents an ImportCompletionSuggestionsResponse. */ + class ImportCompletionSuggestionsResponse implements IImportCompletionSuggestionsResponse { /** - * Constructs a new ImportSuggestionDenyListEntriesResponse. + * Constructs a new ImportCompletionSuggestionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse); - /** ImportSuggestionDenyListEntriesResponse errorSamples. */ + /** ImportCompletionSuggestionsResponse errorSamples. */ public errorSamples: google.rpc.IStatus[]; - /** ImportSuggestionDenyListEntriesResponse importedEntriesCount. */ - public importedEntriesCount: (number|Long|string); - - /** ImportSuggestionDenyListEntriesResponse failedEntriesCount. */ - public failedEntriesCount: (number|Long|string); + /** ImportCompletionSuggestionsResponse errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); /** - * Creates a new ImportSuggestionDenyListEntriesResponse instance using the specified properties. + * Creates a new ImportCompletionSuggestionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportSuggestionDenyListEntriesResponse instance + * @returns ImportCompletionSuggestionsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse; /** - * Encodes the specified ImportSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.verify|verify} messages. + * @param message ImportCompletionSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.verify|verify} messages. + * @param message ImportCompletionSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportSuggestionDenyListEntriesResponse + * @returns ImportCompletionSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse; /** - * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportSuggestionDenyListEntriesResponse + * @returns ImportCompletionSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse; /** - * Verifies an ImportSuggestionDenyListEntriesResponse message. + * Verifies an ImportCompletionSuggestionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImportSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportSuggestionDenyListEntriesResponse + * @returns ImportCompletionSuggestionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. - * @param message ImportSuggestionDenyListEntriesResponse + * Creates a plain object from an ImportCompletionSuggestionsResponse message. Also converts values to other types if specified. + * @param message ImportCompletionSuggestionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportSuggestionDenyListEntriesResponse to JSON. + * Converts this ImportCompletionSuggestionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesResponse + * Gets the default type url for ImportCompletionSuggestionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportSuggestionDenyListEntriesMetadata. */ - interface IImportSuggestionDenyListEntriesMetadata { + /** Properties of an ImportCompletionSuggestionsMetadata. */ + interface IImportCompletionSuggestionsMetadata { - /** ImportSuggestionDenyListEntriesMetadata createTime */ + /** ImportCompletionSuggestionsMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** ImportSuggestionDenyListEntriesMetadata updateTime */ + /** ImportCompletionSuggestionsMetadata updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + + /** ImportCompletionSuggestionsMetadata successCount */ + successCount?: (number|Long|string|null); + + /** ImportCompletionSuggestionsMetadata failureCount */ + failureCount?: (number|Long|string|null); } - /** Represents an ImportSuggestionDenyListEntriesMetadata. */ - class ImportSuggestionDenyListEntriesMetadata implements IImportSuggestionDenyListEntriesMetadata { + /** Represents an ImportCompletionSuggestionsMetadata. */ + class ImportCompletionSuggestionsMetadata implements IImportCompletionSuggestionsMetadata { /** - * Constructs a new ImportSuggestionDenyListEntriesMetadata. + * Constructs a new ImportCompletionSuggestionsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata); + constructor(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata); - /** ImportSuggestionDenyListEntriesMetadata createTime. */ + /** ImportCompletionSuggestionsMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** ImportSuggestionDenyListEntriesMetadata updateTime. */ + /** ImportCompletionSuggestionsMetadata updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** ImportCompletionSuggestionsMetadata successCount. */ + public successCount: (number|Long|string); + + /** ImportCompletionSuggestionsMetadata failureCount. */ + public failureCount: (number|Long|string); + /** - * Creates a new ImportSuggestionDenyListEntriesMetadata instance using the specified properties. + * Creates a new ImportCompletionSuggestionsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ImportSuggestionDenyListEntriesMetadata instance + * @returns ImportCompletionSuggestionsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata; /** - * Encodes the specified ImportSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.verify|verify} messages. + * @param message ImportCompletionSuggestionsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.verify|verify} messages. + * @param message ImportCompletionSuggestionsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportSuggestionDenyListEntriesMetadata + * @returns ImportCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata; /** - * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportSuggestionDenyListEntriesMetadata + * @returns ImportCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata; /** - * Verifies an ImportSuggestionDenyListEntriesMetadata message. + * Verifies an ImportCompletionSuggestionsMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImportSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportSuggestionDenyListEntriesMetadata + * @returns ImportCompletionSuggestionsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. - * @param message ImportSuggestionDenyListEntriesMetadata + * Creates a plain object from an ImportCompletionSuggestionsMetadata message. Also converts values to other types if specified. + * @param message ImportCompletionSuggestionsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportSuggestionDenyListEntriesMetadata to JSON. + * Converts this ImportCompletionSuggestionsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesMetadata + * Gets the default type url for ImportCompletionSuggestionsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -5747,1707 +6967,2010 @@ export namespace google { */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Document.Content; - /** - * Verifies a Content message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a Content message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Content message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Content + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Document.Content; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @param message Content + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Document.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Content to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Content + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UserEvent. */ + interface IUserEvent { + + /** UserEvent eventType */ + eventType?: (string|null); + + /** UserEvent userPseudoId */ + userPseudoId?: (string|null); + + /** UserEvent engine */ + engine?: (string|null); + + /** UserEvent dataStore */ + dataStore?: (string|null); + + /** UserEvent eventTime */ + eventTime?: (google.protobuf.ITimestamp|null); + + /** UserEvent userInfo */ + userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + + /** UserEvent directUserRequest */ + directUserRequest?: (boolean|null); + + /** UserEvent sessionId */ + sessionId?: (string|null); + + /** UserEvent pageInfo */ + pageInfo?: (google.cloud.discoveryengine.v1.IPageInfo|null); + + /** UserEvent attributionToken */ + attributionToken?: (string|null); + + /** UserEvent filter */ + filter?: (string|null); + + /** UserEvent documents */ + documents?: (google.cloud.discoveryengine.v1.IDocumentInfo[]|null); + + /** UserEvent panel */ + panel?: (google.cloud.discoveryengine.v1.IPanelInfo|null); + + /** UserEvent searchInfo */ + searchInfo?: (google.cloud.discoveryengine.v1.ISearchInfo|null); + + /** UserEvent completionInfo */ + completionInfo?: (google.cloud.discoveryengine.v1.ICompletionInfo|null); + + /** UserEvent transactionInfo */ + transactionInfo?: (google.cloud.discoveryengine.v1.ITransactionInfo|null); + + /** UserEvent tagIds */ + tagIds?: (string[]|null); + + /** UserEvent promotionIds */ + promotionIds?: (string[]|null); + + /** UserEvent attributes */ + attributes?: ({ [k: string]: google.cloud.discoveryengine.v1.ICustomAttribute }|null); + + /** UserEvent mediaInfo */ + mediaInfo?: (google.cloud.discoveryengine.v1.IMediaInfo|null); + } + + /** Represents a UserEvent. */ + class UserEvent implements IUserEvent { + + /** + * Constructs a new UserEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IUserEvent); + + /** UserEvent eventType. */ + public eventType: string; + + /** UserEvent userPseudoId. */ + public userPseudoId: string; + + /** UserEvent engine. */ + public engine: string; + + /** UserEvent dataStore. */ + public dataStore: string; + + /** UserEvent eventTime. */ + public eventTime?: (google.protobuf.ITimestamp|null); + + /** UserEvent userInfo. */ + public userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + + /** UserEvent directUserRequest. */ + public directUserRequest: boolean; + + /** UserEvent sessionId. */ + public sessionId: string; + + /** UserEvent pageInfo. */ + public pageInfo?: (google.cloud.discoveryengine.v1.IPageInfo|null); + + /** UserEvent attributionToken. */ + public attributionToken: string; + + /** UserEvent filter. */ + public filter: string; + + /** UserEvent documents. */ + public documents: google.cloud.discoveryengine.v1.IDocumentInfo[]; + + /** UserEvent panel. */ + public panel?: (google.cloud.discoveryengine.v1.IPanelInfo|null); + + /** UserEvent searchInfo. */ + public searchInfo?: (google.cloud.discoveryengine.v1.ISearchInfo|null); + + /** UserEvent completionInfo. */ + public completionInfo?: (google.cloud.discoveryengine.v1.ICompletionInfo|null); + + /** UserEvent transactionInfo. */ + public transactionInfo?: (google.cloud.discoveryengine.v1.ITransactionInfo|null); + + /** UserEvent tagIds. */ + public tagIds: string[]; + + /** UserEvent promotionIds. */ + public promotionIds: string[]; + + /** UserEvent attributes. */ + public attributes: { [k: string]: google.cloud.discoveryengine.v1.ICustomAttribute }; + + /** UserEvent mediaInfo. */ + public mediaInfo?: (google.cloud.discoveryengine.v1.IMediaInfo|null); + + /** + * Creates a new UserEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UserEvent instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IUserEvent): google.cloud.discoveryengine.v1.UserEvent; + + /** + * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. + * @param message UserEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. + * @param message UserEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.UserEvent; + + /** + * Decodes a UserEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.UserEvent; + + /** + * Verifies a UserEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.UserEvent; + + /** + * Creates a plain object from a UserEvent message. Also converts values to other types if specified. + * @param message UserEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.UserEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PageInfo. */ + interface IPageInfo { - /** - * Creates a Content message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Content - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Document.Content; + /** PageInfo pageviewId */ + pageviewId?: (string|null); - /** - * Creates a plain object from a Content message. Also converts values to other types if specified. - * @param message Content - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1.Document.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PageInfo pageCategory */ + pageCategory?: (string|null); - /** - * Converts this Content to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** PageInfo uri */ + uri?: (string|null); - /** - * Gets the default type url for Content - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** PageInfo referrerUri */ + referrerUri?: (string|null); } - /** Properties of a UserEvent. */ - interface IUserEvent { - - /** UserEvent eventType */ - eventType?: (string|null); + /** Represents a PageInfo. */ + class PageInfo implements IPageInfo { - /** UserEvent userPseudoId */ - userPseudoId?: (string|null); + /** + * Constructs a new PageInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IPageInfo); - /** UserEvent engine */ - engine?: (string|null); + /** PageInfo pageviewId. */ + public pageviewId: string; - /** UserEvent dataStore */ - dataStore?: (string|null); + /** PageInfo pageCategory. */ + public pageCategory: string; - /** UserEvent eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); + /** PageInfo uri. */ + public uri: string; - /** UserEvent userInfo */ - userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + /** PageInfo referrerUri. */ + public referrerUri: string; - /** UserEvent directUserRequest */ - directUserRequest?: (boolean|null); + /** + * Creates a new PageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PageInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IPageInfo): google.cloud.discoveryengine.v1.PageInfo; - /** UserEvent sessionId */ - sessionId?: (string|null); + /** + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** UserEvent pageInfo */ - pageInfo?: (google.cloud.discoveryengine.v1.IPageInfo|null); + /** + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** UserEvent attributionToken */ - attributionToken?: (string|null); + /** + * Decodes a PageInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PageInfo; - /** UserEvent filter */ - filter?: (string|null); + /** + * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PageInfo; - /** UserEvent documents */ - documents?: (google.cloud.discoveryengine.v1.IDocumentInfo[]|null); + /** + * Verifies a PageInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** UserEvent panel */ - panel?: (google.cloud.discoveryengine.v1.IPanelInfo|null); + /** + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PageInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PageInfo; - /** UserEvent searchInfo */ - searchInfo?: (google.cloud.discoveryengine.v1.ISearchInfo|null); + /** + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @param message PageInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UserEvent completionInfo */ - completionInfo?: (google.cloud.discoveryengine.v1.ICompletionInfo|null); + /** + * Converts this PageInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UserEvent transactionInfo */ - transactionInfo?: (google.cloud.discoveryengine.v1.ITransactionInfo|null); + /** + * Gets the default type url for PageInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** UserEvent tagIds */ - tagIds?: (string[]|null); + /** Properties of a SearchInfo. */ + interface ISearchInfo { - /** UserEvent promotionIds */ - promotionIds?: (string[]|null); + /** SearchInfo searchQuery */ + searchQuery?: (string|null); - /** UserEvent attributes */ - attributes?: ({ [k: string]: google.cloud.discoveryengine.v1.ICustomAttribute }|null); + /** SearchInfo orderBy */ + orderBy?: (string|null); - /** UserEvent mediaInfo */ - mediaInfo?: (google.cloud.discoveryengine.v1.IMediaInfo|null); + /** SearchInfo offset */ + offset?: (number|null); } - /** Represents a UserEvent. */ - class UserEvent implements IUserEvent { + /** Represents a SearchInfo. */ + class SearchInfo implements ISearchInfo { /** - * Constructs a new UserEvent. + * Constructs a new SearchInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IUserEvent); + constructor(properties?: google.cloud.discoveryengine.v1.ISearchInfo); - /** UserEvent eventType. */ - public eventType: string; + /** SearchInfo searchQuery. */ + public searchQuery: string; - /** UserEvent userPseudoId. */ - public userPseudoId: string; + /** SearchInfo orderBy. */ + public orderBy: string; - /** UserEvent engine. */ - public engine: string; + /** SearchInfo offset. */ + public offset?: (number|null); - /** UserEvent dataStore. */ - public dataStore: string; + /** SearchInfo _offset. */ + public _offset?: "offset"; - /** UserEvent eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new SearchInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ISearchInfo): google.cloud.discoveryengine.v1.SearchInfo; - /** UserEvent userInfo. */ - public userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + /** + * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * @param message SearchInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** UserEvent directUserRequest. */ - public directUserRequest: boolean; + /** + * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * @param message SearchInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** UserEvent sessionId. */ - public sessionId: string; + /** + * Decodes a SearchInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchInfo; - /** UserEvent pageInfo. */ - public pageInfo?: (google.cloud.discoveryengine.v1.IPageInfo|null); + /** + * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchInfo; - /** UserEvent attributionToken. */ - public attributionToken: string; + /** + * Verifies a SearchInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** UserEvent filter. */ - public filter: string; + /** + * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchInfo; - /** UserEvent documents. */ - public documents: google.cloud.discoveryengine.v1.IDocumentInfo[]; + /** + * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. + * @param message SearchInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UserEvent panel. */ - public panel?: (google.cloud.discoveryengine.v1.IPanelInfo|null); + /** + * Converts this SearchInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UserEvent searchInfo. */ - public searchInfo?: (google.cloud.discoveryengine.v1.ISearchInfo|null); + /** + * Gets the default type url for SearchInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** UserEvent completionInfo. */ - public completionInfo?: (google.cloud.discoveryengine.v1.ICompletionInfo|null); + /** Properties of a CompletionInfo. */ + interface ICompletionInfo { - /** UserEvent transactionInfo. */ - public transactionInfo?: (google.cloud.discoveryengine.v1.ITransactionInfo|null); + /** CompletionInfo selectedSuggestion */ + selectedSuggestion?: (string|null); - /** UserEvent tagIds. */ - public tagIds: string[]; + /** CompletionInfo selectedPosition */ + selectedPosition?: (number|null); + } - /** UserEvent promotionIds. */ - public promotionIds: string[]; + /** Represents a CompletionInfo. */ + class CompletionInfo implements ICompletionInfo { - /** UserEvent attributes. */ - public attributes: { [k: string]: google.cloud.discoveryengine.v1.ICustomAttribute }; + /** + * Constructs a new CompletionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.ICompletionInfo); - /** UserEvent mediaInfo. */ - public mediaInfo?: (google.cloud.discoveryengine.v1.IMediaInfo|null); + /** CompletionInfo selectedSuggestion. */ + public selectedSuggestion: string; + + /** CompletionInfo selectedPosition. */ + public selectedPosition: number; /** - * Creates a new UserEvent instance using the specified properties. + * Creates a new CompletionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns UserEvent instance + * @returns CompletionInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IUserEvent): google.cloud.discoveryengine.v1.UserEvent; + public static create(properties?: google.cloud.discoveryengine.v1.ICompletionInfo): google.cloud.discoveryengine.v1.CompletionInfo; /** - * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. - * @param message UserEvent message or plain object to encode + * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. + * @param message CompletionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. - * @param message UserEvent message or plain object to encode + * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. + * @param message CompletionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserEvent message from the specified reader or buffer. + * Decodes a CompletionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserEvent + * @returns CompletionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.UserEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.CompletionInfo; /** - * Decodes a UserEvent message from the specified reader or buffer, length delimited. + * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserEvent + * @returns CompletionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.UserEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.CompletionInfo; /** - * Verifies a UserEvent message. + * Verifies a CompletionInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. + * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserEvent + * @returns CompletionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.UserEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CompletionInfo; /** - * Creates a plain object from a UserEvent message. Also converts values to other types if specified. - * @param message UserEvent + * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. + * @param message CompletionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.UserEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.CompletionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserEvent to JSON. + * Converts this CompletionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserEvent + * Gets the default type url for CompletionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PageInfo. */ - interface IPageInfo { + /** Properties of a TransactionInfo. */ + interface ITransactionInfo { - /** PageInfo pageviewId */ - pageviewId?: (string|null); + /** TransactionInfo value */ + value?: (number|null); - /** PageInfo pageCategory */ - pageCategory?: (string|null); + /** TransactionInfo currency */ + currency?: (string|null); - /** PageInfo uri */ - uri?: (string|null); + /** TransactionInfo transactionId */ + transactionId?: (string|null); - /** PageInfo referrerUri */ - referrerUri?: (string|null); + /** TransactionInfo tax */ + tax?: (number|null); + + /** TransactionInfo cost */ + cost?: (number|null); + + /** TransactionInfo discountValue */ + discountValue?: (number|null); } - /** Represents a PageInfo. */ - class PageInfo implements IPageInfo { + /** Represents a TransactionInfo. */ + class TransactionInfo implements ITransactionInfo { /** - * Constructs a new PageInfo. + * Constructs a new TransactionInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPageInfo); + constructor(properties?: google.cloud.discoveryengine.v1.ITransactionInfo); - /** PageInfo pageviewId. */ - public pageviewId: string; + /** TransactionInfo value. */ + public value?: (number|null); - /** PageInfo pageCategory. */ - public pageCategory: string; + /** TransactionInfo currency. */ + public currency: string; - /** PageInfo uri. */ - public uri: string; + /** TransactionInfo transactionId. */ + public transactionId: string; - /** PageInfo referrerUri. */ - public referrerUri: string; + /** TransactionInfo tax. */ + public tax?: (number|null); + + /** TransactionInfo cost. */ + public cost?: (number|null); + + /** TransactionInfo discountValue. */ + public discountValue?: (number|null); + + /** TransactionInfo _value. */ + public _value?: "value"; + + /** TransactionInfo _tax. */ + public _tax?: "tax"; + + /** TransactionInfo _cost. */ + public _cost?: "cost"; + + /** TransactionInfo _discountValue. */ + public _discountValue?: "discountValue"; /** - * Creates a new PageInfo instance using the specified properties. + * Creates a new TransactionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns PageInfo instance + * @returns TransactionInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPageInfo): google.cloud.discoveryengine.v1.PageInfo; + public static create(properties?: google.cloud.discoveryengine.v1.ITransactionInfo): google.cloud.discoveryengine.v1.TransactionInfo; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. - * @param message PageInfo message or plain object to encode + * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. + * @param message TransactionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. - * @param message PageInfo message or plain object to encode + * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. + * @param message TransactionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes a TransactionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PageInfo + * @returns TransactionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PageInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.TransactionInfo; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PageInfo + * @returns TransactionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PageInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.TransactionInfo; /** - * Verifies a PageInfo message. + * Verifies a TransactionInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PageInfo + * @returns TransactionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PageInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.TransactionInfo; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. - * @param message PageInfo + * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. + * @param message TransactionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.TransactionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PageInfo to JSON. + * Converts this TransactionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PageInfo + * Gets the default type url for TransactionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SearchInfo. */ - interface ISearchInfo { + /** Properties of a DocumentInfo. */ + interface IDocumentInfo { - /** SearchInfo searchQuery */ - searchQuery?: (string|null); + /** DocumentInfo id */ + id?: (string|null); - /** SearchInfo orderBy */ - orderBy?: (string|null); + /** DocumentInfo name */ + name?: (string|null); - /** SearchInfo offset */ - offset?: (number|null); + /** DocumentInfo uri */ + uri?: (string|null); + + /** DocumentInfo quantity */ + quantity?: (number|null); + + /** DocumentInfo promotionIds */ + promotionIds?: (string[]|null); } - /** Represents a SearchInfo. */ - class SearchInfo implements ISearchInfo { + /** Represents a DocumentInfo. */ + class DocumentInfo implements IDocumentInfo { /** - * Constructs a new SearchInfo. + * Constructs a new DocumentInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ISearchInfo); + constructor(properties?: google.cloud.discoveryengine.v1.IDocumentInfo); - /** SearchInfo searchQuery. */ - public searchQuery: string; + /** DocumentInfo id. */ + public id?: (string|null); - /** SearchInfo orderBy. */ - public orderBy: string; + /** DocumentInfo name. */ + public name?: (string|null); - /** SearchInfo offset. */ - public offset?: (number|null); + /** DocumentInfo uri. */ + public uri?: (string|null); - /** SearchInfo _offset. */ - public _offset?: "offset"; + /** DocumentInfo quantity. */ + public quantity?: (number|null); + + /** DocumentInfo promotionIds. */ + public promotionIds: string[]; + + /** DocumentInfo documentDescriptor. */ + public documentDescriptor?: ("id"|"name"|"uri"); + + /** DocumentInfo _quantity. */ + public _quantity?: "quantity"; /** - * Creates a new SearchInfo instance using the specified properties. + * Creates a new DocumentInfo instance using the specified properties. * @param [properties] Properties to set - * @returns SearchInfo instance + * @returns DocumentInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ISearchInfo): google.cloud.discoveryengine.v1.SearchInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IDocumentInfo): google.cloud.discoveryengine.v1.DocumentInfo; /** - * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. - * @param message SearchInfo message or plain object to encode + * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. + * @param message DocumentInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. - * @param message SearchInfo message or plain object to encode + * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. + * @param message DocumentInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchInfo message from the specified reader or buffer. + * Decodes a DocumentInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchInfo + * @returns DocumentInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.DocumentInfo; /** - * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchInfo + * @returns DocumentInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.DocumentInfo; /** - * Verifies a SearchInfo message. + * Verifies a DocumentInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchInfo + * @returns DocumentInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentInfo; /** - * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. - * @param message SearchInfo + * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. + * @param message DocumentInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.SearchInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.DocumentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchInfo to JSON. + * Converts this DocumentInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SearchInfo + * Gets the default type url for DocumentInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CompletionInfo. */ - interface ICompletionInfo { + /** Properties of a PanelInfo. */ + interface IPanelInfo { - /** CompletionInfo selectedSuggestion */ - selectedSuggestion?: (string|null); + /** PanelInfo panelId */ + panelId?: (string|null); - /** CompletionInfo selectedPosition */ - selectedPosition?: (number|null); + /** PanelInfo displayName */ + displayName?: (string|null); + + /** PanelInfo panelPosition */ + panelPosition?: (number|null); + + /** PanelInfo totalPanels */ + totalPanels?: (number|null); } - /** Represents a CompletionInfo. */ - class CompletionInfo implements ICompletionInfo { + /** Represents a PanelInfo. */ + class PanelInfo implements IPanelInfo { /** - * Constructs a new CompletionInfo. + * Constructs a new PanelInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ICompletionInfo); + constructor(properties?: google.cloud.discoveryengine.v1.IPanelInfo); - /** CompletionInfo selectedSuggestion. */ - public selectedSuggestion: string; + /** PanelInfo panelId. */ + public panelId: string; - /** CompletionInfo selectedPosition. */ - public selectedPosition: number; + /** PanelInfo displayName. */ + public displayName: string; + + /** PanelInfo panelPosition. */ + public panelPosition?: (number|null); + + /** PanelInfo totalPanels. */ + public totalPanels?: (number|null); + + /** PanelInfo _panelPosition. */ + public _panelPosition?: "panelPosition"; + + /** PanelInfo _totalPanels. */ + public _totalPanels?: "totalPanels"; /** - * Creates a new CompletionInfo instance using the specified properties. + * Creates a new PanelInfo instance using the specified properties. * @param [properties] Properties to set - * @returns CompletionInfo instance + * @returns PanelInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ICompletionInfo): google.cloud.discoveryengine.v1.CompletionInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IPanelInfo): google.cloud.discoveryengine.v1.PanelInfo; /** - * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. - * @param message CompletionInfo message or plain object to encode + * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. + * @param message PanelInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. - * @param message CompletionInfo message or plain object to encode + * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. + * @param message PanelInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompletionInfo message from the specified reader or buffer. + * Decodes a PanelInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompletionInfo + * @returns PanelInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.CompletionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PanelInfo; /** - * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. + * Decodes a PanelInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompletionInfo + * @returns PanelInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.CompletionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PanelInfo; /** - * Verifies a CompletionInfo message. + * Verifies a PanelInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompletionInfo + * @returns PanelInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CompletionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PanelInfo; /** - * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. - * @param message CompletionInfo + * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. + * @param message PanelInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.CompletionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PanelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompletionInfo to JSON. + * Converts this PanelInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CompletionInfo + * Gets the default type url for PanelInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TransactionInfo. */ - interface ITransactionInfo { - - /** TransactionInfo value */ - value?: (number|null); - - /** TransactionInfo currency */ - currency?: (string|null); - - /** TransactionInfo transactionId */ - transactionId?: (string|null); - - /** TransactionInfo tax */ - tax?: (number|null); + /** Properties of a MediaInfo. */ + interface IMediaInfo { - /** TransactionInfo cost */ - cost?: (number|null); + /** MediaInfo mediaProgressDuration */ + mediaProgressDuration?: (google.protobuf.IDuration|null); - /** TransactionInfo discountValue */ - discountValue?: (number|null); + /** MediaInfo mediaProgressPercentage */ + mediaProgressPercentage?: (number|null); } - /** Represents a TransactionInfo. */ - class TransactionInfo implements ITransactionInfo { + /** Represents a MediaInfo. */ + class MediaInfo implements IMediaInfo { /** - * Constructs a new TransactionInfo. + * Constructs a new MediaInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ITransactionInfo); - - /** TransactionInfo value. */ - public value?: (number|null); - - /** TransactionInfo currency. */ - public currency: string; - - /** TransactionInfo transactionId. */ - public transactionId: string; - - /** TransactionInfo tax. */ - public tax?: (number|null); - - /** TransactionInfo cost. */ - public cost?: (number|null); - - /** TransactionInfo discountValue. */ - public discountValue?: (number|null); - - /** TransactionInfo _value. */ - public _value?: "value"; + constructor(properties?: google.cloud.discoveryengine.v1.IMediaInfo); - /** TransactionInfo _tax. */ - public _tax?: "tax"; + /** MediaInfo mediaProgressDuration. */ + public mediaProgressDuration?: (google.protobuf.IDuration|null); - /** TransactionInfo _cost. */ - public _cost?: "cost"; + /** MediaInfo mediaProgressPercentage. */ + public mediaProgressPercentage?: (number|null); - /** TransactionInfo _discountValue. */ - public _discountValue?: "discountValue"; + /** MediaInfo _mediaProgressPercentage. */ + public _mediaProgressPercentage?: "mediaProgressPercentage"; /** - * Creates a new TransactionInfo instance using the specified properties. + * Creates a new MediaInfo instance using the specified properties. * @param [properties] Properties to set - * @returns TransactionInfo instance + * @returns MediaInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ITransactionInfo): google.cloud.discoveryengine.v1.TransactionInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IMediaInfo): google.cloud.discoveryengine.v1.MediaInfo; /** - * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. - * @param message TransactionInfo message or plain object to encode + * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. + * @param message MediaInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. - * @param message TransactionInfo message or plain object to encode + * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. + * @param message MediaInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransactionInfo message from the specified reader or buffer. + * Decodes a MediaInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransactionInfo + * @returns MediaInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.TransactionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.MediaInfo; /** - * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. + * Decodes a MediaInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransactionInfo + * @returns MediaInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.TransactionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.MediaInfo; /** - * Verifies a TransactionInfo message. + * Verifies a MediaInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransactionInfo + * @returns MediaInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.TransactionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.MediaInfo; /** - * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. - * @param message TransactionInfo + * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. + * @param message MediaInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.TransactionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.MediaInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransactionInfo to JSON. + * Converts this MediaInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TransactionInfo + * Gets the default type url for MediaInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DocumentInfo. */ - interface IDocumentInfo { - - /** DocumentInfo id */ - id?: (string|null); - - /** DocumentInfo name */ - name?: (string|null); + /** Properties of a PurgeDocumentsRequest. */ + interface IPurgeDocumentsRequest { - /** DocumentInfo uri */ - uri?: (string|null); + /** PurgeDocumentsRequest parent */ + parent?: (string|null); - /** DocumentInfo quantity */ - quantity?: (number|null); + /** PurgeDocumentsRequest filter */ + filter?: (string|null); - /** DocumentInfo promotionIds */ - promotionIds?: (string[]|null); + /** PurgeDocumentsRequest force */ + force?: (boolean|null); } - /** Represents a DocumentInfo. */ - class DocumentInfo implements IDocumentInfo { + /** Represents a PurgeDocumentsRequest. */ + class PurgeDocumentsRequest implements IPurgeDocumentsRequest { /** - * Constructs a new DocumentInfo. + * Constructs a new PurgeDocumentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IDocumentInfo); - - /** DocumentInfo id. */ - public id?: (string|null); - - /** DocumentInfo name. */ - public name?: (string|null); - - /** DocumentInfo uri. */ - public uri?: (string|null); - - /** DocumentInfo quantity. */ - public quantity?: (number|null); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest); - /** DocumentInfo promotionIds. */ - public promotionIds: string[]; + /** PurgeDocumentsRequest parent. */ + public parent: string; - /** DocumentInfo documentDescriptor. */ - public documentDescriptor?: ("id"|"name"|"uri"); + /** PurgeDocumentsRequest filter. */ + public filter: string; - /** DocumentInfo _quantity. */ - public _quantity?: "quantity"; + /** PurgeDocumentsRequest force. */ + public force: boolean; /** - * Creates a new DocumentInfo instance using the specified properties. + * Creates a new PurgeDocumentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentInfo instance + * @returns PurgeDocumentsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IDocumentInfo): google.cloud.discoveryengine.v1.DocumentInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; /** - * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. - * @param message DocumentInfo message or plain object to encode + * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. + * @param message PurgeDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. - * @param message DocumentInfo message or plain object to encode + * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. + * @param message PurgeDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentInfo + * @returns PurgeDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.DocumentInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; /** - * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentInfo + * @returns PurgeDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.DocumentInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; /** - * Verifies a DocumentInfo message. + * Verifies a PurgeDocumentsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentInfo + * @returns PurgeDocumentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; /** - * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. - * @param message DocumentInfo + * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. + * @param message PurgeDocumentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.DocumentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentInfo to JSON. + * Converts this PurgeDocumentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DocumentInfo + * Gets the default type url for PurgeDocumentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PanelInfo. */ - interface IPanelInfo { - - /** PanelInfo panelId */ - panelId?: (string|null); - - /** PanelInfo displayName */ - displayName?: (string|null); + /** Properties of a PurgeDocumentsResponse. */ + interface IPurgeDocumentsResponse { - /** PanelInfo panelPosition */ - panelPosition?: (number|null); + /** PurgeDocumentsResponse purgeCount */ + purgeCount?: (number|Long|string|null); - /** PanelInfo totalPanels */ - totalPanels?: (number|null); + /** PurgeDocumentsResponse purgeSample */ + purgeSample?: (string[]|null); } - /** Represents a PanelInfo. */ - class PanelInfo implements IPanelInfo { + /** Represents a PurgeDocumentsResponse. */ + class PurgeDocumentsResponse implements IPurgeDocumentsResponse { /** - * Constructs a new PanelInfo. + * Constructs a new PurgeDocumentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPanelInfo); - - /** PanelInfo panelId. */ - public panelId: string; - - /** PanelInfo displayName. */ - public displayName: string; - - /** PanelInfo panelPosition. */ - public panelPosition?: (number|null); - - /** PanelInfo totalPanels. */ - public totalPanels?: (number|null); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse); - /** PanelInfo _panelPosition. */ - public _panelPosition?: "panelPosition"; + /** PurgeDocumentsResponse purgeCount. */ + public purgeCount: (number|Long|string); - /** PanelInfo _totalPanels. */ - public _totalPanels?: "totalPanels"; + /** PurgeDocumentsResponse purgeSample. */ + public purgeSample: string[]; /** - * Creates a new PanelInfo instance using the specified properties. + * Creates a new PurgeDocumentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PanelInfo instance + * @returns PurgeDocumentsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPanelInfo): google.cloud.discoveryengine.v1.PanelInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; /** - * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. - * @param message PanelInfo message or plain object to encode + * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. + * @param message PurgeDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. - * @param message PanelInfo message or plain object to encode + * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. + * @param message PurgeDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PanelInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PanelInfo + * @returns PurgeDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PanelInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; /** - * Decodes a PanelInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PanelInfo + * @returns PurgeDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PanelInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; /** - * Verifies a PanelInfo message. + * Verifies a PurgeDocumentsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PanelInfo + * @returns PurgeDocumentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PanelInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; /** - * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. - * @param message PanelInfo + * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. + * @param message PurgeDocumentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PanelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PanelInfo to JSON. + * Converts this PurgeDocumentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PanelInfo + * Gets the default type url for PurgeDocumentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MediaInfo. */ - interface IMediaInfo { + /** Properties of a PurgeDocumentsMetadata. */ + interface IPurgeDocumentsMetadata { - /** MediaInfo mediaProgressDuration */ - mediaProgressDuration?: (google.protobuf.IDuration|null); + /** PurgeDocumentsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** MediaInfo mediaProgressPercentage */ - mediaProgressPercentage?: (number|null); + /** PurgeDocumentsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** PurgeDocumentsMetadata successCount */ + successCount?: (number|Long|string|null); + + /** PurgeDocumentsMetadata failureCount */ + failureCount?: (number|Long|string|null); + + /** PurgeDocumentsMetadata ignoredCount */ + ignoredCount?: (number|Long|string|null); } - /** Represents a MediaInfo. */ - class MediaInfo implements IMediaInfo { + /** Represents a PurgeDocumentsMetadata. */ + class PurgeDocumentsMetadata implements IPurgeDocumentsMetadata { /** - * Constructs a new MediaInfo. + * Constructs a new PurgeDocumentsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IMediaInfo); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata); + + /** PurgeDocumentsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PurgeDocumentsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** MediaInfo mediaProgressDuration. */ - public mediaProgressDuration?: (google.protobuf.IDuration|null); + /** PurgeDocumentsMetadata successCount. */ + public successCount: (number|Long|string); - /** MediaInfo mediaProgressPercentage. */ - public mediaProgressPercentage?: (number|null); + /** PurgeDocumentsMetadata failureCount. */ + public failureCount: (number|Long|string); - /** MediaInfo _mediaProgressPercentage. */ - public _mediaProgressPercentage?: "mediaProgressPercentage"; + /** PurgeDocumentsMetadata ignoredCount. */ + public ignoredCount: (number|Long|string); /** - * Creates a new MediaInfo instance using the specified properties. + * Creates a new PurgeDocumentsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns MediaInfo instance + * @returns PurgeDocumentsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IMediaInfo): google.cloud.discoveryengine.v1.MediaInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; /** - * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. - * @param message MediaInfo message or plain object to encode + * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. + * @param message PurgeDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. - * @param message MediaInfo message or plain object to encode + * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. + * @param message PurgeDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MediaInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MediaInfo + * @returns PurgeDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.MediaInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; /** - * Decodes a MediaInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MediaInfo + * @returns PurgeDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.MediaInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; /** - * Verifies a MediaInfo message. + * Verifies a PurgeDocumentsMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MediaInfo + * @returns PurgeDocumentsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.MediaInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; /** - * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. - * @param message MediaInfo + * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. + * @param message PurgeDocumentsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.MediaInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MediaInfo to JSON. + * Converts this PurgeDocumentsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MediaInfo + * Gets the default type url for PurgeDocumentsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeDocumentsRequest. */ - interface IPurgeDocumentsRequest { + /** Properties of a PurgeSuggestionDenyListEntriesRequest. */ + interface IPurgeSuggestionDenyListEntriesRequest { - /** PurgeDocumentsRequest parent */ + /** PurgeSuggestionDenyListEntriesRequest parent */ parent?: (string|null); - - /** PurgeDocumentsRequest filter */ - filter?: (string|null); - - /** PurgeDocumentsRequest force */ - force?: (boolean|null); } - /** Represents a PurgeDocumentsRequest. */ - class PurgeDocumentsRequest implements IPurgeDocumentsRequest { + /** Represents a PurgeSuggestionDenyListEntriesRequest. */ + class PurgeSuggestionDenyListEntriesRequest implements IPurgeSuggestionDenyListEntriesRequest { /** - * Constructs a new PurgeDocumentsRequest. + * Constructs a new PurgeSuggestionDenyListEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest); - /** PurgeDocumentsRequest parent. */ + /** PurgeSuggestionDenyListEntriesRequest parent. */ public parent: string; - /** PurgeDocumentsRequest filter. */ - public filter: string; - - /** PurgeDocumentsRequest force. */ - public force: boolean; - /** - * Creates a new PurgeDocumentsRequest instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeDocumentsRequest instance + * @returns PurgeSuggestionDenyListEntriesRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; /** - * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. - * @param message PurgeDocumentsRequest message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. - * @param message PurgeDocumentsRequest message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeDocumentsRequest + * @returns PurgeSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; /** - * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeDocumentsRequest + * @returns PurgeSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; /** - * Verifies a PurgeDocumentsRequest message. + * Verifies a PurgeSuggestionDenyListEntriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeDocumentsRequest + * @returns PurgeSuggestionDenyListEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; /** - * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. - * @param message PurgeDocumentsRequest + * Creates a plain object from a PurgeSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. + * @param message PurgeSuggestionDenyListEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeDocumentsRequest to JSON. + * Converts this PurgeSuggestionDenyListEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeDocumentsRequest + * Gets the default type url for PurgeSuggestionDenyListEntriesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeDocumentsResponse. */ - interface IPurgeDocumentsResponse { + /** Properties of a PurgeSuggestionDenyListEntriesResponse. */ + interface IPurgeSuggestionDenyListEntriesResponse { - /** PurgeDocumentsResponse purgeCount */ + /** PurgeSuggestionDenyListEntriesResponse purgeCount */ purgeCount?: (number|Long|string|null); - /** PurgeDocumentsResponse purgeSample */ - purgeSample?: (string[]|null); + /** PurgeSuggestionDenyListEntriesResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); } - /** Represents a PurgeDocumentsResponse. */ - class PurgeDocumentsResponse implements IPurgeDocumentsResponse { + /** Represents a PurgeSuggestionDenyListEntriesResponse. */ + class PurgeSuggestionDenyListEntriesResponse implements IPurgeSuggestionDenyListEntriesResponse { /** - * Constructs a new PurgeDocumentsResponse. + * Constructs a new PurgeSuggestionDenyListEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse); - /** PurgeDocumentsResponse purgeCount. */ + /** PurgeSuggestionDenyListEntriesResponse purgeCount. */ public purgeCount: (number|Long|string); - /** PurgeDocumentsResponse purgeSample. */ - public purgeSample: string[]; + /** PurgeSuggestionDenyListEntriesResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; /** - * Creates a new PurgeDocumentsResponse instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeDocumentsResponse instance + * @returns PurgeSuggestionDenyListEntriesResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; /** - * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. - * @param message PurgeDocumentsResponse message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. - * @param message PurgeDocumentsResponse message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeDocumentsResponse + * @returns PurgeSuggestionDenyListEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; /** - * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeDocumentsResponse + * @returns PurgeSuggestionDenyListEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; /** - * Verifies a PurgeDocumentsResponse message. + * Verifies a PurgeSuggestionDenyListEntriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeDocumentsResponse + * @returns PurgeSuggestionDenyListEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; /** - * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. - * @param message PurgeDocumentsResponse + * Creates a plain object from a PurgeSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * @param message PurgeSuggestionDenyListEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeDocumentsResponse to JSON. + * Converts this PurgeSuggestionDenyListEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeDocumentsResponse + * Gets the default type url for PurgeSuggestionDenyListEntriesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeDocumentsMetadata. */ - interface IPurgeDocumentsMetadata { + /** Properties of a PurgeSuggestionDenyListEntriesMetadata. */ + interface IPurgeSuggestionDenyListEntriesMetadata { - /** PurgeDocumentsMetadata createTime */ + /** PurgeSuggestionDenyListEntriesMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** PurgeDocumentsMetadata updateTime */ + /** PurgeSuggestionDenyListEntriesMetadata updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - - /** PurgeDocumentsMetadata successCount */ - successCount?: (number|Long|string|null); - - /** PurgeDocumentsMetadata failureCount */ - failureCount?: (number|Long|string|null); - - /** PurgeDocumentsMetadata ignoredCount */ - ignoredCount?: (number|Long|string|null); } - /** Represents a PurgeDocumentsMetadata. */ - class PurgeDocumentsMetadata implements IPurgeDocumentsMetadata { + /** Represents a PurgeSuggestionDenyListEntriesMetadata. */ + class PurgeSuggestionDenyListEntriesMetadata implements IPurgeSuggestionDenyListEntriesMetadata { /** - * Constructs a new PurgeDocumentsMetadata. + * Constructs a new PurgeSuggestionDenyListEntriesMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata); - /** PurgeDocumentsMetadata createTime. */ + /** PurgeSuggestionDenyListEntriesMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** PurgeDocumentsMetadata updateTime. */ + /** PurgeSuggestionDenyListEntriesMetadata updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** PurgeDocumentsMetadata successCount. */ - public successCount: (number|Long|string); - - /** PurgeDocumentsMetadata failureCount. */ - public failureCount: (number|Long|string); - - /** PurgeDocumentsMetadata ignoredCount. */ - public ignoredCount: (number|Long|string); - /** - * Creates a new PurgeDocumentsMetadata instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeDocumentsMetadata instance + * @returns PurgeSuggestionDenyListEntriesMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; - /** - * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. - * @param message PurgeDocumentsMetadata message or plain object to encode + /** + * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. - * @param message PurgeDocumentsMetadata message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeDocumentsMetadata + * @returns PurgeSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; /** - * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeDocumentsMetadata + * @returns PurgeSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; /** - * Verifies a PurgeDocumentsMetadata message. + * Verifies a PurgeSuggestionDenyListEntriesMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeDocumentsMetadata + * @returns PurgeSuggestionDenyListEntriesMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; /** - * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. - * @param message PurgeDocumentsMetadata + * Creates a plain object from a PurgeSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. + * @param message PurgeSuggestionDenyListEntriesMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeDocumentsMetadata to JSON. + * Converts this PurgeSuggestionDenyListEntriesMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeDocumentsMetadata + * Gets the default type url for PurgeSuggestionDenyListEntriesMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeSuggestionDenyListEntriesRequest. */ - interface IPurgeSuggestionDenyListEntriesRequest { + /** Properties of a PurgeCompletionSuggestionsRequest. */ + interface IPurgeCompletionSuggestionsRequest { - /** PurgeSuggestionDenyListEntriesRequest parent */ + /** PurgeCompletionSuggestionsRequest parent */ parent?: (string|null); } - /** Represents a PurgeSuggestionDenyListEntriesRequest. */ - class PurgeSuggestionDenyListEntriesRequest implements IPurgeSuggestionDenyListEntriesRequest { + /** Represents a PurgeCompletionSuggestionsRequest. */ + class PurgeCompletionSuggestionsRequest implements IPurgeCompletionSuggestionsRequest { /** - * Constructs a new PurgeSuggestionDenyListEntriesRequest. + * Constructs a new PurgeCompletionSuggestionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest); - /** PurgeSuggestionDenyListEntriesRequest parent. */ + /** PurgeCompletionSuggestionsRequest parent. */ public parent: string; /** - * Creates a new PurgeSuggestionDenyListEntriesRequest instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeSuggestionDenyListEntriesRequest instance + * @returns PurgeCompletionSuggestionsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest; /** - * Encodes the specified PurgeSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesRequest message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest.verify|verify} messages. + * @param message PurgeCompletionSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesRequest message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest.verify|verify} messages. + * @param message PurgeCompletionSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeSuggestionDenyListEntriesRequest + * @returns PurgeCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest; /** - * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeSuggestionDenyListEntriesRequest + * @returns PurgeCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest; /** - * Verifies a PurgeSuggestionDenyListEntriesRequest message. + * Verifies a PurgeCompletionSuggestionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PurgeSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeSuggestionDenyListEntriesRequest + * @returns PurgeCompletionSuggestionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. - * @param message PurgeSuggestionDenyListEntriesRequest + * Creates a plain object from a PurgeCompletionSuggestionsRequest message. Also converts values to other types if specified. + * @param message PurgeCompletionSuggestionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeSuggestionDenyListEntriesRequest to JSON. + * Converts this PurgeCompletionSuggestionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesRequest + * Gets the default type url for PurgeCompletionSuggestionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeSuggestionDenyListEntriesResponse. */ - interface IPurgeSuggestionDenyListEntriesResponse { + /** Properties of a PurgeCompletionSuggestionsResponse. */ + interface IPurgeCompletionSuggestionsResponse { - /** PurgeSuggestionDenyListEntriesResponse purgeCount */ - purgeCount?: (number|Long|string|null); + /** PurgeCompletionSuggestionsResponse purgeSucceeded */ + purgeSucceeded?: (boolean|null); - /** PurgeSuggestionDenyListEntriesResponse errorSamples */ + /** PurgeCompletionSuggestionsResponse errorSamples */ errorSamples?: (google.rpc.IStatus[]|null); } - /** Represents a PurgeSuggestionDenyListEntriesResponse. */ - class PurgeSuggestionDenyListEntriesResponse implements IPurgeSuggestionDenyListEntriesResponse { + /** Represents a PurgeCompletionSuggestionsResponse. */ + class PurgeCompletionSuggestionsResponse implements IPurgeCompletionSuggestionsResponse { /** - * Constructs a new PurgeSuggestionDenyListEntriesResponse. + * Constructs a new PurgeCompletionSuggestionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse); - /** PurgeSuggestionDenyListEntriesResponse purgeCount. */ - public purgeCount: (number|Long|string); + /** PurgeCompletionSuggestionsResponse purgeSucceeded. */ + public purgeSucceeded: boolean; - /** PurgeSuggestionDenyListEntriesResponse errorSamples. */ + /** PurgeCompletionSuggestionsResponse errorSamples. */ public errorSamples: google.rpc.IStatus[]; /** - * Creates a new PurgeSuggestionDenyListEntriesResponse instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeSuggestionDenyListEntriesResponse instance + * @returns PurgeCompletionSuggestionsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse; /** - * Encodes the specified PurgeSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesResponse message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.verify|verify} messages. + * @param message PurgeCompletionSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesResponse message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.verify|verify} messages. + * @param message PurgeCompletionSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeSuggestionDenyListEntriesResponse + * @returns PurgeCompletionSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse; /** - * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeSuggestionDenyListEntriesResponse + * @returns PurgeCompletionSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse; /** - * Verifies a PurgeSuggestionDenyListEntriesResponse message. + * Verifies a PurgeCompletionSuggestionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PurgeSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeSuggestionDenyListEntriesResponse + * @returns PurgeCompletionSuggestionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. - * @param message PurgeSuggestionDenyListEntriesResponse + * Creates a plain object from a PurgeCompletionSuggestionsResponse message. Also converts values to other types if specified. + * @param message PurgeCompletionSuggestionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeSuggestionDenyListEntriesResponse to JSON. + * Converts this PurgeCompletionSuggestionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesResponse + * Gets the default type url for PurgeCompletionSuggestionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeSuggestionDenyListEntriesMetadata. */ - interface IPurgeSuggestionDenyListEntriesMetadata { + /** Properties of a PurgeCompletionSuggestionsMetadata. */ + interface IPurgeCompletionSuggestionsMetadata { - /** PurgeSuggestionDenyListEntriesMetadata createTime */ + /** PurgeCompletionSuggestionsMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** PurgeSuggestionDenyListEntriesMetadata updateTime */ + /** PurgeCompletionSuggestionsMetadata updateTime */ updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a PurgeSuggestionDenyListEntriesMetadata. */ - class PurgeSuggestionDenyListEntriesMetadata implements IPurgeSuggestionDenyListEntriesMetadata { + /** Represents a PurgeCompletionSuggestionsMetadata. */ + class PurgeCompletionSuggestionsMetadata implements IPurgeCompletionSuggestionsMetadata { /** - * Constructs a new PurgeSuggestionDenyListEntriesMetadata. + * Constructs a new PurgeCompletionSuggestionsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata); - /** PurgeSuggestionDenyListEntriesMetadata createTime. */ + /** PurgeCompletionSuggestionsMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** PurgeSuggestionDenyListEntriesMetadata updateTime. */ + /** PurgeCompletionSuggestionsMetadata updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new PurgeSuggestionDenyListEntriesMetadata instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeSuggestionDenyListEntriesMetadata instance + * @returns PurgeCompletionSuggestionsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata; /** - * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.verify|verify} messages. + * @param message PurgeCompletionSuggestionsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.verify|verify} messages. + * @param message PurgeCompletionSuggestionsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeSuggestionDenyListEntriesMetadata + * @returns PurgeCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata; /** - * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeSuggestionDenyListEntriesMetadata + * @returns PurgeCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata; /** - * Verifies a PurgeSuggestionDenyListEntriesMetadata message. + * Verifies a PurgeCompletionSuggestionsMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PurgeSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeSuggestionDenyListEntriesMetadata + * @returns PurgeCompletionSuggestionsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. - * @param message PurgeSuggestionDenyListEntriesMetadata + * Creates a plain object from a PurgeCompletionSuggestionsMetadata message. Also converts values to other types if specified. + * @param message PurgeCompletionSuggestionsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeSuggestionDenyListEntriesMetadata to JSON. + * Converts this PurgeCompletionSuggestionsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesMetadata + * Gets the default type url for PurgeCompletionSuggestionsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -9718,6 +11241,9 @@ export namespace google { /** SearchRequest userInfo */ userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + /** SearchRequest languageCode */ + languageCode?: (string|null); + /** SearchRequest facetSpecs */ facetSpecs?: (google.cloud.discoveryengine.v1.SearchRequest.IFacetSpec[]|null); @@ -9744,6 +11270,15 @@ export namespace google { /** SearchRequest userLabels */ userLabels?: ({ [k: string]: string }|null); + + /** SearchRequest searchAsYouTypeSpec */ + searchAsYouTypeSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null); + + /** SearchRequest session */ + session?: (string|null); + + /** SearchRequest sessionSpec */ + sessionSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null); } /** Represents a SearchRequest. */ @@ -9791,6 +11326,9 @@ export namespace google { /** SearchRequest userInfo. */ public userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + /** SearchRequest languageCode. */ + public languageCode: string; + /** SearchRequest facetSpecs. */ public facetSpecs: google.cloud.discoveryengine.v1.SearchRequest.IFacetSpec[]; @@ -9818,6 +11356,15 @@ export namespace google { /** SearchRequest userLabels. */ public userLabels: { [k: string]: string }; + /** SearchRequest searchAsYouTypeSpec. */ + public searchAsYouTypeSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null); + + /** SearchRequest session. */ + public session: string; + + /** SearchRequest sessionSpec. */ + public sessionSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null); + /** * Creates a new SearchRequest instance using the specified properties. * @param [properties] Properties to set @@ -10780,6 +12327,12 @@ export namespace google { /** ContentSearchSpec extractiveContentSpec */ extractiveContentSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec|null); + + /** ContentSearchSpec searchResultMode */ + searchResultMode?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|null); + + /** ContentSearchSpec chunkSpec */ + chunkSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec|null); } /** Represents a ContentSearchSpec. */ @@ -10800,6 +12353,12 @@ export namespace google { /** ContentSearchSpec extractiveContentSpec. */ public extractiveContentSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec|null); + /** ContentSearchSpec searchResultMode. */ + public searchResultMode: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode); + + /** ContentSearchSpec chunkSpec. */ + public chunkSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec|null); + /** * Creates a new ContentSearchSpec instance using the specified properties. * @param [properties] Properties to set @@ -11418,33 +12977,356 @@ export namespace google { public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExtractiveContentSpec message from a plain object. Also converts values to their respective internal types. + * Creates an ExtractiveContentSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtractiveContentSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec; + + /** + * Creates a plain object from an ExtractiveContentSpec message. Also converts values to other types if specified. + * @param message ExtractiveContentSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtractiveContentSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtractiveContentSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChunkSpec. */ + interface IChunkSpec { + + /** ChunkSpec numPreviousChunks */ + numPreviousChunks?: (number|null); + + /** ChunkSpec numNextChunks */ + numNextChunks?: (number|null); + } + + /** Represents a ChunkSpec. */ + class ChunkSpec implements IChunkSpec { + + /** + * Constructs a new ChunkSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec); + + /** ChunkSpec numPreviousChunks. */ + public numPreviousChunks: number; + + /** ChunkSpec numNextChunks. */ + public numNextChunks: number; + + /** + * Creates a new ChunkSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ChunkSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec; + + /** + * Encodes the specified ChunkSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify|verify} messages. + * @param message ChunkSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChunkSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify|verify} messages. + * @param message ChunkSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChunkSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChunkSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec; + + /** + * Decodes a ChunkSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChunkSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec; + + /** + * Verifies a ChunkSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChunkSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtractiveContentSpec + * @returns ChunkSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec; /** - * Creates a plain object from an ExtractiveContentSpec message. Also converts values to other types if specified. - * @param message ExtractiveContentSpec + * Creates a plain object from a ChunkSpec message. Also converts values to other types if specified. + * @param message ChunkSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtractiveContentSpec to JSON. + * Converts this ChunkSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtractiveContentSpec + * Gets the default type url for ChunkSpec * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** SearchResultMode enum. */ + enum SearchResultMode { + SEARCH_RESULT_MODE_UNSPECIFIED = 0, + DOCUMENTS = 1, + CHUNKS = 2 + } + } + + /** Properties of a SearchAsYouTypeSpec. */ + interface ISearchAsYouTypeSpec { + + /** SearchAsYouTypeSpec condition */ + condition?: (google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition|null); + } + + /** Represents a SearchAsYouTypeSpec. */ + class SearchAsYouTypeSpec implements ISearchAsYouTypeSpec { + + /** + * Constructs a new SearchAsYouTypeSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec); + + /** SearchAsYouTypeSpec condition. */ + public condition: (google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition); + + /** + * Creates a new SearchAsYouTypeSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchAsYouTypeSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec): google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec; + + /** + * Encodes the specified SearchAsYouTypeSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify|verify} messages. + * @param message SearchAsYouTypeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchAsYouTypeSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify|verify} messages. + * @param message SearchAsYouTypeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchAsYouTypeSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchAsYouTypeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec; + + /** + * Decodes a SearchAsYouTypeSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchAsYouTypeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec; + + /** + * Verifies a SearchAsYouTypeSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchAsYouTypeSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchAsYouTypeSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec; + + /** + * Creates a plain object from a SearchAsYouTypeSpec message. Also converts values to other types if specified. + * @param message SearchAsYouTypeSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchAsYouTypeSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchAsYouTypeSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchAsYouTypeSpec { + + /** Condition enum. */ + enum Condition { + CONDITION_UNSPECIFIED = 0, + DISABLED = 1, + ENABLED = 2 + } + } + + /** Properties of a SessionSpec. */ + interface ISessionSpec { + + /** SessionSpec queryId */ + queryId?: (string|null); + + /** SessionSpec searchResultPersistenceCount */ + searchResultPersistenceCount?: (number|null); + } + + /** Represents a SessionSpec. */ + class SessionSpec implements ISessionSpec { + + /** + * Constructs a new SessionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec); + + /** SessionSpec queryId. */ + public queryId: string; + + /** SessionSpec searchResultPersistenceCount. */ + public searchResultPersistenceCount?: (number|null); + + /** SessionSpec _searchResultPersistenceCount. */ + public _searchResultPersistenceCount?: "searchResultPersistenceCount"; + + /** + * Creates a new SessionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec): google.cloud.discoveryengine.v1.SearchRequest.SessionSpec; + + /** + * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify|verify} messages. + * @param message SessionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify|verify} messages. + * @param message SessionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchRequest.SessionSpec; + + /** + * Decodes a SessionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchRequest.SessionSpec; + + /** + * Verifies a SessionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.SessionSpec; + + /** + * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. + * @param message SessionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.SessionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11477,6 +13359,9 @@ export namespace google { /** SearchResponse queryExpansionInfo */ queryExpansionInfo?: (google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo|null); + + /** SearchResponse sessionInfo */ + sessionInfo?: (google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null); } /** Represents a SearchResponse. */ @@ -11515,6 +13400,9 @@ export namespace google { /** SearchResponse queryExpansionInfo. */ public queryExpansionInfo?: (google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo|null); + /** SearchResponse sessionInfo. */ + public sessionInfo?: (google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null); + /** * Creates a new SearchResponse instance using the specified properties. * @param [properties] Properties to set @@ -11603,6 +13491,9 @@ export namespace google { /** SearchResult document */ document?: (google.cloud.discoveryengine.v1.IDocument|null); + + /** SearchResult chunk */ + chunk?: (google.cloud.discoveryengine.v1.IChunk|null); } /** Represents a SearchResult. */ @@ -11620,6 +13511,9 @@ export namespace google { /** SearchResult document. */ public document?: (google.cloud.discoveryengine.v1.IDocument|null); + /** SearchResult chunk. */ + public chunk?: (google.cloud.discoveryengine.v1.IChunk|null); + /** * Creates a new SearchResult instance using the specified properties. * @param [properties] Properties to set @@ -12786,103 +14680,206 @@ export namespace google { } } - /** Properties of a QueryExpansionInfo. */ - interface IQueryExpansionInfo { + /** Properties of a QueryExpansionInfo. */ + interface IQueryExpansionInfo { + + /** QueryExpansionInfo expandedQuery */ + expandedQuery?: (boolean|null); + + /** QueryExpansionInfo pinnedResultCount */ + pinnedResultCount?: (number|Long|string|null); + } + + /** Represents a QueryExpansionInfo. */ + class QueryExpansionInfo implements IQueryExpansionInfo { + + /** + * Constructs a new QueryExpansionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo); + + /** QueryExpansionInfo expandedQuery. */ + public expandedQuery: boolean; + + /** QueryExpansionInfo pinnedResultCount. */ + public pinnedResultCount: (number|Long|string); + + /** + * Creates a new QueryExpansionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryExpansionInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + + /** + * Encodes the specified QueryExpansionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.verify|verify} messages. + * @param message QueryExpansionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryExpansionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.verify|verify} messages. + * @param message QueryExpansionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryExpansionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryExpansionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + + /** + * Decodes a QueryExpansionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryExpansionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + + /** + * Verifies a QueryExpansionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryExpansionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryExpansionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + + /** + * Creates a plain object from a QueryExpansionInfo message. Also converts values to other types if specified. + * @param message QueryExpansionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryExpansionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryExpansionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionInfo. */ + interface ISessionInfo { - /** QueryExpansionInfo expandedQuery */ - expandedQuery?: (boolean|null); + /** SessionInfo name */ + name?: (string|null); - /** QueryExpansionInfo pinnedResultCount */ - pinnedResultCount?: (number|Long|string|null); + /** SessionInfo queryId */ + queryId?: (string|null); } - /** Represents a QueryExpansionInfo. */ - class QueryExpansionInfo implements IQueryExpansionInfo { + /** Represents a SessionInfo. */ + class SessionInfo implements ISessionInfo { /** - * Constructs a new QueryExpansionInfo. + * Constructs a new SessionInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo); + constructor(properties?: google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo); - /** QueryExpansionInfo expandedQuery. */ - public expandedQuery: boolean; + /** SessionInfo name. */ + public name: string; - /** QueryExpansionInfo pinnedResultCount. */ - public pinnedResultCount: (number|Long|string); + /** SessionInfo queryId. */ + public queryId: string; /** - * Creates a new QueryExpansionInfo instance using the specified properties. + * Creates a new SessionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns QueryExpansionInfo instance + * @returns SessionInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + public static create(properties?: google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo): google.cloud.discoveryengine.v1.SearchResponse.SessionInfo; /** - * Encodes the specified QueryExpansionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.verify|verify} messages. - * @param message QueryExpansionInfo message or plain object to encode + * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify|verify} messages. + * @param message SessionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryExpansionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.verify|verify} messages. - * @param message QueryExpansionInfo message or plain object to encode + * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify|verify} messages. + * @param message SessionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryExpansionInfo message from the specified reader or buffer. + * Decodes a SessionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryExpansionInfo + * @returns SessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchResponse.SessionInfo; /** - * Decodes a QueryExpansionInfo message from the specified reader or buffer, length delimited. + * Decodes a SessionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryExpansionInfo + * @returns SessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchResponse.SessionInfo; /** - * Verifies a QueryExpansionInfo message. + * Verifies a SessionInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryExpansionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryExpansionInfo + * @returns SessionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchResponse.SessionInfo; /** - * Creates a plain object from a QueryExpansionInfo message. Also converts values to other types if specified. - * @param message QueryExpansionInfo + * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. + * @param message SessionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.SearchResponse.SessionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryExpansionInfo to JSON. + * Converts this SessionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for QueryExpansionInfo + * Gets the default type url for SessionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -14097,6 +16094,9 @@ export namespace google { /** AnswerQueryRequest userPseudoId */ userPseudoId?: (string|null); + + /** AnswerQueryRequest userLabels */ + userLabels?: ({ [k: string]: string }|null); } /** Represents an AnswerQueryRequest. */ @@ -14138,6 +16138,9 @@ export namespace google { /** AnswerQueryRequest userPseudoId. */ public userPseudoId: string; + /** AnswerQueryRequest userLabels. */ + public userLabels: { [k: string]: string }; + /** * Creates a new AnswerQueryRequest instance using the specified properties. * @param [properties] Properties to set @@ -14868,6 +16871,9 @@ export namespace google { /** SearchParams orderBy */ orderBy?: (string|null); + /** SearchParams searchResultMode */ + searchResultMode?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|null); + /** SearchParams dataStoreSpecs */ dataStoreSpecs?: (google.cloud.discoveryengine.v1.SearchRequest.IDataStoreSpec[]|null); } @@ -14893,6 +16899,9 @@ export namespace google { /** SearchParams orderBy. */ public orderBy: string; + /** SearchParams searchResultMode. */ + public searchResultMode: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode); + /** SearchParams dataStoreSpecs. */ public dataStoreSpecs: google.cloud.discoveryengine.v1.SearchRequest.IDataStoreSpec[]; @@ -15943,6 +17952,9 @@ export namespace google { /** QueryRephraserSpec disable */ disable?: (boolean|null); + + /** QueryRephraserSpec maxRephraseSteps */ + maxRephraseSteps?: (number|null); } /** Represents a QueryRephraserSpec. */ @@ -15957,6 +17969,9 @@ export namespace google { /** QueryRephraserSpec disable. */ public disable: boolean; + /** QueryRephraserSpec maxRephraseSteps. */ + public maxRephraseSteps: number; + /** * Creates a new QueryRephraserSpec instance using the specified properties. * @param [properties] Properties to set @@ -17374,110 +19389,322 @@ export namespace google { /** DocumentProcessingConfig name */ name?: (string|null); - /** DocumentProcessingConfig defaultParsingConfig */ - defaultParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null); + /** DocumentProcessingConfig chunkingConfig */ + chunkingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig|null); + + /** DocumentProcessingConfig defaultParsingConfig */ + defaultParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null); + + /** DocumentProcessingConfig parsingConfigOverrides */ + parsingConfigOverrides?: ({ [k: string]: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig }|null); + } + + /** Represents a DocumentProcessingConfig. */ + class DocumentProcessingConfig implements IDocumentProcessingConfig { + + /** + * Constructs a new DocumentProcessingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IDocumentProcessingConfig); + + /** DocumentProcessingConfig name. */ + public name: string; + + /** DocumentProcessingConfig chunkingConfig. */ + public chunkingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig|null); + + /** DocumentProcessingConfig defaultParsingConfig. */ + public defaultParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null); + + /** DocumentProcessingConfig parsingConfigOverrides. */ + public parsingConfigOverrides: { [k: string]: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig }; + + /** + * Creates a new DocumentProcessingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentProcessingConfig instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IDocumentProcessingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + + /** + * Encodes the specified DocumentProcessingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. + * @param message DocumentProcessingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IDocumentProcessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentProcessingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. + * @param message DocumentProcessingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IDocumentProcessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentProcessingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentProcessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + + /** + * Decodes a DocumentProcessingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentProcessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + + /** + * Verifies a DocumentProcessingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DocumentProcessingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentProcessingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + + /** + * Creates a plain object from a DocumentProcessingConfig message. Also converts values to other types if specified. + * @param message DocumentProcessingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentProcessingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentProcessingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DocumentProcessingConfig { + + /** Properties of a ChunkingConfig. */ + interface IChunkingConfig { + + /** ChunkingConfig layoutBasedChunkingConfig */ + layoutBasedChunkingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig|null); + } + + /** Represents a ChunkingConfig. */ + class ChunkingConfig implements IChunkingConfig { + + /** + * Constructs a new ChunkingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig); + + /** ChunkingConfig layoutBasedChunkingConfig. */ + public layoutBasedChunkingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig|null); + + /** ChunkingConfig chunkMode. */ + public chunkMode?: "layoutBasedChunkingConfig"; + + /** + * Creates a new ChunkingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ChunkingConfig instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig; + + /** + * Encodes the specified ChunkingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify|verify} messages. + * @param message ChunkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChunkingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify|verify} messages. + * @param message ChunkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChunkingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig; + + /** + * Decodes a ChunkingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig; + + /** + * Verifies a ChunkingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChunkingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChunkingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig; + + /** + * Creates a plain object from a ChunkingConfig message. Also converts values to other types if specified. + * @param message ChunkingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChunkingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChunkingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ChunkingConfig { - /** DocumentProcessingConfig parsingConfigOverrides */ - parsingConfigOverrides?: ({ [k: string]: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig }|null); - } + /** Properties of a LayoutBasedChunkingConfig. */ + interface ILayoutBasedChunkingConfig { - /** Represents a DocumentProcessingConfig. */ - class DocumentProcessingConfig implements IDocumentProcessingConfig { + /** LayoutBasedChunkingConfig chunkSize */ + chunkSize?: (number|null); - /** - * Constructs a new DocumentProcessingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1.IDocumentProcessingConfig); + /** LayoutBasedChunkingConfig includeAncestorHeadings */ + includeAncestorHeadings?: (boolean|null); + } - /** DocumentProcessingConfig name. */ - public name: string; + /** Represents a LayoutBasedChunkingConfig. */ + class LayoutBasedChunkingConfig implements ILayoutBasedChunkingConfig { - /** DocumentProcessingConfig defaultParsingConfig. */ - public defaultParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null); + /** + * Constructs a new LayoutBasedChunkingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig); - /** DocumentProcessingConfig parsingConfigOverrides. */ - public parsingConfigOverrides: { [k: string]: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig }; + /** LayoutBasedChunkingConfig chunkSize. */ + public chunkSize: number; - /** - * Creates a new DocumentProcessingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DocumentProcessingConfig instance - */ - public static create(properties?: google.cloud.discoveryengine.v1.IDocumentProcessingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + /** LayoutBasedChunkingConfig includeAncestorHeadings. */ + public includeAncestorHeadings: boolean; - /** - * Encodes the specified DocumentProcessingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. - * @param message DocumentProcessingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1.IDocumentProcessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new LayoutBasedChunkingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LayoutBasedChunkingConfig instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig; - /** - * Encodes the specified DocumentProcessingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. - * @param message DocumentProcessingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IDocumentProcessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified LayoutBasedChunkingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify|verify} messages. + * @param message LayoutBasedChunkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DocumentProcessingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DocumentProcessingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + /** + * Encodes the specified LayoutBasedChunkingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify|verify} messages. + * @param message LayoutBasedChunkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DocumentProcessingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DocumentProcessingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + /** + * Decodes a LayoutBasedChunkingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LayoutBasedChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig; - /** - * Verifies a DocumentProcessingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a LayoutBasedChunkingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LayoutBasedChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig; - /** - * Creates a DocumentProcessingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DocumentProcessingConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + /** + * Verifies a LayoutBasedChunkingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a DocumentProcessingConfig message. Also converts values to other types if specified. - * @param message DocumentProcessingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a LayoutBasedChunkingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LayoutBasedChunkingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig; - /** - * Converts this DocumentProcessingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a LayoutBasedChunkingConfig message. Also converts values to other types if specified. + * @param message LayoutBasedChunkingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for DocumentProcessingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this LayoutBasedChunkingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - namespace DocumentProcessingConfig { + /** + * Gets the default type url for LayoutBasedChunkingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } /** Properties of a ParsingConfig. */ interface IParsingConfig { @@ -17487,6 +19714,9 @@ export namespace google { /** ParsingConfig ocrParsingConfig */ ocrParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.IOcrParsingConfig|null); + + /** ParsingConfig layoutParsingConfig */ + layoutParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig|null); } /** Represents a ParsingConfig. */ @@ -17504,8 +19734,11 @@ export namespace google { /** ParsingConfig ocrParsingConfig. */ public ocrParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.IOcrParsingConfig|null); + /** ParsingConfig layoutParsingConfig. */ + public layoutParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig|null); + /** ParsingConfig typeDedicatedConfig. */ - public typeDedicatedConfig?: ("digitalParsingConfig"|"ocrParsingConfig"); + public typeDedicatedConfig?: ("digitalParsingConfig"|"ocrParsingConfig"|"layoutParsingConfig"); /** * Creates a new ParsingConfig instance using the specified properties. @@ -17780,6 +20013,97 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a LayoutParsingConfig. */ + interface ILayoutParsingConfig { + } + + /** Represents a LayoutParsingConfig. */ + class LayoutParsingConfig implements ILayoutParsingConfig { + + /** + * Constructs a new LayoutParsingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig); + + /** + * Creates a new LayoutParsingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LayoutParsingConfig instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig; + + /** + * Encodes the specified LayoutParsingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify|verify} messages. + * @param message LayoutParsingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LayoutParsingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify|verify} messages. + * @param message LayoutParsingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LayoutParsingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LayoutParsingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig; + + /** + * Decodes a LayoutParsingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LayoutParsingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig; + + /** + * Verifies a LayoutParsingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LayoutParsingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LayoutParsingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig; + + /** + * Creates a plain object from a LayoutParsingConfig message. Also converts values to other types if specified. + * @param message LayoutParsingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LayoutParsingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LayoutParsingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } diff --git a/packages/google-cloud-discoveryengine/protos/protos.js b/packages/google-cloud-discoveryengine/protos/protos.js index 257c9be5a3a..6b2b3d3acc1 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.js +++ b/packages/google-cloud-discoveryengine/protos/protos.js @@ -442,6 +442,7 @@ case 2: case 3: case 4: + case 5: break; } } @@ -571,6 +572,10 @@ case 4: message.answerSkippedReasons[i] = 4; break; + case "NO_RELEVANT_CONTENT": + case 5: + message.answerSkippedReasons[i] = 5; + break; } } if (object.createTime != null) { @@ -3602,6 +3607,7 @@ * @property {string|null} [title] SearchResult title * @property {Array.|null} [snippetInfo] SearchResult snippetInfo * @property {Array.|null} [chunkInfo] SearchResult chunkInfo + * @property {google.protobuf.IStruct|null} [structData] SearchResult structData */ /** @@ -3661,6 +3667,14 @@ */ SearchResult.prototype.chunkInfo = $util.emptyArray; + /** + * SearchResult structData. + * @member {google.protobuf.IStruct|null|undefined} structData + * @memberof google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult + * @instance + */ + SearchResult.prototype.structData = null; + /** * Creates a new SearchResult instance using the specified properties. * @function create @@ -3697,6 +3711,8 @@ if (message.chunkInfo != null && message.chunkInfo.length) for (var i = 0; i < message.chunkInfo.length; ++i) $root.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo.encode(message.chunkInfo[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) + $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -3755,6 +3771,10 @@ message.chunkInfo.push($root.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo.decode(reader, reader.uint32())); break; } + case 6: { + message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3817,6 +3837,11 @@ return "chunkInfo." + error; } } + if (message.structData != null && message.hasOwnProperty("structData")) { + var error = $root.google.protobuf.Struct.verify(message.structData); + if (error) + return "structData." + error; + } return null; }; @@ -3858,6 +3883,11 @@ message.chunkInfo[i] = $root.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo.fromObject(object.chunkInfo[i]); } } + if (object.structData != null) { + if (typeof object.structData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.structData: object expected"); + message.structData = $root.google.protobuf.Struct.fromObject(object.structData); + } return message; }; @@ -3882,6 +3912,7 @@ object.document = ""; object.uri = ""; object.title = ""; + object.structData = null; } if (message.document != null && message.hasOwnProperty("document")) object.document = message.document; @@ -3899,6 +3930,8 @@ for (var j = 0; j < message.chunkInfo.length; ++j) object.chunkInfo[j] = $root.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo.toObject(message.chunkInfo[j], options); } + if (message.structData != null && message.hasOwnProperty("structData")) + object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); return object; }; @@ -4972,6 +5005,7 @@ * @property {number} NON_ANSWER_SEEKING_QUERY_IGNORED=2 NON_ANSWER_SEEKING_QUERY_IGNORED value * @property {number} OUT_OF_DOMAIN_QUERY_IGNORED=3 OUT_OF_DOMAIN_QUERY_IGNORED value * @property {number} POTENTIAL_POLICY_VIOLATION=4 POTENTIAL_POLICY_VIOLATION value + * @property {number} NO_RELEVANT_CONTENT=5 NO_RELEVANT_CONTENT value */ Answer.AnswerSkippedReason = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4980,117 +5014,38 @@ values[valuesById[2] = "NON_ANSWER_SEEKING_QUERY_IGNORED"] = 2; values[valuesById[3] = "OUT_OF_DOMAIN_QUERY_IGNORED"] = 3; values[valuesById[4] = "POTENTIAL_POLICY_VIOLATION"] = 4; + values[valuesById[5] = "NO_RELEVANT_CONTENT"] = 5; return values; })(); return Answer; })(); - /** - * IndustryVertical enum. - * @name google.cloud.discoveryengine.v1.IndustryVertical - * @enum {number} - * @property {number} INDUSTRY_VERTICAL_UNSPECIFIED=0 INDUSTRY_VERTICAL_UNSPECIFIED value - * @property {number} GENERIC=1 GENERIC value - * @property {number} MEDIA=2 MEDIA value - * @property {number} HEALTHCARE_FHIR=7 HEALTHCARE_FHIR value - */ - v1.IndustryVertical = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INDUSTRY_VERTICAL_UNSPECIFIED"] = 0; - values[valuesById[1] = "GENERIC"] = 1; - values[valuesById[2] = "MEDIA"] = 2; - values[valuesById[7] = "HEALTHCARE_FHIR"] = 7; - return values; - })(); - - /** - * SolutionType enum. - * @name google.cloud.discoveryengine.v1.SolutionType - * @enum {number} - * @property {number} SOLUTION_TYPE_UNSPECIFIED=0 SOLUTION_TYPE_UNSPECIFIED value - * @property {number} SOLUTION_TYPE_RECOMMENDATION=1 SOLUTION_TYPE_RECOMMENDATION value - * @property {number} SOLUTION_TYPE_SEARCH=2 SOLUTION_TYPE_SEARCH value - * @property {number} SOLUTION_TYPE_CHAT=3 SOLUTION_TYPE_CHAT value - * @property {number} SOLUTION_TYPE_GENERATIVE_CHAT=4 SOLUTION_TYPE_GENERATIVE_CHAT value - */ - v1.SolutionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SOLUTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SOLUTION_TYPE_RECOMMENDATION"] = 1; - values[valuesById[2] = "SOLUTION_TYPE_SEARCH"] = 2; - values[valuesById[3] = "SOLUTION_TYPE_CHAT"] = 3; - values[valuesById[4] = "SOLUTION_TYPE_GENERATIVE_CHAT"] = 4; - return values; - })(); - - /** - * SearchUseCase enum. - * @name google.cloud.discoveryengine.v1.SearchUseCase - * @enum {number} - * @property {number} SEARCH_USE_CASE_UNSPECIFIED=0 SEARCH_USE_CASE_UNSPECIFIED value - * @property {number} SEARCH_USE_CASE_SEARCH=1 SEARCH_USE_CASE_SEARCH value - * @property {number} SEARCH_USE_CASE_BROWSE=2 SEARCH_USE_CASE_BROWSE value - */ - v1.SearchUseCase = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_USE_CASE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SEARCH_USE_CASE_SEARCH"] = 1; - values[valuesById[2] = "SEARCH_USE_CASE_BROWSE"] = 2; - return values; - })(); - - /** - * SearchTier enum. - * @name google.cloud.discoveryengine.v1.SearchTier - * @enum {number} - * @property {number} SEARCH_TIER_UNSPECIFIED=0 SEARCH_TIER_UNSPECIFIED value - * @property {number} SEARCH_TIER_STANDARD=1 SEARCH_TIER_STANDARD value - * @property {number} SEARCH_TIER_ENTERPRISE=2 SEARCH_TIER_ENTERPRISE value - */ - v1.SearchTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SEARCH_TIER_STANDARD"] = 1; - values[valuesById[2] = "SEARCH_TIER_ENTERPRISE"] = 2; - return values; - })(); - - /** - * SearchAddOn enum. - * @name google.cloud.discoveryengine.v1.SearchAddOn - * @enum {number} - * @property {number} SEARCH_ADD_ON_UNSPECIFIED=0 SEARCH_ADD_ON_UNSPECIFIED value - * @property {number} SEARCH_ADD_ON_LLM=1 SEARCH_ADD_ON_LLM value - */ - v1.SearchAddOn = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_ADD_ON_UNSPECIFIED"] = 0; - values[valuesById[1] = "SEARCH_ADD_ON_LLM"] = 1; - return values; - })(); - - v1.Interval = (function() { + v1.Chunk = (function() { /** - * Properties of an Interval. + * Properties of a Chunk. * @memberof google.cloud.discoveryengine.v1 - * @interface IInterval - * @property {number|null} [minimum] Interval minimum - * @property {number|null} [exclusiveMinimum] Interval exclusiveMinimum - * @property {number|null} [maximum] Interval maximum - * @property {number|null} [exclusiveMaximum] Interval exclusiveMaximum + * @interface IChunk + * @property {string|null} [name] Chunk name + * @property {string|null} [id] Chunk id + * @property {string|null} [content] Chunk content + * @property {number|null} [relevanceScore] Chunk relevanceScore + * @property {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata|null} [documentMetadata] Chunk documentMetadata + * @property {google.protobuf.IStruct|null} [derivedStructData] Chunk derivedStructData + * @property {google.cloud.discoveryengine.v1.Chunk.IPageSpan|null} [pageSpan] Chunk pageSpan + * @property {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata|null} [chunkMetadata] Chunk chunkMetadata */ /** - * Constructs a new Interval. + * Constructs a new Chunk. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an Interval. - * @implements IInterval + * @classdesc Represents a Chunk. + * @implements IChunk * @constructor - * @param {google.cloud.discoveryengine.v1.IInterval=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IChunk=} [properties] Properties to set */ - function Interval(properties) { + function Chunk(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5098,142 +5053,187 @@ } /** - * Interval minimum. - * @member {number|null|undefined} minimum - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Interval.prototype.minimum = null; + Chunk.prototype.name = ""; /** - * Interval exclusiveMinimum. - * @member {number|null|undefined} exclusiveMinimum - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk id. + * @member {string} id + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Interval.prototype.exclusiveMinimum = null; + Chunk.prototype.id = ""; /** - * Interval maximum. - * @member {number|null|undefined} maximum - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk content. + * @member {string} content + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Interval.prototype.maximum = null; + Chunk.prototype.content = ""; /** - * Interval exclusiveMaximum. - * @member {number|null|undefined} exclusiveMaximum - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk relevanceScore. + * @member {number|null|undefined} relevanceScore + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Interval.prototype.exclusiveMaximum = null; + Chunk.prototype.relevanceScore = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Chunk documentMetadata. + * @member {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata|null|undefined} documentMetadata + * @memberof google.cloud.discoveryengine.v1.Chunk + * @instance + */ + Chunk.prototype.documentMetadata = null; /** - * Interval min. - * @member {"minimum"|"exclusiveMinimum"|undefined} min - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk derivedStructData. + * @member {google.protobuf.IStruct|null|undefined} derivedStructData + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Object.defineProperty(Interval.prototype, "min", { - get: $util.oneOfGetter($oneOfFields = ["minimum", "exclusiveMinimum"]), - set: $util.oneOfSetter($oneOfFields) - }); + Chunk.prototype.derivedStructData = null; /** - * Interval max. - * @member {"maximum"|"exclusiveMaximum"|undefined} max - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk pageSpan. + * @member {google.cloud.discoveryengine.v1.Chunk.IPageSpan|null|undefined} pageSpan + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Object.defineProperty(Interval.prototype, "max", { - get: $util.oneOfGetter($oneOfFields = ["maximum", "exclusiveMaximum"]), + Chunk.prototype.pageSpan = null; + + /** + * Chunk chunkMetadata. + * @member {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata|null|undefined} chunkMetadata + * @memberof google.cloud.discoveryengine.v1.Chunk + * @instance + */ + Chunk.prototype.chunkMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Chunk _relevanceScore. + * @member {"relevanceScore"|undefined} _relevanceScore + * @memberof google.cloud.discoveryengine.v1.Chunk + * @instance + */ + Object.defineProperty(Chunk.prototype, "_relevanceScore", { + get: $util.oneOfGetter($oneOfFields = ["relevanceScore"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Interval instance using the specified properties. + * Creates a new Chunk instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static - * @param {google.cloud.discoveryengine.v1.IInterval=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.Interval} Interval instance + * @param {google.cloud.discoveryengine.v1.IChunk=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Chunk} Chunk instance */ - Interval.create = function create(properties) { - return new Interval(properties); + Chunk.create = function create(properties) { + return new Chunk(properties); }; /** - * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * Encodes the specified Chunk message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static - * @param {google.cloud.discoveryengine.v1.IInterval} message Interval message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IChunk} message Chunk message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Interval.encode = function encode(message, writer) { + Chunk.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimum); - if (message.exclusiveMinimum != null && Object.hasOwnProperty.call(message, "exclusiveMinimum")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.exclusiveMinimum); - if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.maximum); - if (message.exclusiveMaximum != null && Object.hasOwnProperty.call(message, "exclusiveMaximum")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.exclusiveMaximum); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.content); + if (message.derivedStructData != null && Object.hasOwnProperty.call(message, "derivedStructData")) + $root.google.protobuf.Struct.encode(message.derivedStructData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.documentMetadata != null && Object.hasOwnProperty.call(message, "documentMetadata")) + $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.encode(message.documentMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pageSpan != null && Object.hasOwnProperty.call(message, "pageSpan")) + $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.encode(message.pageSpan, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.chunkMetadata != null && Object.hasOwnProperty.call(message, "chunkMetadata")) + $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.encode(message.chunkMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.relevanceScore != null && Object.hasOwnProperty.call(message, "relevanceScore")) + writer.uint32(/* id 8, wireType 1 =*/65).double(message.relevanceScore); return writer; }; /** - * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * Encodes the specified Chunk message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static - * @param {google.cloud.discoveryengine.v1.IInterval} message Interval message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IChunk} message Chunk message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Interval.encodeDelimited = function encodeDelimited(message, writer) { + Chunk.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Interval message from the specified reader or buffer. + * Decodes a Chunk message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @returns {google.cloud.discoveryengine.v1.Chunk} Chunk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Interval.decode = function decode(reader, length) { + Chunk.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Interval(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Chunk(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.minimum = reader.double(); + message.name = reader.string(); break; } case 2: { - message.exclusiveMinimum = reader.double(); + message.id = reader.string(); break; } case 3: { - message.maximum = reader.double(); + message.content = reader.string(); + break; + } + case 8: { + message.relevanceScore = reader.double(); + break; + } + case 5: { + message.documentMetadata = $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.decode(reader, reader.uint32()); break; } case 4: { - message.exclusiveMaximum = reader.double(); + message.derivedStructData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.pageSpan = $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.decode(reader, reader.uint32()); + break; + } + case 7: { + message.chunkMetadata = $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.decode(reader, reader.uint32()); break; } default: @@ -5245,273 +5245,3593 @@ }; /** - * Decodes an Interval message from the specified reader or buffer, length delimited. + * Decodes a Chunk message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @returns {google.cloud.discoveryengine.v1.Chunk} Chunk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Interval.decodeDelimited = function decodeDelimited(reader) { + Chunk.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Interval message. + * Verifies a Chunk message. * @function verify - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Interval.verify = function verify(message) { + Chunk.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.minimum != null && message.hasOwnProperty("minimum")) { - properties.min = 1; - if (typeof message.minimum !== "number") - return "minimum: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.relevanceScore != null && message.hasOwnProperty("relevanceScore")) { + properties._relevanceScore = 1; + if (typeof message.relevanceScore !== "number") + return "relevanceScore: number expected"; } - if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { - if (properties.min === 1) - return "min: multiple values"; - properties.min = 1; - if (typeof message.exclusiveMinimum !== "number") - return "exclusiveMinimum: number expected"; + if (message.documentMetadata != null && message.hasOwnProperty("documentMetadata")) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify(message.documentMetadata); + if (error) + return "documentMetadata." + error; } - if (message.maximum != null && message.hasOwnProperty("maximum")) { - properties.max = 1; - if (typeof message.maximum !== "number") - return "maximum: number expected"; + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) { + var error = $root.google.protobuf.Struct.verify(message.derivedStructData); + if (error) + return "derivedStructData." + error; } - if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { - if (properties.max === 1) - return "max: multiple values"; - properties.max = 1; - if (typeof message.exclusiveMaximum !== "number") - return "exclusiveMaximum: number expected"; + if (message.pageSpan != null && message.hasOwnProperty("pageSpan")) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.verify(message.pageSpan); + if (error) + return "pageSpan." + error; + } + if (message.chunkMetadata != null && message.hasOwnProperty("chunkMetadata")) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify(message.chunkMetadata); + if (error) + return "chunkMetadata." + error; } return null; }; /** - * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * Creates a Chunk message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @returns {google.cloud.discoveryengine.v1.Chunk} Chunk */ - Interval.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.Interval) + Chunk.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Chunk) return object; - var message = new $root.google.cloud.discoveryengine.v1.Interval(); - if (object.minimum != null) - message.minimum = Number(object.minimum); - if (object.exclusiveMinimum != null) - message.exclusiveMinimum = Number(object.exclusiveMinimum); - if (object.maximum != null) - message.maximum = Number(object.maximum); - if (object.exclusiveMaximum != null) - message.exclusiveMaximum = Number(object.exclusiveMaximum); + var message = new $root.google.cloud.discoveryengine.v1.Chunk(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.content != null) + message.content = String(object.content); + if (object.relevanceScore != null) + message.relevanceScore = Number(object.relevanceScore); + if (object.documentMetadata != null) { + if (typeof object.documentMetadata !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.documentMetadata: object expected"); + message.documentMetadata = $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.fromObject(object.documentMetadata); + } + if (object.derivedStructData != null) { + if (typeof object.derivedStructData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.derivedStructData: object expected"); + message.derivedStructData = $root.google.protobuf.Struct.fromObject(object.derivedStructData); + } + if (object.pageSpan != null) { + if (typeof object.pageSpan !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.pageSpan: object expected"); + message.pageSpan = $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.fromObject(object.pageSpan); + } + if (object.chunkMetadata != null) { + if (typeof object.chunkMetadata !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.chunkMetadata: object expected"); + message.chunkMetadata = $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.fromObject(object.chunkMetadata); + } return message; }; /** - * Creates a plain object from an Interval message. Also converts values to other types if specified. + * Creates a plain object from a Chunk message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static - * @param {google.cloud.discoveryengine.v1.Interval} message Interval + * @param {google.cloud.discoveryengine.v1.Chunk} message Chunk * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Interval.toObject = function toObject(message, options) { + Chunk.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.minimum != null && message.hasOwnProperty("minimum")) { - object.minimum = options.json && !isFinite(message.minimum) ? String(message.minimum) : message.minimum; - if (options.oneofs) - object.min = "minimum"; - } - if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { - object.exclusiveMinimum = options.json && !isFinite(message.exclusiveMinimum) ? String(message.exclusiveMinimum) : message.exclusiveMinimum; - if (options.oneofs) - object.min = "exclusiveMinimum"; - } - if (message.maximum != null && message.hasOwnProperty("maximum")) { - object.maximum = options.json && !isFinite(message.maximum) ? String(message.maximum) : message.maximum; - if (options.oneofs) - object.max = "maximum"; + if (options.defaults) { + object.name = ""; + object.id = ""; + object.content = ""; + object.derivedStructData = null; + object.documentMetadata = null; + object.pageSpan = null; + object.chunkMetadata = null; } - if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { - object.exclusiveMaximum = options.json && !isFinite(message.exclusiveMaximum) ? String(message.exclusiveMaximum) : message.exclusiveMaximum; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) + object.derivedStructData = $root.google.protobuf.Struct.toObject(message.derivedStructData, options); + if (message.documentMetadata != null && message.hasOwnProperty("documentMetadata")) + object.documentMetadata = $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.toObject(message.documentMetadata, options); + if (message.pageSpan != null && message.hasOwnProperty("pageSpan")) + object.pageSpan = $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.toObject(message.pageSpan, options); + if (message.chunkMetadata != null && message.hasOwnProperty("chunkMetadata")) + object.chunkMetadata = $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.toObject(message.chunkMetadata, options); + if (message.relevanceScore != null && message.hasOwnProperty("relevanceScore")) { + object.relevanceScore = options.json && !isFinite(message.relevanceScore) ? String(message.relevanceScore) : message.relevanceScore; if (options.oneofs) - object.max = "exclusiveMaximum"; + object._relevanceScore = "relevanceScore"; } return object; }; /** - * Converts this Interval to JSON. + * Converts this Chunk to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance * @returns {Object.} JSON object */ - Interval.prototype.toJSON = function toJSON() { + Chunk.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Interval + * Gets the default type url for Chunk * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Chunk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Interval"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Chunk"; }; - return Interval; - })(); + Chunk.DocumentMetadata = (function() { - v1.CustomAttribute = (function() { + /** + * Properties of a DocumentMetadata. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @interface IDocumentMetadata + * @property {string|null} [uri] DocumentMetadata uri + * @property {string|null} [title] DocumentMetadata title + * @property {google.protobuf.IStruct|null} [structData] DocumentMetadata structData + */ - /** - * Properties of a CustomAttribute. - * @memberof google.cloud.discoveryengine.v1 - * @interface ICustomAttribute - * @property {Array.|null} [text] CustomAttribute text - * @property {Array.|null} [numbers] CustomAttribute numbers - */ + /** + * Constructs a new DocumentMetadata. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @classdesc Represents a DocumentMetadata. + * @implements IDocumentMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata=} [properties] Properties to set + */ + function DocumentMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new CustomAttribute. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CustomAttribute. - * @implements ICustomAttribute - * @constructor - * @param {google.cloud.discoveryengine.v1.ICustomAttribute=} [properties] Properties to set - */ - function CustomAttribute(properties) { - this.text = []; - this.numbers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DocumentMetadata uri. + * @member {string} uri + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @instance + */ + DocumentMetadata.prototype.uri = ""; - /** - * CustomAttribute text. - * @member {Array.} text - * @memberof google.cloud.discoveryengine.v1.CustomAttribute - * @instance - */ - CustomAttribute.prototype.text = $util.emptyArray; + /** + * DocumentMetadata title. + * @member {string} title + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @instance + */ + DocumentMetadata.prototype.title = ""; - /** - * CustomAttribute numbers. - * @member {Array.} numbers - * @memberof google.cloud.discoveryengine.v1.CustomAttribute - * @instance - */ - CustomAttribute.prototype.numbers = $util.emptyArray; + /** + * DocumentMetadata structData. + * @member {google.protobuf.IStruct|null|undefined} structData + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @instance + */ + DocumentMetadata.prototype.structData = null; - /** - * Creates a new CustomAttribute instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.CustomAttribute - * @static - * @param {google.cloud.discoveryengine.v1.ICustomAttribute=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute instance - */ - CustomAttribute.create = function create(properties) { - return new CustomAttribute(properties); - }; + /** + * Creates a new DocumentMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} DocumentMetadata instance + */ + DocumentMetadata.create = function create(properties) { + return new DocumentMetadata(properties); + }; - /** - * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.CustomAttribute - * @static - * @param {google.cloud.discoveryengine.v1.ICustomAttribute} message CustomAttribute message or plain object to encode + /** + * Encodes the specified DocumentMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata} message DocumentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) + $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DocumentMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata} message DocumentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} DocumentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} DocumentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.structData != null && message.hasOwnProperty("structData")) { + var error = $root.google.protobuf.Struct.verify(message.structData); + if (error) + return "structData." + error; + } + return null; + }; + + /** + * Creates a DocumentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} DocumentMetadata + */ + DocumentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.title != null) + message.title = String(object.title); + if (object.structData != null) { + if (typeof object.structData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.structData: object expected"); + message.structData = $root.google.protobuf.Struct.fromObject(object.structData); + } + return message; + }; + + /** + * Creates a plain object from a DocumentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} message DocumentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.title = ""; + object.structData = null; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.structData != null && message.hasOwnProperty("structData")) + object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); + return object; + }; + + /** + * Converts this DocumentMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @instance + * @returns {Object.} JSON object + */ + DocumentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Chunk.DocumentMetadata"; + }; + + return DocumentMetadata; + })(); + + Chunk.PageSpan = (function() { + + /** + * Properties of a PageSpan. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @interface IPageSpan + * @property {number|null} [pageStart] PageSpan pageStart + * @property {number|null} [pageEnd] PageSpan pageEnd + */ + + /** + * Constructs a new PageSpan. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @classdesc Represents a PageSpan. + * @implements IPageSpan + * @constructor + * @param {google.cloud.discoveryengine.v1.Chunk.IPageSpan=} [properties] Properties to set + */ + function PageSpan(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PageSpan pageStart. + * @member {number} pageStart + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @instance + */ + PageSpan.prototype.pageStart = 0; + + /** + * PageSpan pageEnd. + * @member {number} pageEnd + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @instance + */ + PageSpan.prototype.pageEnd = 0; + + /** + * Creates a new PageSpan instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IPageSpan=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Chunk.PageSpan} PageSpan instance + */ + PageSpan.create = function create(properties) { + return new PageSpan(properties); + }; + + /** + * Encodes the specified PageSpan message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.PageSpan.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IPageSpan} message PageSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageSpan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageStart != null && Object.hasOwnProperty.call(message, "pageStart")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageStart); + if (message.pageEnd != null && Object.hasOwnProperty.call(message, "pageEnd")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageEnd); + return writer; + }; + + /** + * Encodes the specified PageSpan message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.PageSpan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IPageSpan} message PageSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageSpan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageSpan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Chunk.PageSpan} PageSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageSpan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Chunk.PageSpan(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pageStart = reader.int32(); + break; + } + case 2: { + message.pageEnd = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageSpan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Chunk.PageSpan} PageSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageSpan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageSpan message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageSpan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pageStart != null && message.hasOwnProperty("pageStart")) + if (!$util.isInteger(message.pageStart)) + return "pageStart: integer expected"; + if (message.pageEnd != null && message.hasOwnProperty("pageEnd")) + if (!$util.isInteger(message.pageEnd)) + return "pageEnd: integer expected"; + return null; + }; + + /** + * Creates a PageSpan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Chunk.PageSpan} PageSpan + */ + PageSpan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Chunk.PageSpan) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Chunk.PageSpan(); + if (object.pageStart != null) + message.pageStart = object.pageStart | 0; + if (object.pageEnd != null) + message.pageEnd = object.pageEnd | 0; + return message; + }; + + /** + * Creates a plain object from a PageSpan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.PageSpan} message PageSpan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageSpan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageStart = 0; + object.pageEnd = 0; + } + if (message.pageStart != null && message.hasOwnProperty("pageStart")) + object.pageStart = message.pageStart; + if (message.pageEnd != null && message.hasOwnProperty("pageEnd")) + object.pageEnd = message.pageEnd; + return object; + }; + + /** + * Converts this PageSpan to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @instance + * @returns {Object.} JSON object + */ + PageSpan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PageSpan + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PageSpan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Chunk.PageSpan"; + }; + + return PageSpan; + })(); + + Chunk.ChunkMetadata = (function() { + + /** + * Properties of a ChunkMetadata. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @interface IChunkMetadata + * @property {Array.|null} [previousChunks] ChunkMetadata previousChunks + * @property {Array.|null} [nextChunks] ChunkMetadata nextChunks + */ + + /** + * Constructs a new ChunkMetadata. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @classdesc Represents a ChunkMetadata. + * @implements IChunkMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata=} [properties] Properties to set + */ + function ChunkMetadata(properties) { + this.previousChunks = []; + this.nextChunks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChunkMetadata previousChunks. + * @member {Array.} previousChunks + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @instance + */ + ChunkMetadata.prototype.previousChunks = $util.emptyArray; + + /** + * ChunkMetadata nextChunks. + * @member {Array.} nextChunks + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @instance + */ + ChunkMetadata.prototype.nextChunks = $util.emptyArray; + + /** + * Creates a new ChunkMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} ChunkMetadata instance + */ + ChunkMetadata.create = function create(properties) { + return new ChunkMetadata(properties); + }; + + /** + * Encodes the specified ChunkMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata} message ChunkMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.previousChunks != null && message.previousChunks.length) + for (var i = 0; i < message.previousChunks.length; ++i) + $root.google.cloud.discoveryengine.v1.Chunk.encode(message.previousChunks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextChunks != null && message.nextChunks.length) + for (var i = 0; i < message.nextChunks.length; ++i) + $root.google.cloud.discoveryengine.v1.Chunk.encode(message.nextChunks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChunkMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata} message ChunkMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChunkMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} ChunkMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.previousChunks && message.previousChunks.length)) + message.previousChunks = []; + message.previousChunks.push($root.google.cloud.discoveryengine.v1.Chunk.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.nextChunks && message.nextChunks.length)) + message.nextChunks = []; + message.nextChunks.push($root.google.cloud.discoveryengine.v1.Chunk.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChunkMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} ChunkMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChunkMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChunkMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.previousChunks != null && message.hasOwnProperty("previousChunks")) { + if (!Array.isArray(message.previousChunks)) + return "previousChunks: array expected"; + for (var i = 0; i < message.previousChunks.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.verify(message.previousChunks[i]); + if (error) + return "previousChunks." + error; + } + } + if (message.nextChunks != null && message.hasOwnProperty("nextChunks")) { + if (!Array.isArray(message.nextChunks)) + return "nextChunks: array expected"; + for (var i = 0; i < message.nextChunks.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.verify(message.nextChunks[i]); + if (error) + return "nextChunks." + error; + } + } + return null; + }; + + /** + * Creates a ChunkMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} ChunkMetadata + */ + ChunkMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata(); + if (object.previousChunks) { + if (!Array.isArray(object.previousChunks)) + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.previousChunks: array expected"); + message.previousChunks = []; + for (var i = 0; i < object.previousChunks.length; ++i) { + if (typeof object.previousChunks[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.previousChunks: object expected"); + message.previousChunks[i] = $root.google.cloud.discoveryengine.v1.Chunk.fromObject(object.previousChunks[i]); + } + } + if (object.nextChunks) { + if (!Array.isArray(object.nextChunks)) + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.nextChunks: array expected"); + message.nextChunks = []; + for (var i = 0; i < object.nextChunks.length; ++i) { + if (typeof object.nextChunks[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.nextChunks: object expected"); + message.nextChunks[i] = $root.google.cloud.discoveryengine.v1.Chunk.fromObject(object.nextChunks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChunkMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} message ChunkMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChunkMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.previousChunks = []; + object.nextChunks = []; + } + if (message.previousChunks && message.previousChunks.length) { + object.previousChunks = []; + for (var j = 0; j < message.previousChunks.length; ++j) + object.previousChunks[j] = $root.google.cloud.discoveryengine.v1.Chunk.toObject(message.previousChunks[j], options); + } + if (message.nextChunks && message.nextChunks.length) { + object.nextChunks = []; + for (var j = 0; j < message.nextChunks.length; ++j) + object.nextChunks[j] = $root.google.cloud.discoveryengine.v1.Chunk.toObject(message.nextChunks[j], options); + } + return object; + }; + + /** + * Converts this ChunkMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @instance + * @returns {Object.} JSON object + */ + ChunkMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChunkMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChunkMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Chunk.ChunkMetadata"; + }; + + return ChunkMetadata; + })(); + + return Chunk; + })(); + + /** + * IndustryVertical enum. + * @name google.cloud.discoveryengine.v1.IndustryVertical + * @enum {number} + * @property {number} INDUSTRY_VERTICAL_UNSPECIFIED=0 INDUSTRY_VERTICAL_UNSPECIFIED value + * @property {number} GENERIC=1 GENERIC value + * @property {number} MEDIA=2 MEDIA value + * @property {number} HEALTHCARE_FHIR=7 HEALTHCARE_FHIR value + */ + v1.IndustryVertical = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INDUSTRY_VERTICAL_UNSPECIFIED"] = 0; + values[valuesById[1] = "GENERIC"] = 1; + values[valuesById[2] = "MEDIA"] = 2; + values[valuesById[7] = "HEALTHCARE_FHIR"] = 7; + return values; + })(); + + /** + * SolutionType enum. + * @name google.cloud.discoveryengine.v1.SolutionType + * @enum {number} + * @property {number} SOLUTION_TYPE_UNSPECIFIED=0 SOLUTION_TYPE_UNSPECIFIED value + * @property {number} SOLUTION_TYPE_RECOMMENDATION=1 SOLUTION_TYPE_RECOMMENDATION value + * @property {number} SOLUTION_TYPE_SEARCH=2 SOLUTION_TYPE_SEARCH value + * @property {number} SOLUTION_TYPE_CHAT=3 SOLUTION_TYPE_CHAT value + * @property {number} SOLUTION_TYPE_GENERATIVE_CHAT=4 SOLUTION_TYPE_GENERATIVE_CHAT value + */ + v1.SolutionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SOLUTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOLUTION_TYPE_RECOMMENDATION"] = 1; + values[valuesById[2] = "SOLUTION_TYPE_SEARCH"] = 2; + values[valuesById[3] = "SOLUTION_TYPE_CHAT"] = 3; + values[valuesById[4] = "SOLUTION_TYPE_GENERATIVE_CHAT"] = 4; + return values; + })(); + + /** + * SearchUseCase enum. + * @name google.cloud.discoveryengine.v1.SearchUseCase + * @enum {number} + * @property {number} SEARCH_USE_CASE_UNSPECIFIED=0 SEARCH_USE_CASE_UNSPECIFIED value + * @property {number} SEARCH_USE_CASE_SEARCH=1 SEARCH_USE_CASE_SEARCH value + * @property {number} SEARCH_USE_CASE_BROWSE=2 SEARCH_USE_CASE_BROWSE value + */ + v1.SearchUseCase = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_USE_CASE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SEARCH_USE_CASE_SEARCH"] = 1; + values[valuesById[2] = "SEARCH_USE_CASE_BROWSE"] = 2; + return values; + })(); + + /** + * SearchTier enum. + * @name google.cloud.discoveryengine.v1.SearchTier + * @enum {number} + * @property {number} SEARCH_TIER_UNSPECIFIED=0 SEARCH_TIER_UNSPECIFIED value + * @property {number} SEARCH_TIER_STANDARD=1 SEARCH_TIER_STANDARD value + * @property {number} SEARCH_TIER_ENTERPRISE=2 SEARCH_TIER_ENTERPRISE value + */ + v1.SearchTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SEARCH_TIER_STANDARD"] = 1; + values[valuesById[2] = "SEARCH_TIER_ENTERPRISE"] = 2; + return values; + })(); + + /** + * SearchAddOn enum. + * @name google.cloud.discoveryengine.v1.SearchAddOn + * @enum {number} + * @property {number} SEARCH_ADD_ON_UNSPECIFIED=0 SEARCH_ADD_ON_UNSPECIFIED value + * @property {number} SEARCH_ADD_ON_LLM=1 SEARCH_ADD_ON_LLM value + */ + v1.SearchAddOn = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_ADD_ON_UNSPECIFIED"] = 0; + values[valuesById[1] = "SEARCH_ADD_ON_LLM"] = 1; + return values; + })(); + + v1.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.cloud.discoveryengine.v1 + * @interface IInterval + * @property {number|null} [minimum] Interval minimum + * @property {number|null} [exclusiveMinimum] Interval exclusiveMinimum + * @property {number|null} [maximum] Interval maximum + * @property {number|null} [exclusiveMaximum] Interval exclusiveMaximum + */ + + /** + * Constructs a new Interval. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.cloud.discoveryengine.v1.IInterval=} [properties] Properties to set + */ + function Interval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Interval minimum. + * @member {number|null|undefined} minimum + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Interval.prototype.minimum = null; + + /** + * Interval exclusiveMinimum. + * @member {number|null|undefined} exclusiveMinimum + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Interval.prototype.exclusiveMinimum = null; + + /** + * Interval maximum. + * @member {number|null|undefined} maximum + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Interval.prototype.maximum = null; + + /** + * Interval exclusiveMaximum. + * @member {number|null|undefined} exclusiveMaximum + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Interval.prototype.exclusiveMaximum = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Interval min. + * @member {"minimum"|"exclusiveMinimum"|undefined} min + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Object.defineProperty(Interval.prototype, "min", { + get: $util.oneOfGetter($oneOfFields = ["minimum", "exclusiveMinimum"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Interval max. + * @member {"maximum"|"exclusiveMaximum"|undefined} max + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Object.defineProperty(Interval.prototype, "max", { + get: $util.oneOfGetter($oneOfFields = ["maximum", "exclusiveMaximum"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {google.cloud.discoveryengine.v1.IInterval=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {google.cloud.discoveryengine.v1.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimum); + if (message.exclusiveMinimum != null && Object.hasOwnProperty.call(message, "exclusiveMinimum")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.exclusiveMinimum); + if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.maximum); + if (message.exclusiveMaximum != null && Object.hasOwnProperty.call(message, "exclusiveMaximum")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.exclusiveMaximum); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {google.cloud.discoveryengine.v1.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minimum = reader.double(); + break; + } + case 2: { + message.exclusiveMinimum = reader.double(); + break; + } + case 3: { + message.maximum = reader.double(); + break; + } + case 4: { + message.exclusiveMaximum = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.minimum != null && message.hasOwnProperty("minimum")) { + properties.min = 1; + if (typeof message.minimum !== "number") + return "minimum: number expected"; + } + if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { + if (properties.min === 1) + return "min: multiple values"; + properties.min = 1; + if (typeof message.exclusiveMinimum !== "number") + return "exclusiveMinimum: number expected"; + } + if (message.maximum != null && message.hasOwnProperty("maximum")) { + properties.max = 1; + if (typeof message.maximum !== "number") + return "maximum: number expected"; + } + if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { + if (properties.max === 1) + return "max: multiple values"; + properties.max = 1; + if (typeof message.exclusiveMaximum !== "number") + return "exclusiveMaximum: number expected"; + } + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Interval) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Interval(); + if (object.minimum != null) + message.minimum = Number(object.minimum); + if (object.exclusiveMinimum != null) + message.exclusiveMinimum = Number(object.exclusiveMinimum); + if (object.maximum != null) + message.maximum = Number(object.maximum); + if (object.exclusiveMaximum != null) + message.exclusiveMaximum = Number(object.exclusiveMaximum); + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {google.cloud.discoveryengine.v1.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.minimum != null && message.hasOwnProperty("minimum")) { + object.minimum = options.json && !isFinite(message.minimum) ? String(message.minimum) : message.minimum; + if (options.oneofs) + object.min = "minimum"; + } + if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { + object.exclusiveMinimum = options.json && !isFinite(message.exclusiveMinimum) ? String(message.exclusiveMinimum) : message.exclusiveMinimum; + if (options.oneofs) + object.min = "exclusiveMinimum"; + } + if (message.maximum != null && message.hasOwnProperty("maximum")) { + object.maximum = options.json && !isFinite(message.maximum) ? String(message.maximum) : message.maximum; + if (options.oneofs) + object.max = "maximum"; + } + if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { + object.exclusiveMaximum = options.json && !isFinite(message.exclusiveMaximum) ? String(message.exclusiveMaximum) : message.exclusiveMaximum; + if (options.oneofs) + object.max = "exclusiveMaximum"; + } + return object; + }; + + /** + * Converts this Interval to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Interval"; + }; + + return Interval; + })(); + + v1.CustomAttribute = (function() { + + /** + * Properties of a CustomAttribute. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICustomAttribute + * @property {Array.|null} [text] CustomAttribute text + * @property {Array.|null} [numbers] CustomAttribute numbers + */ + + /** + * Constructs a new CustomAttribute. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CustomAttribute. + * @implements ICustomAttribute + * @constructor + * @param {google.cloud.discoveryengine.v1.ICustomAttribute=} [properties] Properties to set + */ + function CustomAttribute(properties) { + this.text = []; + this.numbers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomAttribute text. + * @member {Array.} text + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @instance + */ + CustomAttribute.prototype.text = $util.emptyArray; + + /** + * CustomAttribute numbers. + * @member {Array.} numbers + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @instance + */ + CustomAttribute.prototype.numbers = $util.emptyArray; + + /** + * Creates a new CustomAttribute instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {google.cloud.discoveryengine.v1.ICustomAttribute=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute instance + */ + CustomAttribute.create = function create(properties) { + return new CustomAttribute(properties); + }; + + /** + * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {google.cloud.discoveryengine.v1.ICustomAttribute} message CustomAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.text.length) + for (var i = 0; i < message.text.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); + if (message.numbers != null && message.numbers.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.numbers.length; ++i) + writer.double(message.numbers[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {google.cloud.discoveryengine.v1.ICustomAttribute} message CustomAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomAttribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CustomAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.text && message.text.length)) + message.text = []; + message.text.push(reader.string()); + break; + } + case 2: { + if (!(message.numbers && message.numbers.length)) + message.numbers = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.numbers.push(reader.double()); + } else + message.numbers.push(reader.double()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomAttribute message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + if (!Array.isArray(message.text)) + return "text: array expected"; + for (var i = 0; i < message.text.length; ++i) + if (!$util.isString(message.text[i])) + return "text: string[] expected"; + } + if (message.numbers != null && message.hasOwnProperty("numbers")) { + if (!Array.isArray(message.numbers)) + return "numbers: array expected"; + for (var i = 0; i < message.numbers.length; ++i) + if (typeof message.numbers[i] !== "number") + return "numbers: number[] expected"; + } + return null; + }; + + /** + * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + */ + CustomAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CustomAttribute) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CustomAttribute(); + if (object.text) { + if (!Array.isArray(object.text)) + throw TypeError(".google.cloud.discoveryengine.v1.CustomAttribute.text: array expected"); + message.text = []; + for (var i = 0; i < object.text.length; ++i) + message.text[i] = String(object.text[i]); + } + if (object.numbers) { + if (!Array.isArray(object.numbers)) + throw TypeError(".google.cloud.discoveryengine.v1.CustomAttribute.numbers: array expected"); + message.numbers = []; + for (var i = 0; i < object.numbers.length; ++i) + message.numbers[i] = Number(object.numbers[i]); + } + return message; + }; + + /** + * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {google.cloud.discoveryengine.v1.CustomAttribute} message CustomAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.text = []; + object.numbers = []; + } + if (message.text && message.text.length) { + object.text = []; + for (var j = 0; j < message.text.length; ++j) + object.text[j] = message.text[j]; + } + if (message.numbers && message.numbers.length) { + object.numbers = []; + for (var j = 0; j < message.numbers.length; ++j) + object.numbers[j] = options.json && !isFinite(message.numbers[j]) ? String(message.numbers[j]) : message.numbers[j]; + } + return object; + }; + + /** + * Converts this CustomAttribute to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @instance + * @returns {Object.} JSON object + */ + CustomAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomAttribute + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CustomAttribute"; + }; + + return CustomAttribute; + })(); + + v1.UserInfo = (function() { + + /** + * Properties of a UserInfo. + * @memberof google.cloud.discoveryengine.v1 + * @interface IUserInfo + * @property {string|null} [userId] UserInfo userId + * @property {string|null} [userAgent] UserInfo userAgent + */ + + /** + * Constructs a new UserInfo. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a UserInfo. + * @implements IUserInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.IUserInfo=} [properties] Properties to set + */ + function UserInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserInfo userId. + * @member {string} userId + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @instance + */ + UserInfo.prototype.userId = ""; + + /** + * UserInfo userAgent. + * @member {string} userAgent + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @instance + */ + UserInfo.prototype.userAgent = ""; + + /** + * Creates a new UserInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {google.cloud.discoveryengine.v1.IUserInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo instance + */ + UserInfo.create = function create(properties) { + return new UserInfo(properties); + }; + + /** + * Encodes the specified UserInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {google.cloud.discoveryengine.v1.IUserInfo} message UserInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId); + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userAgent); + return writer; + }; + + /** + * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {google.cloud.discoveryengine.v1.IUserInfo} message UserInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.UserInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.string(); + break; + } + case 2: { + message.userAgent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (!$util.isString(message.userAgent)) + return "userAgent: string expected"; + return null; + }; + + /** + * Creates a UserInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + */ + UserInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.UserInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1.UserInfo(); + if (object.userId != null) + message.userId = String(object.userId); + if (object.userAgent != null) + message.userAgent = String(object.userAgent); + return message; + }; + + /** + * Creates a plain object from a UserInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {google.cloud.discoveryengine.v1.UserInfo} message UserInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userId = ""; + object.userAgent = ""; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = message.userAgent; + return object; + }; + + /** + * Converts this UserInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @instance + * @returns {Object.} JSON object + */ + UserInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.UserInfo"; + }; + + return UserInfo; + })(); + + v1.SuggestionDenyListEntry = (function() { + + /** + * Properties of a SuggestionDenyListEntry. + * @memberof google.cloud.discoveryengine.v1 + * @interface ISuggestionDenyListEntry + * @property {string|null} [blockPhrase] SuggestionDenyListEntry blockPhrase + * @property {google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator|null} [matchOperator] SuggestionDenyListEntry matchOperator + */ + + /** + * Constructs a new SuggestionDenyListEntry. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a SuggestionDenyListEntry. + * @implements ISuggestionDenyListEntry + * @constructor + * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry=} [properties] Properties to set + */ + function SuggestionDenyListEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SuggestionDenyListEntry blockPhrase. + * @member {string} blockPhrase + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @instance + */ + SuggestionDenyListEntry.prototype.blockPhrase = ""; + + /** + * SuggestionDenyListEntry matchOperator. + * @member {google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator} matchOperator + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @instance + */ + SuggestionDenyListEntry.prototype.matchOperator = 0; + + /** + * Creates a new SuggestionDenyListEntry instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry instance + */ + SuggestionDenyListEntry.create = function create(properties) { + return new SuggestionDenyListEntry(properties); + }; + + /** + * Encodes the specified SuggestionDenyListEntry message. Does not implicitly {@link google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry} message SuggestionDenyListEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionDenyListEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockPhrase != null && Object.hasOwnProperty.call(message, "blockPhrase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.blockPhrase); + if (message.matchOperator != null && Object.hasOwnProperty.call(message, "matchOperator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matchOperator); + return writer; + }; + + /** + * Encodes the specified SuggestionDenyListEntry message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry} message SuggestionDenyListEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionDenyListEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SuggestionDenyListEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionDenyListEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.blockPhrase = reader.string(); + break; + } + case 2: { + message.matchOperator = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SuggestionDenyListEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionDenyListEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SuggestionDenyListEntry message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionDenyListEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockPhrase != null && message.hasOwnProperty("blockPhrase")) + if (!$util.isString(message.blockPhrase)) + return "blockPhrase: string expected"; + if (message.matchOperator != null && message.hasOwnProperty("matchOperator")) + switch (message.matchOperator) { + default: + return "matchOperator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SuggestionDenyListEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + */ + SuggestionDenyListEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry(); + if (object.blockPhrase != null) + message.blockPhrase = String(object.blockPhrase); + switch (object.matchOperator) { + default: + if (typeof object.matchOperator === "number") { + message.matchOperator = object.matchOperator; + break; + } + break; + case "MATCH_OPERATOR_UNSPECIFIED": + case 0: + message.matchOperator = 0; + break; + case "EXACT_MATCH": + case 1: + message.matchOperator = 1; + break; + case "CONTAINS": + case 2: + message.matchOperator = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SuggestionDenyListEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} message SuggestionDenyListEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionDenyListEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.blockPhrase = ""; + object.matchOperator = options.enums === String ? "MATCH_OPERATOR_UNSPECIFIED" : 0; + } + if (message.blockPhrase != null && message.hasOwnProperty("blockPhrase")) + object.blockPhrase = message.blockPhrase; + if (message.matchOperator != null && message.hasOwnProperty("matchOperator")) + object.matchOperator = options.enums === String ? $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator[message.matchOperator] === undefined ? message.matchOperator : $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator[message.matchOperator] : message.matchOperator; + return object; + }; + + /** + * Converts this SuggestionDenyListEntry to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @instance + * @returns {Object.} JSON object + */ + SuggestionDenyListEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SuggestionDenyListEntry + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuggestionDenyListEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SuggestionDenyListEntry"; + }; + + /** + * MatchOperator enum. + * @name google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator + * @enum {number} + * @property {number} MATCH_OPERATOR_UNSPECIFIED=0 MATCH_OPERATOR_UNSPECIFIED value + * @property {number} EXACT_MATCH=1 EXACT_MATCH value + * @property {number} CONTAINS=2 CONTAINS value + */ + SuggestionDenyListEntry.MatchOperator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT_MATCH"] = 1; + values[valuesById[2] = "CONTAINS"] = 2; + return values; + })(); + + return SuggestionDenyListEntry; + })(); + + v1.CompletionSuggestion = (function() { + + /** + * Properties of a CompletionSuggestion. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICompletionSuggestion + * @property {number|null} [globalScore] CompletionSuggestion globalScore + * @property {number|Long|null} [frequency] CompletionSuggestion frequency + * @property {string|null} [suggestion] CompletionSuggestion suggestion + * @property {string|null} [languageCode] CompletionSuggestion languageCode + * @property {string|null} [groupId] CompletionSuggestion groupId + * @property {number|null} [groupScore] CompletionSuggestion groupScore + * @property {Array.|null} [alternativePhrases] CompletionSuggestion alternativePhrases + */ + + /** + * Constructs a new CompletionSuggestion. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompletionSuggestion. + * @implements ICompletionSuggestion + * @constructor + * @param {google.cloud.discoveryengine.v1.ICompletionSuggestion=} [properties] Properties to set + */ + function CompletionSuggestion(properties) { + this.alternativePhrases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompletionSuggestion globalScore. + * @member {number|null|undefined} globalScore + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.globalScore = null; + + /** + * CompletionSuggestion frequency. + * @member {number|Long|null|undefined} frequency + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.frequency = null; + + /** + * CompletionSuggestion suggestion. + * @member {string} suggestion + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.suggestion = ""; + + /** + * CompletionSuggestion languageCode. + * @member {string} languageCode + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.languageCode = ""; + + /** + * CompletionSuggestion groupId. + * @member {string} groupId + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.groupId = ""; + + /** + * CompletionSuggestion groupScore. + * @member {number} groupScore + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.groupScore = 0; + + /** + * CompletionSuggestion alternativePhrases. + * @member {Array.} alternativePhrases + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.alternativePhrases = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompletionSuggestion rankingInfo. + * @member {"globalScore"|"frequency"|undefined} rankingInfo + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + Object.defineProperty(CompletionSuggestion.prototype, "rankingInfo", { + get: $util.oneOfGetter($oneOfFields = ["globalScore", "frequency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompletionSuggestion instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {google.cloud.discoveryengine.v1.ICompletionSuggestion=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompletionSuggestion} CompletionSuggestion instance + */ + CompletionSuggestion.create = function create(properties) { + return new CompletionSuggestion(properties); + }; + + /** + * Encodes the specified CompletionSuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionSuggestion.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {google.cloud.discoveryengine.v1.ICompletionSuggestion} message CompletionSuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompletionSuggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); + if (message.globalScore != null && Object.hasOwnProperty.call(message, "globalScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.globalScore); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.frequency); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupId); + if (message.groupScore != null && Object.hasOwnProperty.call(message, "groupScore")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.groupScore); + if (message.alternativePhrases != null && message.alternativePhrases.length) + for (var i = 0; i < message.alternativePhrases.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.alternativePhrases[i]); + return writer; + }; + + /** + * Encodes the specified CompletionSuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionSuggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {google.cloud.discoveryengine.v1.ICompletionSuggestion} message CompletionSuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompletionSuggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompletionSuggestion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CompletionSuggestion} CompletionSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompletionSuggestion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompletionSuggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.globalScore = reader.double(); + break; + } + case 3: { + message.frequency = reader.int64(); + break; + } + case 1: { + message.suggestion = reader.string(); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + case 5: { + message.groupId = reader.string(); + break; + } + case 6: { + message.groupScore = reader.double(); + break; + } + case 7: { + if (!(message.alternativePhrases && message.alternativePhrases.length)) + message.alternativePhrases = []; + message.alternativePhrases.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompletionSuggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CompletionSuggestion} CompletionSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompletionSuggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompletionSuggestion message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompletionSuggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.globalScore != null && message.hasOwnProperty("globalScore")) { + properties.rankingInfo = 1; + if (typeof message.globalScore !== "number") + return "globalScore: number expected"; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + if (properties.rankingInfo === 1) + return "rankingInfo: multiple values"; + properties.rankingInfo = 1; + if (!$util.isInteger(message.frequency) && !(message.frequency && $util.isInteger(message.frequency.low) && $util.isInteger(message.frequency.high))) + return "frequency: integer|Long expected"; + } + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + if (!$util.isString(message.suggestion)) + return "suggestion: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.groupId != null && message.hasOwnProperty("groupId")) + if (!$util.isString(message.groupId)) + return "groupId: string expected"; + if (message.groupScore != null && message.hasOwnProperty("groupScore")) + if (typeof message.groupScore !== "number") + return "groupScore: number expected"; + if (message.alternativePhrases != null && message.hasOwnProperty("alternativePhrases")) { + if (!Array.isArray(message.alternativePhrases)) + return "alternativePhrases: array expected"; + for (var i = 0; i < message.alternativePhrases.length; ++i) + if (!$util.isString(message.alternativePhrases[i])) + return "alternativePhrases: string[] expected"; + } + return null; + }; + + /** + * Creates a CompletionSuggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CompletionSuggestion} CompletionSuggestion + */ + CompletionSuggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompletionSuggestion) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompletionSuggestion(); + if (object.globalScore != null) + message.globalScore = Number(object.globalScore); + if (object.frequency != null) + if ($util.Long) + (message.frequency = $util.Long.fromValue(object.frequency)).unsigned = false; + else if (typeof object.frequency === "string") + message.frequency = parseInt(object.frequency, 10); + else if (typeof object.frequency === "number") + message.frequency = object.frequency; + else if (typeof object.frequency === "object") + message.frequency = new $util.LongBits(object.frequency.low >>> 0, object.frequency.high >>> 0).toNumber(); + if (object.suggestion != null) + message.suggestion = String(object.suggestion); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.groupId != null) + message.groupId = String(object.groupId); + if (object.groupScore != null) + message.groupScore = Number(object.groupScore); + if (object.alternativePhrases) { + if (!Array.isArray(object.alternativePhrases)) + throw TypeError(".google.cloud.discoveryengine.v1.CompletionSuggestion.alternativePhrases: array expected"); + message.alternativePhrases = []; + for (var i = 0; i < object.alternativePhrases.length; ++i) + message.alternativePhrases[i] = String(object.alternativePhrases[i]); + } + return message; + }; + + /** + * Creates a plain object from a CompletionSuggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompletionSuggestion} message CompletionSuggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompletionSuggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.alternativePhrases = []; + if (options.defaults) { + object.suggestion = ""; + object.languageCode = ""; + object.groupId = ""; + object.groupScore = 0; + } + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + object.suggestion = message.suggestion; + if (message.globalScore != null && message.hasOwnProperty("globalScore")) { + object.globalScore = options.json && !isFinite(message.globalScore) ? String(message.globalScore) : message.globalScore; + if (options.oneofs) + object.rankingInfo = "globalScore"; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + if (typeof message.frequency === "number") + object.frequency = options.longs === String ? String(message.frequency) : message.frequency; + else + object.frequency = options.longs === String ? $util.Long.prototype.toString.call(message.frequency) : options.longs === Number ? new $util.LongBits(message.frequency.low >>> 0, message.frequency.high >>> 0).toNumber() : message.frequency; + if (options.oneofs) + object.rankingInfo = "frequency"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.groupId != null && message.hasOwnProperty("groupId")) + object.groupId = message.groupId; + if (message.groupScore != null && message.hasOwnProperty("groupScore")) + object.groupScore = options.json && !isFinite(message.groupScore) ? String(message.groupScore) : message.groupScore; + if (message.alternativePhrases && message.alternativePhrases.length) { + object.alternativePhrases = []; + for (var j = 0; j < message.alternativePhrases.length; ++j) + object.alternativePhrases[j] = message.alternativePhrases[j]; + } + return object; + }; + + /** + * Converts this CompletionSuggestion to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + * @returns {Object.} JSON object + */ + CompletionSuggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompletionSuggestion + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompletionSuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompletionSuggestion"; + }; + + return CompletionSuggestion; + })(); + + v1.CompletionService = (function() { + + /** + * Constructs a new CompletionService service. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompletionService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function CompletionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CompletionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CompletionService; + + /** + * Creates new CompletionService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {CompletionService} RPC service. Useful where requests and/or responses are streamed. + */ + CompletionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|completeQuery}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef CompleteQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse} [response] CompleteQueryResponse + */ + + /** + * Calls CompleteQuery. + * @function completeQuery + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} request CompleteQueryRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.CompleteQueryCallback} callback Node-style callback called with the error, if any, and CompleteQueryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.completeQuery = function completeQuery(request, callback) { + return this.rpcCall(completeQuery, $root.google.cloud.discoveryengine.v1.CompleteQueryRequest, $root.google.cloud.discoveryengine.v1.CompleteQueryResponse, request, callback); + }, "name", { value: "CompleteQuery" }); + + /** + * Calls CompleteQuery. + * @function completeQuery + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} request CompleteQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|importSuggestionDenyListEntries}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef ImportSuggestionDenyListEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportSuggestionDenyListEntries. + * @function importSuggestionDenyListEntries + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} request ImportSuggestionDenyListEntriesRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntriesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.importSuggestionDenyListEntries = function importSuggestionDenyListEntries(request, callback) { + return this.rpcCall(importSuggestionDenyListEntries, $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportSuggestionDenyListEntries" }); + + /** + * Calls ImportSuggestionDenyListEntries. + * @function importSuggestionDenyListEntries + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} request ImportSuggestionDenyListEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|purgeSuggestionDenyListEntries}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef PurgeSuggestionDenyListEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PurgeSuggestionDenyListEntries. + * @function purgeSuggestionDenyListEntries + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} request PurgeSuggestionDenyListEntriesRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntriesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.purgeSuggestionDenyListEntries = function purgeSuggestionDenyListEntries(request, callback) { + return this.rpcCall(purgeSuggestionDenyListEntries, $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PurgeSuggestionDenyListEntries" }); + + /** + * Calls PurgeSuggestionDenyListEntries. + * @function purgeSuggestionDenyListEntries + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} request PurgeSuggestionDenyListEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|importCompletionSuggestions}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef ImportCompletionSuggestionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportCompletionSuggestions. + * @function importCompletionSuggestions + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest} request ImportCompletionSuggestionsRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestionsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.importCompletionSuggestions = function importCompletionSuggestions(request, callback) { + return this.rpcCall(importCompletionSuggestions, $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportCompletionSuggestions" }); + + /** + * Calls ImportCompletionSuggestions. + * @function importCompletionSuggestions + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest} request ImportCompletionSuggestionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|purgeCompletionSuggestions}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef PurgeCompletionSuggestionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PurgeCompletionSuggestions. + * @function purgeCompletionSuggestions + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest} request PurgeCompletionSuggestionsRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestionsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.purgeCompletionSuggestions = function purgeCompletionSuggestions(request, callback) { + return this.rpcCall(purgeCompletionSuggestions, $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PurgeCompletionSuggestions" }); + + /** + * Calls PurgeCompletionSuggestions. + * @function purgeCompletionSuggestions + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest} request PurgeCompletionSuggestionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CompletionService; + })(); + + v1.CompleteQueryRequest = (function() { + + /** + * Properties of a CompleteQueryRequest. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICompleteQueryRequest + * @property {string|null} [dataStore] CompleteQueryRequest dataStore + * @property {string|null} [query] CompleteQueryRequest query + * @property {string|null} [queryModel] CompleteQueryRequest queryModel + * @property {string|null} [userPseudoId] CompleteQueryRequest userPseudoId + * @property {boolean|null} [includeTailSuggestions] CompleteQueryRequest includeTailSuggestions + */ + + /** + * Constructs a new CompleteQueryRequest. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompleteQueryRequest. + * @implements ICompleteQueryRequest + * @constructor + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest=} [properties] Properties to set + */ + function CompleteQueryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompleteQueryRequest dataStore. + * @member {string} dataStore + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.dataStore = ""; + + /** + * CompleteQueryRequest query. + * @member {string} query + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.query = ""; + + /** + * CompleteQueryRequest queryModel. + * @member {string} queryModel + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.queryModel = ""; + + /** + * CompleteQueryRequest userPseudoId. + * @member {string} userPseudoId + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.userPseudoId = ""; + + /** + * CompleteQueryRequest includeTailSuggestions. + * @member {boolean} includeTailSuggestions + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.includeTailSuggestions = false; + + /** + * Creates a new CompleteQueryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest instance + */ + CompleteQueryRequest.create = function create(properties) { + return new CompleteQueryRequest(properties); + }; + + /** + * Encodes the specified CompleteQueryRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteQueryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStore); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.queryModel != null && Object.hasOwnProperty.call(message, "queryModel")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.queryModel); + if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.userPseudoId); + if (message.includeTailSuggestions != null && Object.hasOwnProperty.call(message, "includeTailSuggestions")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.includeTailSuggestions); + return writer; + }; + + /** + * Encodes the specified CompleteQueryRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompleteQueryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteQueryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompleteQueryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataStore = reader.string(); + break; + } + case 2: { + message.query = reader.string(); + break; + } + case 3: { + message.queryModel = reader.string(); + break; + } + case 4: { + message.userPseudoId = reader.string(); + break; + } + case 5: { + message.includeTailSuggestions = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompleteQueryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteQueryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompleteQueryRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompleteQueryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + if (!$util.isString(message.dataStore)) + return "dataStore: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.queryModel != null && message.hasOwnProperty("queryModel")) + if (!$util.isString(message.queryModel)) + return "queryModel: string expected"; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + if (!$util.isString(message.userPseudoId)) + return "userPseudoId: string expected"; + if (message.includeTailSuggestions != null && message.hasOwnProperty("includeTailSuggestions")) + if (typeof message.includeTailSuggestions !== "boolean") + return "includeTailSuggestions: boolean expected"; + return null; + }; + + /** + * Creates a CompleteQueryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + */ + CompleteQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryRequest(); + if (object.dataStore != null) + message.dataStore = String(object.dataStore); + if (object.query != null) + message.query = String(object.query); + if (object.queryModel != null) + message.queryModel = String(object.queryModel); + if (object.userPseudoId != null) + message.userPseudoId = String(object.userPseudoId); + if (object.includeTailSuggestions != null) + message.includeTailSuggestions = Boolean(object.includeTailSuggestions); + return message; + }; + + /** + * Creates a plain object from a CompleteQueryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryRequest} message CompleteQueryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompleteQueryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataStore = ""; + object.query = ""; + object.queryModel = ""; + object.userPseudoId = ""; + object.includeTailSuggestions = false; + } + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + object.dataStore = message.dataStore; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.queryModel != null && message.hasOwnProperty("queryModel")) + object.queryModel = message.queryModel; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + object.userPseudoId = message.userPseudoId; + if (message.includeTailSuggestions != null && message.hasOwnProperty("includeTailSuggestions")) + object.includeTailSuggestions = message.includeTailSuggestions; + return object; + }; + + /** + * Converts this CompleteQueryRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + * @returns {Object.} JSON object + */ + CompleteQueryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompleteQueryRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompleteQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryRequest"; + }; + + return CompleteQueryRequest; + })(); + + v1.CompleteQueryResponse = (function() { + + /** + * Properties of a CompleteQueryResponse. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICompleteQueryResponse + * @property {Array.|null} [querySuggestions] CompleteQueryResponse querySuggestions + * @property {boolean|null} [tailMatchTriggered] CompleteQueryResponse tailMatchTriggered + */ + + /** + * Constructs a new CompleteQueryResponse. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompleteQueryResponse. + * @implements ICompleteQueryResponse + * @constructor + * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse=} [properties] Properties to set + */ + function CompleteQueryResponse(properties) { + this.querySuggestions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompleteQueryResponse querySuggestions. + * @member {Array.} querySuggestions + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @instance + */ + CompleteQueryResponse.prototype.querySuggestions = $util.emptyArray; + + /** + * CompleteQueryResponse tailMatchTriggered. + * @member {boolean} tailMatchTriggered + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @instance + */ + CompleteQueryResponse.prototype.tailMatchTriggered = false; + + /** + * Creates a new CompleteQueryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse instance + */ + CompleteQueryResponse.create = function create(properties) { + return new CompleteQueryResponse(properties); + }; + + /** + * Encodes the specified CompleteQueryResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteQueryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.querySuggestions != null && message.querySuggestions.length) + for (var i = 0; i < message.querySuggestions.length; ++i) + $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.encode(message.querySuggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tailMatchTriggered != null && Object.hasOwnProperty.call(message, "tailMatchTriggered")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.tailMatchTriggered); + return writer; + }; + + /** + * Encodes the specified CompleteQueryResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompleteQueryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteQueryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.querySuggestions && message.querySuggestions.length)) + message.querySuggestions = []; + message.querySuggestions.push($root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.tailMatchTriggered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompleteQueryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteQueryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompleteQueryResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompleteQueryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.querySuggestions != null && message.hasOwnProperty("querySuggestions")) { + if (!Array.isArray(message.querySuggestions)) + return "querySuggestions: array expected"; + for (var i = 0; i < message.querySuggestions.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify(message.querySuggestions[i]); + if (error) + return "querySuggestions." + error; + } + } + if (message.tailMatchTriggered != null && message.hasOwnProperty("tailMatchTriggered")) + if (typeof message.tailMatchTriggered !== "boolean") + return "tailMatchTriggered: boolean expected"; + return null; + }; + + /** + * Creates a CompleteQueryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse + */ + CompleteQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse(); + if (object.querySuggestions) { + if (!Array.isArray(object.querySuggestions)) + throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.querySuggestions: array expected"); + message.querySuggestions = []; + for (var i = 0; i < object.querySuggestions.length; ++i) { + if (typeof object.querySuggestions[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.querySuggestions: object expected"); + message.querySuggestions[i] = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.fromObject(object.querySuggestions[i]); + } + } + if (object.tailMatchTriggered != null) + message.tailMatchTriggered = Boolean(object.tailMatchTriggered); + return message; + }; + + /** + * Creates a plain object from a CompleteQueryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse} message CompleteQueryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompleteQueryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.querySuggestions = []; + if (options.defaults) + object.tailMatchTriggered = false; + if (message.querySuggestions && message.querySuggestions.length) { + object.querySuggestions = []; + for (var j = 0; j < message.querySuggestions.length; ++j) + object.querySuggestions[j] = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.toObject(message.querySuggestions[j], options); + } + if (message.tailMatchTriggered != null && message.hasOwnProperty("tailMatchTriggered")) + object.tailMatchTriggered = message.tailMatchTriggered; + return object; + }; + + /** + * Converts this CompleteQueryResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @instance + * @returns {Object.} JSON object + */ + CompleteQueryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompleteQueryResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompleteQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryResponse"; + }; + + CompleteQueryResponse.QuerySuggestion = (function() { + + /** + * Properties of a QuerySuggestion. + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @interface IQuerySuggestion + * @property {string|null} [suggestion] QuerySuggestion suggestion + * @property {Array.|null} [completableFieldPaths] QuerySuggestion completableFieldPaths + */ + + /** + * Constructs a new QuerySuggestion. + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @classdesc Represents a QuerySuggestion. + * @implements IQuerySuggestion + * @constructor + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set + */ + function QuerySuggestion(properties) { + this.completableFieldPaths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySuggestion suggestion. + * @member {string} suggestion + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @instance + */ + QuerySuggestion.prototype.suggestion = ""; + + /** + * QuerySuggestion completableFieldPaths. + * @member {Array.} completableFieldPaths + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @instance + */ + QuerySuggestion.prototype.completableFieldPaths = $util.emptyArray; + + /** + * Creates a new QuerySuggestion instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion instance + */ + QuerySuggestion.create = function create(properties) { + return new QuerySuggestion(properties); + }; + + /** + * Encodes the specified QuerySuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySuggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); + if (message.completableFieldPaths != null && message.completableFieldPaths.length) + for (var i = 0; i < message.completableFieldPaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.completableFieldPaths[i]); + return writer; + }; + + /** + * Encodes the specified QuerySuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySuggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySuggestion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySuggestion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.suggestion = reader.string(); + break; + } + case 2: { + if (!(message.completableFieldPaths && message.completableFieldPaths.length)) + message.completableFieldPaths = []; + message.completableFieldPaths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySuggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySuggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySuggestion message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySuggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + if (!$util.isString(message.suggestion)) + return "suggestion: string expected"; + if (message.completableFieldPaths != null && message.hasOwnProperty("completableFieldPaths")) { + if (!Array.isArray(message.completableFieldPaths)) + return "completableFieldPaths: array expected"; + for (var i = 0; i < message.completableFieldPaths.length; ++i) + if (!$util.isString(message.completableFieldPaths[i])) + return "completableFieldPaths: string[] expected"; + } + return null; + }; + + /** + * Creates a QuerySuggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + */ + QuerySuggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion(); + if (object.suggestion != null) + message.suggestion = String(object.suggestion); + if (object.completableFieldPaths) { + if (!Array.isArray(object.completableFieldPaths)) + throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.completableFieldPaths: array expected"); + message.completableFieldPaths = []; + for (var i = 0; i < object.completableFieldPaths.length; ++i) + message.completableFieldPaths[i] = String(object.completableFieldPaths[i]); + } + return message; + }; + + /** + * Creates a plain object from a QuerySuggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} message QuerySuggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySuggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.completableFieldPaths = []; + if (options.defaults) + object.suggestion = ""; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + object.suggestion = message.suggestion; + if (message.completableFieldPaths && message.completableFieldPaths.length) { + object.completableFieldPaths = []; + for (var j = 0; j < message.completableFieldPaths.length; ++j) + object.completableFieldPaths[j] = message.completableFieldPaths[j]; + } + return object; + }; + + /** + * Converts this QuerySuggestion to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @instance + * @returns {Object.} JSON object + */ + QuerySuggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuerySuggestion + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuerySuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion"; + }; + + return QuerySuggestion; + })(); + + return CompleteQueryResponse; + })(); + + v1.GcsSource = (function() { + + /** + * Properties of a GcsSource. + * @memberof google.cloud.discoveryengine.v1 + * @interface IGcsSource + * @property {Array.|null} [inputUris] GcsSource inputUris + * @property {string|null} [dataSchema] GcsSource dataSchema + */ + + /** + * Constructs a new GcsSource. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a GcsSource. + * @implements IGcsSource + * @constructor + * @param {google.cloud.discoveryengine.v1.IGcsSource=} [properties] Properties to set + */ + function GcsSource(properties) { + this.inputUris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsSource inputUris. + * @member {Array.} inputUris + * @memberof google.cloud.discoveryengine.v1.GcsSource + * @instance + */ + GcsSource.prototype.inputUris = $util.emptyArray; + + /** + * GcsSource dataSchema. + * @member {string} dataSchema + * @memberof google.cloud.discoveryengine.v1.GcsSource + * @instance + */ + GcsSource.prototype.dataSchema = ""; + + /** + * Creates a new GcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.GcsSource + * @static + * @param {google.cloud.discoveryengine.v1.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource instance + */ + GcsSource.create = function create(properties) { + return new GcsSource(properties); + }; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.GcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.GcsSource + * @static + * @param {google.cloud.discoveryengine.v1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomAttribute.encode = function encode(message, writer) { + GcsSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.text.length) - for (var i = 0; i < message.text.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); - if (message.numbers != null && message.numbers.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.numbers.length; ++i) - writer.double(message.numbers[i]); - writer.ldelim(); - } + if (message.inputUris != null && message.inputUris.length) + for (var i = 0; i < message.inputUris.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); + if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSchema); return writer; }; /** - * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.GcsSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static - * @param {google.cloud.discoveryengine.v1.ICustomAttribute} message CustomAttribute message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomAttribute.encodeDelimited = function encodeDelimited(message, writer) { + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomAttribute message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomAttribute.decode = function decode(reader, length) { + GcsSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CustomAttribute(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.GcsSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.text && message.text.length)) - message.text = []; - message.text.push(reader.string()); + if (!(message.inputUris && message.inputUris.length)) + message.inputUris = []; + message.inputUris.push(reader.string()); break; } case 2: { - if (!(message.numbers && message.numbers.length)) - message.numbers = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.numbers.push(reader.double()); - } else - message.numbers.push(reader.double()); + message.dataSchema = reader.string(); break; } default: @@ -5523,156 +8843,148 @@ }; /** - * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomAttribute.decodeDelimited = function decodeDelimited(reader) { + GcsSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomAttribute message. + * Verifies a GcsSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomAttribute.verify = function verify(message) { + GcsSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - if (!Array.isArray(message.text)) - return "text: array expected"; - for (var i = 0; i < message.text.length; ++i) - if (!$util.isString(message.text[i])) - return "text: string[] expected"; - } - if (message.numbers != null && message.hasOwnProperty("numbers")) { - if (!Array.isArray(message.numbers)) - return "numbers: array expected"; - for (var i = 0; i < message.numbers.length; ++i) - if (typeof message.numbers[i] !== "number") - return "numbers: number[] expected"; + if (message.inputUris != null && message.hasOwnProperty("inputUris")) { + if (!Array.isArray(message.inputUris)) + return "inputUris: array expected"; + for (var i = 0; i < message.inputUris.length; ++i) + if (!$util.isString(message.inputUris[i])) + return "inputUris: string[] expected"; } + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + if (!$util.isString(message.dataSchema)) + return "dataSchema: string expected"; return null; }; /** - * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource */ - CustomAttribute.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CustomAttribute) + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.GcsSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.CustomAttribute(); - if (object.text) { - if (!Array.isArray(object.text)) - throw TypeError(".google.cloud.discoveryengine.v1.CustomAttribute.text: array expected"); - message.text = []; - for (var i = 0; i < object.text.length; ++i) - message.text[i] = String(object.text[i]); - } - if (object.numbers) { - if (!Array.isArray(object.numbers)) - throw TypeError(".google.cloud.discoveryengine.v1.CustomAttribute.numbers: array expected"); - message.numbers = []; - for (var i = 0; i < object.numbers.length; ++i) - message.numbers[i] = Number(object.numbers[i]); + var message = new $root.google.cloud.discoveryengine.v1.GcsSource(); + if (object.inputUris) { + if (!Array.isArray(object.inputUris)) + throw TypeError(".google.cloud.discoveryengine.v1.GcsSource.inputUris: array expected"); + message.inputUris = []; + for (var i = 0; i < object.inputUris.length; ++i) + message.inputUris[i] = String(object.inputUris[i]); } + if (object.dataSchema != null) + message.dataSchema = String(object.dataSchema); return message; }; /** - * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static - * @param {google.cloud.discoveryengine.v1.CustomAttribute} message CustomAttribute + * @param {google.cloud.discoveryengine.v1.GcsSource} message GcsSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomAttribute.toObject = function toObject(message, options) { + GcsSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.text = []; - object.numbers = []; - } - if (message.text && message.text.length) { - object.text = []; - for (var j = 0; j < message.text.length; ++j) - object.text[j] = message.text[j]; - } - if (message.numbers && message.numbers.length) { - object.numbers = []; - for (var j = 0; j < message.numbers.length; ++j) - object.numbers[j] = options.json && !isFinite(message.numbers[j]) ? String(message.numbers[j]) : message.numbers[j]; + if (options.arrays || options.defaults) + object.inputUris = []; + if (options.defaults) + object.dataSchema = ""; + if (message.inputUris && message.inputUris.length) { + object.inputUris = []; + for (var j = 0; j < message.inputUris.length; ++j) + object.inputUris[j] = message.inputUris[j]; } + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + object.dataSchema = message.dataSchema; return object; }; /** - * Converts this CustomAttribute to JSON. + * Converts this GcsSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @instance * @returns {Object.} JSON object */ - CustomAttribute.prototype.toJSON = function toJSON() { + GcsSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomAttribute + * Gets the default type url for GcsSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CustomAttribute"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.GcsSource"; }; - return CustomAttribute; + return GcsSource; })(); - v1.UserInfo = (function() { + v1.BigQuerySource = (function() { /** - * Properties of a UserInfo. + * Properties of a BigQuerySource. * @memberof google.cloud.discoveryengine.v1 - * @interface IUserInfo - * @property {string|null} [userId] UserInfo userId - * @property {string|null} [userAgent] UserInfo userAgent + * @interface IBigQuerySource + * @property {google.type.IDate|null} [partitionDate] BigQuerySource partitionDate + * @property {string|null} [projectId] BigQuerySource projectId + * @property {string|null} [datasetId] BigQuerySource datasetId + * @property {string|null} [tableId] BigQuerySource tableId + * @property {string|null} [gcsStagingDir] BigQuerySource gcsStagingDir + * @property {string|null} [dataSchema] BigQuerySource dataSchema */ /** - * Constructs a new UserInfo. + * Constructs a new BigQuerySource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a UserInfo. - * @implements IUserInfo + * @classdesc Represents a BigQuerySource. + * @implements IBigQuerySource * @constructor - * @param {google.cloud.discoveryengine.v1.IUserInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IBigQuerySource=} [properties] Properties to set */ - function UserInfo(properties) { + function BigQuerySource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5680,89 +8992,159 @@ } /** - * UserInfo userId. - * @member {string} userId - * @memberof google.cloud.discoveryengine.v1.UserInfo + * BigQuerySource partitionDate. + * @member {google.type.IDate|null|undefined} partitionDate + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @instance */ - UserInfo.prototype.userId = ""; + BigQuerySource.prototype.partitionDate = null; /** - * UserInfo userAgent. - * @member {string} userAgent - * @memberof google.cloud.discoveryengine.v1.UserInfo + * BigQuerySource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @instance */ - UserInfo.prototype.userAgent = ""; + BigQuerySource.prototype.projectId = ""; /** - * Creates a new UserInfo instance using the specified properties. + * BigQuerySource datasetId. + * @member {string} datasetId + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + BigQuerySource.prototype.datasetId = ""; + + /** + * BigQuerySource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + BigQuerySource.prototype.tableId = ""; + + /** + * BigQuerySource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + BigQuerySource.prototype.gcsStagingDir = ""; + + /** + * BigQuerySource dataSchema. + * @member {string} dataSchema + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + BigQuerySource.prototype.dataSchema = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BigQuerySource partition. + * @member {"partitionDate"|undefined} partition + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + Object.defineProperty(BigQuerySource.prototype, "partition", { + get: $util.oneOfGetter($oneOfFields = ["partitionDate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BigQuerySource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1.IUserInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo instance + * @param {google.cloud.discoveryengine.v1.IBigQuerySource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource instance */ - UserInfo.create = function create(properties) { - return new UserInfo(properties); + BigQuerySource.create = function create(properties) { + return new BigQuerySource(properties); }; /** - * Encodes the specified UserInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserInfo.verify|verify} messages. + * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigQuerySource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1.IUserInfo} message UserInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigQuerySource} message BigQuerySource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserInfo.encode = function encode(message, writer) { + BigQuerySource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId); - if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userAgent); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); + if (message.partitionDate != null && Object.hasOwnProperty.call(message, "partitionDate")) + $root.google.type.Date.encode(message.partitionDate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataSchema); return writer; }; /** - * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserInfo.verify|verify} messages. + * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigQuerySource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1.IUserInfo} message UserInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigQuerySource} message BigQuerySource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserInfo.encodeDelimited = function encodeDelimited(message, writer) { + BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserInfo message from the specified reader or buffer. + * Decodes a BigQuerySource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserInfo.decode = function decode(reader, length) { + BigQuerySource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.UserInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigQuerySource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: { + message.partitionDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } case 1: { - message.userId = reader.string(); + message.projectId = reader.string(); break; } case 2: { - message.userAgent = reader.string(); + message.datasetId = reader.string(); + break; + } + case 3: { + message.tableId = reader.string(); + break; + } + case 4: { + message.gcsStagingDir = reader.string(); + break; + } + case 6: { + message.dataSchema = reader.string(); break; } default: @@ -5774,132 +9156,178 @@ }; /** - * Decodes a UserInfo message from the specified reader or buffer, length delimited. + * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserInfo.decodeDelimited = function decodeDelimited(reader) { + BigQuerySource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserInfo message. + * Verifies a BigQuerySource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserInfo.verify = function verify(message) { + BigQuerySource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userId != null && message.hasOwnProperty("userId")) - if (!$util.isString(message.userId)) - return "userId: string expected"; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - if (!$util.isString(message.userAgent)) - return "userAgent: string expected"; + var properties = {}; + if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { + properties.partition = 1; + { + var error = $root.google.type.Date.verify(message.partitionDate); + if (error) + return "partitionDate." + error; + } + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + if (!$util.isString(message.dataSchema)) + return "dataSchema: string expected"; return null; }; /** - * Creates a UserInfo message from a plain object. Also converts values to their respective internal types. + * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource */ - UserInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.UserInfo) + BigQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigQuerySource) return object; - var message = new $root.google.cloud.discoveryengine.v1.UserInfo(); - if (object.userId != null) - message.userId = String(object.userId); - if (object.userAgent != null) - message.userAgent = String(object.userAgent); + var message = new $root.google.cloud.discoveryengine.v1.BigQuerySource(); + if (object.partitionDate != null) { + if (typeof object.partitionDate !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigQuerySource.partitionDate: object expected"); + message.partitionDate = $root.google.type.Date.fromObject(object.partitionDate); + } + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); + if (object.dataSchema != null) + message.dataSchema = String(object.dataSchema); return message; }; /** - * Creates a plain object from a UserInfo message. Also converts values to other types if specified. + * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1.UserInfo} message UserInfo + * @param {google.cloud.discoveryengine.v1.BigQuerySource} message BigQuerySource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserInfo.toObject = function toObject(message, options) { + BigQuerySource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.userId = ""; - object.userAgent = ""; + object.projectId = ""; + object.datasetId = ""; + object.tableId = ""; + object.gcsStagingDir = ""; + object.dataSchema = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; + if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { + object.partitionDate = $root.google.type.Date.toObject(message.partitionDate, options); + if (options.oneofs) + object.partition = "partitionDate"; } - if (message.userId != null && message.hasOwnProperty("userId")) - object.userId = message.userId; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - object.userAgent = message.userAgent; + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + object.dataSchema = message.dataSchema; return object; }; /** - * Converts this UserInfo to JSON. + * Converts this BigQuerySource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @instance * @returns {Object.} JSON object */ - UserInfo.prototype.toJSON = function toJSON() { + BigQuerySource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserInfo + * Gets the default type url for BigQuerySource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.UserInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigQuerySource"; }; - return UserInfo; + return BigQuerySource; })(); - v1.SuggestionDenyListEntry = (function() { + v1.SpannerSource = (function() { /** - * Properties of a SuggestionDenyListEntry. + * Properties of a SpannerSource. * @memberof google.cloud.discoveryengine.v1 - * @interface ISuggestionDenyListEntry - * @property {string|null} [blockPhrase] SuggestionDenyListEntry blockPhrase - * @property {google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator|null} [matchOperator] SuggestionDenyListEntry matchOperator + * @interface ISpannerSource + * @property {string|null} [projectId] SpannerSource projectId + * @property {string|null} [instanceId] SpannerSource instanceId + * @property {string|null} [databaseId] SpannerSource databaseId + * @property {string|null} [tableId] SpannerSource tableId + * @property {boolean|null} [enableDataBoost] SpannerSource enableDataBoost */ /** - * Constructs a new SuggestionDenyListEntry. + * Constructs a new SpannerSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a SuggestionDenyListEntry. - * @implements ISuggestionDenyListEntry + * @classdesc Represents a SpannerSource. + * @implements ISpannerSource * @constructor - * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ISpannerSource=} [properties] Properties to set */ - function SuggestionDenyListEntry(properties) { + function SpannerSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5907,89 +9335,131 @@ } /** - * SuggestionDenyListEntry blockPhrase. - * @member {string} blockPhrase - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * SpannerSource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @instance */ - SuggestionDenyListEntry.prototype.blockPhrase = ""; + SpannerSource.prototype.projectId = ""; /** - * SuggestionDenyListEntry matchOperator. - * @member {google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator} matchOperator - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * SpannerSource instanceId. + * @member {string} instanceId + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @instance */ - SuggestionDenyListEntry.prototype.matchOperator = 0; + SpannerSource.prototype.instanceId = ""; /** - * Creates a new SuggestionDenyListEntry instance using the specified properties. + * SpannerSource databaseId. + * @member {string} databaseId + * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @instance + */ + SpannerSource.prototype.databaseId = ""; + + /** + * SpannerSource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @instance + */ + SpannerSource.prototype.tableId = ""; + + /** + * SpannerSource enableDataBoost. + * @member {boolean} enableDataBoost + * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @instance + */ + SpannerSource.prototype.enableDataBoost = false; + + /** + * Creates a new SpannerSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static - * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry instance + * @param {google.cloud.discoveryengine.v1.ISpannerSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource instance */ - SuggestionDenyListEntry.create = function create(properties) { - return new SuggestionDenyListEntry(properties); + SpannerSource.create = function create(properties) { + return new SpannerSource(properties); }; /** - * Encodes the specified SuggestionDenyListEntry message. Does not implicitly {@link google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify|verify} messages. + * Encodes the specified SpannerSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.SpannerSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static - * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry} message SuggestionDenyListEntry message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ISpannerSource} message SpannerSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionDenyListEntry.encode = function encode(message, writer) { + SpannerSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.blockPhrase != null && Object.hasOwnProperty.call(message, "blockPhrase")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.blockPhrase); - if (message.matchOperator != null && Object.hasOwnProperty.call(message, "matchOperator")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matchOperator); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); + if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); + if (message.enableDataBoost != null && Object.hasOwnProperty.call(message, "enableDataBoost")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableDataBoost); return writer; }; /** - * Encodes the specified SuggestionDenyListEntry message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify|verify} messages. + * Encodes the specified SpannerSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SpannerSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static - * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry} message SuggestionDenyListEntry message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ISpannerSource} message SpannerSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionDenyListEntry.encodeDelimited = function encodeDelimited(message, writer) { + SpannerSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestionDenyListEntry message from the specified reader or buffer. + * Decodes a SpannerSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionDenyListEntry.decode = function decode(reader, length) { + SpannerSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SpannerSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.blockPhrase = reader.string(); + message.projectId = reader.string(); break; } case 2: { - message.matchOperator = reader.int32(); + message.instanceId = reader.string(); + break; + } + case 3: { + message.databaseId = reader.string(); + break; + } + case 4: { + message.tableId = reader.string(); + break; + } + case 5: { + message.enableDataBoost = reader.bool(); break; } default: @@ -6001,309 +9471,157 @@ }; /** - * Decodes a SuggestionDenyListEntry message from the specified reader or buffer, length delimited. + * Decodes a SpannerSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionDenyListEntry.decodeDelimited = function decodeDelimited(reader) { + SpannerSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestionDenyListEntry message. + * Verifies a SpannerSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestionDenyListEntry.verify = function verify(message) { + SpannerSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.blockPhrase != null && message.hasOwnProperty("blockPhrase")) - if (!$util.isString(message.blockPhrase)) - return "blockPhrase: string expected"; - if (message.matchOperator != null && message.hasOwnProperty("matchOperator")) - switch (message.matchOperator) { - default: - return "matchOperator: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + if (!$util.isString(message.databaseId)) + return "databaseId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.enableDataBoost != null && message.hasOwnProperty("enableDataBoost")) + if (typeof message.enableDataBoost !== "boolean") + return "enableDataBoost: boolean expected"; return null; }; /** - * Creates a SuggestionDenyListEntry message from a plain object. Also converts values to their respective internal types. + * Creates a SpannerSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource */ - SuggestionDenyListEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry) + SpannerSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SpannerSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry(); - if (object.blockPhrase != null) - message.blockPhrase = String(object.blockPhrase); - switch (object.matchOperator) { - default: - if (typeof object.matchOperator === "number") { - message.matchOperator = object.matchOperator; - break; - } - break; - case "MATCH_OPERATOR_UNSPECIFIED": - case 0: - message.matchOperator = 0; - break; - case "EXACT_MATCH": - case 1: - message.matchOperator = 1; - break; - case "CONTAINS": - case 2: - message.matchOperator = 2; - break; - } + var message = new $root.google.cloud.discoveryengine.v1.SpannerSource(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.enableDataBoost != null) + message.enableDataBoost = Boolean(object.enableDataBoost); return message; }; /** - * Creates a plain object from a SuggestionDenyListEntry message. Also converts values to other types if specified. + * Creates a plain object from a SpannerSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static - * @param {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} message SuggestionDenyListEntry + * @param {google.cloud.discoveryengine.v1.SpannerSource} message SpannerSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestionDenyListEntry.toObject = function toObject(message, options) { + SpannerSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.blockPhrase = ""; - object.matchOperator = options.enums === String ? "MATCH_OPERATOR_UNSPECIFIED" : 0; + object.projectId = ""; + object.instanceId = ""; + object.databaseId = ""; + object.tableId = ""; + object.enableDataBoost = false; } - if (message.blockPhrase != null && message.hasOwnProperty("blockPhrase")) - object.blockPhrase = message.blockPhrase; - if (message.matchOperator != null && message.hasOwnProperty("matchOperator")) - object.matchOperator = options.enums === String ? $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator[message.matchOperator] === undefined ? message.matchOperator : $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator[message.matchOperator] : message.matchOperator; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.enableDataBoost != null && message.hasOwnProperty("enableDataBoost")) + object.enableDataBoost = message.enableDataBoost; return object; }; /** - * Converts this SuggestionDenyListEntry to JSON. + * Converts this SpannerSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @instance * @returns {Object.} JSON object */ - SuggestionDenyListEntry.prototype.toJSON = function toJSON() { + SpannerSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SuggestionDenyListEntry + * Gets the default type url for SpannerSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SuggestionDenyListEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SpannerSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SuggestionDenyListEntry"; - }; - - /** - * MatchOperator enum. - * @name google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator - * @enum {number} - * @property {number} MATCH_OPERATOR_UNSPECIFIED=0 MATCH_OPERATOR_UNSPECIFIED value - * @property {number} EXACT_MATCH=1 EXACT_MATCH value - * @property {number} CONTAINS=2 CONTAINS value - */ - SuggestionDenyListEntry.MatchOperator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_OPERATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT_MATCH"] = 1; - values[valuesById[2] = "CONTAINS"] = 2; - return values; - })(); - - return SuggestionDenyListEntry; - })(); - - v1.CompletionService = (function() { - - /** - * Constructs a new CompletionService service. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CompletionService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function CompletionService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (CompletionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CompletionService; - - /** - * Creates new CompletionService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {CompletionService} RPC service. Useful where requests and/or responses are streamed. - */ - CompletionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SpannerSource"; }; - /** - * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|completeQuery}. - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @typedef CompleteQueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse} [response] CompleteQueryResponse - */ - - /** - * Calls CompleteQuery. - * @function completeQuery - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} request CompleteQueryRequest message or plain object - * @param {google.cloud.discoveryengine.v1.CompletionService.CompleteQueryCallback} callback Node-style callback called with the error, if any, and CompleteQueryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CompletionService.prototype.completeQuery = function completeQuery(request, callback) { - return this.rpcCall(completeQuery, $root.google.cloud.discoveryengine.v1.CompleteQueryRequest, $root.google.cloud.discoveryengine.v1.CompleteQueryResponse, request, callback); - }, "name", { value: "CompleteQuery" }); - - /** - * Calls CompleteQuery. - * @function completeQuery - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} request CompleteQueryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|importSuggestionDenyListEntries}. - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @typedef ImportSuggestionDenyListEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportSuggestionDenyListEntries. - * @function importSuggestionDenyListEntries - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} request ImportSuggestionDenyListEntriesRequest message or plain object - * @param {google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntriesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CompletionService.prototype.importSuggestionDenyListEntries = function importSuggestionDenyListEntries(request, callback) { - return this.rpcCall(importSuggestionDenyListEntries, $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportSuggestionDenyListEntries" }); - - /** - * Calls ImportSuggestionDenyListEntries. - * @function importSuggestionDenyListEntries - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} request ImportSuggestionDenyListEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|purgeSuggestionDenyListEntries}. - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @typedef PurgeSuggestionDenyListEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls PurgeSuggestionDenyListEntries. - * @function purgeSuggestionDenyListEntries - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} request PurgeSuggestionDenyListEntriesRequest message or plain object - * @param {google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntriesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CompletionService.prototype.purgeSuggestionDenyListEntries = function purgeSuggestionDenyListEntries(request, callback) { - return this.rpcCall(purgeSuggestionDenyListEntries, $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "PurgeSuggestionDenyListEntries" }); - - /** - * Calls PurgeSuggestionDenyListEntries. - * @function purgeSuggestionDenyListEntries - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} request PurgeSuggestionDenyListEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return CompletionService; + return SpannerSource; })(); - v1.CompleteQueryRequest = (function() { + v1.BigtableOptions = (function() { /** - * Properties of a CompleteQueryRequest. + * Properties of a BigtableOptions. * @memberof google.cloud.discoveryengine.v1 - * @interface ICompleteQueryRequest - * @property {string|null} [dataStore] CompleteQueryRequest dataStore - * @property {string|null} [query] CompleteQueryRequest query - * @property {string|null} [queryModel] CompleteQueryRequest queryModel - * @property {string|null} [userPseudoId] CompleteQueryRequest userPseudoId - * @property {boolean|null} [includeTailSuggestions] CompleteQueryRequest includeTailSuggestions + * @interface IBigtableOptions + * @property {string|null} [keyFieldName] BigtableOptions keyFieldName + * @property {Object.|null} [families] BigtableOptions families */ /** - * Constructs a new CompleteQueryRequest. + * Constructs a new BigtableOptions. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CompleteQueryRequest. - * @implements ICompleteQueryRequest + * @classdesc Represents a BigtableOptions. + * @implements IBigtableOptions * @constructor - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IBigtableOptions=} [properties] Properties to set */ - function CompleteQueryRequest(properties) { + function BigtableOptions(properties) { + this.families = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6311,131 +9629,111 @@ } /** - * CompleteQueryRequest dataStore. - * @member {string} dataStore - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest - * @instance - */ - CompleteQueryRequest.prototype.dataStore = ""; - - /** - * CompleteQueryRequest query. - * @member {string} query - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest - * @instance - */ - CompleteQueryRequest.prototype.query = ""; - - /** - * CompleteQueryRequest queryModel. - * @member {string} queryModel - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest - * @instance - */ - CompleteQueryRequest.prototype.queryModel = ""; - - /** - * CompleteQueryRequest userPseudoId. - * @member {string} userPseudoId - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * BigtableOptions keyFieldName. + * @member {string} keyFieldName + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @instance */ - CompleteQueryRequest.prototype.userPseudoId = ""; + BigtableOptions.prototype.keyFieldName = ""; /** - * CompleteQueryRequest includeTailSuggestions. - * @member {boolean} includeTailSuggestions - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * BigtableOptions families. + * @member {Object.} families + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @instance */ - CompleteQueryRequest.prototype.includeTailSuggestions = false; + BigtableOptions.prototype.families = $util.emptyObject; /** - * Creates a new CompleteQueryRequest instance using the specified properties. + * Creates a new BigtableOptions instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest instance + * @param {google.cloud.discoveryengine.v1.IBigtableOptions=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions instance */ - CompleteQueryRequest.create = function create(properties) { - return new CompleteQueryRequest(properties); + BigtableOptions.create = function create(properties) { + return new BigtableOptions(properties); }; /** - * Encodes the specified CompleteQueryRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.verify|verify} messages. + * Encodes the specified BigtableOptions message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigtableOptions} message BigtableOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompleteQueryRequest.encode = function encode(message, writer) { + BigtableOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStore); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.queryModel != null && Object.hasOwnProperty.call(message, "queryModel")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.queryModel); - if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.userPseudoId); - if (message.includeTailSuggestions != null && Object.hasOwnProperty.call(message, "includeTailSuggestions")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.includeTailSuggestions); + if (message.keyFieldName != null && Object.hasOwnProperty.call(message, "keyFieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyFieldName); + if (message.families != null && Object.hasOwnProperty.call(message, "families")) + for (var keys = Object.keys(message.families), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.encode(message.families[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified CompleteQueryRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.verify|verify} messages. + * Encodes the specified BigtableOptions message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigtableOptions} message BigtableOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompleteQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + BigtableOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompleteQueryRequest message from the specified reader or buffer. + * Decodes a BigtableOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompleteQueryRequest.decode = function decode(reader, length) { + BigtableOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompleteQueryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableOptions(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataStore = reader.string(); + message.keyFieldName = reader.string(); break; } case 2: { - message.query = reader.string(); - break; - } - case 3: { - message.queryModel = reader.string(); - break; - } - case 4: { - message.userPseudoId = reader.string(); - break; - } - case 5: { - message.includeTailSuggestions = reader.bool(); + if (message.families === $util.emptyObject) + message.families = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.families[key] = value; break; } default: @@ -6447,402 +9745,518 @@ }; /** - * Decodes a CompleteQueryRequest message from the specified reader or buffer, length delimited. + * Decodes a BigtableOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompleteQueryRequest.decodeDelimited = function decodeDelimited(reader) { + BigtableOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompleteQueryRequest message. + * Verifies a BigtableOptions message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompleteQueryRequest.verify = function verify(message) { + BigtableOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - if (!$util.isString(message.dataStore)) - return "dataStore: string expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.queryModel != null && message.hasOwnProperty("queryModel")) - if (!$util.isString(message.queryModel)) - return "queryModel: string expected"; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - if (!$util.isString(message.userPseudoId)) - return "userPseudoId: string expected"; - if (message.includeTailSuggestions != null && message.hasOwnProperty("includeTailSuggestions")) - if (typeof message.includeTailSuggestions !== "boolean") - return "includeTailSuggestions: boolean expected"; + if (message.keyFieldName != null && message.hasOwnProperty("keyFieldName")) + if (!$util.isString(message.keyFieldName)) + return "keyFieldName: string expected"; + if (message.families != null && message.hasOwnProperty("families")) { + if (!$util.isObject(message.families)) + return "families: object expected"; + var key = Object.keys(message.families); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify(message.families[key[i]]); + if (error) + return "families." + error; + } + } return null; }; /** - * Creates a CompleteQueryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BigtableOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions */ - CompleteQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryRequest) + BigtableOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions) return object; - var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryRequest(); - if (object.dataStore != null) - message.dataStore = String(object.dataStore); - if (object.query != null) - message.query = String(object.query); - if (object.queryModel != null) - message.queryModel = String(object.queryModel); - if (object.userPseudoId != null) - message.userPseudoId = String(object.userPseudoId); - if (object.includeTailSuggestions != null) - message.includeTailSuggestions = Boolean(object.includeTailSuggestions); + var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions(); + if (object.keyFieldName != null) + message.keyFieldName = String(object.keyFieldName); + if (object.families) { + if (typeof object.families !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.families: object expected"); + message.families = {}; + for (var keys = Object.keys(object.families), i = 0; i < keys.length; ++i) { + if (typeof object.families[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.families: object expected"); + message.families[keys[i]] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.fromObject(object.families[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a CompleteQueryRequest message. Also converts values to other types if specified. + * Creates a plain object from a BigtableOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryRequest} message CompleteQueryRequest + * @param {google.cloud.discoveryengine.v1.BigtableOptions} message BigtableOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompleteQueryRequest.toObject = function toObject(message, options) { + BigtableOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.dataStore = ""; - object.query = ""; - object.queryModel = ""; - object.userPseudoId = ""; - object.includeTailSuggestions = false; + if (options.objects || options.defaults) + object.families = {}; + if (options.defaults) + object.keyFieldName = ""; + if (message.keyFieldName != null && message.hasOwnProperty("keyFieldName")) + object.keyFieldName = message.keyFieldName; + var keys2; + if (message.families && (keys2 = Object.keys(message.families)).length) { + object.families = {}; + for (var j = 0; j < keys2.length; ++j) + object.families[keys2[j]] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.toObject(message.families[keys2[j]], options); } - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - object.dataStore = message.dataStore; - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.queryModel != null && message.hasOwnProperty("queryModel")) - object.queryModel = message.queryModel; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - object.userPseudoId = message.userPseudoId; - if (message.includeTailSuggestions != null && message.hasOwnProperty("includeTailSuggestions")) - object.includeTailSuggestions = message.includeTailSuggestions; return object; }; /** - * Converts this CompleteQueryRequest to JSON. + * Converts this BigtableOptions to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @instance * @returns {Object.} JSON object */ - CompleteQueryRequest.prototype.toJSON = function toJSON() { + BigtableOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CompleteQueryRequest + * Gets the default type url for BigtableOptions * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CompleteQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigtableOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions"; }; - return CompleteQueryRequest; - })(); + BigtableOptions.BigtableColumnFamily = (function() { - v1.CompleteQueryResponse = (function() { + /** + * Properties of a BigtableColumnFamily. + * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @interface IBigtableColumnFamily + * @property {string|null} [fieldName] BigtableColumnFamily fieldName + * @property {google.cloud.discoveryengine.v1.BigtableOptions.Encoding|null} [encoding] BigtableColumnFamily encoding + * @property {google.cloud.discoveryengine.v1.BigtableOptions.Type|null} [type] BigtableColumnFamily type + * @property {Array.|null} [columns] BigtableColumnFamily columns + */ - /** - * Properties of a CompleteQueryResponse. - * @memberof google.cloud.discoveryengine.v1 - * @interface ICompleteQueryResponse - * @property {Array.|null} [querySuggestions] CompleteQueryResponse querySuggestions - * @property {boolean|null} [tailMatchTriggered] CompleteQueryResponse tailMatchTriggered - */ + /** + * Constructs a new BigtableColumnFamily. + * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @classdesc Represents a BigtableColumnFamily. + * @implements IBigtableColumnFamily + * @constructor + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily=} [properties] Properties to set + */ + function BigtableColumnFamily(properties) { + this.columns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new CompleteQueryResponse. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CompleteQueryResponse. - * @implements ICompleteQueryResponse - * @constructor - * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse=} [properties] Properties to set - */ - function CompleteQueryResponse(properties) { - this.querySuggestions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * BigtableColumnFamily fieldName. + * @member {string} fieldName + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + */ + BigtableColumnFamily.prototype.fieldName = ""; - /** - * CompleteQueryResponse querySuggestions. - * @member {Array.} querySuggestions - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @instance - */ - CompleteQueryResponse.prototype.querySuggestions = $util.emptyArray; + /** + * BigtableColumnFamily encoding. + * @member {google.cloud.discoveryengine.v1.BigtableOptions.Encoding} encoding + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + */ + BigtableColumnFamily.prototype.encoding = 0; - /** - * CompleteQueryResponse tailMatchTriggered. - * @member {boolean} tailMatchTriggered - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @instance - */ - CompleteQueryResponse.prototype.tailMatchTriggered = false; + /** + * BigtableColumnFamily type. + * @member {google.cloud.discoveryengine.v1.BigtableOptions.Type} type + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + */ + BigtableColumnFamily.prototype.type = 0; - /** - * Creates a new CompleteQueryResponse instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse instance - */ - CompleteQueryResponse.create = function create(properties) { - return new CompleteQueryResponse(properties); - }; + /** + * BigtableColumnFamily columns. + * @member {Array.} columns + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + */ + BigtableColumnFamily.prototype.columns = $util.emptyArray; - /** - * Encodes the specified CompleteQueryResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteQueryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.querySuggestions != null && message.querySuggestions.length) - for (var i = 0; i < message.querySuggestions.length; ++i) - $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.encode(message.querySuggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tailMatchTriggered != null && Object.hasOwnProperty.call(message, "tailMatchTriggered")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.tailMatchTriggered); - return writer; - }; + /** + * Creates a new BigtableColumnFamily instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily instance + */ + BigtableColumnFamily.create = function create(properties) { + return new BigtableColumnFamily(properties); + }; - /** - * Encodes the specified CompleteQueryResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified BigtableColumnFamily message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily} message BigtableColumnFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigtableColumnFamily.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encoding); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.encode(message.columns[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Decodes a CompleteQueryResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteQueryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.querySuggestions && message.querySuggestions.length)) - message.querySuggestions = []; - message.querySuggestions.push($root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.decode(reader, reader.uint32())); + /** + * Encodes the specified BigtableColumnFamily message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily} message BigtableColumnFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigtableColumnFamily.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigtableColumnFamily message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigtableColumnFamily.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.encoding = reader.int32(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigtableColumnFamily message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigtableColumnFamily.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigtableColumnFamily message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigtableColumnFamily.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + return null; + }; + + /** + * Creates a BigtableColumnFamily message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily + */ + BigtableColumnFamily.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily) + return object; + var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + switch (object.encoding) { + default: + if (typeof object.encoding === "number") { + message.encoding = object.encoding; break; } - case 2: { - message.tailMatchTriggered = reader.bool(); + break; + case "ENCODING_UNSPECIFIED": + case 0: + message.encoding = 0; + break; + case "TEXT": + case 1: + message.encoding = 1; + break; + case "BINARY": + case 2: + message.encoding = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; break; } - default: - reader.skipType(tag & 7); + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STRING": + case 1: + message.type = 1; + break; + case "NUMBER": + case 2: + message.type = 2; + break; + case "INTEGER": + case 3: + message.type = 3; + break; + case "VAR_INTEGER": + case 4: + message.type = 4; + break; + case "BIG_NUMERIC": + case 5: + message.type = 5; + break; + case "BOOLEAN": + case 6: + message.type = 6; + break; + case "JSON": + case 7: + message.type = 7; break; } - } - return message; - }; - - /** - * Decodes a CompleteQueryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteQueryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompleteQueryResponse message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompleteQueryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.querySuggestions != null && message.hasOwnProperty("querySuggestions")) { - if (!Array.isArray(message.querySuggestions)) - return "querySuggestions: array expected"; - for (var i = 0; i < message.querySuggestions.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify(message.querySuggestions[i]); - if (error) - return "querySuggestions." + error; + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.columns: object expected"); + message.columns[i] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.fromObject(object.columns[i]); + } } - } - if (message.tailMatchTriggered != null && message.hasOwnProperty("tailMatchTriggered")) - if (typeof message.tailMatchTriggered !== "boolean") - return "tailMatchTriggered: boolean expected"; - return null; - }; + return message; + }; - /** - * Creates a CompleteQueryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse - */ - CompleteQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryResponse) - return object; - var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse(); - if (object.querySuggestions) { - if (!Array.isArray(object.querySuggestions)) - throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.querySuggestions: array expected"); - message.querySuggestions = []; - for (var i = 0; i < object.querySuggestions.length; ++i) { - if (typeof object.querySuggestions[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.querySuggestions: object expected"); - message.querySuggestions[i] = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.fromObject(object.querySuggestions[i]); + /** + * Creates a plain object from a BigtableColumnFamily message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} message BigtableColumnFamily + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigtableColumnFamily.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.defaults) { + object.fieldName = ""; + object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; } - } - if (object.tailMatchTriggered != null) - message.tailMatchTriggered = Boolean(object.tailMatchTriggered); - return message; - }; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] : message.encoding; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] === undefined ? message.type : $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] : message.type; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.toObject(message.columns[j], options); + } + return object; + }; - /** - * Creates a plain object from a CompleteQueryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse} message CompleteQueryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompleteQueryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.querySuggestions = []; - if (options.defaults) - object.tailMatchTriggered = false; - if (message.querySuggestions && message.querySuggestions.length) { - object.querySuggestions = []; - for (var j = 0; j < message.querySuggestions.length; ++j) - object.querySuggestions[j] = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.toObject(message.querySuggestions[j], options); - } - if (message.tailMatchTriggered != null && message.hasOwnProperty("tailMatchTriggered")) - object.tailMatchTriggered = message.tailMatchTriggered; - return object; - }; + /** + * Converts this BigtableColumnFamily to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + * @returns {Object.} JSON object + */ + BigtableColumnFamily.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this CompleteQueryResponse to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @instance - * @returns {Object.} JSON object - */ - CompleteQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for BigtableColumnFamily + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigtableColumnFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily"; + }; - /** - * Gets the default type url for CompleteQueryResponse - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompleteQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryResponse"; - }; + return BigtableColumnFamily; + })(); - CompleteQueryResponse.QuerySuggestion = (function() { + BigtableOptions.BigtableColumn = (function() { /** - * Properties of a QuerySuggestion. - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @interface IQuerySuggestion - * @property {string|null} [suggestion] QuerySuggestion suggestion - * @property {Array.|null} [completableFieldPaths] QuerySuggestion completableFieldPaths + * Properties of a BigtableColumn. + * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @interface IBigtableColumn + * @property {Uint8Array|null} [qualifier] BigtableColumn qualifier + * @property {string|null} [fieldName] BigtableColumn fieldName + * @property {google.cloud.discoveryengine.v1.BigtableOptions.Encoding|null} [encoding] BigtableColumn encoding + * @property {google.cloud.discoveryengine.v1.BigtableOptions.Type|null} [type] BigtableColumn type */ /** - * Constructs a new QuerySuggestion. - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @classdesc Represents a QuerySuggestion. - * @implements IQuerySuggestion + * Constructs a new BigtableColumn. + * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @classdesc Represents a BigtableColumn. + * @implements IBigtableColumn * @constructor - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn=} [properties] Properties to set */ - function QuerySuggestion(properties) { - this.completableFieldPaths = []; + function BigtableColumn(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6850,92 +10264,117 @@ } /** - * QuerySuggestion suggestion. - * @member {string} suggestion - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * BigtableColumn qualifier. + * @member {Uint8Array} qualifier + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @instance */ - QuerySuggestion.prototype.suggestion = ""; + BigtableColumn.prototype.qualifier = $util.newBuffer([]); /** - * QuerySuggestion completableFieldPaths. - * @member {Array.} completableFieldPaths - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * BigtableColumn fieldName. + * @member {string} fieldName + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @instance */ - QuerySuggestion.prototype.completableFieldPaths = $util.emptyArray; + BigtableColumn.prototype.fieldName = ""; /** - * Creates a new QuerySuggestion instance using the specified properties. + * BigtableColumn encoding. + * @member {google.cloud.discoveryengine.v1.BigtableOptions.Encoding} encoding + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn + * @instance + */ + BigtableColumn.prototype.encoding = 0; + + /** + * BigtableColumn type. + * @member {google.cloud.discoveryengine.v1.BigtableOptions.Type} type + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn + * @instance + */ + BigtableColumn.prototype.type = 0; + + /** + * Creates a new BigtableColumn instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion instance + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn instance */ - QuerySuggestion.create = function create(properties) { - return new QuerySuggestion(properties); + BigtableColumn.create = function create(properties) { + return new BigtableColumn(properties); }; /** - * Encodes the specified QuerySuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * Encodes the specified BigtableColumn message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn} message BigtableColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuerySuggestion.encode = function encode(message, writer) { + BigtableColumn.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); - if (message.completableFieldPaths != null && message.completableFieldPaths.length) - for (var i = 0; i < message.completableFieldPaths.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.completableFieldPaths[i]); + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifier); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fieldName); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encoding); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); return writer; }; /** - * Encodes the specified QuerySuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * Encodes the specified BigtableColumn message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn} message BigtableColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuerySuggestion.encodeDelimited = function encodeDelimited(message, writer) { + BigtableColumn.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QuerySuggestion message from the specified reader or buffer. + * Decodes a BigtableColumn message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuerySuggestion.decode = function decode(reader, length) { + BigtableColumn.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.suggestion = reader.string(); + message.qualifier = reader.bytes(); break; } case 2: { - if (!(message.completableFieldPaths && message.completableFieldPaths.length)) - message.completableFieldPaths = []; - message.completableFieldPaths.push(reader.string()); + message.fieldName = reader.string(); + break; + } + case 3: { + message.encoding = reader.int32(); + break; + } + case 4: { + message.type = reader.int32(); break; } default: @@ -6947,394 +10386,277 @@ }; /** - * Decodes a QuerySuggestion message from the specified reader or buffer, length delimited. + * Decodes a BigtableColumn message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuerySuggestion.decodeDelimited = function decodeDelimited(reader) { + BigtableColumn.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QuerySuggestion message. + * Verifies a BigtableColumn message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QuerySuggestion.verify = function verify(message) { + BigtableColumn.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.suggestion != null && message.hasOwnProperty("suggestion")) - if (!$util.isString(message.suggestion)) - return "suggestion: string expected"; - if (message.completableFieldPaths != null && message.hasOwnProperty("completableFieldPaths")) { - if (!Array.isArray(message.completableFieldPaths)) - return "completableFieldPaths: array expected"; - for (var i = 0; i < message.completableFieldPaths.length; ++i) - if (!$util.isString(message.completableFieldPaths[i])) - return "completableFieldPaths: string[] expected"; - } + if (message.qualifier != null && message.hasOwnProperty("qualifier")) + if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) + return "qualifier: buffer expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } return null; }; /** - * Creates a QuerySuggestion message from a plain object. Also converts values to their respective internal types. + * Creates a BigtableColumn message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn */ - QuerySuggestion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion) + BigtableColumn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn) return object; - var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion(); - if (object.suggestion != null) - message.suggestion = String(object.suggestion); - if (object.completableFieldPaths) { - if (!Array.isArray(object.completableFieldPaths)) - throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.completableFieldPaths: array expected"); - message.completableFieldPaths = []; - for (var i = 0; i < object.completableFieldPaths.length; ++i) - message.completableFieldPaths[i] = String(object.completableFieldPaths[i]); + var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn(); + if (object.qualifier != null) + if (typeof object.qualifier === "string") + $util.base64.decode(object.qualifier, message.qualifier = $util.newBuffer($util.base64.length(object.qualifier)), 0); + else if (object.qualifier.length >= 0) + message.qualifier = object.qualifier; + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + switch (object.encoding) { + default: + if (typeof object.encoding === "number") { + message.encoding = object.encoding; + break; + } + break; + case "ENCODING_UNSPECIFIED": + case 0: + message.encoding = 0; + break; + case "TEXT": + case 1: + message.encoding = 1; + break; + case "BINARY": + case 2: + message.encoding = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STRING": + case 1: + message.type = 1; + break; + case "NUMBER": + case 2: + message.type = 2; + break; + case "INTEGER": + case 3: + message.type = 3; + break; + case "VAR_INTEGER": + case 4: + message.type = 4; + break; + case "BIG_NUMERIC": + case 5: + message.type = 5; + break; + case "BOOLEAN": + case 6: + message.type = 6; + break; + case "JSON": + case 7: + message.type = 7; + break; } return message; }; /** - * Creates a plain object from a QuerySuggestion message. Also converts values to other types if specified. + * Creates a plain object from a BigtableColumn message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} message QuerySuggestion + * @param {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} message BigtableColumn * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QuerySuggestion.toObject = function toObject(message, options) { + BigtableColumn.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.completableFieldPaths = []; - if (options.defaults) - object.suggestion = ""; - if (message.suggestion != null && message.hasOwnProperty("suggestion")) - object.suggestion = message.suggestion; - if (message.completableFieldPaths && message.completableFieldPaths.length) { - object.completableFieldPaths = []; - for (var j = 0; j < message.completableFieldPaths.length; ++j) - object.completableFieldPaths[j] = message.completableFieldPaths[j]; + if (options.defaults) { + if (options.bytes === String) + object.qualifier = ""; + else { + object.qualifier = []; + if (options.bytes !== Array) + object.qualifier = $util.newBuffer(object.qualifier); + } + object.fieldName = ""; + object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; } + if (message.qualifier != null && message.hasOwnProperty("qualifier")) + object.qualifier = options.bytes === String ? $util.base64.encode(message.qualifier, 0, message.qualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifier) : message.qualifier; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] : message.encoding; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] === undefined ? message.type : $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] : message.type; return object; }; /** - * Converts this QuerySuggestion to JSON. + * Converts this BigtableColumn to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @instance * @returns {Object.} JSON object */ - QuerySuggestion.prototype.toJSON = function toJSON() { + BigtableColumn.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QuerySuggestion + * Gets the default type url for BigtableColumn * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QuerySuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigtableColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn"; }; - return QuerySuggestion; + return BigtableColumn; })(); - return CompleteQueryResponse; - })(); - - v1.GcsSource = (function() { - - /** - * Properties of a GcsSource. - * @memberof google.cloud.discoveryengine.v1 - * @interface IGcsSource - * @property {Array.|null} [inputUris] GcsSource inputUris - * @property {string|null} [dataSchema] GcsSource dataSchema - */ - - /** - * Constructs a new GcsSource. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a GcsSource. - * @implements IGcsSource - * @constructor - * @param {google.cloud.discoveryengine.v1.IGcsSource=} [properties] Properties to set - */ - function GcsSource(properties) { - this.inputUris = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcsSource inputUris. - * @member {Array.} inputUris - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @instance - */ - GcsSource.prototype.inputUris = $util.emptyArray; - - /** - * GcsSource dataSchema. - * @member {string} dataSchema - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @instance - */ - GcsSource.prototype.dataSchema = ""; - - /** - * Creates a new GcsSource instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {google.cloud.discoveryengine.v1.IGcsSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource instance - */ - GcsSource.create = function create(properties) { - return new GcsSource(properties); - }; - - /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.GcsSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {google.cloud.discoveryengine.v1.IGcsSource} message GcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputUris != null && message.inputUris.length) - for (var i = 0; i < message.inputUris.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); - if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSchema); - return writer; - }; - - /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.GcsSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {google.cloud.discoveryengine.v1.IGcsSource} message GcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.GcsSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.inputUris && message.inputUris.length)) - message.inputUris = []; - message.inputUris.push(reader.string()); - break; - } - case 2: { - message.dataSchema = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsSource message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputUris != null && message.hasOwnProperty("inputUris")) { - if (!Array.isArray(message.inputUris)) - return "inputUris: array expected"; - for (var i = 0; i < message.inputUris.length; ++i) - if (!$util.isString(message.inputUris[i])) - return "inputUris: string[] expected"; - } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - if (!$util.isString(message.dataSchema)) - return "dataSchema: string expected"; - return null; - }; - - /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource - */ - GcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.GcsSource) - return object; - var message = new $root.google.cloud.discoveryengine.v1.GcsSource(); - if (object.inputUris) { - if (!Array.isArray(object.inputUris)) - throw TypeError(".google.cloud.discoveryengine.v1.GcsSource.inputUris: array expected"); - message.inputUris = []; - for (var i = 0; i < object.inputUris.length; ++i) - message.inputUris[i] = String(object.inputUris[i]); - } - if (object.dataSchema != null) - message.dataSchema = String(object.dataSchema); - return message; - }; - - /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {google.cloud.discoveryengine.v1.GcsSource} message GcsSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inputUris = []; - if (options.defaults) - object.dataSchema = ""; - if (message.inputUris && message.inputUris.length) { - object.inputUris = []; - for (var j = 0; j < message.inputUris.length; ++j) - object.inputUris[j] = message.inputUris[j]; - } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - object.dataSchema = message.dataSchema; - return object; - }; - /** - * Converts this GcsSource to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @instance - * @returns {Object.} JSON object + * Type enum. + * @name google.cloud.discoveryengine.v1.BigtableOptions.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} STRING=1 STRING value + * @property {number} NUMBER=2 NUMBER value + * @property {number} INTEGER=3 INTEGER value + * @property {number} VAR_INTEGER=4 VAR_INTEGER value + * @property {number} BIG_NUMERIC=5 BIG_NUMERIC value + * @property {number} BOOLEAN=6 BOOLEAN value + * @property {number} JSON=7 JSON value */ - GcsSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + BigtableOptions.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STRING"] = 1; + values[valuesById[2] = "NUMBER"] = 2; + values[valuesById[3] = "INTEGER"] = 3; + values[valuesById[4] = "VAR_INTEGER"] = 4; + values[valuesById[5] = "BIG_NUMERIC"] = 5; + values[valuesById[6] = "BOOLEAN"] = 6; + values[valuesById[7] = "JSON"] = 7; + return values; + })(); /** - * Gets the default type url for GcsSource - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Encoding enum. + * @name google.cloud.discoveryengine.v1.BigtableOptions.Encoding + * @enum {number} + * @property {number} ENCODING_UNSPECIFIED=0 ENCODING_UNSPECIFIED value + * @property {number} TEXT=1 TEXT value + * @property {number} BINARY=2 BINARY value */ - GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.GcsSource"; - }; + BigtableOptions.Encoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "TEXT"] = 1; + values[valuesById[2] = "BINARY"] = 2; + return values; + })(); - return GcsSource; + return BigtableOptions; })(); - v1.BigQuerySource = (function() { + v1.BigtableSource = (function() { /** - * Properties of a BigQuerySource. + * Properties of a BigtableSource. * @memberof google.cloud.discoveryengine.v1 - * @interface IBigQuerySource - * @property {google.type.IDate|null} [partitionDate] BigQuerySource partitionDate - * @property {string|null} [projectId] BigQuerySource projectId - * @property {string|null} [datasetId] BigQuerySource datasetId - * @property {string|null} [tableId] BigQuerySource tableId - * @property {string|null} [gcsStagingDir] BigQuerySource gcsStagingDir - * @property {string|null} [dataSchema] BigQuerySource dataSchema + * @interface IBigtableSource + * @property {string|null} [projectId] BigtableSource projectId + * @property {string|null} [instanceId] BigtableSource instanceId + * @property {string|null} [tableId] BigtableSource tableId + * @property {google.cloud.discoveryengine.v1.IBigtableOptions|null} [bigtableOptions] BigtableSource bigtableOptions */ /** - * Constructs a new BigQuerySource. + * Constructs a new BigtableSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a BigQuerySource. - * @implements IBigQuerySource + * @classdesc Represents a BigtableSource. + * @implements IBigtableSource * @constructor - * @param {google.cloud.discoveryengine.v1.IBigQuerySource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IBigtableSource=} [properties] Properties to set */ - function BigQuerySource(properties) { + function BigtableSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7342,147 +10664,109 @@ } /** - * BigQuerySource partitionDate. - * @member {google.type.IDate|null|undefined} partitionDate - * @memberof google.cloud.discoveryengine.v1.BigQuerySource - * @instance - */ - BigQuerySource.prototype.partitionDate = null; - - /** - * BigQuerySource projectId. + * BigtableSource projectId. * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance */ - BigQuerySource.prototype.projectId = ""; + BigtableSource.prototype.projectId = ""; /** - * BigQuerySource datasetId. - * @member {string} datasetId - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * BigtableSource instanceId. + * @member {string} instanceId + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance */ - BigQuerySource.prototype.datasetId = ""; + BigtableSource.prototype.instanceId = ""; /** - * BigQuerySource tableId. + * BigtableSource tableId. * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1.BigQuerySource - * @instance - */ - BigQuerySource.prototype.tableId = ""; - - /** - * BigQuerySource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1.BigQuerySource - * @instance - */ - BigQuerySource.prototype.gcsStagingDir = ""; - - /** - * BigQuerySource dataSchema. - * @member {string} dataSchema - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance */ - BigQuerySource.prototype.dataSchema = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BigtableSource.prototype.tableId = ""; /** - * BigQuerySource partition. - * @member {"partitionDate"|undefined} partition - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * BigtableSource bigtableOptions. + * @member {google.cloud.discoveryengine.v1.IBigtableOptions|null|undefined} bigtableOptions + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance */ - Object.defineProperty(BigQuerySource.prototype, "partition", { - get: $util.oneOfGetter($oneOfFields = ["partitionDate"]), - set: $util.oneOfSetter($oneOfFields) - }); + BigtableSource.prototype.bigtableOptions = null; /** - * Creates a new BigQuerySource instance using the specified properties. + * Creates a new BigtableSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static - * @param {google.cloud.discoveryengine.v1.IBigQuerySource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource instance + * @param {google.cloud.discoveryengine.v1.IBigtableSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource instance */ - BigQuerySource.create = function create(properties) { - return new BigQuerySource(properties); + BigtableSource.create = function create(properties) { + return new BigtableSource(properties); }; /** - * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigQuerySource.verify|verify} messages. + * Encodes the specified BigtableSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static - * @param {google.cloud.discoveryengine.v1.IBigQuerySource} message BigQuerySource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigtableSource} message BigtableSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQuerySource.encode = function encode(message, writer) { + BigtableSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetId); + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); - if (message.partitionDate != null && Object.hasOwnProperty.call(message, "partitionDate")) - $root.google.type.Date.encode(message.partitionDate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataSchema); + if (message.bigtableOptions != null && Object.hasOwnProperty.call(message, "bigtableOptions")) + $root.google.cloud.discoveryengine.v1.BigtableOptions.encode(message.bigtableOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigQuerySource.verify|verify} messages. + * Encodes the specified BigtableSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static - * @param {google.cloud.discoveryengine.v1.IBigQuerySource} message BigQuerySource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigtableSource} message BigtableSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + BigtableSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQuerySource message from the specified reader or buffer. + * Decodes a BigtableSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQuerySource.decode = function decode(reader, length) { + BigtableSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigQuerySource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { - message.partitionDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } case 1: { message.projectId = reader.string(); break; } case 2: { - message.datasetId = reader.string(); + message.instanceId = reader.string(); break; } case 3: { @@ -7490,11 +10774,7 @@ break; } case 4: { - message.gcsStagingDir = reader.string(); - break; - } - case 6: { - message.dataSchema = reader.string(); + message.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.decode(reader, reader.uint32()); break; } default: @@ -7506,178 +10786,153 @@ }; /** - * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. + * Decodes a BigtableSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQuerySource.decodeDelimited = function decodeDelimited(reader) { + BigtableSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQuerySource message. + * Verifies a BigtableSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.BigQuerySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQuerySource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { - properties.partition = 1; - { - var error = $root.google.type.Date.verify(message.partitionDate); - if (error) - return "partitionDate." + error; - } - } + * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigtableSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; if (message.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string expected"; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; if (message.tableId != null && message.hasOwnProperty("tableId")) if (!$util.isString(message.tableId)) return "tableId: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - if (!$util.isString(message.dataSchema)) - return "dataSchema: string expected"; + if (message.bigtableOptions != null && message.hasOwnProperty("bigtableOptions")) { + var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.verify(message.bigtableOptions); + if (error) + return "bigtableOptions." + error; + } return null; }; /** - * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. + * Creates a BigtableSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource */ - BigQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigQuerySource) + BigtableSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.BigQuerySource(); - if (object.partitionDate != null) { - if (typeof object.partitionDate !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigQuerySource.partitionDate: object expected"); - message.partitionDate = $root.google.type.Date.fromObject(object.partitionDate); - } + var message = new $root.google.cloud.discoveryengine.v1.BigtableSource(); if (object.projectId != null) message.projectId = String(object.projectId); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); if (object.tableId != null) message.tableId = String(object.tableId); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); - if (object.dataSchema != null) - message.dataSchema = String(object.dataSchema); + if (object.bigtableOptions != null) { + if (typeof object.bigtableOptions !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigtableSource.bigtableOptions: object expected"); + message.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.fromObject(object.bigtableOptions); + } return message; }; /** - * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. + * Creates a plain object from a BigtableSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static - * @param {google.cloud.discoveryengine.v1.BigQuerySource} message BigQuerySource + * @param {google.cloud.discoveryengine.v1.BigtableSource} message BigtableSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQuerySource.toObject = function toObject(message, options) { + BigtableSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.projectId = ""; - object.datasetId = ""; + object.instanceId = ""; object.tableId = ""; - object.gcsStagingDir = ""; - object.dataSchema = ""; + object.bigtableOptions = null; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; if (message.tableId != null && message.hasOwnProperty("tableId")) object.tableId = message.tableId; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; - if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { - object.partitionDate = $root.google.type.Date.toObject(message.partitionDate, options); - if (options.oneofs) - object.partition = "partitionDate"; - } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - object.dataSchema = message.dataSchema; + if (message.bigtableOptions != null && message.hasOwnProperty("bigtableOptions")) + object.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.toObject(message.bigtableOptions, options); return object; }; /** - * Converts this BigQuerySource to JSON. + * Converts this BigtableSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance * @returns {Object.} JSON object */ - BigQuerySource.prototype.toJSON = function toJSON() { + BigtableSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQuerySource + * Gets the default type url for BigtableSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigtableSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigQuerySource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableSource"; }; - return BigQuerySource; + return BigtableSource; })(); - v1.SpannerSource = (function() { + v1.FhirStoreSource = (function() { /** - * Properties of a SpannerSource. + * Properties of a FhirStoreSource. * @memberof google.cloud.discoveryengine.v1 - * @interface ISpannerSource - * @property {string|null} [projectId] SpannerSource projectId - * @property {string|null} [instanceId] SpannerSource instanceId - * @property {string|null} [databaseId] SpannerSource databaseId - * @property {string|null} [tableId] SpannerSource tableId - * @property {boolean|null} [enableDataBoost] SpannerSource enableDataBoost + * @interface IFhirStoreSource + * @property {string|null} [fhirStore] FhirStoreSource fhirStore + * @property {string|null} [gcsStagingDir] FhirStoreSource gcsStagingDir */ /** - * Constructs a new SpannerSource. + * Constructs a new FhirStoreSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a SpannerSource. - * @implements ISpannerSource + * @classdesc Represents a FhirStoreSource. + * @implements IFhirStoreSource * @constructor - * @param {google.cloud.discoveryengine.v1.ISpannerSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IFhirStoreSource=} [properties] Properties to set */ - function SpannerSource(properties) { + function FhirStoreSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7685,131 +10940,89 @@ } /** - * SpannerSource projectId. - * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.SpannerSource - * @instance - */ - SpannerSource.prototype.projectId = ""; - - /** - * SpannerSource instanceId. - * @member {string} instanceId - * @memberof google.cloud.discoveryengine.v1.SpannerSource - * @instance - */ - SpannerSource.prototype.instanceId = ""; - - /** - * SpannerSource databaseId. - * @member {string} databaseId - * @memberof google.cloud.discoveryengine.v1.SpannerSource - * @instance - */ - SpannerSource.prototype.databaseId = ""; - - /** - * SpannerSource tableId. - * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * FhirStoreSource fhirStore. + * @member {string} fhirStore + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @instance */ - SpannerSource.prototype.tableId = ""; + FhirStoreSource.prototype.fhirStore = ""; /** - * SpannerSource enableDataBoost. - * @member {boolean} enableDataBoost - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * FhirStoreSource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @instance */ - SpannerSource.prototype.enableDataBoost = false; + FhirStoreSource.prototype.gcsStagingDir = ""; /** - * Creates a new SpannerSource instance using the specified properties. + * Creates a new FhirStoreSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static - * @param {google.cloud.discoveryengine.v1.ISpannerSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource instance + * @param {google.cloud.discoveryengine.v1.IFhirStoreSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource instance */ - SpannerSource.create = function create(properties) { - return new SpannerSource(properties); + FhirStoreSource.create = function create(properties) { + return new FhirStoreSource(properties); }; /** - * Encodes the specified SpannerSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.SpannerSource.verify|verify} messages. + * Encodes the specified FhirStoreSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.FhirStoreSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static - * @param {google.cloud.discoveryengine.v1.ISpannerSource} message SpannerSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IFhirStoreSource} message FhirStoreSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpannerSource.encode = function encode(message, writer) { + FhirStoreSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); - if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId); - if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); - if (message.enableDataBoost != null && Object.hasOwnProperty.call(message, "enableDataBoost")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableDataBoost); + if (message.fhirStore != null && Object.hasOwnProperty.call(message, "fhirStore")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fhirStore); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsStagingDir); return writer; }; /** - * Encodes the specified SpannerSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SpannerSource.verify|verify} messages. + * Encodes the specified FhirStoreSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.FhirStoreSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static - * @param {google.cloud.discoveryengine.v1.ISpannerSource} message SpannerSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IFhirStoreSource} message FhirStoreSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpannerSource.encodeDelimited = function encodeDelimited(message, writer) { + FhirStoreSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpannerSource message from the specified reader or buffer. + * Decodes a FhirStoreSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource + * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpannerSource.decode = function decode(reader, length) { + FhirStoreSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SpannerSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.FhirStoreSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.projectId = reader.string(); + message.fhirStore = reader.string(); break; } case 2: { - message.instanceId = reader.string(); - break; - } - case 3: { - message.databaseId = reader.string(); - break; - } - case 4: { - message.tableId = reader.string(); - break; - } - case 5: { - message.enableDataBoost = reader.bool(); + message.gcsStagingDir = reader.string(); break; } default: @@ -7821,157 +11034,136 @@ }; /** - * Decodes a SpannerSource message from the specified reader or buffer, length delimited. + * Decodes a FhirStoreSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource + * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpannerSource.decodeDelimited = function decodeDelimited(reader) { + FhirStoreSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpannerSource message. + * Verifies a FhirStoreSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpannerSource.verify = function verify(message) { + FhirStoreSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - if (!$util.isString(message.databaseId)) - return "databaseId: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.enableDataBoost != null && message.hasOwnProperty("enableDataBoost")) - if (typeof message.enableDataBoost !== "boolean") - return "enableDataBoost: boolean expected"; + if (message.fhirStore != null && message.hasOwnProperty("fhirStore")) + if (!$util.isString(message.fhirStore)) + return "fhirStore: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; return null; }; /** - * Creates a SpannerSource message from a plain object. Also converts values to their respective internal types. + * Creates a FhirStoreSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource + * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource */ - SpannerSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.SpannerSource) + FhirStoreSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.FhirStoreSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.SpannerSource(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instanceId != null) - message.instanceId = String(object.instanceId); - if (object.databaseId != null) - message.databaseId = String(object.databaseId); - if (object.tableId != null) - message.tableId = String(object.tableId); - if (object.enableDataBoost != null) - message.enableDataBoost = Boolean(object.enableDataBoost); + var message = new $root.google.cloud.discoveryengine.v1.FhirStoreSource(); + if (object.fhirStore != null) + message.fhirStore = String(object.fhirStore); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); return message; }; /** - * Creates a plain object from a SpannerSource message. Also converts values to other types if specified. + * Creates a plain object from a FhirStoreSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static - * @param {google.cloud.discoveryengine.v1.SpannerSource} message SpannerSource + * @param {google.cloud.discoveryengine.v1.FhirStoreSource} message FhirStoreSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpannerSource.toObject = function toObject(message, options) { + FhirStoreSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.instanceId = ""; - object.databaseId = ""; - object.tableId = ""; - object.enableDataBoost = false; + object.fhirStore = ""; + object.gcsStagingDir = ""; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - object.databaseId = message.databaseId; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.enableDataBoost != null && message.hasOwnProperty("enableDataBoost")) - object.enableDataBoost = message.enableDataBoost; + if (message.fhirStore != null && message.hasOwnProperty("fhirStore")) + object.fhirStore = message.fhirStore; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; return object; }; /** - * Converts this SpannerSource to JSON. + * Converts this FhirStoreSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @instance * @returns {Object.} JSON object */ - SpannerSource.prototype.toJSON = function toJSON() { + FhirStoreSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SpannerSource + * Gets the default type url for FhirStoreSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SpannerSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FhirStoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SpannerSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.FhirStoreSource"; }; - return SpannerSource; + return FhirStoreSource; })(); - v1.BigtableOptions = (function() { + v1.CloudSqlSource = (function() { /** - * Properties of a BigtableOptions. + * Properties of a CloudSqlSource. * @memberof google.cloud.discoveryengine.v1 - * @interface IBigtableOptions - * @property {string|null} [keyFieldName] BigtableOptions keyFieldName - * @property {Object.|null} [families] BigtableOptions families + * @interface ICloudSqlSource + * @property {string|null} [projectId] CloudSqlSource projectId + * @property {string|null} [instanceId] CloudSqlSource instanceId + * @property {string|null} [databaseId] CloudSqlSource databaseId + * @property {string|null} [tableId] CloudSqlSource tableId + * @property {string|null} [gcsStagingDir] CloudSqlSource gcsStagingDir + * @property {boolean|null} [offload] CloudSqlSource offload */ /** - * Constructs a new BigtableOptions. + * Constructs a new CloudSqlSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a BigtableOptions. - * @implements IBigtableOptions + * @classdesc Represents a CloudSqlSource. + * @implements ICloudSqlSource * @constructor - * @param {google.cloud.discoveryengine.v1.IBigtableOptions=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ICloudSqlSource=} [properties] Properties to set */ - function BigtableOptions(properties) { - this.families = {}; + function CloudSqlSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7979,111 +11171,145 @@ } /** - * BigtableOptions keyFieldName. - * @member {string} keyFieldName - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * CloudSqlSource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @instance */ - BigtableOptions.prototype.keyFieldName = ""; + CloudSqlSource.prototype.projectId = ""; /** - * BigtableOptions families. - * @member {Object.} families - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * CloudSqlSource instanceId. + * @member {string} instanceId + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @instance */ - BigtableOptions.prototype.families = $util.emptyObject; + CloudSqlSource.prototype.instanceId = ""; /** - * Creates a new BigtableOptions instance using the specified properties. + * CloudSqlSource databaseId. + * @member {string} databaseId + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @instance + */ + CloudSqlSource.prototype.databaseId = ""; + + /** + * CloudSqlSource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @instance + */ + CloudSqlSource.prototype.tableId = ""; + + /** + * CloudSqlSource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @instance + */ + CloudSqlSource.prototype.gcsStagingDir = ""; + + /** + * CloudSqlSource offload. + * @member {boolean} offload + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @instance + */ + CloudSqlSource.prototype.offload = false; + + /** + * Creates a new CloudSqlSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableOptions=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions instance + * @param {google.cloud.discoveryengine.v1.ICloudSqlSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource instance */ - BigtableOptions.create = function create(properties) { - return new BigtableOptions(properties); + CloudSqlSource.create = function create(properties) { + return new CloudSqlSource(properties); }; /** - * Encodes the specified BigtableOptions message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.verify|verify} messages. + * Encodes the specified CloudSqlSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableOptions} message BigtableOptions message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ICloudSqlSource} message CloudSqlSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigtableOptions.encode = function encode(message, writer) { + CloudSqlSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyFieldName != null && Object.hasOwnProperty.call(message, "keyFieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyFieldName); - if (message.families != null && Object.hasOwnProperty.call(message, "families")) - for (var keys = Object.keys(message.families), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.encode(message.families[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); + if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcsStagingDir); + if (message.offload != null && Object.hasOwnProperty.call(message, "offload")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.offload); return writer; }; /** - * Encodes the specified BigtableOptions message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.verify|verify} messages. + * Encodes the specified CloudSqlSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableOptions} message BigtableOptions message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ICloudSqlSource} message CloudSqlSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigtableOptions.encodeDelimited = function encodeDelimited(message, writer) { + CloudSqlSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigtableOptions message from the specified reader or buffer. + * Decodes a CloudSqlSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions + * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigtableOptions.decode = function decode(reader, length) { + CloudSqlSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableOptions(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CloudSqlSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyFieldName = reader.string(); + message.projectId = reader.string(); break; } case 2: { - if (message.families === $util.emptyObject) - message.families = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.families[key] = value; + message.instanceId = reader.string(); + break; + } + case 3: { + message.databaseId = reader.string(); + break; + } + case 4: { + message.tableId = reader.string(); + break; + } + case 5: { + message.gcsStagingDir = reader.string(); + break; + } + case 6: { + message.offload = reader.bool(); break; } default: @@ -8095,918 +11321,485 @@ }; /** - * Decodes a BigtableOptions message from the specified reader or buffer, length delimited. + * Decodes a CloudSqlSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions + * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigtableOptions.decodeDelimited = function decodeDelimited(reader) { + CloudSqlSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigtableOptions message. + * Verifies a CloudSqlSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigtableOptions.verify = function verify(message) { + CloudSqlSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyFieldName != null && message.hasOwnProperty("keyFieldName")) - if (!$util.isString(message.keyFieldName)) - return "keyFieldName: string expected"; - if (message.families != null && message.hasOwnProperty("families")) { - if (!$util.isObject(message.families)) - return "families: object expected"; - var key = Object.keys(message.families); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify(message.families[key[i]]); - if (error) - return "families." + error; - } - } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + if (!$util.isString(message.databaseId)) + return "databaseId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; + if (message.offload != null && message.hasOwnProperty("offload")) + if (typeof message.offload !== "boolean") + return "offload: boolean expected"; return null; }; /** - * Creates a BigtableOptions message from a plain object. Also converts values to their respective internal types. + * Creates a CloudSqlSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions + * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource */ - BigtableOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions) + CloudSqlSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CloudSqlSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions(); - if (object.keyFieldName != null) - message.keyFieldName = String(object.keyFieldName); - if (object.families) { - if (typeof object.families !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.families: object expected"); - message.families = {}; - for (var keys = Object.keys(object.families), i = 0; i < keys.length; ++i) { - if (typeof object.families[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.families: object expected"); - message.families[keys[i]] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.fromObject(object.families[keys[i]]); - } - } + var message = new $root.google.cloud.discoveryengine.v1.CloudSqlSource(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); + if (object.offload != null) + message.offload = Boolean(object.offload); return message; }; /** - * Creates a plain object from a BigtableOptions message. Also converts values to other types if specified. + * Creates a plain object from a CloudSqlSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions} message BigtableOptions + * @param {google.cloud.discoveryengine.v1.CloudSqlSource} message CloudSqlSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigtableOptions.toObject = function toObject(message, options) { + CloudSqlSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.families = {}; - if (options.defaults) - object.keyFieldName = ""; - if (message.keyFieldName != null && message.hasOwnProperty("keyFieldName")) - object.keyFieldName = message.keyFieldName; - var keys2; - if (message.families && (keys2 = Object.keys(message.families)).length) { - object.families = {}; - for (var j = 0; j < keys2.length; ++j) - object.families[keys2[j]] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.toObject(message.families[keys2[j]], options); + if (options.defaults) { + object.projectId = ""; + object.instanceId = ""; + object.databaseId = ""; + object.tableId = ""; + object.gcsStagingDir = ""; + object.offload = false; } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; + if (message.offload != null && message.hasOwnProperty("offload")) + object.offload = message.offload; return object; }; /** - * Converts this BigtableOptions to JSON. + * Converts this CloudSqlSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @instance * @returns {Object.} JSON object */ - BigtableOptions.prototype.toJSON = function toJSON() { + CloudSqlSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigtableOptions + * Gets the default type url for CloudSqlSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigtableOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudSqlSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CloudSqlSource"; }; - BigtableOptions.BigtableColumnFamily = (function() { - - /** - * Properties of a BigtableColumnFamily. - * @memberof google.cloud.discoveryengine.v1.BigtableOptions - * @interface IBigtableColumnFamily - * @property {string|null} [fieldName] BigtableColumnFamily fieldName - * @property {google.cloud.discoveryengine.v1.BigtableOptions.Encoding|null} [encoding] BigtableColumnFamily encoding - * @property {google.cloud.discoveryengine.v1.BigtableOptions.Type|null} [type] BigtableColumnFamily type - * @property {Array.|null} [columns] BigtableColumnFamily columns - */ - - /** - * Constructs a new BigtableColumnFamily. - * @memberof google.cloud.discoveryengine.v1.BigtableOptions - * @classdesc Represents a BigtableColumnFamily. - * @implements IBigtableColumnFamily - * @constructor - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily=} [properties] Properties to set - */ - function BigtableColumnFamily(properties) { - this.columns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigtableColumnFamily fieldName. - * @member {string} fieldName - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - */ - BigtableColumnFamily.prototype.fieldName = ""; - - /** - * BigtableColumnFamily encoding. - * @member {google.cloud.discoveryengine.v1.BigtableOptions.Encoding} encoding - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - */ - BigtableColumnFamily.prototype.encoding = 0; - - /** - * BigtableColumnFamily type. - * @member {google.cloud.discoveryengine.v1.BigtableOptions.Type} type - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - */ - BigtableColumnFamily.prototype.type = 0; - - /** - * BigtableColumnFamily columns. - * @member {Array.} columns - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - */ - BigtableColumnFamily.prototype.columns = $util.emptyArray; - - /** - * Creates a new BigtableColumnFamily instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily instance - */ - BigtableColumnFamily.create = function create(properties) { - return new BigtableColumnFamily(properties); - }; - - /** - * Encodes the specified BigtableColumnFamily message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily} message BigtableColumnFamily message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableColumnFamily.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encoding); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.encode(message.columns[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BigtableColumnFamily message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily} message BigtableColumnFamily message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableColumnFamily.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigtableColumnFamily message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableColumnFamily.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 2: { - message.encoding = reader.int32(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - case 4: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigtableColumnFamily message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableColumnFamily.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigtableColumnFamily message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigtableColumnFamily.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - switch (message.encoding) { - default: - return "encoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - return null; - }; - - /** - * Creates a BigtableColumnFamily message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily - */ - BigtableColumnFamily.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily) - return object; - var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - switch (object.encoding) { - default: - if (typeof object.encoding === "number") { - message.encoding = object.encoding; - break; - } - break; - case "ENCODING_UNSPECIFIED": - case 0: - message.encoding = 0; - break; - case "TEXT": - case 1: - message.encoding = 1; - break; - case "BINARY": - case 2: - message.encoding = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "STRING": - case 1: - message.type = 1; - break; - case "NUMBER": - case 2: - message.type = 2; - break; - case "INTEGER": - case 3: - message.type = 3; - break; - case "VAR_INTEGER": - case 4: - message.type = 4; - break; - case "BIG_NUMERIC": - case 5: - message.type = 5; - break; - case "BOOLEAN": - case 6: - message.type = 6; - break; - case "JSON": - case 7: - message.type = 7; - break; - } - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.columns: object expected"); - message.columns[i] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.fromObject(object.columns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BigtableColumnFamily message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} message BigtableColumnFamily - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigtableColumnFamily.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (options.defaults) { - object.fieldName = ""; - object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] : message.encoding; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] === undefined ? message.type : $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] : message.type; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.toObject(message.columns[j], options); - } - return object; - }; - - /** - * Converts this BigtableColumnFamily to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - * @returns {Object.} JSON object - */ - BigtableColumnFamily.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigtableColumnFamily - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigtableColumnFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily"; - }; + return CloudSqlSource; + })(); - return BigtableColumnFamily; - })(); + v1.AlloyDbSource = (function() { - BigtableOptions.BigtableColumn = (function() { + /** + * Properties of an AlloyDbSource. + * @memberof google.cloud.discoveryengine.v1 + * @interface IAlloyDbSource + * @property {string|null} [projectId] AlloyDbSource projectId + * @property {string|null} [locationId] AlloyDbSource locationId + * @property {string|null} [clusterId] AlloyDbSource clusterId + * @property {string|null} [databaseId] AlloyDbSource databaseId + * @property {string|null} [tableId] AlloyDbSource tableId + * @property {string|null} [gcsStagingDir] AlloyDbSource gcsStagingDir + */ - /** - * Properties of a BigtableColumn. - * @memberof google.cloud.discoveryengine.v1.BigtableOptions - * @interface IBigtableColumn - * @property {Uint8Array|null} [qualifier] BigtableColumn qualifier - * @property {string|null} [fieldName] BigtableColumn fieldName - * @property {google.cloud.discoveryengine.v1.BigtableOptions.Encoding|null} [encoding] BigtableColumn encoding - * @property {google.cloud.discoveryengine.v1.BigtableOptions.Type|null} [type] BigtableColumn type - */ + /** + * Constructs a new AlloyDbSource. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents an AlloyDbSource. + * @implements IAlloyDbSource + * @constructor + * @param {google.cloud.discoveryengine.v1.IAlloyDbSource=} [properties] Properties to set + */ + function AlloyDbSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new BigtableColumn. - * @memberof google.cloud.discoveryengine.v1.BigtableOptions - * @classdesc Represents a BigtableColumn. - * @implements IBigtableColumn - * @constructor - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn=} [properties] Properties to set - */ - function BigtableColumn(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AlloyDbSource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.projectId = ""; - /** - * BigtableColumn qualifier. - * @member {Uint8Array} qualifier - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - */ - BigtableColumn.prototype.qualifier = $util.newBuffer([]); + /** + * AlloyDbSource locationId. + * @member {string} locationId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.locationId = ""; - /** - * BigtableColumn fieldName. - * @member {string} fieldName - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - */ - BigtableColumn.prototype.fieldName = ""; + /** + * AlloyDbSource clusterId. + * @member {string} clusterId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.clusterId = ""; - /** - * BigtableColumn encoding. - * @member {google.cloud.discoveryengine.v1.BigtableOptions.Encoding} encoding - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - */ - BigtableColumn.prototype.encoding = 0; + /** + * AlloyDbSource databaseId. + * @member {string} databaseId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.databaseId = ""; - /** - * BigtableColumn type. - * @member {google.cloud.discoveryengine.v1.BigtableOptions.Type} type - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - */ - BigtableColumn.prototype.type = 0; + /** + * AlloyDbSource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.tableId = ""; - /** - * Creates a new BigtableColumn instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn instance - */ - BigtableColumn.create = function create(properties) { - return new BigtableColumn(properties); - }; + /** + * AlloyDbSource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.gcsStagingDir = ""; - /** - * Encodes the specified BigtableColumn message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn} message BigtableColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifier); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fieldName); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encoding); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - return writer; - }; + /** + * Creates a new AlloyDbSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {google.cloud.discoveryengine.v1.IAlloyDbSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.AlloyDbSource} AlloyDbSource instance + */ + AlloyDbSource.create = function create(properties) { + return new AlloyDbSource(properties); + }; - /** - * Encodes the specified BigtableColumn message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn} message BigtableColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AlloyDbSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.AlloyDbSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {google.cloud.discoveryengine.v1.IAlloyDbSource} message AlloyDbSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlloyDbSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.locationId); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tableId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.gcsStagingDir); + return writer; + }; - /** - * Decodes a BigtableColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableColumn.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.qualifier = reader.bytes(); - break; - } - case 2: { - message.fieldName = reader.string(); - break; - } - case 3: { - message.encoding = reader.int32(); - break; - } - case 4: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified AlloyDbSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.AlloyDbSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {google.cloud.discoveryengine.v1.IAlloyDbSource} message AlloyDbSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlloyDbSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AlloyDbSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.AlloyDbSource} AlloyDbSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlloyDbSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.AlloyDbSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a BigtableColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigtableColumn message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigtableColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) - return "qualifier: buffer expected"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - switch (message.encoding) { - default: - return "encoding: enum value expected"; - case 0: - case 1: - case 2: + case 2: { + message.locationId = reader.string(); break; } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: + case 3: { + message.clusterId = reader.string(); break; } - return null; - }; - - /** - * Creates a BigtableColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn - */ - BigtableColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn) - return object; - var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn(); - if (object.qualifier != null) - if (typeof object.qualifier === "string") - $util.base64.decode(object.qualifier, message.qualifier = $util.newBuffer($util.base64.length(object.qualifier)), 0); - else if (object.qualifier.length >= 0) - message.qualifier = object.qualifier; - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - switch (object.encoding) { - default: - if (typeof object.encoding === "number") { - message.encoding = object.encoding; + case 4: { + message.databaseId = reader.string(); break; } - break; - case "ENCODING_UNSPECIFIED": - case 0: - message.encoding = 0; - break; - case "TEXT": - case 1: - message.encoding = 1; - break; - case "BINARY": - case 2: - message.encoding = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; + case 5: { + message.tableId = reader.string(); break; } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "STRING": - case 1: - message.type = 1; - break; - case "NUMBER": - case 2: - message.type = 2; - break; - case "INTEGER": - case 3: - message.type = 3; - break; - case "VAR_INTEGER": - case 4: - message.type = 4; - break; - case "BIG_NUMERIC": - case 5: - message.type = 5; - break; - case "BOOLEAN": - case 6: - message.type = 6; - break; - case "JSON": - case 7: - message.type = 7; + case 6: { + message.gcsStagingDir = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a BigtableColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} message BigtableColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigtableColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.qualifier = ""; - else { - object.qualifier = []; - if (options.bytes !== Array) - object.qualifier = $util.newBuffer(object.qualifier); - } - object.fieldName = ""; - object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - object.qualifier = options.bytes === String ? $util.base64.encode(message.qualifier, 0, message.qualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifier) : message.qualifier; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] : message.encoding; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] === undefined ? message.type : $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] : message.type; - return object; - }; + /** + * Decodes an AlloyDbSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.AlloyDbSource} AlloyDbSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlloyDbSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this BigtableColumn to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - * @returns {Object.} JSON object - */ - BigtableColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an AlloyDbSource message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AlloyDbSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + if (!$util.isString(message.databaseId)) + return "databaseId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; + return null; + }; - /** - * Gets the default type url for BigtableColumn - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigtableColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn"; - }; + /** + * Creates an AlloyDbSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.AlloyDbSource} AlloyDbSource + */ + AlloyDbSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.AlloyDbSource) + return object; + var message = new $root.google.cloud.discoveryengine.v1.AlloyDbSource(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.locationId != null) + message.locationId = String(object.locationId); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); + return message; + }; - return BigtableColumn; - })(); + /** + * Creates a plain object from an AlloyDbSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {google.cloud.discoveryengine.v1.AlloyDbSource} message AlloyDbSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AlloyDbSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.locationId = ""; + object.clusterId = ""; + object.databaseId = ""; + object.tableId = ""; + object.gcsStagingDir = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; + return object; + }; /** - * Type enum. - * @name google.cloud.discoveryengine.v1.BigtableOptions.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} STRING=1 STRING value - * @property {number} NUMBER=2 NUMBER value - * @property {number} INTEGER=3 INTEGER value - * @property {number} VAR_INTEGER=4 VAR_INTEGER value - * @property {number} BIG_NUMERIC=5 BIG_NUMERIC value - * @property {number} BOOLEAN=6 BOOLEAN value - * @property {number} JSON=7 JSON value + * Converts this AlloyDbSource to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + * @returns {Object.} JSON object */ - BigtableOptions.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STRING"] = 1; - values[valuesById[2] = "NUMBER"] = 2; - values[valuesById[3] = "INTEGER"] = 3; - values[valuesById[4] = "VAR_INTEGER"] = 4; - values[valuesById[5] = "BIG_NUMERIC"] = 5; - values[valuesById[6] = "BOOLEAN"] = 6; - values[valuesById[7] = "JSON"] = 7; - return values; - })(); + AlloyDbSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Encoding enum. - * @name google.cloud.discoveryengine.v1.BigtableOptions.Encoding - * @enum {number} - * @property {number} ENCODING_UNSPECIFIED=0 ENCODING_UNSPECIFIED value - * @property {number} TEXT=1 TEXT value - * @property {number} BINARY=2 BINARY value + * Gets the default type url for AlloyDbSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - BigtableOptions.Encoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "TEXT"] = 1; - values[valuesById[2] = "BINARY"] = 2; - return values; - })(); + AlloyDbSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.AlloyDbSource"; + }; - return BigtableOptions; + return AlloyDbSource; })(); - v1.BigtableSource = (function() { + v1.FirestoreSource = (function() { /** - * Properties of a BigtableSource. + * Properties of a FirestoreSource. * @memberof google.cloud.discoveryengine.v1 - * @interface IBigtableSource - * @property {string|null} [projectId] BigtableSource projectId - * @property {string|null} [instanceId] BigtableSource instanceId - * @property {string|null} [tableId] BigtableSource tableId - * @property {google.cloud.discoveryengine.v1.IBigtableOptions|null} [bigtableOptions] BigtableSource bigtableOptions + * @interface IFirestoreSource + * @property {string|null} [projectId] FirestoreSource projectId + * @property {string|null} [databaseId] FirestoreSource databaseId + * @property {string|null} [collectionId] FirestoreSource collectionId + * @property {string|null} [gcsStagingDir] FirestoreSource gcsStagingDir */ /** - * Constructs a new BigtableSource. + * Constructs a new FirestoreSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a BigtableSource. - * @implements IBigtableSource + * @classdesc Represents a FirestoreSource. + * @implements IFirestoreSource * @constructor - * @param {google.cloud.discoveryengine.v1.IBigtableSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IFirestoreSource=} [properties] Properties to set */ - function BigtableSource(properties) { + function FirestoreSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9014,100 +11807,100 @@ } /** - * BigtableSource projectId. + * FirestoreSource projectId. * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance */ - BigtableSource.prototype.projectId = ""; + FirestoreSource.prototype.projectId = ""; /** - * BigtableSource instanceId. - * @member {string} instanceId - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * FirestoreSource databaseId. + * @member {string} databaseId + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance */ - BigtableSource.prototype.instanceId = ""; + FirestoreSource.prototype.databaseId = ""; /** - * BigtableSource tableId. - * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * FirestoreSource collectionId. + * @member {string} collectionId + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance */ - BigtableSource.prototype.tableId = ""; + FirestoreSource.prototype.collectionId = ""; /** - * BigtableSource bigtableOptions. - * @member {google.cloud.discoveryengine.v1.IBigtableOptions|null|undefined} bigtableOptions - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * FirestoreSource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance */ - BigtableSource.prototype.bigtableOptions = null; + FirestoreSource.prototype.gcsStagingDir = ""; /** - * Creates a new BigtableSource instance using the specified properties. + * Creates a new FirestoreSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource instance + * @param {google.cloud.discoveryengine.v1.IFirestoreSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource instance */ - BigtableSource.create = function create(properties) { - return new BigtableSource(properties); + FirestoreSource.create = function create(properties) { + return new FirestoreSource(properties); }; /** - * Encodes the specified BigtableSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableSource.verify|verify} messages. + * Encodes the specified FirestoreSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.FirestoreSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableSource} message BigtableSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IFirestoreSource} message FirestoreSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigtableSource.encode = function encode(message, writer) { + FirestoreSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); - if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); - if (message.bigtableOptions != null && Object.hasOwnProperty.call(message, "bigtableOptions")) - $root.google.cloud.discoveryengine.v1.BigtableOptions.encode(message.bigtableOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseId); + if (message.collectionId != null && Object.hasOwnProperty.call(message, "collectionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); return writer; }; /** - * Encodes the specified BigtableSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableSource.verify|verify} messages. + * Encodes the specified FirestoreSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.FirestoreSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableSource} message BigtableSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IFirestoreSource} message FirestoreSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigtableSource.encodeDelimited = function encodeDelimited(message, writer) { + FirestoreSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigtableSource message from the specified reader or buffer. + * Decodes a FirestoreSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource + * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigtableSource.decode = function decode(reader, length) { + FirestoreSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.FirestoreSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9116,15 +11909,15 @@ break; } case 2: { - message.instanceId = reader.string(); + message.databaseId = reader.string(); break; } case 3: { - message.tableId = reader.string(); + message.collectionId = reader.string(); break; } case 4: { - message.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.decode(reader, reader.uint32()); + message.gcsStagingDir = reader.string(); break; } default: @@ -9136,153 +11929,147 @@ }; /** - * Decodes a BigtableSource message from the specified reader or buffer, length delimited. + * Decodes a FirestoreSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource + * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigtableSource.decodeDelimited = function decodeDelimited(reader) { + FirestoreSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigtableSource message. + * Verifies a FirestoreSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigtableSource.verify = function verify(message) { + FirestoreSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.bigtableOptions != null && message.hasOwnProperty("bigtableOptions")) { - var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.verify(message.bigtableOptions); - if (error) - return "bigtableOptions." + error; - } + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + if (!$util.isString(message.databaseId)) + return "databaseId: string expected"; + if (message.collectionId != null && message.hasOwnProperty("collectionId")) + if (!$util.isString(message.collectionId)) + return "collectionId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; return null; }; /** - * Creates a BigtableSource message from a plain object. Also converts values to their respective internal types. + * Creates a FirestoreSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource + * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource */ - BigtableSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableSource) + FirestoreSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.FirestoreSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.BigtableSource(); + var message = new $root.google.cloud.discoveryengine.v1.FirestoreSource(); if (object.projectId != null) message.projectId = String(object.projectId); - if (object.instanceId != null) - message.instanceId = String(object.instanceId); - if (object.tableId != null) - message.tableId = String(object.tableId); - if (object.bigtableOptions != null) { - if (typeof object.bigtableOptions !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigtableSource.bigtableOptions: object expected"); - message.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.fromObject(object.bigtableOptions); - } + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + if (object.collectionId != null) + message.collectionId = String(object.collectionId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); return message; }; /** - * Creates a plain object from a BigtableSource message. Also converts values to other types if specified. + * Creates a plain object from a FirestoreSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static - * @param {google.cloud.discoveryengine.v1.BigtableSource} message BigtableSource + * @param {google.cloud.discoveryengine.v1.FirestoreSource} message FirestoreSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigtableSource.toObject = function toObject(message, options) { + FirestoreSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.projectId = ""; - object.instanceId = ""; - object.tableId = ""; - object.bigtableOptions = null; + object.databaseId = ""; + object.collectionId = ""; + object.gcsStagingDir = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.bigtableOptions != null && message.hasOwnProperty("bigtableOptions")) - object.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.toObject(message.bigtableOptions, options); + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + if (message.collectionId != null && message.hasOwnProperty("collectionId")) + object.collectionId = message.collectionId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; return object; }; /** - * Converts this BigtableSource to JSON. + * Converts this FirestoreSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance * @returns {Object.} JSON object */ - BigtableSource.prototype.toJSON = function toJSON() { + FirestoreSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigtableSource + * Gets the default type url for FirestoreSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigtableSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FirestoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.FirestoreSource"; }; - return BigtableSource; + return FirestoreSource; })(); - v1.FhirStoreSource = (function() { + v1.ImportErrorConfig = (function() { /** - * Properties of a FhirStoreSource. + * Properties of an ImportErrorConfig. * @memberof google.cloud.discoveryengine.v1 - * @interface IFhirStoreSource - * @property {string|null} [fhirStore] FhirStoreSource fhirStore - * @property {string|null} [gcsStagingDir] FhirStoreSource gcsStagingDir + * @interface IImportErrorConfig + * @property {string|null} [gcsPrefix] ImportErrorConfig gcsPrefix */ /** - * Constructs a new FhirStoreSource. + * Constructs a new ImportErrorConfig. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a FhirStoreSource. - * @implements IFhirStoreSource + * @classdesc Represents an ImportErrorConfig. + * @implements IImportErrorConfig * @constructor - * @param {google.cloud.discoveryengine.v1.IFhirStoreSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportErrorConfig=} [properties] Properties to set */ - function FhirStoreSource(properties) { + function ImportErrorConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9290,89 +12077,89 @@ } /** - * FhirStoreSource fhirStore. - * @member {string} fhirStore - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * ImportErrorConfig gcsPrefix. + * @member {string|null|undefined} gcsPrefix + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @instance */ - FhirStoreSource.prototype.fhirStore = ""; + ImportErrorConfig.prototype.gcsPrefix = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * FhirStoreSource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * ImportErrorConfig destination. + * @member {"gcsPrefix"|undefined} destination + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @instance */ - FhirStoreSource.prototype.gcsStagingDir = ""; + Object.defineProperty(ImportErrorConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsPrefix"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new FhirStoreSource instance using the specified properties. + * Creates a new ImportErrorConfig instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1.IFhirStoreSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource instance + * @param {google.cloud.discoveryengine.v1.IImportErrorConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig instance */ - FhirStoreSource.create = function create(properties) { - return new FhirStoreSource(properties); + ImportErrorConfig.create = function create(properties) { + return new ImportErrorConfig(properties); }; /** - * Encodes the specified FhirStoreSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.FhirStoreSource.verify|verify} messages. + * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportErrorConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1.IFhirStoreSource} message FhirStoreSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportErrorConfig} message ImportErrorConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FhirStoreSource.encode = function encode(message, writer) { + ImportErrorConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fhirStore != null && Object.hasOwnProperty.call(message, "fhirStore")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fhirStore); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsStagingDir); + if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsPrefix); return writer; }; /** - * Encodes the specified FhirStoreSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.FhirStoreSource.verify|verify} messages. + * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportErrorConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1.IFhirStoreSource} message FhirStoreSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportErrorConfig} message ImportErrorConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FhirStoreSource.encodeDelimited = function encodeDelimited(message, writer) { + ImportErrorConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FhirStoreSource message from the specified reader or buffer. + * Decodes an ImportErrorConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource + * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FhirStoreSource.decode = function decode(reader, length) { + ImportErrorConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.FhirStoreSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportErrorConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.fhirStore = reader.string(); - break; - } - case 2: { - message.gcsStagingDir = reader.string(); + message.gcsPrefix = reader.string(); break; } default: @@ -9384,136 +12171,130 @@ }; /** - * Decodes a FhirStoreSource message from the specified reader or buffer, length delimited. + * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource + * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FhirStoreSource.decodeDelimited = function decodeDelimited(reader) { + ImportErrorConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FhirStoreSource message. + * Verifies an ImportErrorConfig message. * @function verify - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FhirStoreSource.verify = function verify(message) { + ImportErrorConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fhirStore != null && message.hasOwnProperty("fhirStore")) - if (!$util.isString(message.fhirStore)) - return "fhirStore: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; + var properties = {}; + if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { + properties.destination = 1; + if (!$util.isString(message.gcsPrefix)) + return "gcsPrefix: string expected"; + } return null; }; /** - * Creates a FhirStoreSource message from a plain object. Also converts values to their respective internal types. + * Creates an ImportErrorConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource + * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig */ - FhirStoreSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.FhirStoreSource) + ImportErrorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportErrorConfig) return object; - var message = new $root.google.cloud.discoveryengine.v1.FhirStoreSource(); - if (object.fhirStore != null) - message.fhirStore = String(object.fhirStore); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); + var message = new $root.google.cloud.discoveryengine.v1.ImportErrorConfig(); + if (object.gcsPrefix != null) + message.gcsPrefix = String(object.gcsPrefix); return message; }; /** - * Creates a plain object from a FhirStoreSource message. Also converts values to other types if specified. + * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1.FhirStoreSource} message FhirStoreSource + * @param {google.cloud.discoveryengine.v1.ImportErrorConfig} message ImportErrorConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FhirStoreSource.toObject = function toObject(message, options) { + ImportErrorConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fhirStore = ""; - object.gcsStagingDir = ""; + if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { + object.gcsPrefix = message.gcsPrefix; + if (options.oneofs) + object.destination = "gcsPrefix"; } - if (message.fhirStore != null && message.hasOwnProperty("fhirStore")) - object.fhirStore = message.fhirStore; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; return object; }; /** - * Converts this FhirStoreSource to JSON. + * Converts this ImportErrorConfig to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @instance * @returns {Object.} JSON object */ - FhirStoreSource.prototype.toJSON = function toJSON() { + ImportErrorConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FhirStoreSource + * Gets the default type url for ImportErrorConfig * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FhirStoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportErrorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.FhirStoreSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportErrorConfig"; }; - return FhirStoreSource; + return ImportErrorConfig; })(); - v1.CloudSqlSource = (function() { + v1.ImportUserEventsRequest = (function() { /** - * Properties of a CloudSqlSource. + * Properties of an ImportUserEventsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface ICloudSqlSource - * @property {string|null} [projectId] CloudSqlSource projectId - * @property {string|null} [instanceId] CloudSqlSource instanceId - * @property {string|null} [databaseId] CloudSqlSource databaseId - * @property {string|null} [tableId] CloudSqlSource tableId - * @property {string|null} [gcsStagingDir] CloudSqlSource gcsStagingDir - * @property {boolean|null} [offload] CloudSqlSource offload + * @interface IImportUserEventsRequest + * @property {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource|null} [inlineSource] ImportUserEventsRequest inlineSource + * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportUserEventsRequest gcsSource + * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportUserEventsRequest bigquerySource + * @property {string|null} [parent] ImportUserEventsRequest parent + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportUserEventsRequest errorConfig */ /** - * Constructs a new CloudSqlSource. + * Constructs a new ImportUserEventsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CloudSqlSource. - * @implements ICloudSqlSource + * @classdesc Represents an ImportUserEventsRequest. + * @implements IImportUserEventsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.ICloudSqlSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest=} [properties] Properties to set */ - function CloudSqlSource(properties) { + function ImportUserEventsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9521,145 +12302,145 @@ } /** - * CloudSqlSource projectId. - * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest inlineSource. + * @member {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.projectId = ""; + ImportUserEventsRequest.prototype.inlineSource = null; /** - * CloudSqlSource instanceId. - * @member {string} instanceId - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest gcsSource. + * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.instanceId = ""; + ImportUserEventsRequest.prototype.gcsSource = null; /** - * CloudSqlSource databaseId. - * @member {string} databaseId - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest bigquerySource. + * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.databaseId = ""; + ImportUserEventsRequest.prototype.bigquerySource = null; /** - * CloudSqlSource tableId. - * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.tableId = ""; + ImportUserEventsRequest.prototype.parent = ""; /** - * CloudSqlSource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.gcsStagingDir = ""; + ImportUserEventsRequest.prototype.errorConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CloudSqlSource offload. - * @member {boolean} offload - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest source. + * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.offload = false; + Object.defineProperty(ImportUserEventsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CloudSqlSource instance using the specified properties. + * Creates a new ImportUserEventsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1.ICloudSqlSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource instance + * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest instance */ - CloudSqlSource.create = function create(properties) { - return new CloudSqlSource(properties); + ImportUserEventsRequest.create = function create(properties) { + return new ImportUserEventsRequest(properties); }; /** - * Encodes the specified CloudSqlSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. + * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1.ICloudSqlSource} message CloudSqlSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlSource.encode = function encode(message, writer) { + ImportUserEventsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); - if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId); - if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcsStagingDir); - if (message.offload != null && Object.hasOwnProperty.call(message, "offload")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.offload); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) + $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) + $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudSqlSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. + * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1.ICloudSqlSource} message CloudSqlSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlSource.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlSource message from the specified reader or buffer. + * Decodes an ImportUserEventsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlSource.decode = function decode(reader, length) { + ImportUserEventsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CloudSqlSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } case 2: { - message.instanceId = reader.string(); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.decode(reader, reader.uint32()); break; } case 3: { - message.databaseId = reader.string(); + message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); break; } case 4: { - message.tableId = reader.string(); + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); break; } - case 5: { - message.gcsStagingDir = reader.string(); + case 1: { + message.parent = reader.string(); break; } - case 6: { - message.offload = reader.bool(); + case 5: { + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); break; } default: @@ -9671,166 +12452,423 @@ }; /** - * Decodes a CloudSqlSource message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlSource.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlSource message. + * Verifies an ImportUserEventsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlSource.verify = function verify(message) { + ImportUserEventsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - if (!$util.isString(message.databaseId)) - return "databaseId: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; - if (message.offload != null && message.hasOwnProperty("offload")) - if (typeof message.offload !== "boolean") - return "offload: boolean expected"; + var properties = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify(message.inlineSource); + if (error) + return "inlineSource." + error; + } + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } return null; }; /** - * Creates a CloudSqlSource message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest */ - CloudSqlSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CloudSqlSource) + ImportUserEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.CloudSqlSource(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instanceId != null) - message.instanceId = String(object.instanceId); - if (object.databaseId != null) - message.databaseId = String(object.databaseId); - if (object.tableId != null) - message.tableId = String(object.tableId); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); - if (object.offload != null) - message.offload = Boolean(object.offload); + var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest(); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.fromObject(object.inlineSource); + } + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); + } + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + } return message; }; /** - * Creates a plain object from a CloudSqlSource message. Also converts values to other types if specified. + * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1.CloudSqlSource} message CloudSqlSource + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest} message ImportUserEventsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlSource.toObject = function toObject(message, options) { + ImportUserEventsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.instanceId = ""; - object.databaseId = ""; - object.tableId = ""; - object.gcsStagingDir = ""; - object.offload = false; + object.parent = ""; + object.errorConfig = null; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - object.databaseId = message.databaseId; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; - if (message.offload != null && message.hasOwnProperty("offload")) - object.offload = message.offload; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); return object; }; /** - * Converts this CloudSqlSource to JSON. + * Converts this ImportUserEventsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance * @returns {Object.} JSON object */ - CloudSqlSource.prototype.toJSON = function toJSON() { + ImportUserEventsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlSource + * Gets the default type url for ImportUserEventsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CloudSqlSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsRequest"; }; - return CloudSqlSource; + ImportUserEventsRequest.InlineSource = (function() { + + /** + * Properties of an InlineSource. + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @interface IInlineSource + * @property {Array.|null} [userEvents] InlineSource userEvents + */ + + /** + * Constructs a new InlineSource. + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @classdesc Represents an InlineSource. + * @implements IInlineSource + * @constructor + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set + */ + function InlineSource(properties) { + this.userEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InlineSource userEvents. + * @member {Array.} userEvents + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @instance + */ + InlineSource.prototype.userEvents = $util.emptyArray; + + /** + * Creates a new InlineSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource instance + */ + InlineSource.create = function create(properties) { + return new InlineSource(properties); + }; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userEvents != null && message.userEvents.length) + for (var i = 0; i < message.userEvents.length; ++i) + $root.google.cloud.discoveryengine.v1.UserEvent.encode(message.userEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userEvents && message.userEvents.length)) + message.userEvents = []; + message.userEvents.push($root.google.cloud.discoveryengine.v1.UserEvent.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InlineSource message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userEvents != null && message.hasOwnProperty("userEvents")) { + if (!Array.isArray(message.userEvents)) + return "userEvents: array expected"; + for (var i = 0; i < message.userEvents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.UserEvent.verify(message.userEvents[i]); + if (error) + return "userEvents." + error; + } + } + return null; + }; + + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource + */ + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource) + return object; + var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource(); + if (object.userEvents) { + if (!Array.isArray(object.userEvents)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.userEvents: array expected"); + message.userEvents = []; + for (var i = 0; i < object.userEvents.length; ++i) { + if (typeof object.userEvents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.userEvents: object expected"); + message.userEvents[i] = $root.google.cloud.discoveryengine.v1.UserEvent.fromObject(object.userEvents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} message InlineSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userEvents = []; + if (message.userEvents && message.userEvents.length) { + object.userEvents = []; + for (var j = 0; j < message.userEvents.length; ++j) + object.userEvents[j] = $root.google.cloud.discoveryengine.v1.UserEvent.toObject(message.userEvents[j], options); + } + return object; + }; + + /** + * Converts this InlineSource to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @instance + * @returns {Object.} JSON object + */ + InlineSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource"; + }; + + return InlineSource; + })(); + + return ImportUserEventsRequest; })(); - v1.FirestoreSource = (function() { + v1.ImportUserEventsResponse = (function() { /** - * Properties of a FirestoreSource. + * Properties of an ImportUserEventsResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IFirestoreSource - * @property {string|null} [projectId] FirestoreSource projectId - * @property {string|null} [databaseId] FirestoreSource databaseId - * @property {string|null} [collectionId] FirestoreSource collectionId - * @property {string|null} [gcsStagingDir] FirestoreSource gcsStagingDir + * @interface IImportUserEventsResponse + * @property {Array.|null} [errorSamples] ImportUserEventsResponse errorSamples + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportUserEventsResponse errorConfig + * @property {number|Long|null} [joinedEventsCount] ImportUserEventsResponse joinedEventsCount + * @property {number|Long|null} [unjoinedEventsCount] ImportUserEventsResponse unjoinedEventsCount */ /** - * Constructs a new FirestoreSource. + * Constructs a new ImportUserEventsResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a FirestoreSource. - * @implements IFirestoreSource + * @classdesc Represents an ImportUserEventsResponse. + * @implements IImportUserEventsResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IFirestoreSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse=} [properties] Properties to set */ - function FirestoreSource(properties) { + function ImportUserEventsResponse(properties) { + this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9838,117 +12876,120 @@ } /** - * FirestoreSource projectId. - * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * ImportUserEventsResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance */ - FirestoreSource.prototype.projectId = ""; + ImportUserEventsResponse.prototype.errorSamples = $util.emptyArray; /** - * FirestoreSource databaseId. - * @member {string} databaseId - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * ImportUserEventsResponse errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance */ - FirestoreSource.prototype.databaseId = ""; + ImportUserEventsResponse.prototype.errorConfig = null; /** - * FirestoreSource collectionId. - * @member {string} collectionId - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * ImportUserEventsResponse joinedEventsCount. + * @member {number|Long} joinedEventsCount + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance */ - FirestoreSource.prototype.collectionId = ""; + ImportUserEventsResponse.prototype.joinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FirestoreSource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * ImportUserEventsResponse unjoinedEventsCount. + * @member {number|Long} unjoinedEventsCount + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance */ - FirestoreSource.prototype.gcsStagingDir = ""; + ImportUserEventsResponse.prototype.unjoinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new FirestoreSource instance using the specified properties. + * Creates a new ImportUserEventsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1.IFirestoreSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource instance + * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse instance */ - FirestoreSource.create = function create(properties) { - return new FirestoreSource(properties); + ImportUserEventsResponse.create = function create(properties) { + return new ImportUserEventsResponse(properties); }; /** - * Encodes the specified FirestoreSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.FirestoreSource.verify|verify} messages. + * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1.IFirestoreSource} message FirestoreSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FirestoreSource.encode = function encode(message, writer) { + ImportUserEventsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseId); - if (message.collectionId != null && Object.hasOwnProperty.call(message, "collectionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionId); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.joinedEventsCount != null && Object.hasOwnProperty.call(message, "joinedEventsCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.joinedEventsCount); + if (message.unjoinedEventsCount != null && Object.hasOwnProperty.call(message, "unjoinedEventsCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unjoinedEventsCount); return writer; }; /** - * Encodes the specified FirestoreSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.FirestoreSource.verify|verify} messages. + * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1.IFirestoreSource} message FirestoreSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FirestoreSource.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FirestoreSource message from the specified reader or buffer. + * Decodes an ImportUserEventsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FirestoreSource.decode = function decode(reader, length) { + ImportUserEventsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.FirestoreSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.projectId = reader.string(); + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } case 2: { - message.databaseId = reader.string(); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); break; } case 3: { - message.collectionId = reader.string(); + message.joinedEventsCount = reader.int64(); break; } case 4: { - message.gcsStagingDir = reader.string(); + message.unjoinedEventsCount = reader.int64(); break; } default: @@ -9960,147 +13001,201 @@ }; /** - * Decodes a FirestoreSource message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FirestoreSource.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FirestoreSource message. + * Verifies an ImportUserEventsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FirestoreSource.verify = function verify(message) { + ImportUserEventsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - if (!$util.isString(message.databaseId)) - return "databaseId: string expected"; - if (message.collectionId != null && message.hasOwnProperty("collectionId")) - if (!$util.isString(message.collectionId)) - return "collectionId: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } + if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) + if (!$util.isInteger(message.joinedEventsCount) && !(message.joinedEventsCount && $util.isInteger(message.joinedEventsCount.low) && $util.isInteger(message.joinedEventsCount.high))) + return "joinedEventsCount: integer|Long expected"; + if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) + if (!$util.isInteger(message.unjoinedEventsCount) && !(message.unjoinedEventsCount && $util.isInteger(message.unjoinedEventsCount.low) && $util.isInteger(message.unjoinedEventsCount.high))) + return "unjoinedEventsCount: integer|Long expected"; return null; }; /** - * Creates a FirestoreSource message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse */ - FirestoreSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.FirestoreSource) + ImportUserEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.FirestoreSource(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.databaseId != null) - message.databaseId = String(object.databaseId); - if (object.collectionId != null) - message.collectionId = String(object.collectionId); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); + var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } + } + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + } + if (object.joinedEventsCount != null) + if ($util.Long) + (message.joinedEventsCount = $util.Long.fromValue(object.joinedEventsCount)).unsigned = false; + else if (typeof object.joinedEventsCount === "string") + message.joinedEventsCount = parseInt(object.joinedEventsCount, 10); + else if (typeof object.joinedEventsCount === "number") + message.joinedEventsCount = object.joinedEventsCount; + else if (typeof object.joinedEventsCount === "object") + message.joinedEventsCount = new $util.LongBits(object.joinedEventsCount.low >>> 0, object.joinedEventsCount.high >>> 0).toNumber(); + if (object.unjoinedEventsCount != null) + if ($util.Long) + (message.unjoinedEventsCount = $util.Long.fromValue(object.unjoinedEventsCount)).unsigned = false; + else if (typeof object.unjoinedEventsCount === "string") + message.unjoinedEventsCount = parseInt(object.unjoinedEventsCount, 10); + else if (typeof object.unjoinedEventsCount === "number") + message.unjoinedEventsCount = object.unjoinedEventsCount; + else if (typeof object.unjoinedEventsCount === "object") + message.unjoinedEventsCount = new $util.LongBits(object.unjoinedEventsCount.low >>> 0, object.unjoinedEventsCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a FirestoreSource message. Also converts values to other types if specified. + * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1.FirestoreSource} message FirestoreSource + * @param {google.cloud.discoveryengine.v1.ImportUserEventsResponse} message ImportUserEventsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FirestoreSource.toObject = function toObject(message, options) { + ImportUserEventsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errorSamples = []; if (options.defaults) { - object.projectId = ""; - object.databaseId = ""; - object.collectionId = ""; - object.gcsStagingDir = ""; + object.errorConfig = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.joinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.joinedEventsCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unjoinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unjoinedEventsCount = options.longs === String ? "0" : 0; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - object.databaseId = message.databaseId; - if (message.collectionId != null && message.hasOwnProperty("collectionId")) - object.collectionId = message.collectionId; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); + if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) + if (typeof message.joinedEventsCount === "number") + object.joinedEventsCount = options.longs === String ? String(message.joinedEventsCount) : message.joinedEventsCount; + else + object.joinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.joinedEventsCount) : options.longs === Number ? new $util.LongBits(message.joinedEventsCount.low >>> 0, message.joinedEventsCount.high >>> 0).toNumber() : message.joinedEventsCount; + if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) + if (typeof message.unjoinedEventsCount === "number") + object.unjoinedEventsCount = options.longs === String ? String(message.unjoinedEventsCount) : message.unjoinedEventsCount; + else + object.unjoinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unjoinedEventsCount) : options.longs === Number ? new $util.LongBits(message.unjoinedEventsCount.low >>> 0, message.unjoinedEventsCount.high >>> 0).toNumber() : message.unjoinedEventsCount; return object; }; /** - * Converts this FirestoreSource to JSON. + * Converts this ImportUserEventsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance * @returns {Object.} JSON object */ - FirestoreSource.prototype.toJSON = function toJSON() { + ImportUserEventsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FirestoreSource + * Gets the default type url for ImportUserEventsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FirestoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.FirestoreSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsResponse"; }; - return FirestoreSource; + return ImportUserEventsResponse; })(); - v1.ImportErrorConfig = (function() { + v1.ImportUserEventsMetadata = (function() { /** - * Properties of an ImportErrorConfig. + * Properties of an ImportUserEventsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportErrorConfig - * @property {string|null} [gcsPrefix] ImportErrorConfig gcsPrefix + * @interface IImportUserEventsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportUserEventsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportUserEventsMetadata updateTime + * @property {number|Long|null} [successCount] ImportUserEventsMetadata successCount + * @property {number|Long|null} [failureCount] ImportUserEventsMetadata failureCount */ /** - * Constructs a new ImportErrorConfig. + * Constructs a new ImportUserEventsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportErrorConfig. - * @implements IImportErrorConfig + * @classdesc Represents an ImportUserEventsMetadata. + * @implements IImportUserEventsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IImportErrorConfig=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata=} [properties] Properties to set */ - function ImportErrorConfig(properties) { + function ImportUserEventsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10108,89 +13203,117 @@ } /** - * ImportErrorConfig gcsPrefix. - * @member {string|null|undefined} gcsPrefix - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * ImportUserEventsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @instance */ - ImportErrorConfig.prototype.gcsPrefix = null; + ImportUserEventsMetadata.prototype.createTime = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ImportUserEventsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata + * @instance + */ + ImportUserEventsMetadata.prototype.updateTime = null; /** - * ImportErrorConfig destination. - * @member {"gcsPrefix"|undefined} destination - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * ImportUserEventsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @instance */ - Object.defineProperty(ImportErrorConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsPrefix"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImportUserEventsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportErrorConfig instance using the specified properties. + * ImportUserEventsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata + * @instance + */ + ImportUserEventsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImportUserEventsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportErrorConfig=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig instance + * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata instance */ - ImportErrorConfig.create = function create(properties) { - return new ImportErrorConfig(properties); + ImportUserEventsMetadata.create = function create(properties) { + return new ImportUserEventsMetadata(properties); }; /** - * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportErrorConfig.verify|verify} messages. + * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportErrorConfig} message ImportErrorConfig message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportErrorConfig.encode = function encode(message, writer) { + ImportUserEventsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsPrefix); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); return writer; }; /** - * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportErrorConfig.verify|verify} messages. + * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportErrorConfig} message ImportErrorConfig message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportErrorConfig.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportErrorConfig message from the specified reader or buffer. + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportErrorConfig.decode = function decode(reader, length) { + ImportUserEventsMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportErrorConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcsPrefix = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); break; } default: @@ -10202,130 +13325,189 @@ }; /** - * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportErrorConfig.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportErrorConfig message. + * Verifies an ImportUserEventsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportErrorConfig.verify = function verify(message) { + ImportUserEventsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { - properties.destination = 1; - if (!$util.isString(message.gcsPrefix)) - return "gcsPrefix: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; return null; }; /** - * Creates an ImportErrorConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata */ - ImportErrorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportErrorConfig) + ImportUserEventsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportErrorConfig(); - if (object.gcsPrefix != null) - message.gcsPrefix = String(object.gcsPrefix); + var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified. + * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1.ImportErrorConfig} message ImportErrorConfig + * @param {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} message ImportUserEventsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportErrorConfig.toObject = function toObject(message, options) { + ImportUserEventsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { - object.gcsPrefix = message.gcsPrefix; - if (options.oneofs) - object.destination = "gcsPrefix"; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; return object; }; /** - * Converts this ImportErrorConfig to JSON. + * Converts this ImportUserEventsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @instance * @returns {Object.} JSON object */ - ImportErrorConfig.prototype.toJSON = function toJSON() { + ImportUserEventsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportErrorConfig + * Gets the default type url for ImportUserEventsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportErrorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportErrorConfig"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsMetadata"; }; - return ImportErrorConfig; + return ImportUserEventsMetadata; })(); - v1.ImportUserEventsRequest = (function() { + v1.ImportDocumentsMetadata = (function() { /** - * Properties of an ImportUserEventsRequest. + * Properties of an ImportDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportUserEventsRequest - * @property {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource|null} [inlineSource] ImportUserEventsRequest inlineSource - * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportUserEventsRequest gcsSource - * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportUserEventsRequest bigquerySource - * @property {string|null} [parent] ImportUserEventsRequest parent - * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportUserEventsRequest errorConfig + * @interface IImportDocumentsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportDocumentsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportDocumentsMetadata updateTime + * @property {number|Long|null} [successCount] ImportDocumentsMetadata successCount + * @property {number|Long|null} [failureCount] ImportDocumentsMetadata failureCount + * @property {number|Long|null} [totalCount] ImportDocumentsMetadata totalCount */ /** - * Constructs a new ImportUserEventsRequest. + * Constructs a new ImportDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportUserEventsRequest. - * @implements IImportUserEventsRequest + * @classdesc Represents an ImportDocumentsMetadata. + * @implements IImportDocumentsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata=} [properties] Properties to set */ - function ImportUserEventsRequest(properties) { + function ImportDocumentsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10333,145 +13515,131 @@ } /** - * ImportUserEventsRequest inlineSource. - * @member {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @instance - */ - ImportUserEventsRequest.prototype.inlineSource = null; - - /** - * ImportUserEventsRequest gcsSource. - * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - ImportUserEventsRequest.prototype.gcsSource = null; + ImportDocumentsMetadata.prototype.createTime = null; /** - * ImportUserEventsRequest bigquerySource. - * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - ImportUserEventsRequest.prototype.bigquerySource = null; + ImportDocumentsMetadata.prototype.updateTime = null; /** - * ImportUserEventsRequest parent. - * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - ImportUserEventsRequest.prototype.parent = ""; + ImportDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImportUserEventsRequest errorConfig. - * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - ImportUserEventsRequest.prototype.errorConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ImportDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImportUserEventsRequest source. - * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata totalCount. + * @member {number|Long} totalCount + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - Object.defineProperty(ImportUserEventsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImportDocumentsMetadata.prototype.totalCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportUserEventsRequest instance using the specified properties. + * Creates a new ImportDocumentsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest instance + * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata instance */ - ImportUserEventsRequest.create = function create(properties) { - return new ImportUserEventsRequest(properties); + ImportDocumentsMetadata.create = function create(properties) { + return new ImportDocumentsMetadata(properties); }; /** - * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.verify|verify} messages. + * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsRequest.encode = function encode(message, writer) { + ImportDocumentsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) - $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); + if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalCount); return writer; }; /** - * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.verify|verify} messages. + * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportUserEventsRequest message from the specified reader or buffer. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsRequest.decode = function decode(reader, length) { + ImportDocumentsMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 2: { - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); + message.successCount = reader.int64(); break; } case 4: { - message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); - break; - } - case 1: { - message.parent = reader.string(); + message.failureCount = reader.int64(); break; } case 5: { - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); + message.totalCount = reader.int64(); break; } default: @@ -10483,423 +13651,221 @@ }; /** - * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsRequest.decodeDelimited = function decodeDelimited(reader) { + ImportDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportUserEventsRequest message. + * Verifies an ImportDocumentsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportUserEventsRequest.verify = function verify(message) { + ImportDocumentsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify(message.inlineSource); - if (error) - return "inlineSource." + error; - } - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); - if (error) - return "bigquerySource." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "errorConfig." + error; + return "updateTime." + error; } + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; + if (message.totalCount != null && message.hasOwnProperty("totalCount")) + if (!$util.isInteger(message.totalCount) && !(message.totalCount && $util.isInteger(message.totalCount.low) && $util.isInteger(message.totalCount.high))) + return "totalCount: integer|Long expected"; return null; }; /** - * Creates an ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata */ - ImportUserEventsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest) + ImportDocumentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest(); - if (object.inlineSource != null) { - if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.fromObject(object.inlineSource); - } - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); - } - if (object.bigquerySource != null) { - if (typeof object.bigquerySource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.bigquerySource: object expected"); - message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); + var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.parent != null) - message.parent = String(object.parent); - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); + if (object.totalCount != null) + if ($util.Long) + (message.totalCount = $util.Long.fromValue(object.totalCount)).unsigned = false; + else if (typeof object.totalCount === "string") + message.totalCount = parseInt(object.totalCount, 10); + else if (typeof object.totalCount === "number") + message.totalCount = object.totalCount; + else if (typeof object.totalCount === "object") + message.totalCount = new $util.LongBits(object.totalCount.low >>> 0, object.totalCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest} message ImportUserEventsRequest + * @param {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} message ImportDocumentsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportUserEventsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.errorConfig = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.toObject(message.inlineSource, options); - if (options.oneofs) - object.source = "inlineSource"; - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); - if (options.oneofs) - object.source = "bigquerySource"; - } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); - return object; - }; - - /** - * Converts this ImportUserEventsRequest to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @instance - * @returns {Object.} JSON object - */ - ImportUserEventsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportUserEventsRequest - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportUserEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsRequest"; - }; - - ImportUserEventsRequest.InlineSource = (function() { - - /** - * Properties of an InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @interface IInlineSource - * @property {Array.|null} [userEvents] InlineSource userEvents - */ - - /** - * Constructs a new InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @classdesc Represents an InlineSource. - * @implements IInlineSource - * @constructor - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set - */ - function InlineSource(properties) { - this.userEvents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InlineSource userEvents. - * @member {Array.} userEvents - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @instance - */ - InlineSource.prototype.userEvents = $util.emptyArray; - - /** - * Creates a new InlineSource instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource instance - */ - InlineSource.create = function create(properties) { - return new InlineSource(properties); - }; - - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userEvents != null && message.userEvents.length) - for (var i = 0; i < message.userEvents.length; ++i) - $root.google.cloud.discoveryengine.v1.UserEvent.encode(message.userEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.userEvents && message.userEvents.length)) - message.userEvents = []; - message.userEvents.push($root.google.cloud.discoveryengine.v1.UserEvent.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InlineSource message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InlineSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userEvents != null && message.hasOwnProperty("userEvents")) { - if (!Array.isArray(message.userEvents)) - return "userEvents: array expected"; - for (var i = 0; i < message.userEvents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.UserEvent.verify(message.userEvents[i]); - if (error) - return "userEvents." + error; - } - } - return null; - }; - - /** - * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource - */ - InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource) - return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource(); - if (object.userEvents) { - if (!Array.isArray(object.userEvents)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.userEvents: array expected"); - message.userEvents = []; - for (var i = 0; i < object.userEvents.length; ++i) { - if (typeof object.userEvents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.userEvents: object expected"); - message.userEvents[i] = $root.google.cloud.discoveryengine.v1.UserEvent.fromObject(object.userEvents[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} message InlineSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InlineSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userEvents = []; - if (message.userEvents && message.userEvents.length) { - object.userEvents = []; - for (var j = 0; j < message.userEvents.length; ++j) - object.userEvents[j] = $root.google.cloud.discoveryengine.v1.UserEvent.toObject(message.userEvents[j], options); - } - return object; - }; - - /** - * Converts this InlineSource to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @instance - * @returns {Object.} JSON object - */ - InlineSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ImportDocumentsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalCount = options.longs === String ? "0" : 0; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; + if (message.totalCount != null && message.hasOwnProperty("totalCount")) + if (typeof message.totalCount === "number") + object.totalCount = options.longs === String ? String(message.totalCount) : message.totalCount; + else + object.totalCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalCount) : options.longs === Number ? new $util.LongBits(message.totalCount.low >>> 0, message.totalCount.high >>> 0).toNumber() : message.totalCount; + return object; + }; - /** - * Gets the default type url for InlineSource - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource"; - }; + /** + * Converts this ImportDocumentsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportDocumentsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return InlineSource; - })(); + /** + * Gets the default type url for ImportDocumentsMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsMetadata"; + }; - return ImportUserEventsRequest; + return ImportDocumentsMetadata; })(); - v1.ImportUserEventsResponse = (function() { + v1.ImportDocumentsRequest = (function() { /** - * Properties of an ImportUserEventsResponse. + * Properties of an ImportDocumentsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportUserEventsResponse - * @property {Array.|null} [errorSamples] ImportUserEventsResponse errorSamples - * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportUserEventsResponse errorConfig - * @property {number|Long|null} [joinedEventsCount] ImportUserEventsResponse joinedEventsCount - * @property {number|Long|null} [unjoinedEventsCount] ImportUserEventsResponse unjoinedEventsCount + * @interface IImportDocumentsRequest + * @property {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null} [inlineSource] ImportDocumentsRequest inlineSource + * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportDocumentsRequest gcsSource + * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportDocumentsRequest bigquerySource + * @property {google.cloud.discoveryengine.v1.IFhirStoreSource|null} [fhirStoreSource] ImportDocumentsRequest fhirStoreSource + * @property {google.cloud.discoveryengine.v1.ISpannerSource|null} [spannerSource] ImportDocumentsRequest spannerSource + * @property {google.cloud.discoveryengine.v1.ICloudSqlSource|null} [cloudSqlSource] ImportDocumentsRequest cloudSqlSource + * @property {google.cloud.discoveryengine.v1.IFirestoreSource|null} [firestoreSource] ImportDocumentsRequest firestoreSource + * @property {google.cloud.discoveryengine.v1.IAlloyDbSource|null} [alloyDbSource] ImportDocumentsRequest alloyDbSource + * @property {google.cloud.discoveryengine.v1.IBigtableSource|null} [bigtableSource] ImportDocumentsRequest bigtableSource + * @property {string|null} [parent] ImportDocumentsRequest parent + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportDocumentsRequest errorConfig + * @property {google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|null} [reconciliationMode] ImportDocumentsRequest reconciliationMode + * @property {google.protobuf.IFieldMask|null} [updateMask] ImportDocumentsRequest updateMask + * @property {boolean|null} [autoGenerateIds] ImportDocumentsRequest autoGenerateIds + * @property {string|null} [idField] ImportDocumentsRequest idField */ /** - * Constructs a new ImportUserEventsResponse. + * Constructs a new ImportDocumentsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportUserEventsResponse. - * @implements IImportUserEventsResponse + * @classdesc Represents an ImportDocumentsRequest. + * @implements IImportDocumentsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest=} [properties] Properties to set */ - function ImportUserEventsResponse(properties) { - this.errorSamples = []; + function ImportDocumentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10907,120 +13873,285 @@ } /** - * ImportUserEventsResponse errorSamples. - * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * ImportDocumentsRequest inlineSource. + * @member {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance */ - ImportUserEventsResponse.prototype.errorSamples = $util.emptyArray; + ImportDocumentsRequest.prototype.inlineSource = null; /** - * ImportUserEventsResponse errorConfig. + * ImportDocumentsRequest gcsSource. + * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.gcsSource = null; + + /** + * ImportDocumentsRequest bigquerySource. + * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.bigquerySource = null; + + /** + * ImportDocumentsRequest fhirStoreSource. + * @member {google.cloud.discoveryengine.v1.IFhirStoreSource|null|undefined} fhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.fhirStoreSource = null; + + /** + * ImportDocumentsRequest spannerSource. + * @member {google.cloud.discoveryengine.v1.ISpannerSource|null|undefined} spannerSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.spannerSource = null; + + /** + * ImportDocumentsRequest cloudSqlSource. + * @member {google.cloud.discoveryengine.v1.ICloudSqlSource|null|undefined} cloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.cloudSqlSource = null; + + /** + * ImportDocumentsRequest firestoreSource. + * @member {google.cloud.discoveryengine.v1.IFirestoreSource|null|undefined} firestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.firestoreSource = null; + + /** + * ImportDocumentsRequest alloyDbSource. + * @member {google.cloud.discoveryengine.v1.IAlloyDbSource|null|undefined} alloyDbSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.alloyDbSource = null; + + /** + * ImportDocumentsRequest bigtableSource. + * @member {google.cloud.discoveryengine.v1.IBigtableSource|null|undefined} bigtableSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.bigtableSource = null; + + /** + * ImportDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.parent = ""; + + /** + * ImportDocumentsRequest errorConfig. * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance */ - ImportUserEventsResponse.prototype.errorConfig = null; + ImportDocumentsRequest.prototype.errorConfig = null; /** - * ImportUserEventsResponse joinedEventsCount. - * @member {number|Long} joinedEventsCount - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * ImportDocumentsRequest reconciliationMode. + * @member {google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode} reconciliationMode + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance */ - ImportUserEventsResponse.prototype.joinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportDocumentsRequest.prototype.reconciliationMode = 0; /** - * ImportUserEventsResponse unjoinedEventsCount. - * @member {number|Long} unjoinedEventsCount - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * ImportDocumentsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance */ - ImportUserEventsResponse.prototype.unjoinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportDocumentsRequest.prototype.updateMask = null; /** - * Creates a new ImportUserEventsResponse instance using the specified properties. + * ImportDocumentsRequest autoGenerateIds. + * @member {boolean} autoGenerateIds + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.autoGenerateIds = false; + + /** + * ImportDocumentsRequest idField. + * @member {string} idField + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.idField = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportDocumentsRequest source. + * @member {"inlineSource"|"gcsSource"|"bigquerySource"|"fhirStoreSource"|"spannerSource"|"cloudSqlSource"|"firestoreSource"|"alloyDbSource"|"bigtableSource"|undefined} source + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + Object.defineProperty(ImportDocumentsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource", "fhirStoreSource", "spannerSource", "cloudSqlSource", "firestoreSource", "alloyDbSource", "bigtableSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportDocumentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse instance + * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest instance */ - ImportUserEventsResponse.create = function create(properties) { - return new ImportUserEventsResponse(properties); + ImportDocumentsRequest.create = function create(properties) { + return new ImportDocumentsRequest(properties); }; /** - * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. + * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsResponse.encode = function encode(message, writer) { + ImportDocumentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errorSamples != null && message.errorSamples.length) - for (var i = 0; i < message.errorSamples.length; ++i) - $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) + $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) + $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.joinedEventsCount != null && Object.hasOwnProperty.call(message, "joinedEventsCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.joinedEventsCount); - if (message.unjoinedEventsCount != null && Object.hasOwnProperty.call(message, "unjoinedEventsCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unjoinedEventsCount); + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.reconciliationMode != null && Object.hasOwnProperty.call(message, "reconciliationMode")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.reconciliationMode); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.autoGenerateIds != null && Object.hasOwnProperty.call(message, "autoGenerateIds")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.autoGenerateIds); + if (message.idField != null && Object.hasOwnProperty.call(message, "idField")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.idField); + if (message.fhirStoreSource != null && Object.hasOwnProperty.call(message, "fhirStoreSource")) + $root.google.cloud.discoveryengine.v1.FhirStoreSource.encode(message.fhirStoreSource, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.spannerSource != null && Object.hasOwnProperty.call(message, "spannerSource")) + $root.google.cloud.discoveryengine.v1.SpannerSource.encode(message.spannerSource, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cloudSqlSource != null && Object.hasOwnProperty.call(message, "cloudSqlSource")) + $root.google.cloud.discoveryengine.v1.CloudSqlSource.encode(message.cloudSqlSource, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.firestoreSource != null && Object.hasOwnProperty.call(message, "firestoreSource")) + $root.google.cloud.discoveryengine.v1.FirestoreSource.encode(message.firestoreSource, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.alloyDbSource != null && Object.hasOwnProperty.call(message, "alloyDbSource")) + $root.google.cloud.discoveryengine.v1.AlloyDbSource.encode(message.alloyDbSource, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.bigtableSource != null && Object.hasOwnProperty.call(message, "bigtableSource")) + $root.google.cloud.discoveryengine.v1.BigtableSource.encode(message.bigtableSource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. + * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsResponse.decode = function decode(reader, length) { + ImportDocumentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); + break; + } + case 10: { + message.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.decode(reader, reader.uint32()); + break; + } + case 11: { + message.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.decode(reader, reader.uint32()); + break; + } + case 12: { + message.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.decode(reader, reader.uint32()); + break; + } + case 13: { + message.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.decode(reader, reader.uint32()); + break; + } + case 14: { + message.alloyDbSource = $root.google.cloud.discoveryengine.v1.AlloyDbSource.decode(reader, reader.uint32()); + break; + } + case 15: { + message.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.decode(reader, reader.uint32()); + break; + } case 1: { - if (!(message.errorSamples && message.errorSamples.length)) - message.errorSamples = []; - message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } - case 2: { + case 5: { message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); break; } - case 3: { - message.joinedEventsCount = reader.int64(); + case 6: { + message.reconciliationMode = reader.int32(); break; } - case 4: { - message.unjoinedEventsCount = reader.int64(); + case 7: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 8: { + message.autoGenerateIds = reader.bool(); + break; + } + case 9: { + message.idField = reader.string(); break; } default: @@ -11032,513 +14163,618 @@ }; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsResponse.decodeDelimited = function decodeDelimited(reader) { + ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportUserEventsResponse message. + * Verifies an ImportDocumentsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportUserEventsResponse.verify = function verify(message) { + ImportDocumentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { - if (!Array.isArray(message.errorSamples)) - return "errorSamples: array expected"; - for (var i = 0; i < message.errorSamples.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + var properties = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify(message.inlineSource); if (error) - return "errorSamples." + error; + return "inlineSource." + error; + } + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } + } + if (message.fhirStoreSource != null && message.hasOwnProperty("fhirStoreSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.FhirStoreSource.verify(message.fhirStoreSource); + if (error) + return "fhirStoreSource." + error; + } + } + if (message.spannerSource != null && message.hasOwnProperty("spannerSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.SpannerSource.verify(message.spannerSource); + if (error) + return "spannerSource." + error; + } + } + if (message.cloudSqlSource != null && message.hasOwnProperty("cloudSqlSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.CloudSqlSource.verify(message.cloudSqlSource); + if (error) + return "cloudSqlSource." + error; + } + } + if (message.firestoreSource != null && message.hasOwnProperty("firestoreSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.FirestoreSource.verify(message.firestoreSource); + if (error) + return "firestoreSource." + error; + } + } + if (message.alloyDbSource != null && message.hasOwnProperty("alloyDbSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.AlloyDbSource.verify(message.alloyDbSource); + if (error) + return "alloyDbSource." + error; + } + } + if (message.bigtableSource != null && message.hasOwnProperty("bigtableSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.BigtableSource.verify(message.bigtableSource); + if (error) + return "bigtableSource." + error; } } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); if (error) return "errorConfig." + error; } - if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) - if (!$util.isInteger(message.joinedEventsCount) && !(message.joinedEventsCount && $util.isInteger(message.joinedEventsCount.low) && $util.isInteger(message.joinedEventsCount.high))) - return "joinedEventsCount: integer|Long expected"; - if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) - if (!$util.isInteger(message.unjoinedEventsCount) && !(message.unjoinedEventsCount && $util.isInteger(message.unjoinedEventsCount.low) && $util.isInteger(message.unjoinedEventsCount.high))) - return "unjoinedEventsCount: integer|Long expected"; + if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) + switch (message.reconciliationMode) { + default: + return "reconciliationMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.autoGenerateIds != null && message.hasOwnProperty("autoGenerateIds")) + if (typeof message.autoGenerateIds !== "boolean") + return "autoGenerateIds: boolean expected"; + if (message.idField != null && message.hasOwnProperty("idField")) + if (!$util.isString(message.idField)) + return "idField: string expected"; return null; }; /** - * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest */ - ImportUserEventsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse) + ImportDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse(); - if (object.errorSamples) { - if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorSamples: array expected"); - message.errorSamples = []; - for (var i = 0; i < object.errorSamples.length; ++i) { - if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorSamples: object expected"); - message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); - } + var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest(); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.fromObject(object.inlineSource); + } + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); + } + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); + } + if (object.fhirStoreSource != null) { + if (typeof object.fhirStoreSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.fhirStoreSource: object expected"); + message.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.fromObject(object.fhirStoreSource); + } + if (object.spannerSource != null) { + if (typeof object.spannerSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.spannerSource: object expected"); + message.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.fromObject(object.spannerSource); + } + if (object.cloudSqlSource != null) { + if (typeof object.cloudSqlSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.cloudSqlSource: object expected"); + message.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.fromObject(object.cloudSqlSource); } + if (object.firestoreSource != null) { + if (typeof object.firestoreSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.firestoreSource: object expected"); + message.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.fromObject(object.firestoreSource); + } + if (object.alloyDbSource != null) { + if (typeof object.alloyDbSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.alloyDbSource: object expected"); + message.alloyDbSource = $root.google.cloud.discoveryengine.v1.AlloyDbSource.fromObject(object.alloyDbSource); + } + if (object.bigtableSource != null) { + if (typeof object.bigtableSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.bigtableSource: object expected"); + message.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.fromObject(object.bigtableSource); + } + if (object.parent != null) + message.parent = String(object.parent); if (object.errorConfig != null) { if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorConfig: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.errorConfig: object expected"); message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); } - if (object.joinedEventsCount != null) - if ($util.Long) - (message.joinedEventsCount = $util.Long.fromValue(object.joinedEventsCount)).unsigned = false; - else if (typeof object.joinedEventsCount === "string") - message.joinedEventsCount = parseInt(object.joinedEventsCount, 10); - else if (typeof object.joinedEventsCount === "number") - message.joinedEventsCount = object.joinedEventsCount; - else if (typeof object.joinedEventsCount === "object") - message.joinedEventsCount = new $util.LongBits(object.joinedEventsCount.low >>> 0, object.joinedEventsCount.high >>> 0).toNumber(); - if (object.unjoinedEventsCount != null) - if ($util.Long) - (message.unjoinedEventsCount = $util.Long.fromValue(object.unjoinedEventsCount)).unsigned = false; - else if (typeof object.unjoinedEventsCount === "string") - message.unjoinedEventsCount = parseInt(object.unjoinedEventsCount, 10); - else if (typeof object.unjoinedEventsCount === "number") - message.unjoinedEventsCount = object.unjoinedEventsCount; - else if (typeof object.unjoinedEventsCount === "object") - message.unjoinedEventsCount = new $util.LongBits(object.unjoinedEventsCount.low >>> 0, object.unjoinedEventsCount.high >>> 0).toNumber(); + switch (object.reconciliationMode) { + default: + if (typeof object.reconciliationMode === "number") { + message.reconciliationMode = object.reconciliationMode; + break; + } + break; + case "RECONCILIATION_MODE_UNSPECIFIED": + case 0: + message.reconciliationMode = 0; + break; + case "INCREMENTAL": + case 1: + message.reconciliationMode = 1; + break; + case "FULL": + case 2: + message.reconciliationMode = 2; + break; + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.autoGenerateIds != null) + message.autoGenerateIds = Boolean(object.autoGenerateIds); + if (object.idField != null) + message.idField = String(object.idField); return message; }; /** - * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsResponse} message ImportUserEventsResponse + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest} message ImportDocumentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportUserEventsResponse.toObject = function toObject(message, options) { + ImportDocumentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorSamples = []; if (options.defaults) { + object.parent = ""; object.errorConfig = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.joinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.joinedEventsCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.unjoinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.unjoinedEventsCount = options.longs === String ? "0" : 0; + object.reconciliationMode = options.enums === String ? "RECONCILIATION_MODE_UNSPECIFIED" : 0; + object.updateMask = null; + object.autoGenerateIds = false; + object.idField = ""; } - if (message.errorSamples && message.errorSamples.length) { - object.errorSamples = []; - for (var j = 0; j < message.errorSamples.length; ++j) - object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; } if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); - if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) - if (typeof message.joinedEventsCount === "number") - object.joinedEventsCount = options.longs === String ? String(message.joinedEventsCount) : message.joinedEventsCount; - else - object.joinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.joinedEventsCount) : options.longs === Number ? new $util.LongBits(message.joinedEventsCount.low >>> 0, message.joinedEventsCount.high >>> 0).toNumber() : message.joinedEventsCount; - if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) - if (typeof message.unjoinedEventsCount === "number") - object.unjoinedEventsCount = options.longs === String ? String(message.unjoinedEventsCount) : message.unjoinedEventsCount; - else - object.unjoinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unjoinedEventsCount) : options.longs === Number ? new $util.LongBits(message.unjoinedEventsCount.low >>> 0, message.unjoinedEventsCount.high >>> 0).toNumber() : message.unjoinedEventsCount; + if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) + object.reconciliationMode = options.enums === String ? $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] === undefined ? message.reconciliationMode : $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] : message.reconciliationMode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.autoGenerateIds != null && message.hasOwnProperty("autoGenerateIds")) + object.autoGenerateIds = message.autoGenerateIds; + if (message.idField != null && message.hasOwnProperty("idField")) + object.idField = message.idField; + if (message.fhirStoreSource != null && message.hasOwnProperty("fhirStoreSource")) { + object.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.toObject(message.fhirStoreSource, options); + if (options.oneofs) + object.source = "fhirStoreSource"; + } + if (message.spannerSource != null && message.hasOwnProperty("spannerSource")) { + object.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.toObject(message.spannerSource, options); + if (options.oneofs) + object.source = "spannerSource"; + } + if (message.cloudSqlSource != null && message.hasOwnProperty("cloudSqlSource")) { + object.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.toObject(message.cloudSqlSource, options); + if (options.oneofs) + object.source = "cloudSqlSource"; + } + if (message.firestoreSource != null && message.hasOwnProperty("firestoreSource")) { + object.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.toObject(message.firestoreSource, options); + if (options.oneofs) + object.source = "firestoreSource"; + } + if (message.alloyDbSource != null && message.hasOwnProperty("alloyDbSource")) { + object.alloyDbSource = $root.google.cloud.discoveryengine.v1.AlloyDbSource.toObject(message.alloyDbSource, options); + if (options.oneofs) + object.source = "alloyDbSource"; + } + if (message.bigtableSource != null && message.hasOwnProperty("bigtableSource")) { + object.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.toObject(message.bigtableSource, options); + if (options.oneofs) + object.source = "bigtableSource"; + } return object; }; /** - * Converts this ImportUserEventsResponse to JSON. + * Converts this ImportDocumentsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance * @returns {Object.} JSON object */ - ImportUserEventsResponse.prototype.toJSON = function toJSON() { + ImportDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportUserEventsResponse + * Gets the default type url for ImportDocumentsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportUserEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsRequest"; }; - return ImportUserEventsResponse; - })(); - - v1.ImportUserEventsMetadata = (function() { - - /** - * Properties of an ImportUserEventsMetadata. - * @memberof google.cloud.discoveryengine.v1 - * @interface IImportUserEventsMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] ImportUserEventsMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportUserEventsMetadata updateTime - * @property {number|Long|null} [successCount] ImportUserEventsMetadata successCount - * @property {number|Long|null} [failureCount] ImportUserEventsMetadata failureCount - */ - - /** - * Constructs a new ImportUserEventsMetadata. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportUserEventsMetadata. - * @implements IImportUserEventsMetadata - * @constructor - * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata=} [properties] Properties to set - */ - function ImportUserEventsMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportUserEventsMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.createTime = null; + ImportDocumentsRequest.InlineSource = (function() { - /** - * ImportUserEventsMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.updateTime = null; + /** + * Properties of an InlineSource. + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @interface IInlineSource + * @property {Array.|null} [documents] InlineSource documents + */ - /** - * ImportUserEventsMetadata successCount. - * @member {number|Long} successCount - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Constructs a new InlineSource. + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @classdesc Represents an InlineSource. + * @implements IInlineSource + * @constructor + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set + */ + function InlineSource(properties) { + this.documents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ImportUserEventsMetadata failureCount. - * @member {number|Long} failureCount - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * InlineSource documents. + * @member {Array.} documents + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @instance + */ + InlineSource.prototype.documents = $util.emptyArray; - /** - * Creates a new ImportUserEventsMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata instance - */ - ImportUserEventsMetadata.create = function create(properties) { - return new ImportUserEventsMetadata(properties); - }; + /** + * Creates a new InlineSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource instance + */ + InlineSource.create = function create(properties) { + return new InlineSource(properties); + }; - /** - * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportUserEventsMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); - if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); - return writer; - }; + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + $root.google.cloud.discoveryengine.v1.Document.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportUserEventsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportUserEventsMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.successCount = reader.int64(); - break; - } - case 4: { - message.failureCount = reader.int64(); + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.discoveryengine.v1.Document.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportUserEventsMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ImportUserEventsMetadata message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportUserEventsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) - return "successCount: integer|Long expected"; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) - return "failureCount: integer|Long expected"; - return null; - }; + /** + * Verifies an InlineSource message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.Document.verify(message.documents[i]); + if (error) + return "documents." + error; + } + } + return null; + }; - /** - * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata - */ - ImportUserEventsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata) + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + */ + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource) + return object; + var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.documents: object expected"); + message.documents[i] = $root.google.cloud.discoveryengine.v1.Document.fromObject(object.documents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} message InlineSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documents = []; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.cloud.discoveryengine.v1.Document.toObject(message.documents[j], options); + } return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.successCount != null) - if ($util.Long) - (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; - else if (typeof object.successCount === "string") - message.successCount = parseInt(object.successCount, 10); - else if (typeof object.successCount === "number") - message.successCount = object.successCount; - else if (typeof object.successCount === "object") - message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); - if (object.failureCount != null) - if ($util.Long) - (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; - else if (typeof object.failureCount === "string") - message.failureCount = parseInt(object.failureCount, 10); - else if (typeof object.failureCount === "number") - message.failureCount = object.failureCount; - else if (typeof object.failureCount === "object") - message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); - return message; - }; + }; - /** - * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} message ImportUserEventsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportUserEventsMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.successCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failureCount = options.longs === String ? "0" : 0; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (typeof message.successCount === "number") - object.successCount = options.longs === String ? String(message.successCount) : message.successCount; - else - object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (typeof message.failureCount === "number") - object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; - else - object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; - return object; - }; + /** + * Converts this InlineSource to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @instance + * @returns {Object.} JSON object + */ + InlineSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ImportUserEventsMetadata to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportUserEventsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource"; + }; + + return InlineSource; + })(); /** - * Gets the default type url for ImportUserEventsMetadata - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * ReconciliationMode enum. + * @name google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode + * @enum {number} + * @property {number} RECONCILIATION_MODE_UNSPECIFIED=0 RECONCILIATION_MODE_UNSPECIFIED value + * @property {number} INCREMENTAL=1 INCREMENTAL value + * @property {number} FULL=2 FULL value */ - ImportUserEventsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsMetadata"; - }; + ImportDocumentsRequest.ReconciliationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECONCILIATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCREMENTAL"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); - return ImportUserEventsMetadata; + return ImportDocumentsRequest; })(); - v1.ImportDocumentsMetadata = (function() { + v1.ImportDocumentsResponse = (function() { /** - * Properties of an ImportDocumentsMetadata. + * Properties of an ImportDocumentsResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportDocumentsMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] ImportDocumentsMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportDocumentsMetadata updateTime - * @property {number|Long|null} [successCount] ImportDocumentsMetadata successCount - * @property {number|Long|null} [failureCount] ImportDocumentsMetadata failureCount - * @property {number|Long|null} [totalCount] ImportDocumentsMetadata totalCount + * @interface IImportDocumentsResponse + * @property {Array.|null} [errorSamples] ImportDocumentsResponse errorSamples + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportDocumentsResponse errorConfig */ /** - * Constructs a new ImportDocumentsMetadata. + * Constructs a new ImportDocumentsResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportDocumentsMetadata. - * @implements IImportDocumentsMetadata + * @classdesc Represents an ImportDocumentsResponse. + * @implements IImportDocumentsResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse=} [properties] Properties to set */ - function ImportDocumentsMetadata(properties) { + function ImportDocumentsResponse(properties) { + this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11546,131 +14782,92 @@ } /** - * ImportDocumentsMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.createTime = null; - - /** - * ImportDocumentsMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.updateTime = null; - - /** - * ImportDocumentsMetadata successCount. - * @member {number|Long} successCount - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImportDocumentsMetadata failureCount. - * @member {number|Long} failureCount - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * ImportDocumentsResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @instance */ - ImportDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportDocumentsResponse.prototype.errorSamples = $util.emptyArray; /** - * ImportDocumentsMetadata totalCount. - * @member {number|Long} totalCount - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * ImportDocumentsResponse errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @instance */ - ImportDocumentsMetadata.prototype.totalCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportDocumentsResponse.prototype.errorConfig = null; /** - * Creates a new ImportDocumentsMetadata instance using the specified properties. + * Creates a new ImportDocumentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata instance + * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse instance */ - ImportDocumentsMetadata.create = function create(properties) { - return new ImportDocumentsMetadata(properties); + ImportDocumentsResponse.create = function create(properties) { + return new ImportDocumentsResponse(properties); }; /** - * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. + * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsMetadata.encode = function encode(message, writer) { + ImportDocumentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); - if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); - if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalCount); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. + * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsMetadata.decode = function decode(reader, length) { + ImportDocumentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.successCount = reader.int64(); - break; - } - case 4: { - message.failureCount = reader.int64(); - break; - } - case 5: { - message.totalCount = reader.int64(); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); break; } default: @@ -11682,220 +14879,155 @@ }; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { + ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsMetadata message. + * Verifies an ImportDocumentsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsMetadata.verify = function verify(message) { + ImportDocumentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); if (error) - return "updateTime." + error; + return "errorConfig." + error; } - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) - return "successCount: integer|Long expected"; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) - return "failureCount: integer|Long expected"; - if (message.totalCount != null && message.hasOwnProperty("totalCount")) - if (!$util.isInteger(message.totalCount) && !(message.totalCount && $util.isInteger(message.totalCount.low) && $util.isInteger(message.totalCount.high))) - return "totalCount: integer|Long expected"; return null; }; /** - * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse */ - ImportDocumentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata) + ImportDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); } - if (object.successCount != null) - if ($util.Long) - (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; - else if (typeof object.successCount === "string") - message.successCount = parseInt(object.successCount, 10); - else if (typeof object.successCount === "number") - message.successCount = object.successCount; - else if (typeof object.successCount === "object") - message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); - if (object.failureCount != null) - if ($util.Long) - (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; - else if (typeof object.failureCount === "string") - message.failureCount = parseInt(object.failureCount, 10); - else if (typeof object.failureCount === "number") - message.failureCount = object.failureCount; - else if (typeof object.failureCount === "object") - message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); - if (object.totalCount != null) - if ($util.Long) - (message.totalCount = $util.Long.fromValue(object.totalCount)).unsigned = false; - else if (typeof object.totalCount === "string") - message.totalCount = parseInt(object.totalCount, 10); - else if (typeof object.totalCount === "number") - message.totalCount = object.totalCount; - else if (typeof object.totalCount === "object") - message.totalCount = new $util.LongBits(object.totalCount.low >>> 0, object.totalCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} message ImportDocumentsMetadata + * @param {google.cloud.discoveryengine.v1.ImportDocumentsResponse} message ImportDocumentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsMetadata.toObject = function toObject(message, options) { + ImportDocumentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.successCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failureCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalCount = options.longs === String ? "0" : 0; + if (options.arrays || options.defaults) + object.errorSamples = []; + if (options.defaults) + object.errorConfig = null; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (typeof message.successCount === "number") - object.successCount = options.longs === String ? String(message.successCount) : message.successCount; - else - object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (typeof message.failureCount === "number") - object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; - else - object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; - if (message.totalCount != null && message.hasOwnProperty("totalCount")) - if (typeof message.totalCount === "number") - object.totalCount = options.longs === String ? String(message.totalCount) : message.totalCount; - else - object.totalCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalCount) : options.longs === Number ? new $util.LongBits(message.totalCount.low >>> 0, message.totalCount.high >>> 0).toNumber() : message.totalCount; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); return object; }; /** - * Converts this ImportDocumentsMetadata to JSON. + * Converts this ImportDocumentsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @instance * @returns {Object.} JSON object */ - ImportDocumentsMetadata.prototype.toJSON = function toJSON() { + ImportDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsMetadata + * Gets the default type url for ImportDocumentsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsResponse"; }; - return ImportDocumentsMetadata; + return ImportDocumentsResponse; })(); - v1.ImportDocumentsRequest = (function() { + v1.ImportSuggestionDenyListEntriesRequest = (function() { /** - * Properties of an ImportDocumentsRequest. + * Properties of an ImportSuggestionDenyListEntriesRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportDocumentsRequest - * @property {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null} [inlineSource] ImportDocumentsRequest inlineSource - * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportDocumentsRequest gcsSource - * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportDocumentsRequest bigquerySource - * @property {google.cloud.discoveryengine.v1.IFhirStoreSource|null} [fhirStoreSource] ImportDocumentsRequest fhirStoreSource - * @property {google.cloud.discoveryengine.v1.ISpannerSource|null} [spannerSource] ImportDocumentsRequest spannerSource - * @property {google.cloud.discoveryengine.v1.ICloudSqlSource|null} [cloudSqlSource] ImportDocumentsRequest cloudSqlSource - * @property {google.cloud.discoveryengine.v1.IFirestoreSource|null} [firestoreSource] ImportDocumentsRequest firestoreSource - * @property {google.cloud.discoveryengine.v1.IBigtableSource|null} [bigtableSource] ImportDocumentsRequest bigtableSource - * @property {string|null} [parent] ImportDocumentsRequest parent - * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportDocumentsRequest errorConfig - * @property {google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|null} [reconciliationMode] ImportDocumentsRequest reconciliationMode - * @property {google.protobuf.IFieldMask|null} [updateMask] ImportDocumentsRequest updateMask - * @property {boolean|null} [autoGenerateIds] ImportDocumentsRequest autoGenerateIds - * @property {string|null} [idField] ImportDocumentsRequest idField + * @interface IImportSuggestionDenyListEntriesRequest + * @property {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null} [inlineSource] ImportSuggestionDenyListEntriesRequest inlineSource + * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportSuggestionDenyListEntriesRequest gcsSource + * @property {string|null} [parent] ImportSuggestionDenyListEntriesRequest parent */ /** - * Constructs a new ImportDocumentsRequest. + * Constructs a new ImportSuggestionDenyListEntriesRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportDocumentsRequest. - * @implements IImportDocumentsRequest + * @classdesc Represents an ImportSuggestionDenyListEntriesRequest. + * @implements IImportSuggestionDenyListEntriesRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest=} [properties] Properties to set */ - function ImportDocumentsRequest(properties) { + function ImportSuggestionDenyListEntriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11903,273 +15035,119 @@ } /** - * ImportDocumentsRequest inlineSource. - * @member {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * ImportSuggestionDenyListEntriesRequest inlineSource. + * @member {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance */ - ImportDocumentsRequest.prototype.inlineSource = null; + ImportSuggestionDenyListEntriesRequest.prototype.inlineSource = null; /** - * ImportDocumentsRequest gcsSource. + * ImportSuggestionDenyListEntriesRequest gcsSource. * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.gcsSource = null; - - /** - * ImportDocumentsRequest bigquerySource. - * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.bigquerySource = null; - - /** - * ImportDocumentsRequest fhirStoreSource. - * @member {google.cloud.discoveryengine.v1.IFhirStoreSource|null|undefined} fhirStoreSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.fhirStoreSource = null; - - /** - * ImportDocumentsRequest spannerSource. - * @member {google.cloud.discoveryengine.v1.ISpannerSource|null|undefined} spannerSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.spannerSource = null; - - /** - * ImportDocumentsRequest cloudSqlSource. - * @member {google.cloud.discoveryengine.v1.ICloudSqlSource|null|undefined} cloudSqlSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.cloudSqlSource = null; - - /** - * ImportDocumentsRequest firestoreSource. - * @member {google.cloud.discoveryengine.v1.IFirestoreSource|null|undefined} firestoreSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.firestoreSource = null; - - /** - * ImportDocumentsRequest bigtableSource. - * @member {google.cloud.discoveryengine.v1.IBigtableSource|null|undefined} bigtableSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance */ - ImportDocumentsRequest.prototype.bigtableSource = null; + ImportSuggestionDenyListEntriesRequest.prototype.gcsSource = null; /** - * ImportDocumentsRequest parent. + * ImportSuggestionDenyListEntriesRequest parent. * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.parent = ""; - - /** - * ImportDocumentsRequest errorConfig. - * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.errorConfig = null; - - /** - * ImportDocumentsRequest reconciliationMode. - * @member {google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode} reconciliationMode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.reconciliationMode = 0; - - /** - * ImportDocumentsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.updateMask = null; - - /** - * ImportDocumentsRequest autoGenerateIds. - * @member {boolean} autoGenerateIds - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.autoGenerateIds = false; - - /** - * ImportDocumentsRequest idField. - * @member {string} idField - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance */ - ImportDocumentsRequest.prototype.idField = ""; + ImportSuggestionDenyListEntriesRequest.prototype.parent = ""; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ImportDocumentsRequest source. - * @member {"inlineSource"|"gcsSource"|"bigquerySource"|"fhirStoreSource"|"spannerSource"|"cloudSqlSource"|"firestoreSource"|"bigtableSource"|undefined} source - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * ImportSuggestionDenyListEntriesRequest source. + * @member {"inlineSource"|"gcsSource"|undefined} source + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance */ - Object.defineProperty(ImportDocumentsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource", "fhirStoreSource", "spannerSource", "cloudSqlSource", "firestoreSource", "bigtableSource"]), + Object.defineProperty(ImportSuggestionDenyListEntriesRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ImportDocumentsRequest instance using the specified properties. + * Creates a new ImportSuggestionDenyListEntriesRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest instance + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest instance */ - ImportDocumentsRequest.create = function create(properties) { - return new ImportDocumentsRequest(properties); + ImportSuggestionDenyListEntriesRequest.create = function create(properties) { + return new ImportSuggestionDenyListEntriesRequest(properties); }; /** - * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. + * Encodes the specified ImportSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsRequest.encode = function encode(message, writer) { + ImportSuggestionDenyListEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) - $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.reconciliationMode != null && Object.hasOwnProperty.call(message, "reconciliationMode")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.reconciliationMode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.autoGenerateIds != null && Object.hasOwnProperty.call(message, "autoGenerateIds")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.autoGenerateIds); - if (message.idField != null && Object.hasOwnProperty.call(message, "idField")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.idField); - if (message.fhirStoreSource != null && Object.hasOwnProperty.call(message, "fhirStoreSource")) - $root.google.cloud.discoveryengine.v1.FhirStoreSource.encode(message.fhirStoreSource, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.spannerSource != null && Object.hasOwnProperty.call(message, "spannerSource")) - $root.google.cloud.discoveryengine.v1.SpannerSource.encode(message.spannerSource, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.cloudSqlSource != null && Object.hasOwnProperty.call(message, "cloudSqlSource")) - $root.google.cloud.discoveryengine.v1.CloudSqlSource.encode(message.cloudSqlSource, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.firestoreSource != null && Object.hasOwnProperty.call(message, "firestoreSource")) - $root.google.cloud.discoveryengine.v1.FirestoreSource.encode(message.firestoreSource, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.bigtableSource != null && Object.hasOwnProperty.call(message, "bigtableSource")) - $root.google.cloud.discoveryengine.v1.BigtableSource.encode(message.bigtableSource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. + * Encodes the specified ImportSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportSuggestionDenyListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer. + * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsRequest.decode = function decode(reader, length) { + ImportSuggestionDenyListEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 2: { - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.decode(reader, reader.uint32()); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.decode(reader, reader.uint32()); break; } case 3: { message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); break; } - case 4: { - message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); - break; - } - case 10: { - message.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.decode(reader, reader.uint32()); - break; - } - case 11: { - message.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.decode(reader, reader.uint32()); - break; - } - case 12: { - message.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.decode(reader, reader.uint32()); - break; - } - case 13: { - message.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.decode(reader, reader.uint32()); - break; - } - case 15: { - message.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.decode(reader, reader.uint32()); - break; - } case 1: { message.parent = reader.string(); break; } - case 5: { - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.reconciliationMode = reader.int32(); - break; - } - case 7: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 8: { - message.autoGenerateIds = reader.bool(); - break; - } - case 9: { - message.idField = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -12179,37 +15157,37 @@ }; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + ImportSuggestionDenyListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsRequest message. + * Verifies an ImportSuggestionDenyListEntriesRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsRequest.verify = function verify(message) { + ImportSuggestionDenyListEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { properties.source = 1; { - var error = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify(message.inlineSource); + var error = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify(message.inlineSource); if (error) return "inlineSource." + error; } @@ -12224,309 +15202,114 @@ return "gcsSource." + error; } } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); - if (error) - return "bigquerySource." + error; - } - } - if (message.fhirStoreSource != null && message.hasOwnProperty("fhirStoreSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.FhirStoreSource.verify(message.fhirStoreSource); - if (error) - return "fhirStoreSource." + error; - } - } - if (message.spannerSource != null && message.hasOwnProperty("spannerSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.SpannerSource.verify(message.spannerSource); - if (error) - return "spannerSource." + error; - } - } - if (message.cloudSqlSource != null && message.hasOwnProperty("cloudSqlSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.CloudSqlSource.verify(message.cloudSqlSource); - if (error) - return "cloudSqlSource." + error; - } - } - if (message.firestoreSource != null && message.hasOwnProperty("firestoreSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.FirestoreSource.verify(message.firestoreSource); - if (error) - return "firestoreSource." + error; - } - } - if (message.bigtableSource != null && message.hasOwnProperty("bigtableSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.BigtableSource.verify(message.bigtableSource); - if (error) - return "bigtableSource." + error; - } - } if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); - if (error) - return "errorConfig." + error; - } - if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) - switch (message.reconciliationMode) { - default: - return "reconciliationMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.autoGenerateIds != null && message.hasOwnProperty("autoGenerateIds")) - if (typeof message.autoGenerateIds !== "boolean") - return "autoGenerateIds: boolean expected"; - if (message.idField != null && message.hasOwnProperty("idField")) - if (!$util.isString(message.idField)) - return "idField: string expected"; return null; }; /** - * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest */ - ImportDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest) + ImportSuggestionDenyListEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest(); + var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest(); if (object.inlineSource != null) { if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.fromObject(object.inlineSource); + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.fromObject(object.inlineSource); } if (object.gcsSource != null) { if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.gcsSource: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.gcsSource: object expected"); message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); } - if (object.bigquerySource != null) { - if (typeof object.bigquerySource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.bigquerySource: object expected"); - message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); - } - if (object.fhirStoreSource != null) { - if (typeof object.fhirStoreSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.fhirStoreSource: object expected"); - message.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.fromObject(object.fhirStoreSource); - } - if (object.spannerSource != null) { - if (typeof object.spannerSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.spannerSource: object expected"); - message.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.fromObject(object.spannerSource); - } - if (object.cloudSqlSource != null) { - if (typeof object.cloudSqlSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.cloudSqlSource: object expected"); - message.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.fromObject(object.cloudSqlSource); - } - if (object.firestoreSource != null) { - if (typeof object.firestoreSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.firestoreSource: object expected"); - message.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.fromObject(object.firestoreSource); - } - if (object.bigtableSource != null) { - if (typeof object.bigtableSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.bigtableSource: object expected"); - message.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.fromObject(object.bigtableSource); - } if (object.parent != null) message.parent = String(object.parent); - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); - } - switch (object.reconciliationMode) { - default: - if (typeof object.reconciliationMode === "number") { - message.reconciliationMode = object.reconciliationMode; - break; - } - break; - case "RECONCILIATION_MODE_UNSPECIFIED": - case 0: - message.reconciliationMode = 0; - break; - case "INCREMENTAL": - case 1: - message.reconciliationMode = 1; - break; - case "FULL": - case 2: - message.reconciliationMode = 2; - break; - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.autoGenerateIds != null) - message.autoGenerateIds = Boolean(object.autoGenerateIds); - if (object.idField != null) - message.idField = String(object.idField); return message; }; /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest} message ImportDocumentsRequest + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsRequest.toObject = function toObject(message, options) { + ImportSuggestionDenyListEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.parent = ""; - object.errorConfig = null; - object.reconciliationMode = options.enums === String ? "RECONCILIATION_MODE_UNSPECIFIED" : 0; - object.updateMask = null; - object.autoGenerateIds = false; - object.idField = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.toObject(message.inlineSource, options); - if (options.oneofs) - object.source = "inlineSource"; - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); - if (options.oneofs) - object.source = "bigquerySource"; - } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); - if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) - object.reconciliationMode = options.enums === String ? $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] === undefined ? message.reconciliationMode : $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] : message.reconciliationMode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.autoGenerateIds != null && message.hasOwnProperty("autoGenerateIds")) - object.autoGenerateIds = message.autoGenerateIds; - if (message.idField != null && message.hasOwnProperty("idField")) - object.idField = message.idField; - if (message.fhirStoreSource != null && message.hasOwnProperty("fhirStoreSource")) { - object.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.toObject(message.fhirStoreSource, options); - if (options.oneofs) - object.source = "fhirStoreSource"; - } - if (message.spannerSource != null && message.hasOwnProperty("spannerSource")) { - object.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.toObject(message.spannerSource, options); - if (options.oneofs) - object.source = "spannerSource"; - } - if (message.cloudSqlSource != null && message.hasOwnProperty("cloudSqlSource")) { - object.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.toObject(message.cloudSqlSource, options); - if (options.oneofs) - object.source = "cloudSqlSource"; - } - if (message.firestoreSource != null && message.hasOwnProperty("firestoreSource")) { - object.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.toObject(message.firestoreSource, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.toObject(message.inlineSource, options); if (options.oneofs) - object.source = "firestoreSource"; + object.source = "inlineSource"; } - if (message.bigtableSource != null && message.hasOwnProperty("bigtableSource")) { - object.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.toObject(message.bigtableSource, options); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); if (options.oneofs) - object.source = "bigtableSource"; + object.source = "gcsSource"; } return object; }; /** - * Converts this ImportDocumentsRequest to JSON. + * Converts this ImportSuggestionDenyListEntriesRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance * @returns {Object.} JSON object */ - ImportDocumentsRequest.prototype.toJSON = function toJSON() { + ImportSuggestionDenyListEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsRequest + * Gets the default type url for ImportSuggestionDenyListEntriesRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportSuggestionDenyListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest"; }; - ImportDocumentsRequest.InlineSource = (function() { + ImportSuggestionDenyListEntriesRequest.InlineSource = (function() { /** * Properties of an InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @interface IInlineSource - * @property {Array.|null} [documents] InlineSource documents + * @property {Array.|null} [entries] InlineSource entries */ /** * Constructs a new InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @classdesc Represents an InlineSource. * @implements IInlineSource * @constructor - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource=} [properties] Properties to set */ function InlineSource(properties) { - this.documents = []; + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12534,49 +15317,49 @@ } /** - * InlineSource documents. - * @member {Array.} documents - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * InlineSource entries. + * @member {Array.} entries + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @instance */ - InlineSource.prototype.documents = $util.emptyArray; + InlineSource.prototype.entries = $util.emptyArray; /** * Creates a new InlineSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource instance + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource instance */ InlineSource.create = function create(properties) { return new InlineSource(properties); }; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ InlineSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - $root.google.cloud.discoveryengine.v1.Document.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -12587,25 +15370,25 @@ /** * Decodes an InlineSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ InlineSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push($root.google.cloud.discoveryengine.v1.Document.decode(reader, reader.uint32())); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.decode(reader, reader.uint32())); break; } default: @@ -12619,10 +15402,10 @@ /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -12635,7 +15418,7 @@ /** * Verifies an InlineSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -12643,13 +15426,13 @@ InlineSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.Document.verify(message.documents[i]); + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify(message.entries[i]); if (error) - return "documents." + error; + return "entries." + error; } } return null; @@ -12658,23 +15441,23 @@ /** * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource */ InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource) + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource(); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.documents: object expected"); - message.documents[i] = $root.google.cloud.discoveryengine.v1.Document.fromObject(object.documents[i]); + var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.entries: object expected"); + message.entries[i] = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.fromObject(object.entries[i]); } } return message; @@ -12683,9 +15466,9 @@ /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} message InlineSource + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} message InlineSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -12694,11 +15477,11 @@ options = {}; var object = {}; if (options.arrays || options.defaults) - object.documents = []; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.cloud.discoveryengine.v1.Document.toObject(message.documents[j], options); + object.entries = []; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.toObject(message.entries[j], options); } return object; }; @@ -12706,7 +15489,7 @@ /** * Converts this InlineSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @instance * @returns {Object.} JSON object */ @@ -12717,7 +15500,7 @@ /** * Gets the default type url for InlineSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url @@ -12726,50 +15509,35 @@ if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource"; }; return InlineSource; })(); - /** - * ReconciliationMode enum. - * @name google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode - * @enum {number} - * @property {number} RECONCILIATION_MODE_UNSPECIFIED=0 RECONCILIATION_MODE_UNSPECIFIED value - * @property {number} INCREMENTAL=1 INCREMENTAL value - * @property {number} FULL=2 FULL value - */ - ImportDocumentsRequest.ReconciliationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RECONCILIATION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCREMENTAL"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; - })(); - - return ImportDocumentsRequest; + return ImportSuggestionDenyListEntriesRequest; })(); - v1.ImportDocumentsResponse = (function() { + v1.ImportSuggestionDenyListEntriesResponse = (function() { /** - * Properties of an ImportDocumentsResponse. + * Properties of an ImportSuggestionDenyListEntriesResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportDocumentsResponse - * @property {Array.|null} [errorSamples] ImportDocumentsResponse errorSamples - * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportDocumentsResponse errorConfig + * @interface IImportSuggestionDenyListEntriesResponse + * @property {Array.|null} [errorSamples] ImportSuggestionDenyListEntriesResponse errorSamples + * @property {number|Long|null} [importedEntriesCount] ImportSuggestionDenyListEntriesResponse importedEntriesCount + * @property {number|Long|null} [failedEntriesCount] ImportSuggestionDenyListEntriesResponse failedEntriesCount */ /** - * Constructs a new ImportDocumentsResponse. + * Constructs a new ImportSuggestionDenyListEntriesResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportDocumentsResponse. - * @implements IImportDocumentsResponse + * @classdesc Represents an ImportSuggestionDenyListEntriesResponse. + * @implements IImportSuggestionDenyListEntriesResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse=} [properties] Properties to set */ - function ImportDocumentsResponse(properties) { + function ImportSuggestionDenyListEntriesResponse(properties) { this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -12778,92 +15546,387 @@ } /** - * ImportDocumentsResponse errorSamples. + * ImportSuggestionDenyListEntriesResponse errorSamples. * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse * @instance */ - ImportDocumentsResponse.prototype.errorSamples = $util.emptyArray; + ImportSuggestionDenyListEntriesResponse.prototype.errorSamples = $util.emptyArray; /** - * ImportDocumentsResponse errorConfig. - * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * ImportSuggestionDenyListEntriesResponse importedEntriesCount. + * @member {number|Long} importedEntriesCount + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse * @instance */ - ImportDocumentsResponse.prototype.errorConfig = null; + ImportSuggestionDenyListEntriesResponse.prototype.importedEntriesCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportDocumentsResponse instance using the specified properties. + * ImportSuggestionDenyListEntriesResponse failedEntriesCount. + * @member {number|Long} failedEntriesCount + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @instance + */ + ImportSuggestionDenyListEntriesResponse.prototype.failedEntriesCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImportSuggestionDenyListEntriesResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse instance + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse instance */ - ImportDocumentsResponse.create = function create(properties) { - return new ImportDocumentsResponse(properties); + ImportSuggestionDenyListEntriesResponse.create = function create(properties) { + return new ImportSuggestionDenyListEntriesResponse(properties); }; /** - * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. + * Encodes the specified ImportSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsResponse.encode = function encode(message, writer) { + ImportSuggestionDenyListEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errorSamples != null && message.errorSamples.length) for (var i = 0; i < message.errorSamples.length; ++i) $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.importedEntriesCount != null && Object.hasOwnProperty.call(message, "importedEntriesCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.importedEntriesCount); + if (message.failedEntriesCount != null && Object.hasOwnProperty.call(message, "failedEntriesCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.failedEntriesCount); + return writer; + }; + + /** + * Encodes the specified ImportSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportSuggestionDenyListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportSuggestionDenyListEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 2: { + message.importedEntriesCount = reader.int64(); + break; + } + case 3: { + message.failedEntriesCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportSuggestionDenyListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportSuggestionDenyListEntriesResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportSuggestionDenyListEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } + } + if (message.importedEntriesCount != null && message.hasOwnProperty("importedEntriesCount")) + if (!$util.isInteger(message.importedEntriesCount) && !(message.importedEntriesCount && $util.isInteger(message.importedEntriesCount.low) && $util.isInteger(message.importedEntriesCount.high))) + return "importedEntriesCount: integer|Long expected"; + if (message.failedEntriesCount != null && message.hasOwnProperty("failedEntriesCount")) + if (!$util.isInteger(message.failedEntriesCount) && !(message.failedEntriesCount && $util.isInteger(message.failedEntriesCount.low) && $util.isInteger(message.failedEntriesCount.high))) + return "failedEntriesCount: integer|Long expected"; + return null; + }; + + /** + * Creates an ImportSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + */ + ImportSuggestionDenyListEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } + } + if (object.importedEntriesCount != null) + if ($util.Long) + (message.importedEntriesCount = $util.Long.fromValue(object.importedEntriesCount)).unsigned = false; + else if (typeof object.importedEntriesCount === "string") + message.importedEntriesCount = parseInt(object.importedEntriesCount, 10); + else if (typeof object.importedEntriesCount === "number") + message.importedEntriesCount = object.importedEntriesCount; + else if (typeof object.importedEntriesCount === "object") + message.importedEntriesCount = new $util.LongBits(object.importedEntriesCount.low >>> 0, object.importedEntriesCount.high >>> 0).toNumber(); + if (object.failedEntriesCount != null) + if ($util.Long) + (message.failedEntriesCount = $util.Long.fromValue(object.failedEntriesCount)).unsigned = false; + else if (typeof object.failedEntriesCount === "string") + message.failedEntriesCount = parseInt(object.failedEntriesCount, 10); + else if (typeof object.failedEntriesCount === "number") + message.failedEntriesCount = object.failedEntriesCount; + else if (typeof object.failedEntriesCount === "object") + message.failedEntriesCount = new $util.LongBits(object.failedEntriesCount.low >>> 0, object.failedEntriesCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an ImportSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportSuggestionDenyListEntriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errorSamples = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.importedEntriesCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.importedEntriesCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failedEntriesCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failedEntriesCount = options.longs === String ? "0" : 0; + } + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + } + if (message.importedEntriesCount != null && message.hasOwnProperty("importedEntriesCount")) + if (typeof message.importedEntriesCount === "number") + object.importedEntriesCount = options.longs === String ? String(message.importedEntriesCount) : message.importedEntriesCount; + else + object.importedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.importedEntriesCount) : options.longs === Number ? new $util.LongBits(message.importedEntriesCount.low >>> 0, message.importedEntriesCount.high >>> 0).toNumber() : message.importedEntriesCount; + if (message.failedEntriesCount != null && message.hasOwnProperty("failedEntriesCount")) + if (typeof message.failedEntriesCount === "number") + object.failedEntriesCount = options.longs === String ? String(message.failedEntriesCount) : message.failedEntriesCount; + else + object.failedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedEntriesCount) : options.longs === Number ? new $util.LongBits(message.failedEntriesCount.low >>> 0, message.failedEntriesCount.high >>> 0).toNumber() : message.failedEntriesCount; + return object; + }; + + /** + * Converts this ImportSuggestionDenyListEntriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + ImportSuggestionDenyListEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportSuggestionDenyListEntriesResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportSuggestionDenyListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse"; + }; + + return ImportSuggestionDenyListEntriesResponse; + })(); + + v1.ImportSuggestionDenyListEntriesMetadata = (function() { + + /** + * Properties of an ImportSuggestionDenyListEntriesMetadata. + * @memberof google.cloud.discoveryengine.v1 + * @interface IImportSuggestionDenyListEntriesMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportSuggestionDenyListEntriesMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportSuggestionDenyListEntriesMetadata updateTime + */ + + /** + * Constructs a new ImportSuggestionDenyListEntriesMetadata. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents an ImportSuggestionDenyListEntriesMetadata. + * @implements IImportSuggestionDenyListEntriesMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata=} [properties] Properties to set + */ + function ImportSuggestionDenyListEntriesMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportSuggestionDenyListEntriesMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @instance + */ + ImportSuggestionDenyListEntriesMetadata.prototype.createTime = null; + + /** + * ImportSuggestionDenyListEntriesMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @instance + */ + ImportSuggestionDenyListEntriesMetadata.prototype.updateTime = null; + + /** + * Creates a new ImportSuggestionDenyListEntriesMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @static + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata instance + */ + ImportSuggestionDenyListEntriesMetadata.create = function create(properties) { + return new ImportSuggestionDenyListEntriesMetadata(properties); + }; + + /** + * Encodes the specified ImportSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @static + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportSuggestionDenyListEntriesMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. + * Encodes the specified ImportSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportSuggestionDenyListEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsResponse.decode = function decode(reader, length) { + ImportSuggestionDenyListEntriesMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.errorSamples && message.errorSamples.length)) - message.errorSamples = []; - message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -12875,155 +15938,145 @@ }; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { + ImportSuggestionDenyListEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsResponse message. + * Verifies an ImportSuggestionDenyListEntriesMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsResponse.verify = function verify(message) { + ImportSuggestionDenyListEntriesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { - if (!Array.isArray(message.errorSamples)) - return "errorSamples: array expected"; - for (var i = 0; i < message.errorSamples.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errorSamples[i]); - if (error) - return "errorSamples." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "errorConfig." + error; + return "updateTime." + error; } return null; }; /** - * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata */ - ImportDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse) + ImportSuggestionDenyListEntriesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse(); - if (object.errorSamples) { - if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorSamples: array expected"); - message.errorSamples = []; - for (var i = 0; i < object.errorSamples.length; ++i) { - if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorSamples: object expected"); - message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); - } + var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsResponse} message ImportDocumentsResponse + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsResponse.toObject = function toObject(message, options) { + ImportSuggestionDenyListEntriesMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorSamples = []; - if (options.defaults) - object.errorConfig = null; - if (message.errorSamples && message.errorSamples.length) { - object.errorSamples = []; - for (var j = 0; j < message.errorSamples.length; ++j) - object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + if (options.defaults) { + object.createTime = null; + object.updateTime = null; } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this ImportDocumentsResponse to JSON. + * Converts this ImportSuggestionDenyListEntriesMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @instance * @returns {Object.} JSON object */ - ImportDocumentsResponse.prototype.toJSON = function toJSON() { + ImportSuggestionDenyListEntriesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsResponse + * Gets the default type url for ImportSuggestionDenyListEntriesMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportSuggestionDenyListEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata"; }; - return ImportDocumentsResponse; + return ImportSuggestionDenyListEntriesMetadata; })(); - v1.ImportSuggestionDenyListEntriesRequest = (function() { + v1.ImportCompletionSuggestionsRequest = (function() { /** - * Properties of an ImportSuggestionDenyListEntriesRequest. + * Properties of an ImportCompletionSuggestionsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportSuggestionDenyListEntriesRequest - * @property {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null} [inlineSource] ImportSuggestionDenyListEntriesRequest inlineSource - * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportSuggestionDenyListEntriesRequest gcsSource - * @property {string|null} [parent] ImportSuggestionDenyListEntriesRequest parent + * @interface IImportCompletionSuggestionsRequest + * @property {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource|null} [inlineSource] ImportCompletionSuggestionsRequest inlineSource + * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportCompletionSuggestionsRequest gcsSource + * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportCompletionSuggestionsRequest bigquerySource + * @property {string|null} [parent] ImportCompletionSuggestionsRequest parent + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportCompletionSuggestionsRequest errorConfig */ /** - * Constructs a new ImportSuggestionDenyListEntriesRequest. + * Constructs a new ImportCompletionSuggestionsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportSuggestionDenyListEntriesRequest. - * @implements IImportSuggestionDenyListEntriesRequest + * @classdesc Represents an ImportCompletionSuggestionsRequest. + * @implements IImportCompletionSuggestionsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest=} [properties] Properties to set */ - function ImportSuggestionDenyListEntriesRequest(properties) { + function ImportCompletionSuggestionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13031,119 +16084,147 @@ } /** - * ImportSuggestionDenyListEntriesRequest inlineSource. - * @member {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * ImportCompletionSuggestionsRequest inlineSource. + * @member {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance */ - ImportSuggestionDenyListEntriesRequest.prototype.inlineSource = null; + ImportCompletionSuggestionsRequest.prototype.inlineSource = null; /** - * ImportSuggestionDenyListEntriesRequest gcsSource. + * ImportCompletionSuggestionsRequest gcsSource. * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance */ - ImportSuggestionDenyListEntriesRequest.prototype.gcsSource = null; + ImportCompletionSuggestionsRequest.prototype.gcsSource = null; /** - * ImportSuggestionDenyListEntriesRequest parent. + * ImportCompletionSuggestionsRequest bigquerySource. + * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest + * @instance + */ + ImportCompletionSuggestionsRequest.prototype.bigquerySource = null; + + /** + * ImportCompletionSuggestionsRequest parent. * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance */ - ImportSuggestionDenyListEntriesRequest.prototype.parent = ""; + ImportCompletionSuggestionsRequest.prototype.parent = ""; + + /** + * ImportCompletionSuggestionsRequest errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest + * @instance + */ + ImportCompletionSuggestionsRequest.prototype.errorConfig = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ImportSuggestionDenyListEntriesRequest source. - * @member {"inlineSource"|"gcsSource"|undefined} source - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * ImportCompletionSuggestionsRequest source. + * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance */ - Object.defineProperty(ImportSuggestionDenyListEntriesRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource"]), + Object.defineProperty(ImportCompletionSuggestionsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ImportSuggestionDenyListEntriesRequest instance using the specified properties. + * Creates a new ImportCompletionSuggestionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest instance + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} ImportCompletionSuggestionsRequest instance */ - ImportSuggestionDenyListEntriesRequest.create = function create(properties) { - return new ImportSuggestionDenyListEntriesRequest(properties); + ImportCompletionSuggestionsRequest.create = function create(properties) { + return new ImportCompletionSuggestionsRequest(properties); }; /** - * Encodes the specified ImportSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. + * Encodes the specified ImportCompletionSuggestionsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest} message ImportCompletionSuggestionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesRequest.encode = function encode(message, writer) { + ImportCompletionSuggestionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) + $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. + * Encodes the specified ImportCompletionSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest} message ImportCompletionSuggestionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportCompletionSuggestionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} ImportCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesRequest.decode = function decode(reader, length) { + ImportCompletionSuggestionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 2: { - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.decode(reader, reader.uint32()); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.decode(reader, reader.uint32()); break; } case 3: { message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); break; } + case 4: { + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); + break; + } case 1: { message.parent = reader.string(); break; } + case 5: { + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -13153,37 +16234,37 @@ }; /** - * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} ImportCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + ImportCompletionSuggestionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSuggestionDenyListEntriesRequest message. + * Verifies an ImportCompletionSuggestionsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportSuggestionDenyListEntriesRequest.verify = function verify(message) { + ImportCompletionSuggestionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { properties.source = 1; { - var error = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify(message.inlineSource); + var error = $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify(message.inlineSource); if (error) return "inlineSource." + error; } @@ -13198,58 +16279,85 @@ return "gcsSource." + error; } } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } + } if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } return null; }; /** - * Creates an ImportSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} ImportCompletionSuggestionsRequest */ - ImportSuggestionDenyListEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest) + ImportCompletionSuggestionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest(); + var message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest(); if (object.inlineSource != null) { if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.fromObject(object.inlineSource); + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.fromObject(object.inlineSource); } if (object.gcsSource != null) { if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.gcsSource: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.gcsSource: object expected"); message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); } + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); + } if (object.parent != null) message.parent = String(object.parent); + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + } return message; }; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportCompletionSuggestionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} message ImportCompletionSuggestionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSuggestionDenyListEntriesRequest.toObject = function toObject(message, options) { + ImportCompletionSuggestionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.parent = ""; + object.errorConfig = null; + } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.toObject(message.inlineSource, options); + object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.toObject(message.inlineSource, options); if (options.oneofs) object.source = "inlineSource"; } @@ -13258,54 +16366,61 @@ if (options.oneofs) object.source = "gcsSource"; } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); return object; }; /** - * Converts this ImportSuggestionDenyListEntriesRequest to JSON. + * Converts this ImportCompletionSuggestionsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance * @returns {Object.} JSON object */ - ImportSuggestionDenyListEntriesRequest.prototype.toJSON = function toJSON() { + ImportCompletionSuggestionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesRequest + * Gets the default type url for ImportCompletionSuggestionsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportSuggestionDenyListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportCompletionSuggestionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest"; }; - ImportSuggestionDenyListEntriesRequest.InlineSource = (function() { + ImportCompletionSuggestionsRequest.InlineSource = (function() { /** * Properties of an InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @interface IInlineSource - * @property {Array.|null} [entries] InlineSource entries + * @property {Array.|null} [suggestions] InlineSource suggestions */ /** * Constructs a new InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @classdesc Represents an InlineSource. * @implements IInlineSource * @constructor - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource=} [properties] Properties to set */ function InlineSource(properties) { - this.entries = []; + this.suggestions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13313,49 +16428,49 @@ } /** - * InlineSource entries. - * @member {Array.} entries - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * InlineSource suggestions. + * @member {Array.} suggestions + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @instance */ - InlineSource.prototype.entries = $util.emptyArray; + InlineSource.prototype.suggestions = $util.emptyArray; /** * Creates a new InlineSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource instance + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} InlineSource instance */ InlineSource.create = function create(properties) { return new InlineSource(properties); }; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ InlineSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.suggestions != null && message.suggestions.length) + for (var i = 0; i < message.suggestions.length; ++i) + $root.google.cloud.discoveryengine.v1.CompletionSuggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -13366,25 +16481,25 @@ /** * Decodes an InlineSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ InlineSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.decode(reader, reader.uint32())); + if (!(message.suggestions && message.suggestions.length)) + message.suggestions = []; + message.suggestions.push($root.google.cloud.discoveryengine.v1.CompletionSuggestion.decode(reader, reader.uint32())); break; } default: @@ -13398,10 +16513,10 @@ /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -13414,7 +16529,7 @@ /** * Verifies an InlineSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -13422,13 +16537,13 @@ InlineSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify(message.entries[i]); + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (!Array.isArray(message.suggestions)) + return "suggestions: array expected"; + for (var i = 0; i < message.suggestions.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.CompletionSuggestion.verify(message.suggestions[i]); if (error) - return "entries." + error; + return "suggestions." + error; } } return null; @@ -13437,23 +16552,23 @@ /** * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} InlineSource */ InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource) + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.entries: object expected"); - message.entries[i] = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.fromObject(object.entries[i]); + var message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource(); + if (object.suggestions) { + if (!Array.isArray(object.suggestions)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.suggestions: array expected"); + message.suggestions = []; + for (var i = 0; i < object.suggestions.length; ++i) { + if (typeof object.suggestions[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.suggestions: object expected"); + message.suggestions[i] = $root.google.cloud.discoveryengine.v1.CompletionSuggestion.fromObject(object.suggestions[i]); } } return message; @@ -13462,9 +16577,9 @@ /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} message InlineSource + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} message InlineSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -13473,11 +16588,11 @@ options = {}; var object = {}; if (options.arrays || options.defaults) - object.entries = []; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.toObject(message.entries[j], options); + object.suggestions = []; + if (message.suggestions && message.suggestions.length) { + object.suggestions = []; + for (var j = 0; j < message.suggestions.length; ++j) + object.suggestions[j] = $root.google.cloud.discoveryengine.v1.CompletionSuggestion.toObject(message.suggestions[j], options); } return object; }; @@ -13485,7 +16600,7 @@ /** * Converts this InlineSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @instance * @returns {Object.} JSON object */ @@ -13493,48 +16608,301 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for InlineSource - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource"; - }; + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource"; + }; + + return InlineSource; + })(); + + return ImportCompletionSuggestionsRequest; + })(); + + v1.ImportCompletionSuggestionsResponse = (function() { + + /** + * Properties of an ImportCompletionSuggestionsResponse. + * @memberof google.cloud.discoveryengine.v1 + * @interface IImportCompletionSuggestionsResponse + * @property {Array.|null} [errorSamples] ImportCompletionSuggestionsResponse errorSamples + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportCompletionSuggestionsResponse errorConfig + */ + + /** + * Constructs a new ImportCompletionSuggestionsResponse. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents an ImportCompletionSuggestionsResponse. + * @implements IImportCompletionSuggestionsResponse + * @constructor + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse=} [properties] Properties to set + */ + function ImportCompletionSuggestionsResponse(properties) { + this.errorSamples = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportCompletionSuggestionsResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @instance + */ + ImportCompletionSuggestionsResponse.prototype.errorSamples = $util.emptyArray; + + /** + * ImportCompletionSuggestionsResponse errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @instance + */ + ImportCompletionSuggestionsResponse.prototype.errorConfig = null; + + /** + * Creates a new ImportCompletionSuggestionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} ImportCompletionSuggestionsResponse instance + */ + ImportCompletionSuggestionsResponse.create = function create(properties) { + return new ImportCompletionSuggestionsResponse(properties); + }; + + /** + * Encodes the specified ImportCompletionSuggestionsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse} message ImportCompletionSuggestionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportCompletionSuggestionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportCompletionSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse} message ImportCompletionSuggestionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportCompletionSuggestionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportCompletionSuggestionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} ImportCompletionSuggestionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportCompletionSuggestionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 2: { + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportCompletionSuggestionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} ImportCompletionSuggestionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportCompletionSuggestionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportCompletionSuggestionsResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportCompletionSuggestionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } + return null; + }; + + /** + * Creates an ImportCompletionSuggestionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} ImportCompletionSuggestionsResponse + */ + ImportCompletionSuggestionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } + } + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + } + return message; + }; + + /** + * Creates a plain object from an ImportCompletionSuggestionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} message ImportCompletionSuggestionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportCompletionSuggestionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errorSamples = []; + if (options.defaults) + object.errorConfig = null; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); + return object; + }; + + /** + * Converts this ImportCompletionSuggestionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @instance + * @returns {Object.} JSON object + */ + ImportCompletionSuggestionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return InlineSource; - })(); + /** + * Gets the default type url for ImportCompletionSuggestionsResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportCompletionSuggestionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse"; + }; - return ImportSuggestionDenyListEntriesRequest; + return ImportCompletionSuggestionsResponse; })(); - v1.ImportSuggestionDenyListEntriesResponse = (function() { + v1.ImportCompletionSuggestionsMetadata = (function() { /** - * Properties of an ImportSuggestionDenyListEntriesResponse. + * Properties of an ImportCompletionSuggestionsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportSuggestionDenyListEntriesResponse - * @property {Array.|null} [errorSamples] ImportSuggestionDenyListEntriesResponse errorSamples - * @property {number|Long|null} [importedEntriesCount] ImportSuggestionDenyListEntriesResponse importedEntriesCount - * @property {number|Long|null} [failedEntriesCount] ImportSuggestionDenyListEntriesResponse failedEntriesCount + * @interface IImportCompletionSuggestionsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportCompletionSuggestionsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportCompletionSuggestionsMetadata updateTime + * @property {number|Long|null} [successCount] ImportCompletionSuggestionsMetadata successCount + * @property {number|Long|null} [failureCount] ImportCompletionSuggestionsMetadata failureCount */ /** - * Constructs a new ImportSuggestionDenyListEntriesResponse. + * Constructs a new ImportCompletionSuggestionsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportSuggestionDenyListEntriesResponse. - * @implements IImportSuggestionDenyListEntriesResponse + * @classdesc Represents an ImportCompletionSuggestionsMetadata. + * @implements IImportCompletionSuggestionsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata=} [properties] Properties to set */ - function ImportSuggestionDenyListEntriesResponse(properties) { - this.errorSamples = []; + function ImportCompletionSuggestionsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13542,106 +16910,117 @@ } /** - * ImportSuggestionDenyListEntriesResponse errorSamples. - * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * ImportCompletionSuggestionsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @instance */ - ImportSuggestionDenyListEntriesResponse.prototype.errorSamples = $util.emptyArray; + ImportCompletionSuggestionsMetadata.prototype.createTime = null; /** - * ImportSuggestionDenyListEntriesResponse importedEntriesCount. - * @member {number|Long} importedEntriesCount - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * ImportCompletionSuggestionsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @instance */ - ImportSuggestionDenyListEntriesResponse.prototype.importedEntriesCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportCompletionSuggestionsMetadata.prototype.updateTime = null; /** - * ImportSuggestionDenyListEntriesResponse failedEntriesCount. - * @member {number|Long} failedEntriesCount - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * ImportCompletionSuggestionsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @instance */ - ImportSuggestionDenyListEntriesResponse.prototype.failedEntriesCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportCompletionSuggestionsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportSuggestionDenyListEntriesResponse instance using the specified properties. + * ImportCompletionSuggestionsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata + * @instance + */ + ImportCompletionSuggestionsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImportCompletionSuggestionsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse instance + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} ImportCompletionSuggestionsMetadata instance */ - ImportSuggestionDenyListEntriesResponse.create = function create(properties) { - return new ImportSuggestionDenyListEntriesResponse(properties); + ImportCompletionSuggestionsMetadata.create = function create(properties) { + return new ImportCompletionSuggestionsMetadata(properties); }; /** - * Encodes the specified ImportSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * Encodes the specified ImportCompletionSuggestionsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata} message ImportCompletionSuggestionsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesResponse.encode = function encode(message, writer) { + ImportCompletionSuggestionsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errorSamples != null && message.errorSamples.length) - for (var i = 0; i < message.errorSamples.length; ++i) - $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.importedEntriesCount != null && Object.hasOwnProperty.call(message, "importedEntriesCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.importedEntriesCount); - if (message.failedEntriesCount != null && Object.hasOwnProperty.call(message, "failedEntriesCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.failedEntriesCount); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); return writer; }; /** - * Encodes the specified ImportSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * Encodes the specified ImportCompletionSuggestionsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata} message ImportCompletionSuggestionsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportCompletionSuggestionsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} ImportCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesResponse.decode = function decode(reader, length) { + ImportCompletionSuggestionsMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.errorSamples && message.errorSamples.length)) - message.errorSamples = []; - message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.importedEntriesCount = reader.int64(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.failedEntriesCount = reader.int64(); + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); break; } default: @@ -13653,186 +17032,193 @@ }; /** - * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} ImportCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + ImportCompletionSuggestionsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSuggestionDenyListEntriesResponse message. + * Verifies an ImportCompletionSuggestionsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportSuggestionDenyListEntriesResponse.verify = function verify(message) { + ImportCompletionSuggestionsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { - if (!Array.isArray(message.errorSamples)) - return "errorSamples: array expected"; - for (var i = 0; i < message.errorSamples.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errorSamples[i]); - if (error) - return "errorSamples." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.importedEntriesCount != null && message.hasOwnProperty("importedEntriesCount")) - if (!$util.isInteger(message.importedEntriesCount) && !(message.importedEntriesCount && $util.isInteger(message.importedEntriesCount.low) && $util.isInteger(message.importedEntriesCount.high))) - return "importedEntriesCount: integer|Long expected"; - if (message.failedEntriesCount != null && message.hasOwnProperty("failedEntriesCount")) - if (!$util.isInteger(message.failedEntriesCount) && !(message.failedEntriesCount && $util.isInteger(message.failedEntriesCount.low) && $util.isInteger(message.failedEntriesCount.high))) - return "failedEntriesCount: integer|Long expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; return null; }; /** - * Creates an ImportSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} ImportCompletionSuggestionsMetadata */ - ImportSuggestionDenyListEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse) + ImportCompletionSuggestionsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse(); - if (object.errorSamples) { - if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.errorSamples: array expected"); - message.errorSamples = []; - for (var i = 0; i < object.errorSamples.length; ++i) { - if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.errorSamples: object expected"); - message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); - } + var message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.importedEntriesCount != null) + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.successCount != null) if ($util.Long) - (message.importedEntriesCount = $util.Long.fromValue(object.importedEntriesCount)).unsigned = false; - else if (typeof object.importedEntriesCount === "string") - message.importedEntriesCount = parseInt(object.importedEntriesCount, 10); - else if (typeof object.importedEntriesCount === "number") - message.importedEntriesCount = object.importedEntriesCount; - else if (typeof object.importedEntriesCount === "object") - message.importedEntriesCount = new $util.LongBits(object.importedEntriesCount.low >>> 0, object.importedEntriesCount.high >>> 0).toNumber(); - if (object.failedEntriesCount != null) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) if ($util.Long) - (message.failedEntriesCount = $util.Long.fromValue(object.failedEntriesCount)).unsigned = false; - else if (typeof object.failedEntriesCount === "string") - message.failedEntriesCount = parseInt(object.failedEntriesCount, 10); - else if (typeof object.failedEntriesCount === "number") - message.failedEntriesCount = object.failedEntriesCount; - else if (typeof object.failedEntriesCount === "object") - message.failedEntriesCount = new $util.LongBits(object.failedEntriesCount.low >>> 0, object.failedEntriesCount.high >>> 0).toNumber(); + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportCompletionSuggestionsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} message ImportCompletionSuggestionsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSuggestionDenyListEntriesResponse.toObject = function toObject(message, options) { + ImportCompletionSuggestionsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorSamples = []; if (options.defaults) { + object.createTime = null; + object.updateTime = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.importedEntriesCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.importedEntriesCount = options.longs === String ? "0" : 0; + object.successCount = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.failedEntriesCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.failedEntriesCount = options.longs === String ? "0" : 0; - } - if (message.errorSamples && message.errorSamples.length) { - object.errorSamples = []; - for (var j = 0; j < message.errorSamples.length; ++j) - object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + object.failureCount = options.longs === String ? "0" : 0; } - if (message.importedEntriesCount != null && message.hasOwnProperty("importedEntriesCount")) - if (typeof message.importedEntriesCount === "number") - object.importedEntriesCount = options.longs === String ? String(message.importedEntriesCount) : message.importedEntriesCount; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; else - object.importedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.importedEntriesCount) : options.longs === Number ? new $util.LongBits(message.importedEntriesCount.low >>> 0, message.importedEntriesCount.high >>> 0).toNumber() : message.importedEntriesCount; - if (message.failedEntriesCount != null && message.hasOwnProperty("failedEntriesCount")) - if (typeof message.failedEntriesCount === "number") - object.failedEntriesCount = options.longs === String ? String(message.failedEntriesCount) : message.failedEntriesCount; + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; else - object.failedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedEntriesCount) : options.longs === Number ? new $util.LongBits(message.failedEntriesCount.low >>> 0, message.failedEntriesCount.high >>> 0).toNumber() : message.failedEntriesCount; + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; return object; }; /** - * Converts this ImportSuggestionDenyListEntriesResponse to JSON. + * Converts this ImportCompletionSuggestionsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @instance * @returns {Object.} JSON object */ - ImportSuggestionDenyListEntriesResponse.prototype.toJSON = function toJSON() { + ImportCompletionSuggestionsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesResponse + * Gets the default type url for ImportCompletionSuggestionsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportSuggestionDenyListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportCompletionSuggestionsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata"; }; - return ImportSuggestionDenyListEntriesResponse; + return ImportCompletionSuggestionsMetadata; })(); - v1.ImportSuggestionDenyListEntriesMetadata = (function() { + v1.Document = (function() { /** - * Properties of an ImportSuggestionDenyListEntriesMetadata. + * Properties of a Document. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportSuggestionDenyListEntriesMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] ImportSuggestionDenyListEntriesMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportSuggestionDenyListEntriesMetadata updateTime + * @interface IDocument + * @property {google.protobuf.IStruct|null} [structData] Document structData + * @property {string|null} [jsonData] Document jsonData + * @property {string|null} [name] Document name + * @property {string|null} [id] Document id + * @property {string|null} [schemaId] Document schemaId + * @property {google.cloud.discoveryengine.v1.Document.IContent|null} [content] Document content + * @property {string|null} [parentDocumentId] Document parentDocumentId + * @property {google.protobuf.IStruct|null} [derivedStructData] Document derivedStructData + * @property {google.protobuf.ITimestamp|null} [indexTime] Document indexTime */ /** - * Constructs a new ImportSuggestionDenyListEntriesMetadata. + * Constructs a new Document. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportSuggestionDenyListEntriesMetadata. - * @implements IImportSuggestionDenyListEntriesMetadata + * @classdesc Represents a Document. + * @implements IDocument * @constructor - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IDocument=} [properties] Properties to set */ - function ImportSuggestionDenyListEntriesMetadata(properties) { + function Document(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13840,89 +17226,201 @@ } /** - * ImportSuggestionDenyListEntriesMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * Document structData. + * @member {google.protobuf.IStruct|null|undefined} structData + * @memberof google.cloud.discoveryengine.v1.Document * @instance */ - ImportSuggestionDenyListEntriesMetadata.prototype.createTime = null; + Document.prototype.structData = null; /** - * ImportSuggestionDenyListEntriesMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * Document jsonData. + * @member {string|null|undefined} jsonData + * @memberof google.cloud.discoveryengine.v1.Document * @instance */ - ImportSuggestionDenyListEntriesMetadata.prototype.updateTime = null; + Document.prototype.jsonData = null; /** - * Creates a new ImportSuggestionDenyListEntriesMetadata instance using the specified properties. + * Document name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.name = ""; + + /** + * Document id. + * @member {string} id + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.id = ""; + + /** + * Document schemaId. + * @member {string} schemaId + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.schemaId = ""; + + /** + * Document content. + * @member {google.cloud.discoveryengine.v1.Document.IContent|null|undefined} content + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.content = null; + + /** + * Document parentDocumentId. + * @member {string} parentDocumentId + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.parentDocumentId = ""; + + /** + * Document derivedStructData. + * @member {google.protobuf.IStruct|null|undefined} derivedStructData + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.derivedStructData = null; + + /** + * Document indexTime. + * @member {google.protobuf.ITimestamp|null|undefined} indexTime + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.indexTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Document data. + * @member {"structData"|"jsonData"|undefined} data + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Object.defineProperty(Document.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["structData", "jsonData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Document instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata instance + * @param {google.cloud.discoveryengine.v1.IDocument=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Document} Document instance */ - ImportSuggestionDenyListEntriesMetadata.create = function create(properties) { - return new ImportSuggestionDenyListEntriesMetadata(properties); + Document.create = function create(properties) { + return new Document(properties); }; /** - * Encodes the specified ImportSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesMetadata.encode = function encode(message, writer) { + Document.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId); + if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) + $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonData != null && Object.hasOwnProperty.call(message, "jsonData")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.jsonData); + if (message.derivedStructData != null && Object.hasOwnProperty.call(message, "derivedStructData")) + $root.google.protobuf.Struct.encode(message.derivedStructData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.parentDocumentId != null && Object.hasOwnProperty.call(message, "parentDocumentId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.parentDocumentId); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.discoveryengine.v1.Document.Content.encode(message.content, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime")) + $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + Document.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesMetadata.decode = function decode(reader, length) { + Document.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Document(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: { + message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 5: { + message.jsonData = reader.string(); + break; + } case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.id = reader.string(); + break; + } + case 3: { + message.schemaId = reader.string(); + break; + } + case 10: { + message.content = $root.google.cloud.discoveryengine.v1.Document.Content.decode(reader, reader.uint32()); + break; + } + case 7: { + message.parentDocumentId = reader.string(); + break; + } + case 6: { + message.derivedStructData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 13: { + message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -13934,149 +17432,519 @@ }; /** - * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes a Document message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { + Document.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSuggestionDenyListEntriesMetadata message. + * Verifies a Document message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportSuggestionDenyListEntriesMetadata.verify = function verify(message) { + Document.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + var properties = {}; + if (message.structData != null && message.hasOwnProperty("structData")) { + properties.data = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structData); + if (error) + return "structData." + error; + } + } + if (message.jsonData != null && message.hasOwnProperty("jsonData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + if (!$util.isString(message.jsonData)) + return "jsonData: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + if (!$util.isString(message.schemaId)) + return "schemaId: string expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.discoveryengine.v1.Document.Content.verify(message.content); if (error) - return "createTime." + error; + return "content." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) + if (!$util.isString(message.parentDocumentId)) + return "parentDocumentId: string expected"; + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) { + var error = $root.google.protobuf.Struct.verify(message.derivedStructData); + if (error) + return "derivedStructData." + error; + } + if (message.indexTime != null && message.hasOwnProperty("indexTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.indexTime); if (error) - return "updateTime." + error; + return "indexTime." + error; } return null; }; /** - * Creates an ImportSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Document message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.Document} Document */ - ImportSuggestionDenyListEntriesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata) + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Document) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.discoveryengine.v1.Document(); + if (object.structData != null) { + if (typeof object.structData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Document.structData: object expected"); + message.structData = $root.google.protobuf.Struct.fromObject(object.structData); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.jsonData != null) + message.jsonData = String(object.jsonData); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.schemaId != null) + message.schemaId = String(object.schemaId); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Document.content: object expected"); + message.content = $root.google.cloud.discoveryengine.v1.Document.Content.fromObject(object.content); + } + if (object.parentDocumentId != null) + message.parentDocumentId = String(object.parentDocumentId); + if (object.derivedStructData != null) { + if (typeof object.derivedStructData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Document.derivedStructData: object expected"); + message.derivedStructData = $root.google.protobuf.Struct.fromObject(object.derivedStructData); + } + if (object.indexTime != null) { + if (typeof object.indexTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Document.indexTime: object expected"); + message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime); } return message; }; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a Document message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata + * @param {google.cloud.discoveryengine.v1.Document} message Document * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSuggestionDenyListEntriesMetadata.toObject = function toObject(message, options) { + Document.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.updateTime = null; + object.name = ""; + object.id = ""; + object.schemaId = ""; + object.derivedStructData = null; + object.parentDocumentId = ""; + object.content = null; + object.indexTime = null; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + object.schemaId = message.schemaId; + if (message.structData != null && message.hasOwnProperty("structData")) { + object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); + if (options.oneofs) + object.data = "structData"; + } + if (message.jsonData != null && message.hasOwnProperty("jsonData")) { + object.jsonData = message.jsonData; + if (options.oneofs) + object.data = "jsonData"; + } + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) + object.derivedStructData = $root.google.protobuf.Struct.toObject(message.derivedStructData, options); + if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) + object.parentDocumentId = message.parentDocumentId; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.discoveryengine.v1.Document.Content.toObject(message.content, options); + if (message.indexTime != null && message.hasOwnProperty("indexTime")) + object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options); return object; }; /** - * Converts this ImportSuggestionDenyListEntriesMetadata to JSON. + * Converts this Document to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @instance * @returns {Object.} JSON object */ - ImportSuggestionDenyListEntriesMetadata.prototype.toJSON = function toJSON() { + Document.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesMetadata + * Gets the default type url for Document * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportSuggestionDenyListEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Document"; }; - return ImportSuggestionDenyListEntriesMetadata; + Document.Content = (function() { + + /** + * Properties of a Content. + * @memberof google.cloud.discoveryengine.v1.Document + * @interface IContent + * @property {Uint8Array|null} [rawBytes] Content rawBytes + * @property {string|null} [uri] Content uri + * @property {string|null} [mimeType] Content mimeType + */ + + /** + * Constructs a new Content. + * @memberof google.cloud.discoveryengine.v1.Document + * @classdesc Represents a Content. + * @implements IContent + * @constructor + * @param {google.cloud.discoveryengine.v1.Document.IContent=} [properties] Properties to set + */ + function Content(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Content rawBytes. + * @member {Uint8Array|null|undefined} rawBytes + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + */ + Content.prototype.rawBytes = null; + + /** + * Content uri. + * @member {string|null|undefined} uri + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + */ + Content.prototype.uri = null; + + /** + * Content mimeType. + * @member {string} mimeType + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + */ + Content.prototype.mimeType = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Content content. + * @member {"rawBytes"|"uri"|undefined} content + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + */ + Object.defineProperty(Content.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["rawBytes", "uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Content instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1.Document.IContent=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Document.Content} Content instance + */ + Content.create = function create(properties) { + return new Content(properties); + }; + + /** + * Encodes the specified Content message. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.Content.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1.Document.IContent} message Content message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Content.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.rawBytes != null && Object.hasOwnProperty.call(message, "rawBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rawBytes); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); + return writer; + }; + + /** + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.Content.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1.Document.IContent} message Content message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Content.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Content message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Document.Content} Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Content.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Document.Content(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.rawBytes = reader.bytes(); + break; + } + case 3: { + message.uri = reader.string(); + break; + } + case 1: { + message.mimeType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Content message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Document.Content} Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Content.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Content message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Content.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { + properties.content = 1; + if (!(message.rawBytes && typeof message.rawBytes.length === "number" || $util.isString(message.rawBytes))) + return "rawBytes: buffer expected"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + return null; + }; + + /** + * Creates a Content message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Document.Content} Content + */ + Content.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Document.Content) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Document.Content(); + if (object.rawBytes != null) + if (typeof object.rawBytes === "string") + $util.base64.decode(object.rawBytes, message.rawBytes = $util.newBuffer($util.base64.length(object.rawBytes)), 0); + else if (object.rawBytes.length >= 0) + message.rawBytes = object.rawBytes; + if (object.uri != null) + message.uri = String(object.uri); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + return message; + }; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1.Document.Content} message Content + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Content.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mimeType = ""; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { + object.rawBytes = options.bytes === String ? $util.base64.encode(message.rawBytes, 0, message.rawBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawBytes) : message.rawBytes; + if (options.oneofs) + object.content = "rawBytes"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.content = "uri"; + } + return object; + }; + + /** + * Converts this Content to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + * @returns {Object.} JSON object + */ + Content.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Content + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Document.Content"; + }; + + return Content; + })(); + + return Document; })(); - v1.Document = (function() { + v1.UserEvent = (function() { /** - * Properties of a Document. + * Properties of a UserEvent. * @memberof google.cloud.discoveryengine.v1 - * @interface IDocument - * @property {google.protobuf.IStruct|null} [structData] Document structData - * @property {string|null} [jsonData] Document jsonData - * @property {string|null} [name] Document name - * @property {string|null} [id] Document id - * @property {string|null} [schemaId] Document schemaId - * @property {google.cloud.discoveryengine.v1.Document.IContent|null} [content] Document content - * @property {string|null} [parentDocumentId] Document parentDocumentId - * @property {google.protobuf.IStruct|null} [derivedStructData] Document derivedStructData - * @property {google.protobuf.ITimestamp|null} [indexTime] Document indexTime + * @interface IUserEvent + * @property {string|null} [eventType] UserEvent eventType + * @property {string|null} [userPseudoId] UserEvent userPseudoId + * @property {string|null} [engine] UserEvent engine + * @property {string|null} [dataStore] UserEvent dataStore + * @property {google.protobuf.ITimestamp|null} [eventTime] UserEvent eventTime + * @property {google.cloud.discoveryengine.v1.IUserInfo|null} [userInfo] UserEvent userInfo + * @property {boolean|null} [directUserRequest] UserEvent directUserRequest + * @property {string|null} [sessionId] UserEvent sessionId + * @property {google.cloud.discoveryengine.v1.IPageInfo|null} [pageInfo] UserEvent pageInfo + * @property {string|null} [attributionToken] UserEvent attributionToken + * @property {string|null} [filter] UserEvent filter + * @property {Array.|null} [documents] UserEvent documents + * @property {google.cloud.discoveryengine.v1.IPanelInfo|null} [panel] UserEvent panel + * @property {google.cloud.discoveryengine.v1.ISearchInfo|null} [searchInfo] UserEvent searchInfo + * @property {google.cloud.discoveryengine.v1.ICompletionInfo|null} [completionInfo] UserEvent completionInfo + * @property {google.cloud.discoveryengine.v1.ITransactionInfo|null} [transactionInfo] UserEvent transactionInfo + * @property {Array.|null} [tagIds] UserEvent tagIds + * @property {Array.|null} [promotionIds] UserEvent promotionIds + * @property {Object.|null} [attributes] UserEvent attributes + * @property {google.cloud.discoveryengine.v1.IMediaInfo|null} [mediaInfo] UserEvent mediaInfo */ /** - * Constructs a new Document. + * Constructs a new UserEvent. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a Document. - * @implements IDocument + * @classdesc Represents a UserEvent. + * @implements IUserEvent * @constructor - * @param {google.cloud.discoveryengine.v1.IDocument=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IUserEvent=} [properties] Properties to set */ - function Document(properties) { + function UserEvent(properties) { + this.documents = []; + this.tagIds = []; + this.promotionIds = []; + this.attributes = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14084,201 +17952,372 @@ } /** - * Document structData. - * @member {google.protobuf.IStruct|null|undefined} structData - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent eventType. + * @member {string} eventType + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.eventType = ""; + + /** + * UserEvent userPseudoId. + * @member {string} userPseudoId + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.userPseudoId = ""; + + /** + * UserEvent engine. + * @member {string} engine + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.engine = ""; + + /** + * UserEvent dataStore. + * @member {string} dataStore + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.dataStore = ""; + + /** + * UserEvent eventTime. + * @member {google.protobuf.ITimestamp|null|undefined} eventTime + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.eventTime = null; + + /** + * UserEvent userInfo. + * @member {google.cloud.discoveryengine.v1.IUserInfo|null|undefined} userInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.userInfo = null; + + /** + * UserEvent directUserRequest. + * @member {boolean} directUserRequest + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.directUserRequest = false; + + /** + * UserEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.sessionId = ""; + + /** + * UserEvent pageInfo. + * @member {google.cloud.discoveryengine.v1.IPageInfo|null|undefined} pageInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.pageInfo = null; + + /** + * UserEvent attributionToken. + * @member {string} attributionToken + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.structData = null; + UserEvent.prototype.attributionToken = ""; /** - * Document jsonData. - * @member {string|null|undefined} jsonData - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent filter. + * @member {string} filter + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.jsonData = null; + UserEvent.prototype.filter = ""; /** - * Document name. - * @member {string} name - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent documents. + * @member {Array.} documents + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.name = ""; + UserEvent.prototype.documents = $util.emptyArray; /** - * Document id. - * @member {string} id - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent panel. + * @member {google.cloud.discoveryengine.v1.IPanelInfo|null|undefined} panel + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.id = ""; + UserEvent.prototype.panel = null; /** - * Document schemaId. - * @member {string} schemaId - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent searchInfo. + * @member {google.cloud.discoveryengine.v1.ISearchInfo|null|undefined} searchInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.schemaId = ""; + UserEvent.prototype.searchInfo = null; /** - * Document content. - * @member {google.cloud.discoveryengine.v1.Document.IContent|null|undefined} content - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent completionInfo. + * @member {google.cloud.discoveryengine.v1.ICompletionInfo|null|undefined} completionInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.content = null; + UserEvent.prototype.completionInfo = null; /** - * Document parentDocumentId. - * @member {string} parentDocumentId - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent transactionInfo. + * @member {google.cloud.discoveryengine.v1.ITransactionInfo|null|undefined} transactionInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.parentDocumentId = ""; + UserEvent.prototype.transactionInfo = null; /** - * Document derivedStructData. - * @member {google.protobuf.IStruct|null|undefined} derivedStructData - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent tagIds. + * @member {Array.} tagIds + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.derivedStructData = null; + UserEvent.prototype.tagIds = $util.emptyArray; /** - * Document indexTime. - * @member {google.protobuf.ITimestamp|null|undefined} indexTime - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent promotionIds. + * @member {Array.} promotionIds + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.indexTime = null; + UserEvent.prototype.promotionIds = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * UserEvent attributes. + * @member {Object.} attributes + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.attributes = $util.emptyObject; /** - * Document data. - * @member {"structData"|"jsonData"|undefined} data - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent mediaInfo. + * @member {google.cloud.discoveryengine.v1.IMediaInfo|null|undefined} mediaInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Object.defineProperty(Document.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["structData", "jsonData"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserEvent.prototype.mediaInfo = null; /** - * Creates a new Document instance using the specified properties. + * Creates a new UserEvent instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static - * @param {google.cloud.discoveryengine.v1.IDocument=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.Document} Document instance + * @param {google.cloud.discoveryengine.v1.IUserEvent=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent instance */ - Document.create = function create(properties) { - return new Document(properties); + UserEvent.create = function create(properties) { + return new UserEvent(properties); }; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.verify|verify} messages. + * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static - * @param {google.cloud.discoveryengine.v1.IDocument} message Document message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IUserEvent} message UserEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encode = function encode(message, writer) { + UserEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId); - if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) - $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.jsonData != null && Object.hasOwnProperty.call(message, "jsonData")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.jsonData); - if (message.derivedStructData != null && Object.hasOwnProperty.call(message, "derivedStructData")) - $root.google.protobuf.Struct.encode(message.derivedStructData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.parentDocumentId != null && Object.hasOwnProperty.call(message, "parentDocumentId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.parentDocumentId); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.cloud.discoveryengine.v1.Document.Content.encode(message.content, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime")) - $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType); + if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userPseudoId); + if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) + $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.userInfo != null && Object.hasOwnProperty.call(message, "userInfo")) + $root.google.cloud.discoveryengine.v1.UserInfo.encode(message.userInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.directUserRequest != null && Object.hasOwnProperty.call(message, "directUserRequest")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.directUserRequest); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sessionId); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.google.cloud.discoveryengine.v1.PageInfo.encode(message.pageInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.attributionToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.filter); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + $root.google.cloud.discoveryengine.v1.DocumentInfo.encode(message.documents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.panel != null && Object.hasOwnProperty.call(message, "panel")) + $root.google.cloud.discoveryengine.v1.PanelInfo.encode(message.panel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.searchInfo != null && Object.hasOwnProperty.call(message, "searchInfo")) + $root.google.cloud.discoveryengine.v1.SearchInfo.encode(message.searchInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.completionInfo != null && Object.hasOwnProperty.call(message, "completionInfo")) + $root.google.cloud.discoveryengine.v1.CompletionInfo.encode(message.completionInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.transactionInfo != null && Object.hasOwnProperty.call(message, "transactionInfo")) + $root.google.cloud.discoveryengine.v1.TransactionInfo.encode(message.transactionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.tagIds != null && message.tagIds.length) + for (var i = 0; i < message.tagIds.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.tagIds[i]); + if (message.promotionIds != null && message.promotionIds.length) + for (var i = 0; i < message.promotionIds.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.promotionIds[i]); + if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) + for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.discoveryengine.v1.CustomAttribute.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.mediaInfo != null && Object.hasOwnProperty.call(message, "mediaInfo")) + $root.google.cloud.discoveryengine.v1.MediaInfo.encode(message.mediaInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.engine); + if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.dataStore); return writer; }; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.verify|verify} messages. + * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static - * @param {google.cloud.discoveryengine.v1.IDocument} message Document message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IUserEvent} message UserEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encodeDelimited = function encodeDelimited(message, writer) { + UserEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes a UserEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.Document} Document + * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decode = function decode(reader, length) { + UserEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Document(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.UserEvent(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.eventType = reader.string(); + break; + } + case 2: { + message.userPseudoId = reader.string(); + break; + } + case 19: { + message.engine = reader.string(); + break; + } + case 20: { + message.dataStore = reader.string(); + break; + } + case 3: { + message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 4: { - message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.decode(reader, reader.uint32()); break; } case 5: { - message.jsonData = reader.string(); + message.directUserRequest = reader.bool(); break; } - case 1: { - message.name = reader.string(); + case 6: { + message.sessionId = reader.string(); break; } - case 2: { - message.id = reader.string(); + case 7: { + message.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.decode(reader, reader.uint32()); break; } - case 3: { - message.schemaId = reader.string(); + case 8: { + message.attributionToken = reader.string(); + break; + } + case 9: { + message.filter = reader.string(); break; } case 10: { - message.content = $root.google.cloud.discoveryengine.v1.Document.Content.decode(reader, reader.uint32()); + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.discoveryengine.v1.DocumentInfo.decode(reader, reader.uint32())); break; } - case 7: { - message.parentDocumentId = reader.string(); + case 11: { + message.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.decode(reader, reader.uint32()); break; } - case 6: { - message.derivedStructData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + case 12: { + message.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.decode(reader, reader.uint32()); break; } case 13: { - message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.decode(reader, reader.uint32()); + break; + } + case 15: { + if (!(message.tagIds && message.tagIds.length)) + message.tagIds = []; + message.tagIds.push(reader.string()); + break; + } + case 16: { + if (!(message.promotionIds && message.promotionIds.length)) + message.promotionIds = []; + message.promotionIds.push(reader.string()); + break; + } + case 17: { + if (message.attributes === $util.emptyObject) + message.attributes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.discoveryengine.v1.CustomAttribute.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.attributes[key] = value; + break; + } + case 18: { + message.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.decode(reader, reader.uint32()); break; } default: @@ -14290,519 +18329,653 @@ }; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes a UserEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.Document} Document + * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decodeDelimited = function decodeDelimited(reader) { + UserEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Document message. + * Verifies a UserEvent message. * @function verify - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Document.verify = function verify(message) { + UserEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.structData != null && message.hasOwnProperty("structData")) { - properties.data = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structData); + if (message.eventType != null && message.hasOwnProperty("eventType")) + if (!$util.isString(message.eventType)) + return "eventType: string expected"; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + if (!$util.isString(message.userPseudoId)) + return "userPseudoId: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + if (!$util.isString(message.engine)) + return "engine: string expected"; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + if (!$util.isString(message.dataStore)) + return "dataStore: string expected"; + if (message.eventTime != null && message.hasOwnProperty("eventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (error) + return "eventTime." + error; + } + if (message.userInfo != null && message.hasOwnProperty("userInfo")) { + var error = $root.google.cloud.discoveryengine.v1.UserInfo.verify(message.userInfo); + if (error) + return "userInfo." + error; + } + if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) + if (typeof message.directUserRequest !== "boolean") + return "directUserRequest: boolean expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { + var error = $root.google.cloud.discoveryengine.v1.PageInfo.verify(message.pageInfo); + if (error) + return "pageInfo." + error; + } + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + if (!$util.isString(message.attributionToken)) + return "attributionToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.DocumentInfo.verify(message.documents[i]); if (error) - return "structData." + error; + return "documents." + error; } } - if (message.jsonData != null && message.hasOwnProperty("jsonData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - if (!$util.isString(message.jsonData)) - return "jsonData: string expected"; + if (message.panel != null && message.hasOwnProperty("panel")) { + var error = $root.google.cloud.discoveryengine.v1.PanelInfo.verify(message.panel); + if (error) + return "panel." + error; } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.schemaId != null && message.hasOwnProperty("schemaId")) - if (!$util.isString(message.schemaId)) - return "schemaId: string expected"; - if (message.content != null && message.hasOwnProperty("content")) { - var error = $root.google.cloud.discoveryengine.v1.Document.Content.verify(message.content); + if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) { + var error = $root.google.cloud.discoveryengine.v1.SearchInfo.verify(message.searchInfo); if (error) - return "content." + error; + return "searchInfo." + error; } - if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) - if (!$util.isString(message.parentDocumentId)) - return "parentDocumentId: string expected"; - if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) { - var error = $root.google.protobuf.Struct.verify(message.derivedStructData); + if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) { + var error = $root.google.cloud.discoveryengine.v1.CompletionInfo.verify(message.completionInfo); if (error) - return "derivedStructData." + error; + return "completionInfo." + error; } - if (message.indexTime != null && message.hasOwnProperty("indexTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.indexTime); + if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) { + var error = $root.google.cloud.discoveryengine.v1.TransactionInfo.verify(message.transactionInfo); if (error) - return "indexTime." + error; + return "transactionInfo." + error; + } + if (message.tagIds != null && message.hasOwnProperty("tagIds")) { + if (!Array.isArray(message.tagIds)) + return "tagIds: array expected"; + for (var i = 0; i < message.tagIds.length; ++i) + if (!$util.isString(message.tagIds[i])) + return "tagIds: string[] expected"; + } + if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { + if (!Array.isArray(message.promotionIds)) + return "promotionIds: array expected"; + for (var i = 0; i < message.promotionIds.length; ++i) + if (!$util.isString(message.promotionIds[i])) + return "promotionIds: string[] expected"; + } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!$util.isObject(message.attributes)) + return "attributes: object expected"; + var key = Object.keys(message.attributes); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.CustomAttribute.verify(message.attributes[key[i]]); + if (error) + return "attributes." + error; + } + } + if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) { + var error = $root.google.cloud.discoveryengine.v1.MediaInfo.verify(message.mediaInfo); + if (error) + return "mediaInfo." + error; } return null; }; /** - * Creates a Document message from a plain object. Also converts values to their respective internal types. + * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.Document} Document + * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent */ - Document.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.Document) + UserEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.UserEvent) return object; - var message = new $root.google.cloud.discoveryengine.v1.Document(); - if (object.structData != null) { - if (typeof object.structData !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.Document.structData: object expected"); - message.structData = $root.google.protobuf.Struct.fromObject(object.structData); + var message = new $root.google.cloud.discoveryengine.v1.UserEvent(); + if (object.eventType != null) + message.eventType = String(object.eventType); + if (object.userPseudoId != null) + message.userPseudoId = String(object.userPseudoId); + if (object.engine != null) + message.engine = String(object.engine); + if (object.dataStore != null) + message.dataStore = String(object.dataStore); + if (object.eventTime != null) { + if (typeof object.eventTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.eventTime: object expected"); + message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); } - if (object.jsonData != null) - message.jsonData = String(object.jsonData); - if (object.name != null) - message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); - if (object.schemaId != null) - message.schemaId = String(object.schemaId); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.Document.content: object expected"); - message.content = $root.google.cloud.discoveryengine.v1.Document.Content.fromObject(object.content); + if (object.userInfo != null) { + if (typeof object.userInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.userInfo: object expected"); + message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.fromObject(object.userInfo); + } + if (object.directUserRequest != null) + message.directUserRequest = Boolean(object.directUserRequest); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + if (object.pageInfo != null) { + if (typeof object.pageInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.pageInfo: object expected"); + message.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.fromObject(object.pageInfo); + } + if (object.attributionToken != null) + message.attributionToken = String(object.attributionToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.documents: object expected"); + message.documents[i] = $root.google.cloud.discoveryengine.v1.DocumentInfo.fromObject(object.documents[i]); + } + } + if (object.panel != null) { + if (typeof object.panel !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.panel: object expected"); + message.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.fromObject(object.panel); + } + if (object.searchInfo != null) { + if (typeof object.searchInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.searchInfo: object expected"); + message.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.fromObject(object.searchInfo); + } + if (object.completionInfo != null) { + if (typeof object.completionInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.completionInfo: object expected"); + message.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.fromObject(object.completionInfo); + } + if (object.transactionInfo != null) { + if (typeof object.transactionInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.transactionInfo: object expected"); + message.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.fromObject(object.transactionInfo); } - if (object.parentDocumentId != null) - message.parentDocumentId = String(object.parentDocumentId); - if (object.derivedStructData != null) { - if (typeof object.derivedStructData !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.Document.derivedStructData: object expected"); - message.derivedStructData = $root.google.protobuf.Struct.fromObject(object.derivedStructData); + if (object.tagIds) { + if (!Array.isArray(object.tagIds)) + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.tagIds: array expected"); + message.tagIds = []; + for (var i = 0; i < object.tagIds.length; ++i) + message.tagIds[i] = String(object.tagIds[i]); } - if (object.indexTime != null) { - if (typeof object.indexTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.Document.indexTime: object expected"); - message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime); + if (object.promotionIds) { + if (!Array.isArray(object.promotionIds)) + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.promotionIds: array expected"); + message.promotionIds = []; + for (var i = 0; i < object.promotionIds.length; ++i) + message.promotionIds[i] = String(object.promotionIds[i]); + } + if (object.attributes) { + if (typeof object.attributes !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.attributes: object expected"); + message.attributes = {}; + for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { + if (typeof object.attributes[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.attributes: object expected"); + message.attributes[keys[i]] = $root.google.cloud.discoveryengine.v1.CustomAttribute.fromObject(object.attributes[keys[i]]); + } + } + if (object.mediaInfo != null) { + if (typeof object.mediaInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.mediaInfo: object expected"); + message.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.fromObject(object.mediaInfo); } return message; }; /** - * Creates a plain object from a Document message. Also converts values to other types if specified. + * Creates a plain object from a UserEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static - * @param {google.cloud.discoveryengine.v1.Document} message Document + * @param {google.cloud.discoveryengine.v1.UserEvent} message UserEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Document.toObject = function toObject(message, options) { + UserEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.documents = []; + object.tagIds = []; + object.promotionIds = []; + } + if (options.objects || options.defaults) + object.attributes = {}; if (options.defaults) { - object.name = ""; - object.id = ""; - object.schemaId = ""; - object.derivedStructData = null; - object.parentDocumentId = ""; - object.content = null; - object.indexTime = null; + object.eventType = ""; + object.userPseudoId = ""; + object.eventTime = null; + object.userInfo = null; + object.directUserRequest = false; + object.sessionId = ""; + object.pageInfo = null; + object.attributionToken = ""; + object.filter = ""; + object.panel = null; + object.searchInfo = null; + object.completionInfo = null; + object.transactionInfo = null; + object.mediaInfo = null; + object.engine = ""; + object.dataStore = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.schemaId != null && message.hasOwnProperty("schemaId")) - object.schemaId = message.schemaId; - if (message.structData != null && message.hasOwnProperty("structData")) { - object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); - if (options.oneofs) - object.data = "structData"; + if (message.eventType != null && message.hasOwnProperty("eventType")) + object.eventType = message.eventType; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + object.userPseudoId = message.userPseudoId; + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); + if (message.userInfo != null && message.hasOwnProperty("userInfo")) + object.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.toObject(message.userInfo, options); + if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) + object.directUserRequest = message.directUserRequest; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) + object.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.toObject(message.pageInfo, options); + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + object.attributionToken = message.attributionToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.cloud.discoveryengine.v1.DocumentInfo.toObject(message.documents[j], options); } - if (message.jsonData != null && message.hasOwnProperty("jsonData")) { - object.jsonData = message.jsonData; - if (options.oneofs) - object.data = "jsonData"; + if (message.panel != null && message.hasOwnProperty("panel")) + object.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.toObject(message.panel, options); + if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) + object.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.toObject(message.searchInfo, options); + if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) + object.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.toObject(message.completionInfo, options); + if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) + object.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.toObject(message.transactionInfo, options); + if (message.tagIds && message.tagIds.length) { + object.tagIds = []; + for (var j = 0; j < message.tagIds.length; ++j) + object.tagIds[j] = message.tagIds[j]; } - if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) - object.derivedStructData = $root.google.protobuf.Struct.toObject(message.derivedStructData, options); - if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) - object.parentDocumentId = message.parentDocumentId; - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.cloud.discoveryengine.v1.Document.Content.toObject(message.content, options); - if (message.indexTime != null && message.hasOwnProperty("indexTime")) - object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options); + if (message.promotionIds && message.promotionIds.length) { + object.promotionIds = []; + for (var j = 0; j < message.promotionIds.length; ++j) + object.promotionIds[j] = message.promotionIds[j]; + } + var keys2; + if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { + object.attributes = {}; + for (var j = 0; j < keys2.length; ++j) + object.attributes[keys2[j]] = $root.google.cloud.discoveryengine.v1.CustomAttribute.toObject(message.attributes[keys2[j]], options); + } + if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) + object.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.toObject(message.mediaInfo, options); + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = message.engine; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + object.dataStore = message.dataStore; return object; }; /** - * Converts this Document to JSON. + * Converts this UserEvent to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance * @returns {Object.} JSON object */ - Document.prototype.toJSON = function toJSON() { + UserEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Document + * Gets the default type url for UserEvent * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Document"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.UserEvent"; }; - Document.Content = (function() { - - /** - * Properties of a Content. - * @memberof google.cloud.discoveryengine.v1.Document - * @interface IContent - * @property {Uint8Array|null} [rawBytes] Content rawBytes - * @property {string|null} [uri] Content uri - * @property {string|null} [mimeType] Content mimeType - */ - - /** - * Constructs a new Content. - * @memberof google.cloud.discoveryengine.v1.Document - * @classdesc Represents a Content. - * @implements IContent - * @constructor - * @param {google.cloud.discoveryengine.v1.Document.IContent=} [properties] Properties to set - */ - function Content(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Content rawBytes. - * @member {Uint8Array|null|undefined} rawBytes - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - */ - Content.prototype.rawBytes = null; - - /** - * Content uri. - * @member {string|null|undefined} uri - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - */ - Content.prototype.uri = null; + return UserEvent; + })(); - /** - * Content mimeType. - * @member {string} mimeType - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - */ - Content.prototype.mimeType = ""; + v1.PageInfo = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a PageInfo. + * @memberof google.cloud.discoveryengine.v1 + * @interface IPageInfo + * @property {string|null} [pageviewId] PageInfo pageviewId + * @property {string|null} [pageCategory] PageInfo pageCategory + * @property {string|null} [uri] PageInfo uri + * @property {string|null} [referrerUri] PageInfo referrerUri + */ - /** - * Content content. - * @member {"rawBytes"|"uri"|undefined} content - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - */ - Object.defineProperty(Content.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["rawBytes", "uri"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new PageInfo. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a PageInfo. + * @implements IPageInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.IPageInfo=} [properties] Properties to set + */ + function PageInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new Content instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {google.cloud.discoveryengine.v1.Document.IContent=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.Document.Content} Content instance - */ - Content.create = function create(properties) { - return new Content(properties); - }; + /** + * PageInfo pageviewId. + * @member {string} pageviewId + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + */ + PageInfo.prototype.pageviewId = ""; - /** - * Encodes the specified Content message. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.Content.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {google.cloud.discoveryengine.v1.Document.IContent} message Content message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Content.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); - if (message.rawBytes != null && Object.hasOwnProperty.call(message, "rawBytes")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rawBytes); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); - return writer; - }; + /** + * PageInfo pageCategory. + * @member {string} pageCategory + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + */ + PageInfo.prototype.pageCategory = ""; - /** - * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.Content.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {google.cloud.discoveryengine.v1.Document.IContent} message Content message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Content.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * PageInfo uri. + * @member {string} uri + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + */ + PageInfo.prototype.uri = ""; - /** - * Decodes a Content message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.Document.Content} Content - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Content.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Document.Content(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.rawBytes = reader.bytes(); - break; - } - case 3: { - message.uri = reader.string(); - break; - } - case 1: { - message.mimeType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * PageInfo referrerUri. + * @member {string} referrerUri + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + */ + PageInfo.prototype.referrerUri = ""; - /** - * Decodes a Content message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.Document.Content} Content - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Content.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new PageInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {google.cloud.discoveryengine.v1.IPageInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo instance + */ + PageInfo.create = function create(properties) { + return new PageInfo(properties); + }; - /** - * Verifies a Content message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Content.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { - properties.content = 1; - if (!(message.rawBytes && typeof message.rawBytes.length === "number" || $util.isString(message.rawBytes))) - return "rawBytes: buffer expected"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; - } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - return null; - }; + /** + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {google.cloud.discoveryengine.v1.IPageInfo} message PageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageviewId != null && Object.hasOwnProperty.call(message, "pageviewId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pageviewId); + if (message.pageCategory != null && Object.hasOwnProperty.call(message, "pageCategory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageCategory); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); + if (message.referrerUri != null && Object.hasOwnProperty.call(message, "referrerUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.referrerUri); + return writer; + }; - /** - * Creates a Content message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.Document.Content} Content - */ - Content.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.Document.Content) - return object; - var message = new $root.google.cloud.discoveryengine.v1.Document.Content(); - if (object.rawBytes != null) - if (typeof object.rawBytes === "string") - $util.base64.decode(object.rawBytes, message.rawBytes = $util.newBuffer($util.base64.length(object.rawBytes)), 0); - else if (object.rawBytes.length >= 0) - message.rawBytes = object.rawBytes; - if (object.uri != null) - message.uri = String(object.uri); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - return message; - }; + /** + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {google.cloud.discoveryengine.v1.IPageInfo} message PageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Content message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {google.cloud.discoveryengine.v1.Document.Content} message Content - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Content.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.mimeType = ""; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { - object.rawBytes = options.bytes === String ? $util.base64.encode(message.rawBytes, 0, message.rawBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawBytes) : message.rawBytes; - if (options.oneofs) - object.content = "rawBytes"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.content = "uri"; + /** + * Decodes a PageInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PageInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pageviewId = reader.string(); + break; + } + case 2: { + message.pageCategory = reader.string(); + break; + } + case 3: { + message.uri = reader.string(); + break; + } + case 4: { + message.referrerUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; + + /** + * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) + if (!$util.isString(message.pageviewId)) + return "pageviewId: string expected"; + if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) + if (!$util.isString(message.pageCategory)) + return "pageCategory: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) + if (!$util.isString(message.referrerUri)) + return "referrerUri: string expected"; + return null; + }; + + /** + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + */ + PageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PageInfo) return object; - }; + var message = new $root.google.cloud.discoveryengine.v1.PageInfo(); + if (object.pageviewId != null) + message.pageviewId = String(object.pageviewId); + if (object.pageCategory != null) + message.pageCategory = String(object.pageCategory); + if (object.uri != null) + message.uri = String(object.uri); + if (object.referrerUri != null) + message.referrerUri = String(object.referrerUri); + return message; + }; - /** - * Converts this Content to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - * @returns {Object.} JSON object - */ - Content.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {google.cloud.discoveryengine.v1.PageInfo} message PageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageviewId = ""; + object.pageCategory = ""; + object.uri = ""; + object.referrerUri = ""; + } + if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) + object.pageviewId = message.pageviewId; + if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) + object.pageCategory = message.pageCategory; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) + object.referrerUri = message.referrerUri; + return object; + }; - /** - * Gets the default type url for Content - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Document.Content"; - }; + /** + * Converts this PageInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + * @returns {Object.} JSON object + */ + PageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Content; - })(); + /** + * Gets the default type url for PageInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PageInfo"; + }; - return Document; + return PageInfo; })(); - v1.UserEvent = (function() { + v1.SearchInfo = (function() { /** - * Properties of a UserEvent. + * Properties of a SearchInfo. * @memberof google.cloud.discoveryengine.v1 - * @interface IUserEvent - * @property {string|null} [eventType] UserEvent eventType - * @property {string|null} [userPseudoId] UserEvent userPseudoId - * @property {string|null} [engine] UserEvent engine - * @property {string|null} [dataStore] UserEvent dataStore - * @property {google.protobuf.ITimestamp|null} [eventTime] UserEvent eventTime - * @property {google.cloud.discoveryengine.v1.IUserInfo|null} [userInfo] UserEvent userInfo - * @property {boolean|null} [directUserRequest] UserEvent directUserRequest - * @property {string|null} [sessionId] UserEvent sessionId - * @property {google.cloud.discoveryengine.v1.IPageInfo|null} [pageInfo] UserEvent pageInfo - * @property {string|null} [attributionToken] UserEvent attributionToken - * @property {string|null} [filter] UserEvent filter - * @property {Array.|null} [documents] UserEvent documents - * @property {google.cloud.discoveryengine.v1.IPanelInfo|null} [panel] UserEvent panel - * @property {google.cloud.discoveryengine.v1.ISearchInfo|null} [searchInfo] UserEvent searchInfo - * @property {google.cloud.discoveryengine.v1.ICompletionInfo|null} [completionInfo] UserEvent completionInfo - * @property {google.cloud.discoveryengine.v1.ITransactionInfo|null} [transactionInfo] UserEvent transactionInfo - * @property {Array.|null} [tagIds] UserEvent tagIds - * @property {Array.|null} [promotionIds] UserEvent promotionIds - * @property {Object.|null} [attributes] UserEvent attributes - * @property {google.cloud.discoveryengine.v1.IMediaInfo|null} [mediaInfo] UserEvent mediaInfo + * @interface ISearchInfo + * @property {string|null} [searchQuery] SearchInfo searchQuery + * @property {string|null} [orderBy] SearchInfo orderBy + * @property {number|null} [offset] SearchInfo offset */ /** - * Constructs a new UserEvent. + * Constructs a new SearchInfo. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a UserEvent. - * @implements IUserEvent + * @classdesc Represents a SearchInfo. + * @implements ISearchInfo * @constructor - * @param {google.cloud.discoveryengine.v1.IUserEvent=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ISearchInfo=} [properties] Properties to set */ - function UserEvent(properties) { - this.documents = []; - this.tagIds = []; - this.promotionIds = []; - this.attributes = {}; + function SearchInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14810,372 +18983,357 @@ } /** - * UserEvent eventType. - * @member {string} eventType - * @memberof google.cloud.discoveryengine.v1.UserEvent + * SearchInfo searchQuery. + * @member {string} searchQuery + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance */ - UserEvent.prototype.eventType = ""; + SearchInfo.prototype.searchQuery = ""; /** - * UserEvent userPseudoId. - * @member {string} userPseudoId - * @memberof google.cloud.discoveryengine.v1.UserEvent + * SearchInfo orderBy. + * @member {string} orderBy + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance */ - UserEvent.prototype.userPseudoId = ""; + SearchInfo.prototype.orderBy = ""; /** - * UserEvent engine. - * @member {string} engine - * @memberof google.cloud.discoveryengine.v1.UserEvent + * SearchInfo offset. + * @member {number|null|undefined} offset + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance */ - UserEvent.prototype.engine = ""; + SearchInfo.prototype.offset = null; - /** - * UserEvent dataStore. - * @member {string} dataStore - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance - */ - UserEvent.prototype.dataStore = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * UserEvent eventTime. - * @member {google.protobuf.ITimestamp|null|undefined} eventTime - * @memberof google.cloud.discoveryengine.v1.UserEvent + * SearchInfo _offset. + * @member {"offset"|undefined} _offset + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance */ - UserEvent.prototype.eventTime = null; + Object.defineProperty(SearchInfo.prototype, "_offset", { + get: $util.oneOfGetter($oneOfFields = ["offset"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * UserEvent userInfo. - * @member {google.cloud.discoveryengine.v1.IUserInfo|null|undefined} userInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Creates a new SearchInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {google.cloud.discoveryengine.v1.ISearchInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo instance */ - UserEvent.prototype.userInfo = null; + SearchInfo.create = function create(properties) { + return new SearchInfo(properties); + }; /** - * UserEvent directUserRequest. - * @member {boolean} directUserRequest - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {google.cloud.discoveryengine.v1.ISearchInfo} message SearchInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UserEvent.prototype.directUserRequest = false; + SearchInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.searchQuery); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderBy); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.offset); + return writer; + }; /** - * UserEvent sessionId. - * @member {string} sessionId - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {google.cloud.discoveryengine.v1.ISearchInfo} message SearchInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UserEvent.prototype.sessionId = ""; + SearchInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * UserEvent pageInfo. - * @member {google.cloud.discoveryengine.v1.IPageInfo|null|undefined} pageInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Decodes a SearchInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.prototype.pageInfo = null; + SearchInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.searchQuery = reader.string(); + break; + } + case 2: { + message.orderBy = reader.string(); + break; + } + case 3: { + message.offset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * UserEvent attributionToken. - * @member {string} attributionToken - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.prototype.attributionToken = ""; + SearchInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * UserEvent filter. - * @member {string} filter - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Verifies a SearchInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserEvent.prototype.filter = ""; + SearchInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) + if (!$util.isString(message.searchQuery)) + return "searchQuery: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.offset != null && message.hasOwnProperty("offset")) { + properties._offset = 1; + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; + } + return null; + }; /** - * UserEvent documents. - * @member {Array.} documents - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo */ - UserEvent.prototype.documents = $util.emptyArray; + SearchInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchInfo(); + if (object.searchQuery != null) + message.searchQuery = String(object.searchQuery); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.offset != null) + message.offset = object.offset | 0; + return message; + }; /** - * UserEvent panel. - * @member {google.cloud.discoveryengine.v1.IPanelInfo|null|undefined} panel - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchInfo} message SearchInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - UserEvent.prototype.panel = null; + SearchInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.searchQuery = ""; + object.orderBy = ""; + } + if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) + object.searchQuery = message.searchQuery; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.offset != null && message.hasOwnProperty("offset")) { + object.offset = message.offset; + if (options.oneofs) + object._offset = "offset"; + } + return object; + }; /** - * UserEvent searchInfo. - * @member {google.cloud.discoveryengine.v1.ISearchInfo|null|undefined} searchInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent + * Converts this SearchInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance + * @returns {Object.} JSON object */ - UserEvent.prototype.searchInfo = null; + SearchInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * UserEvent completionInfo. - * @member {google.cloud.discoveryengine.v1.ICompletionInfo|null|undefined} completionInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Gets the default type url for SearchInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - UserEvent.prototype.completionInfo = null; + SearchInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchInfo"; + }; - /** - * UserEvent transactionInfo. - * @member {google.cloud.discoveryengine.v1.ITransactionInfo|null|undefined} transactionInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance - */ - UserEvent.prototype.transactionInfo = null; + return SearchInfo; + })(); + + v1.CompletionInfo = (function() { /** - * UserEvent tagIds. - * @member {Array.} tagIds - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Properties of a CompletionInfo. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICompletionInfo + * @property {string|null} [selectedSuggestion] CompletionInfo selectedSuggestion + * @property {number|null} [selectedPosition] CompletionInfo selectedPosition */ - UserEvent.prototype.tagIds = $util.emptyArray; /** - * UserEvent promotionIds. - * @member {Array.} promotionIds - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Constructs a new CompletionInfo. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompletionInfo. + * @implements ICompletionInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.ICompletionInfo=} [properties] Properties to set */ - UserEvent.prototype.promotionIds = $util.emptyArray; + function CompletionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * UserEvent attributes. - * @member {Object.} attributes - * @memberof google.cloud.discoveryengine.v1.UserEvent + * CompletionInfo selectedSuggestion. + * @member {string} selectedSuggestion + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @instance */ - UserEvent.prototype.attributes = $util.emptyObject; + CompletionInfo.prototype.selectedSuggestion = ""; /** - * UserEvent mediaInfo. - * @member {google.cloud.discoveryengine.v1.IMediaInfo|null|undefined} mediaInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent + * CompletionInfo selectedPosition. + * @member {number} selectedPosition + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @instance */ - UserEvent.prototype.mediaInfo = null; + CompletionInfo.prototype.selectedPosition = 0; /** - * Creates a new UserEvent instance using the specified properties. + * Creates a new CompletionInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static - * @param {google.cloud.discoveryengine.v1.IUserEvent=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent instance + * @param {google.cloud.discoveryengine.v1.ICompletionInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo instance */ - UserEvent.create = function create(properties) { - return new UserEvent(properties); + CompletionInfo.create = function create(properties) { + return new CompletionInfo(properties); }; /** - * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. + * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static - * @param {google.cloud.discoveryengine.v1.IUserEvent} message UserEvent message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ICompletionInfo} message CompletionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserEvent.encode = function encode(message, writer) { + CompletionInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType); - if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userPseudoId); - if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) - $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.userInfo != null && Object.hasOwnProperty.call(message, "userInfo")) - $root.google.cloud.discoveryengine.v1.UserInfo.encode(message.userInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.directUserRequest != null && Object.hasOwnProperty.call(message, "directUserRequest")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.directUserRequest); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sessionId); - if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) - $root.google.cloud.discoveryengine.v1.PageInfo.encode(message.pageInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.attributionToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.filter); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - $root.google.cloud.discoveryengine.v1.DocumentInfo.encode(message.documents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.panel != null && Object.hasOwnProperty.call(message, "panel")) - $root.google.cloud.discoveryengine.v1.PanelInfo.encode(message.panel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.searchInfo != null && Object.hasOwnProperty.call(message, "searchInfo")) - $root.google.cloud.discoveryengine.v1.SearchInfo.encode(message.searchInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.completionInfo != null && Object.hasOwnProperty.call(message, "completionInfo")) - $root.google.cloud.discoveryengine.v1.CompletionInfo.encode(message.completionInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.transactionInfo != null && Object.hasOwnProperty.call(message, "transactionInfo")) - $root.google.cloud.discoveryengine.v1.TransactionInfo.encode(message.transactionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.tagIds != null && message.tagIds.length) - for (var i = 0; i < message.tagIds.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.tagIds[i]); - if (message.promotionIds != null && message.promotionIds.length) - for (var i = 0; i < message.promotionIds.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.promotionIds[i]); - if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) - for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.discoveryengine.v1.CustomAttribute.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.mediaInfo != null && Object.hasOwnProperty.call(message, "mediaInfo")) - $root.google.cloud.discoveryengine.v1.MediaInfo.encode(message.mediaInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.engine); - if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.dataStore); + if (message.selectedSuggestion != null && Object.hasOwnProperty.call(message, "selectedSuggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedSuggestion); + if (message.selectedPosition != null && Object.hasOwnProperty.call(message, "selectedPosition")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectedPosition); return writer; }; /** - * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. + * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static - * @param {google.cloud.discoveryengine.v1.IUserEvent} message UserEvent message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ICompletionInfo} message CompletionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserEvent.encodeDelimited = function encodeDelimited(message, writer) { + CompletionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserEvent message from the specified reader or buffer. + * Decodes a CompletionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent + * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.decode = function decode(reader, length) { + CompletionInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.UserEvent(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompletionInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.eventType = reader.string(); + message.selectedSuggestion = reader.string(); break; } case 2: { - message.userPseudoId = reader.string(); - break; - } - case 19: { - message.engine = reader.string(); - break; - } - case 20: { - message.dataStore = reader.string(); - break; - } - case 3: { - message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.decode(reader, reader.uint32()); - break; - } - case 5: { - message.directUserRequest = reader.bool(); - break; - } - case 6: { - message.sessionId = reader.string(); - break; - } - case 7: { - message.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.attributionToken = reader.string(); - break; - } - case 9: { - message.filter = reader.string(); - break; - } - case 10: { - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push($root.google.cloud.discoveryengine.v1.DocumentInfo.decode(reader, reader.uint32())); - break; - } - case 11: { - message.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.decode(reader, reader.uint32()); - break; - } - case 13: { - message.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.decode(reader, reader.uint32()); - break; - } - case 14: { - message.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.decode(reader, reader.uint32()); - break; - } - case 15: { - if (!(message.tagIds && message.tagIds.length)) - message.tagIds = []; - message.tagIds.push(reader.string()); - break; - } - case 16: { - if (!(message.promotionIds && message.promotionIds.length)) - message.promotionIds = []; - message.promotionIds.push(reader.string()); - break; - } - case 17: { - if (message.attributes === $util.emptyObject) - message.attributes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.discoveryengine.v1.CustomAttribute.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.attributes[key] = value; - break; - } - case 18: { - message.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.decode(reader, reader.uint32()); + message.selectedPosition = reader.int32(); break; } default: @@ -15187,381 +19345,136 @@ }; /** - * Decodes a UserEvent message from the specified reader or buffer, length delimited. + * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent + * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.decodeDelimited = function decodeDelimited(reader) { + CompletionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserEvent message. + * Verifies a CompletionInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserEvent.verify = function verify(message) { + CompletionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eventType != null && message.hasOwnProperty("eventType")) - if (!$util.isString(message.eventType)) - return "eventType: string expected"; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - if (!$util.isString(message.userPseudoId)) - return "userPseudoId: string expected"; - if (message.engine != null && message.hasOwnProperty("engine")) - if (!$util.isString(message.engine)) - return "engine: string expected"; - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - if (!$util.isString(message.dataStore)) - return "dataStore: string expected"; - if (message.eventTime != null && message.hasOwnProperty("eventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.eventTime); - if (error) - return "eventTime." + error; - } - if (message.userInfo != null && message.hasOwnProperty("userInfo")) { - var error = $root.google.cloud.discoveryengine.v1.UserInfo.verify(message.userInfo); - if (error) - return "userInfo." + error; - } - if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) - if (typeof message.directUserRequest !== "boolean") - return "directUserRequest: boolean expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isString(message.sessionId)) - return "sessionId: string expected"; - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { - var error = $root.google.cloud.discoveryengine.v1.PageInfo.verify(message.pageInfo); - if (error) - return "pageInfo." + error; - } - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) - if (!$util.isString(message.attributionToken)) - return "attributionToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.DocumentInfo.verify(message.documents[i]); - if (error) - return "documents." + error; - } - } - if (message.panel != null && message.hasOwnProperty("panel")) { - var error = $root.google.cloud.discoveryengine.v1.PanelInfo.verify(message.panel); - if (error) - return "panel." + error; - } - if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) { - var error = $root.google.cloud.discoveryengine.v1.SearchInfo.verify(message.searchInfo); - if (error) - return "searchInfo." + error; - } - if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) { - var error = $root.google.cloud.discoveryengine.v1.CompletionInfo.verify(message.completionInfo); - if (error) - return "completionInfo." + error; - } - if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) { - var error = $root.google.cloud.discoveryengine.v1.TransactionInfo.verify(message.transactionInfo); - if (error) - return "transactionInfo." + error; - } - if (message.tagIds != null && message.hasOwnProperty("tagIds")) { - if (!Array.isArray(message.tagIds)) - return "tagIds: array expected"; - for (var i = 0; i < message.tagIds.length; ++i) - if (!$util.isString(message.tagIds[i])) - return "tagIds: string[] expected"; - } - if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { - if (!Array.isArray(message.promotionIds)) - return "promotionIds: array expected"; - for (var i = 0; i < message.promotionIds.length; ++i) - if (!$util.isString(message.promotionIds[i])) - return "promotionIds: string[] expected"; - } - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!$util.isObject(message.attributes)) - return "attributes: object expected"; - var key = Object.keys(message.attributes); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.CustomAttribute.verify(message.attributes[key[i]]); - if (error) - return "attributes." + error; - } - } - if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) { - var error = $root.google.cloud.discoveryengine.v1.MediaInfo.verify(message.mediaInfo); - if (error) - return "mediaInfo." + error; - } + if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) + if (!$util.isString(message.selectedSuggestion)) + return "selectedSuggestion: string expected"; + if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) + if (!$util.isInteger(message.selectedPosition)) + return "selectedPosition: integer expected"; return null; }; /** - * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. + * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent - */ - UserEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.UserEvent) - return object; - var message = new $root.google.cloud.discoveryengine.v1.UserEvent(); - if (object.eventType != null) - message.eventType = String(object.eventType); - if (object.userPseudoId != null) - message.userPseudoId = String(object.userPseudoId); - if (object.engine != null) - message.engine = String(object.engine); - if (object.dataStore != null) - message.dataStore = String(object.dataStore); - if (object.eventTime != null) { - if (typeof object.eventTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.eventTime: object expected"); - message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); - } - if (object.userInfo != null) { - if (typeof object.userInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.userInfo: object expected"); - message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.fromObject(object.userInfo); - } - if (object.directUserRequest != null) - message.directUserRequest = Boolean(object.directUserRequest); - if (object.sessionId != null) - message.sessionId = String(object.sessionId); - if (object.pageInfo != null) { - if (typeof object.pageInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.pageInfo: object expected"); - message.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.fromObject(object.pageInfo); - } - if (object.attributionToken != null) - message.attributionToken = String(object.attributionToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.documents: object expected"); - message.documents[i] = $root.google.cloud.discoveryengine.v1.DocumentInfo.fromObject(object.documents[i]); - } - } - if (object.panel != null) { - if (typeof object.panel !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.panel: object expected"); - message.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.fromObject(object.panel); - } - if (object.searchInfo != null) { - if (typeof object.searchInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.searchInfo: object expected"); - message.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.fromObject(object.searchInfo); - } - if (object.completionInfo != null) { - if (typeof object.completionInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.completionInfo: object expected"); - message.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.fromObject(object.completionInfo); - } - if (object.transactionInfo != null) { - if (typeof object.transactionInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.transactionInfo: object expected"); - message.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.fromObject(object.transactionInfo); - } - if (object.tagIds) { - if (!Array.isArray(object.tagIds)) - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.tagIds: array expected"); - message.tagIds = []; - for (var i = 0; i < object.tagIds.length; ++i) - message.tagIds[i] = String(object.tagIds[i]); - } - if (object.promotionIds) { - if (!Array.isArray(object.promotionIds)) - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.promotionIds: array expected"); - message.promotionIds = []; - for (var i = 0; i < object.promotionIds.length; ++i) - message.promotionIds[i] = String(object.promotionIds[i]); - } - if (object.attributes) { - if (typeof object.attributes !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.attributes: object expected"); - message.attributes = {}; - for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { - if (typeof object.attributes[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.attributes: object expected"); - message.attributes[keys[i]] = $root.google.cloud.discoveryengine.v1.CustomAttribute.fromObject(object.attributes[keys[i]]); - } - } - if (object.mediaInfo != null) { - if (typeof object.mediaInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.mediaInfo: object expected"); - message.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.fromObject(object.mediaInfo); - } - return message; - }; - - /** - * Creates a plain object from a UserEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @static - * @param {google.cloud.discoveryengine.v1.UserEvent} message UserEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo */ - UserEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.documents = []; - object.tagIds = []; - object.promotionIds = []; - } - if (options.objects || options.defaults) - object.attributes = {}; - if (options.defaults) { - object.eventType = ""; - object.userPseudoId = ""; - object.eventTime = null; - object.userInfo = null; - object.directUserRequest = false; - object.sessionId = ""; - object.pageInfo = null; - object.attributionToken = ""; - object.filter = ""; - object.panel = null; - object.searchInfo = null; - object.completionInfo = null; - object.transactionInfo = null; - object.mediaInfo = null; - object.engine = ""; - object.dataStore = ""; - } - if (message.eventType != null && message.hasOwnProperty("eventType")) - object.eventType = message.eventType; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - object.userPseudoId = message.userPseudoId; - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); - if (message.userInfo != null && message.hasOwnProperty("userInfo")) - object.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.toObject(message.userInfo, options); - if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) - object.directUserRequest = message.directUserRequest; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) - object.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.toObject(message.pageInfo, options); - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) - object.attributionToken = message.attributionToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.cloud.discoveryengine.v1.DocumentInfo.toObject(message.documents[j], options); - } - if (message.panel != null && message.hasOwnProperty("panel")) - object.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.toObject(message.panel, options); - if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) - object.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.toObject(message.searchInfo, options); - if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) - object.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.toObject(message.completionInfo, options); - if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) - object.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.toObject(message.transactionInfo, options); - if (message.tagIds && message.tagIds.length) { - object.tagIds = []; - for (var j = 0; j < message.tagIds.length; ++j) - object.tagIds[j] = message.tagIds[j]; - } - if (message.promotionIds && message.promotionIds.length) { - object.promotionIds = []; - for (var j = 0; j < message.promotionIds.length; ++j) - object.promotionIds[j] = message.promotionIds[j]; - } - var keys2; - if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { - object.attributes = {}; - for (var j = 0; j < keys2.length; ++j) - object.attributes[keys2[j]] = $root.google.cloud.discoveryengine.v1.CustomAttribute.toObject(message.attributes[keys2[j]], options); + CompletionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompletionInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompletionInfo(); + if (object.selectedSuggestion != null) + message.selectedSuggestion = String(object.selectedSuggestion); + if (object.selectedPosition != null) + message.selectedPosition = object.selectedPosition | 0; + return message; + }; + + /** + * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @static + * @param {google.cloud.discoveryengine.v1.CompletionInfo} message CompletionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompletionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selectedSuggestion = ""; + object.selectedPosition = 0; } - if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) - object.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.toObject(message.mediaInfo, options); - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = message.engine; - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - object.dataStore = message.dataStore; + if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) + object.selectedSuggestion = message.selectedSuggestion; + if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) + object.selectedPosition = message.selectedPosition; return object; }; /** - * Converts this UserEvent to JSON. + * Converts this CompletionInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @instance * @returns {Object.} JSON object */ - UserEvent.prototype.toJSON = function toJSON() { + CompletionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserEvent + * Gets the default type url for CompletionInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompletionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.UserEvent"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompletionInfo"; }; - return UserEvent; + return CompletionInfo; })(); - v1.PageInfo = (function() { + v1.TransactionInfo = (function() { /** - * Properties of a PageInfo. + * Properties of a TransactionInfo. * @memberof google.cloud.discoveryengine.v1 - * @interface IPageInfo - * @property {string|null} [pageviewId] PageInfo pageviewId - * @property {string|null} [pageCategory] PageInfo pageCategory - * @property {string|null} [uri] PageInfo uri - * @property {string|null} [referrerUri] PageInfo referrerUri + * @interface ITransactionInfo + * @property {number|null} [value] TransactionInfo value + * @property {string|null} [currency] TransactionInfo currency + * @property {string|null} [transactionId] TransactionInfo transactionId + * @property {number|null} [tax] TransactionInfo tax + * @property {number|null} [cost] TransactionInfo cost + * @property {number|null} [discountValue] TransactionInfo discountValue */ /** - * Constructs a new PageInfo. + * Constructs a new TransactionInfo. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PageInfo. - * @implements IPageInfo + * @classdesc Represents a TransactionInfo. + * @implements ITransactionInfo * @constructor - * @param {google.cloud.discoveryengine.v1.IPageInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ITransactionInfo=} [properties] Properties to set */ - function PageInfo(properties) { + function TransactionInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15569,117 +19482,192 @@ } /** - * PageInfo pageviewId. - * @member {string} pageviewId - * @memberof google.cloud.discoveryengine.v1.PageInfo + * TransactionInfo value. + * @member {number|null|undefined} value + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance */ - PageInfo.prototype.pageviewId = ""; + TransactionInfo.prototype.value = null; /** - * PageInfo pageCategory. - * @member {string} pageCategory - * @memberof google.cloud.discoveryengine.v1.PageInfo + * TransactionInfo currency. + * @member {string} currency + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance */ - PageInfo.prototype.pageCategory = ""; + TransactionInfo.prototype.currency = ""; /** - * PageInfo uri. - * @member {string} uri - * @memberof google.cloud.discoveryengine.v1.PageInfo + * TransactionInfo transactionId. + * @member {string} transactionId + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance */ - PageInfo.prototype.uri = ""; + TransactionInfo.prototype.transactionId = ""; /** - * PageInfo referrerUri. - * @member {string} referrerUri - * @memberof google.cloud.discoveryengine.v1.PageInfo + * TransactionInfo tax. + * @member {number|null|undefined} tax + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance */ - PageInfo.prototype.referrerUri = ""; + TransactionInfo.prototype.tax = null; /** - * Creates a new PageInfo instance using the specified properties. + * TransactionInfo cost. + * @member {number|null|undefined} cost + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + TransactionInfo.prototype.cost = null; + + /** + * TransactionInfo discountValue. + * @member {number|null|undefined} discountValue + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + TransactionInfo.prototype.discountValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransactionInfo _value. + * @member {"value"|undefined} _value + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _tax. + * @member {"tax"|undefined} _tax + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_tax", { + get: $util.oneOfGetter($oneOfFields = ["tax"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _cost. + * @member {"cost"|undefined} _cost + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_cost", { + get: $util.oneOfGetter($oneOfFields = ["cost"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _discountValue. + * @member {"discountValue"|undefined} _discountValue + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_discountValue", { + get: $util.oneOfGetter($oneOfFields = ["discountValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransactionInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1.IPageInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo instance + * @param {google.cloud.discoveryengine.v1.ITransactionInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo instance */ - PageInfo.create = function create(properties) { - return new PageInfo(properties); + TransactionInfo.create = function create(properties) { + return new TransactionInfo(properties); }; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ITransactionInfo} message TransactionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encode = function encode(message, writer) { + TransactionInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageviewId != null && Object.hasOwnProperty.call(message, "pageviewId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pageviewId); - if (message.pageCategory != null && Object.hasOwnProperty.call(message, "pageCategory")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageCategory); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); - if (message.referrerUri != null && Object.hasOwnProperty.call(message, "referrerUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.referrerUri); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.currency); + if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.transactionId); + if (message.tax != null && Object.hasOwnProperty.call(message, "tax")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.tax); + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.cost); + if (message.discountValue != null && Object.hasOwnProperty.call(message, "discountValue")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.discountValue); return writer; }; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ITransactionInfo} message TransactionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encodeDelimited = function encodeDelimited(message, writer) { + TransactionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes a TransactionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decode = function decode(reader, length) { + TransactionInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PageInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.TransactionInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.pageviewId = reader.string(); + message.value = reader.float(); break; } case 2: { - message.pageCategory = reader.string(); + message.currency = reader.string(); break; } case 3: { - message.uri = reader.string(); + message.transactionId = reader.string(); break; } case 4: { - message.referrerUri = reader.string(); + message.tax = reader.float(); + break; + } + case 5: { + message.cost = reader.float(); + break; + } + case 6: { + message.discountValue = reader.float(); break; } default: @@ -15691,149 +19679,185 @@ }; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decodeDelimited = function decodeDelimited(reader) { + TransactionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PageInfo message. + * Verifies a TransactionInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PageInfo.verify = function verify(message) { + TransactionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) - if (!$util.isString(message.pageviewId)) - return "pageviewId: string expected"; - if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) - if (!$util.isString(message.pageCategory)) - return "pageCategory: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) - if (!$util.isString(message.referrerUri)) - return "referrerUri: string expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (typeof message.value !== "number") + return "value: number expected"; + } + if (message.currency != null && message.hasOwnProperty("currency")) + if (!$util.isString(message.currency)) + return "currency: string expected"; + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + if (!$util.isString(message.transactionId)) + return "transactionId: string expected"; + if (message.tax != null && message.hasOwnProperty("tax")) { + properties._tax = 1; + if (typeof message.tax !== "number") + return "tax: number expected"; + } + if (message.cost != null && message.hasOwnProperty("cost")) { + properties._cost = 1; + if (typeof message.cost !== "number") + return "cost: number expected"; + } + if (message.discountValue != null && message.hasOwnProperty("discountValue")) { + properties._discountValue = 1; + if (typeof message.discountValue !== "number") + return "discountValue: number expected"; + } return null; }; /** - * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo */ - PageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PageInfo) + TransactionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.TransactionInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1.PageInfo(); - if (object.pageviewId != null) - message.pageviewId = String(object.pageviewId); - if (object.pageCategory != null) - message.pageCategory = String(object.pageCategory); - if (object.uri != null) - message.uri = String(object.uri); - if (object.referrerUri != null) - message.referrerUri = String(object.referrerUri); + var message = new $root.google.cloud.discoveryengine.v1.TransactionInfo(); + if (object.value != null) + message.value = Number(object.value); + if (object.currency != null) + message.currency = String(object.currency); + if (object.transactionId != null) + message.transactionId = String(object.transactionId); + if (object.tax != null) + message.tax = Number(object.tax); + if (object.cost != null) + message.cost = Number(object.cost); + if (object.discountValue != null) + message.discountValue = Number(object.discountValue); return message; }; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1.PageInfo} message PageInfo + * @param {google.cloud.discoveryengine.v1.TransactionInfo} message TransactionInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PageInfo.toObject = function toObject(message, options) { + TransactionInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.pageviewId = ""; - object.pageCategory = ""; - object.uri = ""; - object.referrerUri = ""; + object.currency = ""; + object.transactionId = ""; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (options.oneofs) + object._value = "value"; + } + if (message.currency != null && message.hasOwnProperty("currency")) + object.currency = message.currency; + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + object.transactionId = message.transactionId; + if (message.tax != null && message.hasOwnProperty("tax")) { + object.tax = options.json && !isFinite(message.tax) ? String(message.tax) : message.tax; + if (options.oneofs) + object._tax = "tax"; + } + if (message.cost != null && message.hasOwnProperty("cost")) { + object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost; + if (options.oneofs) + object._cost = "cost"; + } + if (message.discountValue != null && message.hasOwnProperty("discountValue")) { + object.discountValue = options.json && !isFinite(message.discountValue) ? String(message.discountValue) : message.discountValue; + if (options.oneofs) + object._discountValue = "discountValue"; } - if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) - object.pageviewId = message.pageviewId; - if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) - object.pageCategory = message.pageCategory; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) - object.referrerUri = message.referrerUri; return object; }; /** - * Converts this PageInfo to JSON. + * Converts this TransactionInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance * @returns {Object.} JSON object */ - PageInfo.prototype.toJSON = function toJSON() { + TransactionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PageInfo + * Gets the default type url for TransactionInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransactionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PageInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.TransactionInfo"; }; - return PageInfo; + return TransactionInfo; })(); - v1.SearchInfo = (function() { + v1.DocumentInfo = (function() { /** - * Properties of a SearchInfo. + * Properties of a DocumentInfo. * @memberof google.cloud.discoveryengine.v1 - * @interface ISearchInfo - * @property {string|null} [searchQuery] SearchInfo searchQuery - * @property {string|null} [orderBy] SearchInfo orderBy - * @property {number|null} [offset] SearchInfo offset + * @interface IDocumentInfo + * @property {string|null} [id] DocumentInfo id + * @property {string|null} [name] DocumentInfo name + * @property {string|null} [uri] DocumentInfo uri + * @property {number|null} [quantity] DocumentInfo quantity + * @property {Array.|null} [promotionIds] DocumentInfo promotionIds */ /** - * Constructs a new SearchInfo. + * Constructs a new DocumentInfo. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a SearchInfo. - * @implements ISearchInfo + * @classdesc Represents a DocumentInfo. + * @implements IDocumentInfo * @constructor - * @param {google.cloud.discoveryengine.v1.ISearchInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IDocumentInfo=} [properties] Properties to set */ - function SearchInfo(properties) { + function DocumentInfo(properties) { + this.promotionIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15841,117 +19865,159 @@ } /** - * SearchInfo searchQuery. - * @member {string} searchQuery - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * DocumentInfo id. + * @member {string|null|undefined} id + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance */ - SearchInfo.prototype.searchQuery = ""; + DocumentInfo.prototype.id = null; /** - * SearchInfo orderBy. - * @member {string} orderBy - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * DocumentInfo name. + * @member {string|null|undefined} name + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance */ - SearchInfo.prototype.orderBy = ""; + DocumentInfo.prototype.name = null; /** - * SearchInfo offset. - * @member {number|null|undefined} offset - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * DocumentInfo uri. + * @member {string|null|undefined} uri + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance */ - SearchInfo.prototype.offset = null; + DocumentInfo.prototype.uri = null; + + /** + * DocumentInfo quantity. + * @member {number|null|undefined} quantity + * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @instance + */ + DocumentInfo.prototype.quantity = null; + + /** + * DocumentInfo promotionIds. + * @member {Array.} promotionIds + * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @instance + */ + DocumentInfo.prototype.promotionIds = $util.emptyArray; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * SearchInfo _offset. - * @member {"offset"|undefined} _offset - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * DocumentInfo documentDescriptor. + * @member {"id"|"name"|"uri"|undefined} documentDescriptor + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance */ - Object.defineProperty(SearchInfo.prototype, "_offset", { - get: $util.oneOfGetter($oneOfFields = ["offset"]), + Object.defineProperty(DocumentInfo.prototype, "documentDescriptor", { + get: $util.oneOfGetter($oneOfFields = ["id", "name", "uri"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SearchInfo instance using the specified properties. + * DocumentInfo _quantity. + * @member {"quantity"|undefined} _quantity + * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @instance + */ + Object.defineProperty(DocumentInfo.prototype, "_quantity", { + get: $util.oneOfGetter($oneOfFields = ["quantity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DocumentInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1.ISearchInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo instance + * @param {google.cloud.discoveryengine.v1.IDocumentInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo instance */ - SearchInfo.create = function create(properties) { - return new SearchInfo(properties); + DocumentInfo.create = function create(properties) { + return new DocumentInfo(properties); }; /** - * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1.ISearchInfo} message SearchInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IDocumentInfo} message DocumentInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchInfo.encode = function encode(message, writer) { + DocumentInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.searchQuery); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderBy); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.offset); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.quantity); + if (message.promotionIds != null && message.promotionIds.length) + for (var i = 0; i < message.promotionIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.promotionIds[i]); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.uri); return writer; }; /** - * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1.ISearchInfo} message SearchInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IDocumentInfo} message DocumentInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchInfo.encodeDelimited = function encodeDelimited(message, writer) { + DocumentInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchInfo message from the specified reader or buffer. + * Decodes a DocumentInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchInfo.decode = function decode(reader, length) { + DocumentInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.DocumentInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.searchQuery = reader.string(); + message.id = reader.string(); break; } case 2: { - message.orderBy = reader.string(); + message.name = reader.string(); + break; + } + case 6: { + message.uri = reader.string(); break; } case 3: { - message.offset = reader.int32(); + message.quantity = reader.int32(); + break; + } + case 4: { + if (!(message.promotionIds && message.promotionIds.length)) + message.promotionIds = []; + message.promotionIds.push(reader.string()); break; } default: @@ -15963,145 +20029,190 @@ }; /** - * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchInfo.decodeDelimited = function decodeDelimited(reader) { + DocumentInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchInfo message. + * Verifies a DocumentInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchInfo.verify = function verify(message) { + DocumentInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) - if (!$util.isString(message.searchQuery)) - return "searchQuery: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.offset != null && message.hasOwnProperty("offset")) { - properties._offset = 1; - if (!$util.isInteger(message.offset)) - return "offset: integer expected"; + if (message.id != null && message.hasOwnProperty("id")) { + properties.documentDescriptor = 1; + if (!$util.isString(message.id)) + return "id: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + if (properties.documentDescriptor === 1) + return "documentDescriptor: multiple values"; + properties.documentDescriptor = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + if (properties.documentDescriptor === 1) + return "documentDescriptor: multiple values"; + properties.documentDescriptor = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.quantity != null && message.hasOwnProperty("quantity")) { + properties._quantity = 1; + if (!$util.isInteger(message.quantity)) + return "quantity: integer expected"; + } + if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { + if (!Array.isArray(message.promotionIds)) + return "promotionIds: array expected"; + for (var i = 0; i < message.promotionIds.length; ++i) + if (!$util.isString(message.promotionIds[i])) + return "promotionIds: string[] expected"; } return null; }; /** - * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo */ - SearchInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.SearchInfo) + DocumentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1.SearchInfo(); - if (object.searchQuery != null) - message.searchQuery = String(object.searchQuery); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.offset != null) - message.offset = object.offset | 0; + var message = new $root.google.cloud.discoveryengine.v1.DocumentInfo(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.uri != null) + message.uri = String(object.uri); + if (object.quantity != null) + message.quantity = object.quantity | 0; + if (object.promotionIds) { + if (!Array.isArray(object.promotionIds)) + throw TypeError(".google.cloud.discoveryengine.v1.DocumentInfo.promotionIds: array expected"); + message.promotionIds = []; + for (var i = 0; i < object.promotionIds.length; ++i) + message.promotionIds[i] = String(object.promotionIds[i]); + } return message; }; /** - * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. + * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1.SearchInfo} message SearchInfo + * @param {google.cloud.discoveryengine.v1.DocumentInfo} message DocumentInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchInfo.toObject = function toObject(message, options) { + DocumentInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.searchQuery = ""; - object.orderBy = ""; + if (options.arrays || options.defaults) + object.promotionIds = []; + if (message.id != null && message.hasOwnProperty("id")) { + object.id = message.id; + if (options.oneofs) + object.documentDescriptor = "id"; } - if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) - object.searchQuery = message.searchQuery; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.offset != null && message.hasOwnProperty("offset")) { - object.offset = message.offset; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; if (options.oneofs) - object._offset = "offset"; + object.documentDescriptor = "name"; + } + if (message.quantity != null && message.hasOwnProperty("quantity")) { + object.quantity = message.quantity; + if (options.oneofs) + object._quantity = "quantity"; + } + if (message.promotionIds && message.promotionIds.length) { + object.promotionIds = []; + for (var j = 0; j < message.promotionIds.length; ++j) + object.promotionIds[j] = message.promotionIds[j]; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.documentDescriptor = "uri"; } return object; }; /** - * Converts this SearchInfo to JSON. + * Converts this DocumentInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance * @returns {Object.} JSON object */ - SearchInfo.prototype.toJSON = function toJSON() { + DocumentInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SearchInfo + * Gets the default type url for DocumentInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SearchInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DocumentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentInfo"; }; - return SearchInfo; + return DocumentInfo; })(); - v1.CompletionInfo = (function() { + v1.PanelInfo = (function() { /** - * Properties of a CompletionInfo. + * Properties of a PanelInfo. * @memberof google.cloud.discoveryengine.v1 - * @interface ICompletionInfo - * @property {string|null} [selectedSuggestion] CompletionInfo selectedSuggestion - * @property {number|null} [selectedPosition] CompletionInfo selectedPosition + * @interface IPanelInfo + * @property {string|null} [panelId] PanelInfo panelId + * @property {string|null} [displayName] PanelInfo displayName + * @property {number|null} [panelPosition] PanelInfo panelPosition + * @property {number|null} [totalPanels] PanelInfo totalPanels */ /** - * Constructs a new CompletionInfo. + * Constructs a new PanelInfo. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CompletionInfo. - * @implements ICompletionInfo + * @classdesc Represents a PanelInfo. + * @implements IPanelInfo * @constructor - * @param {google.cloud.discoveryengine.v1.ICompletionInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPanelInfo=} [properties] Properties to set */ - function CompletionInfo(properties) { + function PanelInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16109,89 +20220,142 @@ } /** - * CompletionInfo selectedSuggestion. - * @member {string} selectedSuggestion - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * PanelInfo panelId. + * @member {string} panelId + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @instance */ - CompletionInfo.prototype.selectedSuggestion = ""; + PanelInfo.prototype.panelId = ""; /** - * CompletionInfo selectedPosition. - * @member {number} selectedPosition - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * PanelInfo displayName. + * @member {string} displayName + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @instance */ - CompletionInfo.prototype.selectedPosition = 0; + PanelInfo.prototype.displayName = ""; /** - * Creates a new CompletionInfo instance using the specified properties. + * PanelInfo panelPosition. + * @member {number|null|undefined} panelPosition + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @instance + */ + PanelInfo.prototype.panelPosition = null; + + /** + * PanelInfo totalPanels. + * @member {number|null|undefined} totalPanels + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @instance + */ + PanelInfo.prototype.totalPanels = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PanelInfo _panelPosition. + * @member {"panelPosition"|undefined} _panelPosition + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @instance + */ + Object.defineProperty(PanelInfo.prototype, "_panelPosition", { + get: $util.oneOfGetter($oneOfFields = ["panelPosition"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PanelInfo _totalPanels. + * @member {"totalPanels"|undefined} _totalPanels + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @instance + */ + Object.defineProperty(PanelInfo.prototype, "_totalPanels", { + get: $util.oneOfGetter($oneOfFields = ["totalPanels"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PanelInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static - * @param {google.cloud.discoveryengine.v1.ICompletionInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo instance + * @param {google.cloud.discoveryengine.v1.IPanelInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo instance */ - CompletionInfo.create = function create(properties) { - return new CompletionInfo(properties); + PanelInfo.create = function create(properties) { + return new PanelInfo(properties); }; /** - * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. + * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static - * @param {google.cloud.discoveryengine.v1.ICompletionInfo} message CompletionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPanelInfo} message PanelInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompletionInfo.encode = function encode(message, writer) { + PanelInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selectedSuggestion != null && Object.hasOwnProperty.call(message, "selectedSuggestion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedSuggestion); - if (message.selectedPosition != null && Object.hasOwnProperty.call(message, "selectedPosition")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectedPosition); + if (message.panelId != null && Object.hasOwnProperty.call(message, "panelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.panelPosition != null && Object.hasOwnProperty.call(message, "panelPosition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.panelPosition); + if (message.totalPanels != null && Object.hasOwnProperty.call(message, "totalPanels")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalPanels); return writer; }; /** - * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. + * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static - * @param {google.cloud.discoveryengine.v1.ICompletionInfo} message CompletionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPanelInfo} message PanelInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompletionInfo.encodeDelimited = function encodeDelimited(message, writer) { + PanelInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompletionInfo message from the specified reader or buffer. + * Decodes a PanelInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo + * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompletionInfo.decode = function decode(reader, length) { + PanelInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompletionInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PanelInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.selectedSuggestion = reader.string(); + case 2: { + message.panelId = reader.string(); break; } - case 2: { - message.selectedPosition = reader.int32(); + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.panelPosition = reader.int32(); + break; + } + case 5: { + message.totalPanels = reader.int32(); break; } default: @@ -16203,329 +20367,261 @@ }; /** - * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. + * Decodes a PanelInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo + * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompletionInfo.decodeDelimited = function decodeDelimited(reader) { + PanelInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompletionInfo message. + * Verifies a PanelInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompletionInfo.verify = function verify(message) { + PanelInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) - if (!$util.isString(message.selectedSuggestion)) - return "selectedSuggestion: string expected"; - if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) - if (!$util.isInteger(message.selectedPosition)) - return "selectedPosition: integer expected"; + var properties = {}; + if (message.panelId != null && message.hasOwnProperty("panelId")) + if (!$util.isString(message.panelId)) + return "panelId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { + properties._panelPosition = 1; + if (!$util.isInteger(message.panelPosition)) + return "panelPosition: integer expected"; + } + if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { + properties._totalPanels = 1; + if (!$util.isInteger(message.totalPanels)) + return "totalPanels: integer expected"; + } return null; }; /** - * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo + * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo */ - CompletionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CompletionInfo) + PanelInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PanelInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1.CompletionInfo(); - if (object.selectedSuggestion != null) - message.selectedSuggestion = String(object.selectedSuggestion); - if (object.selectedPosition != null) - message.selectedPosition = object.selectedPosition | 0; + var message = new $root.google.cloud.discoveryengine.v1.PanelInfo(); + if (object.panelId != null) + message.panelId = String(object.panelId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.panelPosition != null) + message.panelPosition = object.panelPosition | 0; + if (object.totalPanels != null) + message.totalPanels = object.totalPanels | 0; return message; }; /** - * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. + * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static - * @param {google.cloud.discoveryengine.v1.CompletionInfo} message CompletionInfo + * @param {google.cloud.discoveryengine.v1.PanelInfo} message PanelInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompletionInfo.toObject = function toObject(message, options) { + PanelInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.selectedSuggestion = ""; - object.selectedPosition = 0; + object.panelId = ""; + object.displayName = ""; + } + if (message.panelId != null && message.hasOwnProperty("panelId")) + object.panelId = message.panelId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { + object.panelPosition = message.panelPosition; + if (options.oneofs) + object._panelPosition = "panelPosition"; + } + if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { + object.totalPanels = message.totalPanels; + if (options.oneofs) + object._totalPanels = "totalPanels"; } - if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) - object.selectedSuggestion = message.selectedSuggestion; - if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) - object.selectedPosition = message.selectedPosition; return object; }; /** - * Converts this CompletionInfo to JSON. + * Converts this PanelInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CompletionInfo - * @instance - * @returns {Object.} JSON object - */ - CompletionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompletionInfo - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CompletionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompletionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompletionInfo"; - }; - - return CompletionInfo; - })(); - - v1.TransactionInfo = (function() { - - /** - * Properties of a TransactionInfo. - * @memberof google.cloud.discoveryengine.v1 - * @interface ITransactionInfo - * @property {number|null} [value] TransactionInfo value - * @property {string|null} [currency] TransactionInfo currency - * @property {string|null} [transactionId] TransactionInfo transactionId - * @property {number|null} [tax] TransactionInfo tax - * @property {number|null} [cost] TransactionInfo cost - * @property {number|null} [discountValue] TransactionInfo discountValue - */ - - /** - * Constructs a new TransactionInfo. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a TransactionInfo. - * @implements ITransactionInfo - * @constructor - * @param {google.cloud.discoveryengine.v1.ITransactionInfo=} [properties] Properties to set - */ - function TransactionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TransactionInfo value. - * @member {number|null|undefined} value - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance - */ - TransactionInfo.prototype.value = null; - - /** - * TransactionInfo currency. - * @member {string} currency - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance - */ - TransactionInfo.prototype.currency = ""; - - /** - * TransactionInfo transactionId. - * @member {string} transactionId - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance - */ - TransactionInfo.prototype.transactionId = ""; - - /** - * TransactionInfo tax. - * @member {number|null|undefined} tax - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance - */ - TransactionInfo.prototype.tax = null; - - /** - * TransactionInfo cost. - * @member {number|null|undefined} cost - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @instance + * @returns {Object.} JSON object */ - TransactionInfo.prototype.cost = null; + PanelInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * TransactionInfo discountValue. - * @member {number|null|undefined} discountValue - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance + * Gets the default type url for PanelInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - TransactionInfo.prototype.discountValue = null; + PanelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PanelInfo"; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return PanelInfo; + })(); + + v1.MediaInfo = (function() { /** - * TransactionInfo _value. - * @member {"value"|undefined} _value - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance + * Properties of a MediaInfo. + * @memberof google.cloud.discoveryengine.v1 + * @interface IMediaInfo + * @property {google.protobuf.IDuration|null} [mediaProgressDuration] MediaInfo mediaProgressDuration + * @property {number|null} [mediaProgressPercentage] MediaInfo mediaProgressPercentage */ - Object.defineProperty(TransactionInfo.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); /** - * TransactionInfo _tax. - * @member {"tax"|undefined} _tax - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * Constructs a new MediaInfo. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a MediaInfo. + * @implements IMediaInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.IMediaInfo=} [properties] Properties to set + */ + function MediaInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MediaInfo mediaProgressDuration. + * @member {google.protobuf.IDuration|null|undefined} mediaProgressDuration + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_tax", { - get: $util.oneOfGetter($oneOfFields = ["tax"]), - set: $util.oneOfSetter($oneOfFields) - }); + MediaInfo.prototype.mediaProgressDuration = null; /** - * TransactionInfo _cost. - * @member {"cost"|undefined} _cost - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * MediaInfo mediaProgressPercentage. + * @member {number|null|undefined} mediaProgressPercentage + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_cost", { - get: $util.oneOfGetter($oneOfFields = ["cost"]), - set: $util.oneOfSetter($oneOfFields) - }); + MediaInfo.prototype.mediaProgressPercentage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TransactionInfo _discountValue. - * @member {"discountValue"|undefined} _discountValue - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * MediaInfo _mediaProgressPercentage. + * @member {"mediaProgressPercentage"|undefined} _mediaProgressPercentage + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_discountValue", { - get: $util.oneOfGetter($oneOfFields = ["discountValue"]), + Object.defineProperty(MediaInfo.prototype, "_mediaProgressPercentage", { + get: $util.oneOfGetter($oneOfFields = ["mediaProgressPercentage"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new TransactionInfo instance using the specified properties. + * Creates a new MediaInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static - * @param {google.cloud.discoveryengine.v1.ITransactionInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo instance + * @param {google.cloud.discoveryengine.v1.IMediaInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo instance */ - TransactionInfo.create = function create(properties) { - return new TransactionInfo(properties); + MediaInfo.create = function create(properties) { + return new MediaInfo(properties); }; /** - * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. + * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static - * @param {google.cloud.discoveryengine.v1.ITransactionInfo} message TransactionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IMediaInfo} message MediaInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionInfo.encode = function encode(message, writer) { + MediaInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.currency); - if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.transactionId); - if (message.tax != null && Object.hasOwnProperty.call(message, "tax")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.tax); - if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.cost); - if (message.discountValue != null && Object.hasOwnProperty.call(message, "discountValue")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.discountValue); + if (message.mediaProgressDuration != null && Object.hasOwnProperty.call(message, "mediaProgressDuration")) + $root.google.protobuf.Duration.encode(message.mediaProgressDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mediaProgressPercentage != null && Object.hasOwnProperty.call(message, "mediaProgressPercentage")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.mediaProgressPercentage); return writer; }; /** - * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. + * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static - * @param {google.cloud.discoveryengine.v1.ITransactionInfo} message TransactionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IMediaInfo} message MediaInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionInfo.encodeDelimited = function encodeDelimited(message, writer) { + MediaInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransactionInfo message from the specified reader or buffer. + * Decodes a MediaInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionInfo.decode = function decode(reader, length) { + MediaInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.TransactionInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.MediaInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.float(); + message.mediaProgressDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 2: { - message.currency = reader.string(); - break; - } - case 3: { - message.transactionId = reader.string(); - break; - } - case 4: { - message.tax = reader.float(); - break; - } - case 5: { - message.cost = reader.float(); - break; - } - case 6: { - message.discountValue = reader.float(); + message.mediaProgressPercentage = reader.float(); break; } default: @@ -16537,185 +20633,142 @@ }; /** - * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. + * Decodes a MediaInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionInfo.decodeDelimited = function decodeDelimited(reader) { + MediaInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransactionInfo message. + * Verifies a MediaInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransactionInfo.verify = function verify(message) { + MediaInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - if (typeof message.value !== "number") - return "value: number expected"; - } - if (message.currency != null && message.hasOwnProperty("currency")) - if (!$util.isString(message.currency)) - return "currency: string expected"; - if (message.transactionId != null && message.hasOwnProperty("transactionId")) - if (!$util.isString(message.transactionId)) - return "transactionId: string expected"; - if (message.tax != null && message.hasOwnProperty("tax")) { - properties._tax = 1; - if (typeof message.tax !== "number") - return "tax: number expected"; - } - if (message.cost != null && message.hasOwnProperty("cost")) { - properties._cost = 1; - if (typeof message.cost !== "number") - return "cost: number expected"; + if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) { + var error = $root.google.protobuf.Duration.verify(message.mediaProgressDuration); + if (error) + return "mediaProgressDuration." + error; } - if (message.discountValue != null && message.hasOwnProperty("discountValue")) { - properties._discountValue = 1; - if (typeof message.discountValue !== "number") - return "discountValue: number expected"; + if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { + properties._mediaProgressPercentage = 1; + if (typeof message.mediaProgressPercentage !== "number") + return "mediaProgressPercentage: number expected"; } return null; }; /** - * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo */ - TransactionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.TransactionInfo) + MediaInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.MediaInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1.TransactionInfo(); - if (object.value != null) - message.value = Number(object.value); - if (object.currency != null) - message.currency = String(object.currency); - if (object.transactionId != null) - message.transactionId = String(object.transactionId); - if (object.tax != null) - message.tax = Number(object.tax); - if (object.cost != null) - message.cost = Number(object.cost); - if (object.discountValue != null) - message.discountValue = Number(object.discountValue); + var message = new $root.google.cloud.discoveryengine.v1.MediaInfo(); + if (object.mediaProgressDuration != null) { + if (typeof object.mediaProgressDuration !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.MediaInfo.mediaProgressDuration: object expected"); + message.mediaProgressDuration = $root.google.protobuf.Duration.fromObject(object.mediaProgressDuration); + } + if (object.mediaProgressPercentage != null) + message.mediaProgressPercentage = Number(object.mediaProgressPercentage); return message; }; /** - * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. + * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static - * @param {google.cloud.discoveryengine.v1.TransactionInfo} message TransactionInfo + * @param {google.cloud.discoveryengine.v1.MediaInfo} message MediaInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransactionInfo.toObject = function toObject(message, options) { + MediaInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.currency = ""; - object.transactionId = ""; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (options.oneofs) - object._value = "value"; - } - if (message.currency != null && message.hasOwnProperty("currency")) - object.currency = message.currency; - if (message.transactionId != null && message.hasOwnProperty("transactionId")) - object.transactionId = message.transactionId; - if (message.tax != null && message.hasOwnProperty("tax")) { - object.tax = options.json && !isFinite(message.tax) ? String(message.tax) : message.tax; - if (options.oneofs) - object._tax = "tax"; - } - if (message.cost != null && message.hasOwnProperty("cost")) { - object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost; - if (options.oneofs) - object._cost = "cost"; - } - if (message.discountValue != null && message.hasOwnProperty("discountValue")) { - object.discountValue = options.json && !isFinite(message.discountValue) ? String(message.discountValue) : message.discountValue; + if (options.defaults) + object.mediaProgressDuration = null; + if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) + object.mediaProgressDuration = $root.google.protobuf.Duration.toObject(message.mediaProgressDuration, options); + if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { + object.mediaProgressPercentage = options.json && !isFinite(message.mediaProgressPercentage) ? String(message.mediaProgressPercentage) : message.mediaProgressPercentage; if (options.oneofs) - object._discountValue = "discountValue"; + object._mediaProgressPercentage = "mediaProgressPercentage"; } return object; }; /** - * Converts this TransactionInfo to JSON. + * Converts this MediaInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @instance * @returns {Object.} JSON object */ - TransactionInfo.prototype.toJSON = function toJSON() { + MediaInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransactionInfo + * Gets the default type url for MediaInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransactionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MediaInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.TransactionInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.MediaInfo"; }; - return TransactionInfo; + return MediaInfo; })(); - v1.DocumentInfo = (function() { + v1.PurgeDocumentsRequest = (function() { /** - * Properties of a DocumentInfo. + * Properties of a PurgeDocumentsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IDocumentInfo - * @property {string|null} [id] DocumentInfo id - * @property {string|null} [name] DocumentInfo name - * @property {string|null} [uri] DocumentInfo uri - * @property {number|null} [quantity] DocumentInfo quantity - * @property {Array.|null} [promotionIds] DocumentInfo promotionIds + * @interface IPurgeDocumentsRequest + * @property {string|null} [parent] PurgeDocumentsRequest parent + * @property {string|null} [filter] PurgeDocumentsRequest filter + * @property {boolean|null} [force] PurgeDocumentsRequest force */ /** - * Constructs a new DocumentInfo. + * Constructs a new PurgeDocumentsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a DocumentInfo. - * @implements IDocumentInfo + * @classdesc Represents a PurgeDocumentsRequest. + * @implements IPurgeDocumentsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IDocumentInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest=} [properties] Properties to set */ - function DocumentInfo(properties) { - this.promotionIds = []; + function PurgeDocumentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16723,159 +20776,103 @@ } /** - * DocumentInfo id. - * @member {string|null|undefined} id - * @memberof google.cloud.discoveryengine.v1.DocumentInfo - * @instance - */ - DocumentInfo.prototype.id = null; - - /** - * DocumentInfo name. - * @member {string|null|undefined} name - * @memberof google.cloud.discoveryengine.v1.DocumentInfo - * @instance - */ - DocumentInfo.prototype.name = null; - - /** - * DocumentInfo uri. - * @member {string|null|undefined} uri - * @memberof google.cloud.discoveryengine.v1.DocumentInfo - * @instance - */ - DocumentInfo.prototype.uri = null; - - /** - * DocumentInfo quantity. - * @member {number|null|undefined} quantity - * @memberof google.cloud.discoveryengine.v1.DocumentInfo - * @instance - */ - DocumentInfo.prototype.quantity = null; - - /** - * DocumentInfo promotionIds. - * @member {Array.} promotionIds - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * PurgeDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @instance */ - DocumentInfo.prototype.promotionIds = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + PurgeDocumentsRequest.prototype.parent = ""; /** - * DocumentInfo documentDescriptor. - * @member {"id"|"name"|"uri"|undefined} documentDescriptor - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * PurgeDocumentsRequest filter. + * @member {string} filter + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @instance */ - Object.defineProperty(DocumentInfo.prototype, "documentDescriptor", { - get: $util.oneOfGetter($oneOfFields = ["id", "name", "uri"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsRequest.prototype.filter = ""; /** - * DocumentInfo _quantity. - * @member {"quantity"|undefined} _quantity - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * PurgeDocumentsRequest force. + * @member {boolean} force + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @instance */ - Object.defineProperty(DocumentInfo.prototype, "_quantity", { - get: $util.oneOfGetter($oneOfFields = ["quantity"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsRequest.prototype.force = false; /** - * Creates a new DocumentInfo instance using the specified properties. + * Creates a new PurgeDocumentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IDocumentInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo instance + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest instance */ - DocumentInfo.create = function create(properties) { - return new DocumentInfo(properties); + PurgeDocumentsRequest.create = function create(properties) { + return new PurgeDocumentsRequest(properties); }; /** - * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IDocumentInfo} message DocumentInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInfo.encode = function encode(message, writer) { + PurgeDocumentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.quantity); - if (message.promotionIds != null && message.promotionIds.length) - for (var i = 0; i < message.promotionIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.promotionIds[i]); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.uri); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IDocumentInfo} message DocumentInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInfo.encodeDelimited = function encodeDelimited(message, writer) { + PurgeDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInfo.decode = function decode(reader, length) { + PurgeDocumentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.DocumentInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.name = reader.string(); - break; - } - case 6: { - message.uri = reader.string(); + message.filter = reader.string(); break; } case 3: { - message.quantity = reader.int32(); - break; - } - case 4: { - if (!(message.promotionIds && message.promotionIds.length)) - message.promotionIds = []; - message.promotionIds.push(reader.string()); + message.force = reader.bool(); break; } default: @@ -16887,190 +20884,141 @@ }; /** - * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInfo.decodeDelimited = function decodeDelimited(reader) { + PurgeDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentInfo message. + * Verifies a PurgeDocumentsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentInfo.verify = function verify(message) { + PurgeDocumentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) { - properties.documentDescriptor = 1; - if (!$util.isString(message.id)) - return "id: string expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - if (properties.documentDescriptor === 1) - return "documentDescriptor: multiple values"; - properties.documentDescriptor = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - if (properties.documentDescriptor === 1) - return "documentDescriptor: multiple values"; - properties.documentDescriptor = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; - } - if (message.quantity != null && message.hasOwnProperty("quantity")) { - properties._quantity = 1; - if (!$util.isInteger(message.quantity)) - return "quantity: integer expected"; - } - if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { - if (!Array.isArray(message.promotionIds)) - return "promotionIds: array expected"; - for (var i = 0; i < message.promotionIds.length; ++i) - if (!$util.isString(message.promotionIds[i])) - return "promotionIds: string[] expected"; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest */ - DocumentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentInfo) + PurgeDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.DocumentInfo(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - if (object.uri != null) - message.uri = String(object.uri); - if (object.quantity != null) - message.quantity = object.quantity | 0; - if (object.promotionIds) { - if (!Array.isArray(object.promotionIds)) - throw TypeError(".google.cloud.discoveryengine.v1.DocumentInfo.promotionIds: array expected"); - message.promotionIds = []; - for (var i = 0; i < object.promotionIds.length; ++i) - message.promotionIds[i] = String(object.promotionIds[i]); - } + var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. + * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.DocumentInfo} message DocumentInfo + * @param {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} message PurgeDocumentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentInfo.toObject = function toObject(message, options) { + PurgeDocumentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.promotionIds = []; - if (message.id != null && message.hasOwnProperty("id")) { - object.id = message.id; - if (options.oneofs) - object.documentDescriptor = "id"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object.documentDescriptor = "name"; - } - if (message.quantity != null && message.hasOwnProperty("quantity")) { - object.quantity = message.quantity; - if (options.oneofs) - object._quantity = "quantity"; - } - if (message.promotionIds && message.promotionIds.length) { - object.promotionIds = []; - for (var j = 0; j < message.promotionIds.length; ++j) - object.promotionIds[j] = message.promotionIds[j]; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.documentDescriptor = "uri"; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.force = false; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this DocumentInfo to JSON. + * Converts this PurgeDocumentsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @instance * @returns {Object.} JSON object */ - DocumentInfo.prototype.toJSON = function toJSON() { + PurgeDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DocumentInfo + * Gets the default type url for PurgeDocumentsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DocumentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsRequest"; }; - return DocumentInfo; + return PurgeDocumentsRequest; })(); - v1.PanelInfo = (function() { + v1.PurgeDocumentsResponse = (function() { /** - * Properties of a PanelInfo. + * Properties of a PurgeDocumentsResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IPanelInfo - * @property {string|null} [panelId] PanelInfo panelId - * @property {string|null} [displayName] PanelInfo displayName - * @property {number|null} [panelPosition] PanelInfo panelPosition - * @property {number|null} [totalPanels] PanelInfo totalPanels + * @interface IPurgeDocumentsResponse + * @property {number|Long|null} [purgeCount] PurgeDocumentsResponse purgeCount + * @property {Array.|null} [purgeSample] PurgeDocumentsResponse purgeSample */ /** - * Constructs a new PanelInfo. + * Constructs a new PurgeDocumentsResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PanelInfo. - * @implements IPanelInfo + * @classdesc Represents a PurgeDocumentsResponse. + * @implements IPurgeDocumentsResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IPanelInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse=} [properties] Properties to set */ - function PanelInfo(properties) { + function PurgeDocumentsResponse(properties) { + this.purgeSample = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17078,142 +21026,92 @@ } /** - * PanelInfo panelId. - * @member {string} panelId - * @memberof google.cloud.discoveryengine.v1.PanelInfo - * @instance - */ - PanelInfo.prototype.panelId = ""; - - /** - * PanelInfo displayName. - * @member {string} displayName - * @memberof google.cloud.discoveryengine.v1.PanelInfo - * @instance - */ - PanelInfo.prototype.displayName = ""; - - /** - * PanelInfo panelPosition. - * @member {number|null|undefined} panelPosition - * @memberof google.cloud.discoveryengine.v1.PanelInfo - * @instance - */ - PanelInfo.prototype.panelPosition = null; - - /** - * PanelInfo totalPanels. - * @member {number|null|undefined} totalPanels - * @memberof google.cloud.discoveryengine.v1.PanelInfo - * @instance - */ - PanelInfo.prototype.totalPanels = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PanelInfo _panelPosition. - * @member {"panelPosition"|undefined} _panelPosition - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * PurgeDocumentsResponse purgeCount. + * @member {number|Long} purgeCount + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @instance */ - Object.defineProperty(PanelInfo.prototype, "_panelPosition", { - get: $util.oneOfGetter($oneOfFields = ["panelPosition"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * PanelInfo _totalPanels. - * @member {"totalPanels"|undefined} _totalPanels - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * PurgeDocumentsResponse purgeSample. + * @member {Array.} purgeSample + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @instance */ - Object.defineProperty(PanelInfo.prototype, "_totalPanels", { - get: $util.oneOfGetter($oneOfFields = ["totalPanels"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsResponse.prototype.purgeSample = $util.emptyArray; /** - * Creates a new PanelInfo instance using the specified properties. + * Creates a new PurgeDocumentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPanelInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo instance + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse instance */ - PanelInfo.create = function create(properties) { - return new PanelInfo(properties); + PurgeDocumentsResponse.create = function create(properties) { + return new PurgeDocumentsResponse(properties); }; /** - * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPanelInfo} message PanelInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PanelInfo.encode = function encode(message, writer) { + PurgeDocumentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.panelId != null && Object.hasOwnProperty.call(message, "panelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.panelPosition != null && Object.hasOwnProperty.call(message, "panelPosition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.panelPosition); - if (message.totalPanels != null && Object.hasOwnProperty.call(message, "totalPanels")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalPanels); + if (message.purgeCount != null && Object.hasOwnProperty.call(message, "purgeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.purgeCount); + if (message.purgeSample != null && message.purgeSample.length) + for (var i = 0; i < message.purgeSample.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.purgeSample[i]); return writer; }; /** - * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPanelInfo} message PanelInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PanelInfo.encodeDelimited = function encodeDelimited(message, writer) { + PurgeDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PanelInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PanelInfo.decode = function decode(reader, length) { + PurgeDocumentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PanelInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.panelId = reader.string(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.panelPosition = reader.int32(); + case 1: { + message.purgeCount = reader.int64(); break; } - case 5: { - message.totalPanels = reader.int32(); + case 2: { + if (!(message.purgeSample && message.purgeSample.length)) + message.purgeSample = []; + message.purgeSample.push(reader.string()); break; } default: @@ -17225,157 +21123,161 @@ }; /** - * Decodes a PanelInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PanelInfo.decodeDelimited = function decodeDelimited(reader) { + PurgeDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PanelInfo message. + * Verifies a PurgeDocumentsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PanelInfo.verify = function verify(message) { + PurgeDocumentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.panelId != null && message.hasOwnProperty("panelId")) - if (!$util.isString(message.panelId)) - return "panelId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { - properties._panelPosition = 1; - if (!$util.isInteger(message.panelPosition)) - return "panelPosition: integer expected"; - } - if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { - properties._totalPanels = 1; - if (!$util.isInteger(message.totalPanels)) - return "totalPanels: integer expected"; + if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) + if (!$util.isInteger(message.purgeCount) && !(message.purgeCount && $util.isInteger(message.purgeCount.low) && $util.isInteger(message.purgeCount.high))) + return "purgeCount: integer|Long expected"; + if (message.purgeSample != null && message.hasOwnProperty("purgeSample")) { + if (!Array.isArray(message.purgeSample)) + return "purgeSample: array expected"; + for (var i = 0; i < message.purgeSample.length; ++i) + if (!$util.isString(message.purgeSample[i])) + return "purgeSample: string[] expected"; } return null; }; /** - * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse */ - PanelInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PanelInfo) + PurgeDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.PanelInfo(); - if (object.panelId != null) - message.panelId = String(object.panelId); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.panelPosition != null) - message.panelPosition = object.panelPosition | 0; - if (object.totalPanels != null) - message.totalPanels = object.totalPanels | 0; + var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse(); + if (object.purgeCount != null) + if ($util.Long) + (message.purgeCount = $util.Long.fromValue(object.purgeCount)).unsigned = false; + else if (typeof object.purgeCount === "string") + message.purgeCount = parseInt(object.purgeCount, 10); + else if (typeof object.purgeCount === "number") + message.purgeCount = object.purgeCount; + else if (typeof object.purgeCount === "object") + message.purgeCount = new $util.LongBits(object.purgeCount.low >>> 0, object.purgeCount.high >>> 0).toNumber(); + if (object.purgeSample) { + if (!Array.isArray(object.purgeSample)) + throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsResponse.purgeSample: array expected"); + message.purgeSample = []; + for (var i = 0; i < object.purgeSample.length; ++i) + message.purgeSample[i] = String(object.purgeSample[i]); + } return message; }; /** - * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. + * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.PanelInfo} message PanelInfo + * @param {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} message PurgeDocumentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PanelInfo.toObject = function toObject(message, options) { + PurgeDocumentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.panelId = ""; - object.displayName = ""; - } - if (message.panelId != null && message.hasOwnProperty("panelId")) - object.panelId = message.panelId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { - object.panelPosition = message.panelPosition; - if (options.oneofs) - object._panelPosition = "panelPosition"; - } - if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { - object.totalPanels = message.totalPanels; - if (options.oneofs) - object._totalPanels = "totalPanels"; + if (options.arrays || options.defaults) + object.purgeSample = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.purgeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.purgeCount = options.longs === String ? "0" : 0; + if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) + if (typeof message.purgeCount === "number") + object.purgeCount = options.longs === String ? String(message.purgeCount) : message.purgeCount; + else + object.purgeCount = options.longs === String ? $util.Long.prototype.toString.call(message.purgeCount) : options.longs === Number ? new $util.LongBits(message.purgeCount.low >>> 0, message.purgeCount.high >>> 0).toNumber() : message.purgeCount; + if (message.purgeSample && message.purgeSample.length) { + object.purgeSample = []; + for (var j = 0; j < message.purgeSample.length; ++j) + object.purgeSample[j] = message.purgeSample[j]; } return object; }; /** - * Converts this PanelInfo to JSON. + * Converts this PurgeDocumentsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @instance * @returns {Object.} JSON object */ - PanelInfo.prototype.toJSON = function toJSON() { + PurgeDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PanelInfo + * Gets the default type url for PurgeDocumentsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PanelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PanelInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsResponse"; }; - return PanelInfo; + return PurgeDocumentsResponse; })(); - v1.MediaInfo = (function() { + v1.PurgeDocumentsMetadata = (function() { /** - * Properties of a MediaInfo. + * Properties of a PurgeDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IMediaInfo - * @property {google.protobuf.IDuration|null} [mediaProgressDuration] MediaInfo mediaProgressDuration - * @property {number|null} [mediaProgressPercentage] MediaInfo mediaProgressPercentage + * @interface IPurgeDocumentsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] PurgeDocumentsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeDocumentsMetadata updateTime + * @property {number|Long|null} [successCount] PurgeDocumentsMetadata successCount + * @property {number|Long|null} [failureCount] PurgeDocumentsMetadata failureCount + * @property {number|Long|null} [ignoredCount] PurgeDocumentsMetadata ignoredCount */ /** - * Constructs a new MediaInfo. + * Constructs a new PurgeDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a MediaInfo. - * @implements IMediaInfo + * @classdesc Represents a PurgeDocumentsMetadata. + * @implements IPurgeDocumentsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IMediaInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata=} [properties] Properties to set */ - function MediaInfo(properties) { + function PurgeDocumentsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17383,103 +21285,131 @@ } /** - * MediaInfo mediaProgressDuration. - * @member {google.protobuf.IDuration|null|undefined} mediaProgressDuration - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * PurgeDocumentsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @instance */ - MediaInfo.prototype.mediaProgressDuration = null; + PurgeDocumentsMetadata.prototype.createTime = null; /** - * MediaInfo mediaProgressPercentage. - * @member {number|null|undefined} mediaProgressPercentage - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * PurgeDocumentsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @instance */ - MediaInfo.prototype.mediaProgressPercentage = null; + PurgeDocumentsMetadata.prototype.updateTime = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * PurgeDocumentsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @instance + */ + PurgeDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * MediaInfo _mediaProgressPercentage. - * @member {"mediaProgressPercentage"|undefined} _mediaProgressPercentage - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * PurgeDocumentsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @instance */ - Object.defineProperty(MediaInfo.prototype, "_mediaProgressPercentage", { - get: $util.oneOfGetter($oneOfFields = ["mediaProgressPercentage"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new MediaInfo instance using the specified properties. + * PurgeDocumentsMetadata ignoredCount. + * @member {number|Long} ignoredCount + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @instance + */ + PurgeDocumentsMetadata.prototype.ignoredCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PurgeDocumentsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IMediaInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo instance + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata instance */ - MediaInfo.create = function create(properties) { - return new MediaInfo(properties); + PurgeDocumentsMetadata.create = function create(properties) { + return new PurgeDocumentsMetadata(properties); }; /** - * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IMediaInfo} message MediaInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MediaInfo.encode = function encode(message, writer) { + PurgeDocumentsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mediaProgressDuration != null && Object.hasOwnProperty.call(message, "mediaProgressDuration")) - $root.google.protobuf.Duration.encode(message.mediaProgressDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mediaProgressPercentage != null && Object.hasOwnProperty.call(message, "mediaProgressPercentage")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.mediaProgressPercentage); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); + if (message.ignoredCount != null && Object.hasOwnProperty.call(message, "ignoredCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.ignoredCount); return writer; }; /** - * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IMediaInfo} message MediaInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MediaInfo.encodeDelimited = function encodeDelimited(message, writer) { + PurgeDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MediaInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MediaInfo.decode = function decode(reader, length) { + PurgeDocumentsMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.MediaInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.mediaProgressDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); break; } - case 2: { - message.mediaProgressPercentage = reader.float(); + case 5: { + message.ignoredCount = reader.int64(); break; } default: @@ -17491,142 +21421,207 @@ }; /** - * Decodes a MediaInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MediaInfo.decodeDelimited = function decodeDelimited(reader) { + PurgeDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MediaInfo message. + * Verifies a PurgeDocumentsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MediaInfo.verify = function verify(message) { + PurgeDocumentsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) { - var error = $root.google.protobuf.Duration.verify(message.mediaProgressDuration); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "mediaProgressDuration." + error; + return "createTime." + error; } - if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { - properties._mediaProgressPercentage = 1; - if (typeof message.mediaProgressPercentage !== "number") - return "mediaProgressPercentage: number expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; + if (message.ignoredCount != null && message.hasOwnProperty("ignoredCount")) + if (!$util.isInteger(message.ignoredCount) && !(message.ignoredCount && $util.isInteger(message.ignoredCount.low) && $util.isInteger(message.ignoredCount.high))) + return "ignoredCount: integer|Long expected"; return null; }; /** - * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata */ - MediaInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.MediaInfo) + PurgeDocumentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.MediaInfo(); - if (object.mediaProgressDuration != null) { - if (typeof object.mediaProgressDuration !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.MediaInfo.mediaProgressDuration: object expected"); - message.mediaProgressDuration = $root.google.protobuf.Duration.fromObject(object.mediaProgressDuration); + var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.mediaProgressPercentage != null) - message.mediaProgressPercentage = Number(object.mediaProgressPercentage); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); + if (object.ignoredCount != null) + if ($util.Long) + (message.ignoredCount = $util.Long.fromValue(object.ignoredCount)).unsigned = false; + else if (typeof object.ignoredCount === "string") + message.ignoredCount = parseInt(object.ignoredCount, 10); + else if (typeof object.ignoredCount === "number") + message.ignoredCount = object.ignoredCount; + else if (typeof object.ignoredCount === "object") + message.ignoredCount = new $util.LongBits(object.ignoredCount.low >>> 0, object.ignoredCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. + * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.MediaInfo} message MediaInfo + * @param {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} message PurgeDocumentsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MediaInfo.toObject = function toObject(message, options) { + PurgeDocumentsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.mediaProgressDuration = null; - if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) - object.mediaProgressDuration = $root.google.protobuf.Duration.toObject(message.mediaProgressDuration, options); - if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { - object.mediaProgressPercentage = options.json && !isFinite(message.mediaProgressPercentage) ? String(message.mediaProgressPercentage) : message.mediaProgressPercentage; - if (options.oneofs) - object._mediaProgressPercentage = "mediaProgressPercentage"; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.ignoredCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ignoredCount = options.longs === String ? "0" : 0; } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; + if (message.ignoredCount != null && message.hasOwnProperty("ignoredCount")) + if (typeof message.ignoredCount === "number") + object.ignoredCount = options.longs === String ? String(message.ignoredCount) : message.ignoredCount; + else + object.ignoredCount = options.longs === String ? $util.Long.prototype.toString.call(message.ignoredCount) : options.longs === Number ? new $util.LongBits(message.ignoredCount.low >>> 0, message.ignoredCount.high >>> 0).toNumber() : message.ignoredCount; return object; }; /** - * Converts this MediaInfo to JSON. + * Converts this PurgeDocumentsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @instance * @returns {Object.} JSON object */ - MediaInfo.prototype.toJSON = function toJSON() { + PurgeDocumentsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MediaInfo + * Gets the default type url for PurgeDocumentsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MediaInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.MediaInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsMetadata"; }; - return MediaInfo; + return PurgeDocumentsMetadata; })(); - v1.PurgeDocumentsRequest = (function() { + v1.PurgeSuggestionDenyListEntriesRequest = (function() { /** - * Properties of a PurgeDocumentsRequest. + * Properties of a PurgeSuggestionDenyListEntriesRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeDocumentsRequest - * @property {string|null} [parent] PurgeDocumentsRequest parent - * @property {string|null} [filter] PurgeDocumentsRequest filter - * @property {boolean|null} [force] PurgeDocumentsRequest force + * @interface IPurgeSuggestionDenyListEntriesRequest + * @property {string|null} [parent] PurgeSuggestionDenyListEntriesRequest parent */ /** - * Constructs a new PurgeDocumentsRequest. + * Constructs a new PurgeSuggestionDenyListEntriesRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeDocumentsRequest. - * @implements IPurgeDocumentsRequest + * @classdesc Represents a PurgeSuggestionDenyListEntriesRequest. + * @implements IPurgeSuggestionDenyListEntriesRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest=} [properties] Properties to set */ - function PurgeDocumentsRequest(properties) { + function PurgeSuggestionDenyListEntriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17634,90 +21629,70 @@ } /** - * PurgeDocumentsRequest parent. + * PurgeSuggestionDenyListEntriesRequest parent. * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest - * @instance - */ - PurgeDocumentsRequest.prototype.parent = ""; - - /** - * PurgeDocumentsRequest filter. - * @member {string} filter - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest - * @instance - */ - PurgeDocumentsRequest.prototype.filter = ""; - - /** - * PurgeDocumentsRequest force. - * @member {boolean} force - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @instance */ - PurgeDocumentsRequest.prototype.force = false; + PurgeSuggestionDenyListEntriesRequest.prototype.parent = ""; /** - * Creates a new PurgeDocumentsRequest instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest instance */ - PurgeDocumentsRequest.create = function create(properties) { - return new PurgeDocumentsRequest(properties); + PurgeSuggestionDenyListEntriesRequest.create = function create(properties) { + return new PurgeSuggestionDenyListEntriesRequest(properties); }; /** - * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsRequest.encode = function encode(message, writer) { + PurgeSuggestionDenyListEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + PurgeSuggestionDenyListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsRequest.decode = function decode(reader, length) { + PurgeSuggestionDenyListEntriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17725,14 +21700,6 @@ message.parent = reader.string(); break; } - case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -17742,141 +21709,124 @@ }; /** - * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + PurgeSuggestionDenyListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeDocumentsRequest message. + * Verifies a PurgeSuggestionDenyListEntriesRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeDocumentsRequest.verify = function verify(message) { + PurgeSuggestionDenyListEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; return null; }; /** - * Creates a PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest */ - PurgeDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest) + PurgeSuggestionDenyListEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.force != null) - message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a PurgeSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} message PurgeDocumentsRequest + * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeDocumentsRequest.toObject = function toObject(message, options) { + PurgeSuggestionDenyListEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.parent = ""; - object.filter = ""; - object.force = false; - } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this PurgeDocumentsRequest to JSON. + * Converts this PurgeSuggestionDenyListEntriesRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @instance * @returns {Object.} JSON object */ - PurgeDocumentsRequest.prototype.toJSON = function toJSON() { + PurgeSuggestionDenyListEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeDocumentsRequest + * Gets the default type url for PurgeSuggestionDenyListEntriesRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeSuggestionDenyListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest"; }; - return PurgeDocumentsRequest; + return PurgeSuggestionDenyListEntriesRequest; })(); - v1.PurgeDocumentsResponse = (function() { + v1.PurgeSuggestionDenyListEntriesResponse = (function() { /** - * Properties of a PurgeDocumentsResponse. + * Properties of a PurgeSuggestionDenyListEntriesResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeDocumentsResponse - * @property {number|Long|null} [purgeCount] PurgeDocumentsResponse purgeCount - * @property {Array.|null} [purgeSample] PurgeDocumentsResponse purgeSample + * @interface IPurgeSuggestionDenyListEntriesResponse + * @property {number|Long|null} [purgeCount] PurgeSuggestionDenyListEntriesResponse purgeCount + * @property {Array.|null} [errorSamples] PurgeSuggestionDenyListEntriesResponse errorSamples */ /** - * Constructs a new PurgeDocumentsResponse. + * Constructs a new PurgeSuggestionDenyListEntriesResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeDocumentsResponse. - * @implements IPurgeDocumentsResponse + * @classdesc Represents a PurgeSuggestionDenyListEntriesResponse. + * @implements IPurgeSuggestionDenyListEntriesResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse=} [properties] Properties to set */ - function PurgeDocumentsResponse(properties) { - this.purgeSample = []; + function PurgeSuggestionDenyListEntriesResponse(properties) { + this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17884,81 +21834,81 @@ } /** - * PurgeDocumentsResponse purgeCount. + * PurgeSuggestionDenyListEntriesResponse purgeCount. * @member {number|Long} purgeCount - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @instance */ - PurgeDocumentsResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PurgeSuggestionDenyListEntriesResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * PurgeDocumentsResponse purgeSample. - * @member {Array.} purgeSample - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * PurgeSuggestionDenyListEntriesResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @instance */ - PurgeDocumentsResponse.prototype.purgeSample = $util.emptyArray; + PurgeSuggestionDenyListEntriesResponse.prototype.errorSamples = $util.emptyArray; /** - * Creates a new PurgeDocumentsResponse instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse instance */ - PurgeDocumentsResponse.create = function create(properties) { - return new PurgeDocumentsResponse(properties); + PurgeSuggestionDenyListEntriesResponse.create = function create(properties) { + return new PurgeSuggestionDenyListEntriesResponse(properties); }; /** - * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsResponse.encode = function encode(message, writer) { + PurgeSuggestionDenyListEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.purgeCount != null && Object.hasOwnProperty.call(message, "purgeCount")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.purgeCount); - if (message.purgeSample != null && message.purgeSample.length) - for (var i = 0; i < message.purgeSample.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.purgeSample[i]); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + PurgeSuggestionDenyListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsResponse.decode = function decode(reader, length) { + PurgeSuggestionDenyListEntriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17967,9 +21917,9 @@ break; } case 2: { - if (!(message.purgeSample && message.purgeSample.length)) - message.purgeSample = []; - message.purgeSample.push(reader.string()); + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } default: @@ -17981,57 +21931,59 @@ }; /** - * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { + PurgeSuggestionDenyListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeDocumentsResponse message. + * Verifies a PurgeSuggestionDenyListEntriesResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeDocumentsResponse.verify = function verify(message) { + PurgeSuggestionDenyListEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) if (!$util.isInteger(message.purgeCount) && !(message.purgeCount && $util.isInteger(message.purgeCount.low) && $util.isInteger(message.purgeCount.high))) return "purgeCount: integer|Long expected"; - if (message.purgeSample != null && message.hasOwnProperty("purgeSample")) { - if (!Array.isArray(message.purgeSample)) - return "purgeSample: array expected"; - for (var i = 0; i < message.purgeSample.length; ++i) - if (!$util.isString(message.purgeSample[i])) - return "purgeSample: string[] expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } } return null; }; /** - * Creates a PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse */ - PurgeDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse) + PurgeSuggestionDenyListEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse(); if (object.purgeCount != null) if ($util.Long) (message.purgeCount = $util.Long.fromValue(object.purgeCount)).unsigned = false; @@ -18041,31 +21993,34 @@ message.purgeCount = object.purgeCount; else if (typeof object.purgeCount === "object") message.purgeCount = new $util.LongBits(object.purgeCount.low >>> 0, object.purgeCount.high >>> 0).toNumber(); - if (object.purgeSample) { - if (!Array.isArray(object.purgeSample)) - throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsResponse.purgeSample: array expected"); - message.purgeSample = []; - for (var i = 0; i < object.purgeSample.length; ++i) - message.purgeSample[i] = String(object.purgeSample[i]); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } } return message; }; /** - * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a PurgeSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} message PurgeDocumentsResponse + * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeDocumentsResponse.toObject = function toObject(message, options) { + PurgeSuggestionDenyListEntriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.purgeSample = []; + object.errorSamples = []; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); @@ -18077,65 +22032,62 @@ object.purgeCount = options.longs === String ? String(message.purgeCount) : message.purgeCount; else object.purgeCount = options.longs === String ? $util.Long.prototype.toString.call(message.purgeCount) : options.longs === Number ? new $util.LongBits(message.purgeCount.low >>> 0, message.purgeCount.high >>> 0).toNumber() : message.purgeCount; - if (message.purgeSample && message.purgeSample.length) { - object.purgeSample = []; - for (var j = 0; j < message.purgeSample.length; ++j) - object.purgeSample[j] = message.purgeSample[j]; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); } return object; }; /** - * Converts this PurgeDocumentsResponse to JSON. + * Converts this PurgeSuggestionDenyListEntriesResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @instance * @returns {Object.} JSON object */ - PurgeDocumentsResponse.prototype.toJSON = function toJSON() { + PurgeSuggestionDenyListEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeDocumentsResponse + * Gets the default type url for PurgeSuggestionDenyListEntriesResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeSuggestionDenyListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse"; }; - return PurgeDocumentsResponse; + return PurgeSuggestionDenyListEntriesResponse; })(); - v1.PurgeDocumentsMetadata = (function() { + v1.PurgeSuggestionDenyListEntriesMetadata = (function() { /** - * Properties of a PurgeDocumentsMetadata. + * Properties of a PurgeSuggestionDenyListEntriesMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeDocumentsMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] PurgeDocumentsMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeDocumentsMetadata updateTime - * @property {number|Long|null} [successCount] PurgeDocumentsMetadata successCount - * @property {number|Long|null} [failureCount] PurgeDocumentsMetadata failureCount - * @property {number|Long|null} [ignoredCount] PurgeDocumentsMetadata ignoredCount + * @interface IPurgeSuggestionDenyListEntriesMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] PurgeSuggestionDenyListEntriesMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeSuggestionDenyListEntriesMetadata updateTime */ /** - * Constructs a new PurgeDocumentsMetadata. + * Constructs a new PurgeSuggestionDenyListEntriesMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeDocumentsMetadata. - * @implements IPurgeDocumentsMetadata + * @classdesc Represents a PurgeSuggestionDenyListEntriesMetadata. + * @implements IPurgeSuggestionDenyListEntriesMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata=} [properties] Properties to set */ - function PurgeDocumentsMetadata(properties) { + function PurgeSuggestionDenyListEntriesMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18143,110 +22095,80 @@ } /** - * PurgeDocumentsMetadata createTime. + * PurgeSuggestionDenyListEntriesMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @instance */ - PurgeDocumentsMetadata.prototype.createTime = null; + PurgeSuggestionDenyListEntriesMetadata.prototype.createTime = null; /** - * PurgeDocumentsMetadata updateTime. + * PurgeSuggestionDenyListEntriesMetadata updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata - * @instance - */ - PurgeDocumentsMetadata.prototype.updateTime = null; - - /** - * PurgeDocumentsMetadata successCount. - * @member {number|Long} successCount - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata - * @instance - */ - PurgeDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PurgeDocumentsMetadata failureCount. - * @member {number|Long} failureCount - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata - * @instance - */ - PurgeDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PurgeDocumentsMetadata ignoredCount. - * @member {number|Long} ignoredCount - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @instance */ - PurgeDocumentsMetadata.prototype.ignoredCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PurgeSuggestionDenyListEntriesMetadata.prototype.updateTime = null; /** - * Creates a new PurgeDocumentsMetadata instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata instance */ - PurgeDocumentsMetadata.create = function create(properties) { - return new PurgeDocumentsMetadata(properties); + PurgeSuggestionDenyListEntriesMetadata.create = function create(properties) { + return new PurgeSuggestionDenyListEntriesMetadata(properties); }; /** - * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsMetadata.encode = function encode(message, writer) { + PurgeSuggestionDenyListEntriesMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); - if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); - if (message.ignoredCount != null && Object.hasOwnProperty.call(message, "ignoredCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.ignoredCount); return writer; }; /** - * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + PurgeSuggestionDenyListEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsMetadata.decode = function decode(reader, length) { + PurgeSuggestionDenyListEntriesMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -18258,18 +22180,6 @@ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 3: { - message.successCount = reader.int64(); - break; - } - case 4: { - message.failureCount = reader.int64(); - break; - } - case 5: { - message.ignoredCount = reader.int64(); - break; - } default: reader.skipType(tag & 7); break; @@ -18279,30 +22189,30 @@ }; /** - * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { + PurgeSuggestionDenyListEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeDocumentsMetadata message. + * Verifies a PurgeSuggestionDenyListEntriesMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeDocumentsMetadata.verify = function verify(message) { + PurgeSuggestionDenyListEntriesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -18315,171 +22225,105 @@ if (error) return "updateTime." + error; } - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) - return "successCount: integer|Long expected"; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) - return "failureCount: integer|Long expected"; - if (message.ignoredCount != null && message.hasOwnProperty("ignoredCount")) - if (!$util.isInteger(message.ignoredCount) && !(message.ignoredCount && $util.isInteger(message.ignoredCount.low) && $util.isInteger(message.ignoredCount.high))) - return "ignoredCount: integer|Long expected"; return null; }; /** - * Creates a PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata */ - PurgeDocumentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata) + PurgeSuggestionDenyListEntriesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata(); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.createTime: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.updateTime: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.successCount != null) - if ($util.Long) - (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; - else if (typeof object.successCount === "string") - message.successCount = parseInt(object.successCount, 10); - else if (typeof object.successCount === "number") - message.successCount = object.successCount; - else if (typeof object.successCount === "object") - message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); - if (object.failureCount != null) - if ($util.Long) - (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; - else if (typeof object.failureCount === "string") - message.failureCount = parseInt(object.failureCount, 10); - else if (typeof object.failureCount === "number") - message.failureCount = object.failureCount; - else if (typeof object.failureCount === "object") - message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); - if (object.ignoredCount != null) - if ($util.Long) - (message.ignoredCount = $util.Long.fromValue(object.ignoredCount)).unsigned = false; - else if (typeof object.ignoredCount === "string") - message.ignoredCount = parseInt(object.ignoredCount, 10); - else if (typeof object.ignoredCount === "number") - message.ignoredCount = object.ignoredCount; - else if (typeof object.ignoredCount === "object") - message.ignoredCount = new $util.LongBits(object.ignoredCount.low >>> 0, object.ignoredCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. + * Creates a plain object from a PurgeSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} message PurgeDocumentsMetadata + * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeDocumentsMetadata.toObject = function toObject(message, options) { + PurgeSuggestionDenyListEntriesMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.createTime = null; object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.successCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failureCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ignoredCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ignoredCount = options.longs === String ? "0" : 0; } if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (typeof message.successCount === "number") - object.successCount = options.longs === String ? String(message.successCount) : message.successCount; - else - object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (typeof message.failureCount === "number") - object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; - else - object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; - if (message.ignoredCount != null && message.hasOwnProperty("ignoredCount")) - if (typeof message.ignoredCount === "number") - object.ignoredCount = options.longs === String ? String(message.ignoredCount) : message.ignoredCount; - else - object.ignoredCount = options.longs === String ? $util.Long.prototype.toString.call(message.ignoredCount) : options.longs === Number ? new $util.LongBits(message.ignoredCount.low >>> 0, message.ignoredCount.high >>> 0).toNumber() : message.ignoredCount; return object; }; /** - * Converts this PurgeDocumentsMetadata to JSON. + * Converts this PurgeSuggestionDenyListEntriesMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @instance * @returns {Object.} JSON object */ - PurgeDocumentsMetadata.prototype.toJSON = function toJSON() { + PurgeSuggestionDenyListEntriesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeDocumentsMetadata + * Gets the default type url for PurgeSuggestionDenyListEntriesMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeSuggestionDenyListEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata"; }; - return PurgeDocumentsMetadata; + return PurgeSuggestionDenyListEntriesMetadata; })(); - v1.PurgeSuggestionDenyListEntriesRequest = (function() { + v1.PurgeCompletionSuggestionsRequest = (function() { /** - * Properties of a PurgeSuggestionDenyListEntriesRequest. + * Properties of a PurgeCompletionSuggestionsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeSuggestionDenyListEntriesRequest - * @property {string|null} [parent] PurgeSuggestionDenyListEntriesRequest parent + * @interface IPurgeCompletionSuggestionsRequest + * @property {string|null} [parent] PurgeCompletionSuggestionsRequest parent */ /** - * Constructs a new PurgeSuggestionDenyListEntriesRequest. + * Constructs a new PurgeCompletionSuggestionsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeSuggestionDenyListEntriesRequest. - * @implements IPurgeSuggestionDenyListEntriesRequest + * @classdesc Represents a PurgeCompletionSuggestionsRequest. + * @implements IPurgeCompletionSuggestionsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest=} [properties] Properties to set */ - function PurgeSuggestionDenyListEntriesRequest(properties) { + function PurgeCompletionSuggestionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18487,35 +22331,35 @@ } /** - * PurgeSuggestionDenyListEntriesRequest parent. + * PurgeCompletionSuggestionsRequest parent. * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @instance */ - PurgeSuggestionDenyListEntriesRequest.prototype.parent = ""; + PurgeCompletionSuggestionsRequest.prototype.parent = ""; /** - * Creates a new PurgeSuggestionDenyListEntriesRequest instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} PurgeCompletionSuggestionsRequest instance */ - PurgeSuggestionDenyListEntriesRequest.create = function create(properties) { - return new PurgeSuggestionDenyListEntriesRequest(properties); + PurgeCompletionSuggestionsRequest.create = function create(properties) { + return new PurgeCompletionSuggestionsRequest(properties); }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest} message PurgeCompletionSuggestionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesRequest.encode = function encode(message, writer) { + PurgeCompletionSuggestionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -18524,33 +22368,33 @@ }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest} message PurgeCompletionSuggestionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + PurgeCompletionSuggestionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} PurgeCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesRequest.decode = function decode(reader, length) { + PurgeCompletionSuggestionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -18567,30 +22411,30 @@ }; /** - * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} PurgeCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + PurgeCompletionSuggestionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeSuggestionDenyListEntriesRequest message. + * Verifies a PurgeCompletionSuggestionsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeSuggestionDenyListEntriesRequest.verify = function verify(message) { + PurgeCompletionSuggestionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -18600,32 +22444,32 @@ }; /** - * Creates a PurgeSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} PurgeCompletionSuggestionsRequest */ - PurgeSuggestionDenyListEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest) + PurgeCompletionSuggestionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest(); if (object.parent != null) message.parent = String(object.parent); return message; }; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a PurgeCompletionSuggestionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest + * @param {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} message PurgeCompletionSuggestionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeSuggestionDenyListEntriesRequest.toObject = function toObject(message, options) { + PurgeCompletionSuggestionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -18637,53 +22481,53 @@ }; /** - * Converts this PurgeSuggestionDenyListEntriesRequest to JSON. + * Converts this PurgeCompletionSuggestionsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @instance * @returns {Object.} JSON object */ - PurgeSuggestionDenyListEntriesRequest.prototype.toJSON = function toJSON() { + PurgeCompletionSuggestionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesRequest + * Gets the default type url for PurgeCompletionSuggestionsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeSuggestionDenyListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeCompletionSuggestionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest"; }; - return PurgeSuggestionDenyListEntriesRequest; + return PurgeCompletionSuggestionsRequest; })(); - v1.PurgeSuggestionDenyListEntriesResponse = (function() { + v1.PurgeCompletionSuggestionsResponse = (function() { /** - * Properties of a PurgeSuggestionDenyListEntriesResponse. + * Properties of a PurgeCompletionSuggestionsResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeSuggestionDenyListEntriesResponse - * @property {number|Long|null} [purgeCount] PurgeSuggestionDenyListEntriesResponse purgeCount - * @property {Array.|null} [errorSamples] PurgeSuggestionDenyListEntriesResponse errorSamples + * @interface IPurgeCompletionSuggestionsResponse + * @property {boolean|null} [purgeSucceeded] PurgeCompletionSuggestionsResponse purgeSucceeded + * @property {Array.|null} [errorSamples] PurgeCompletionSuggestionsResponse errorSamples */ /** - * Constructs a new PurgeSuggestionDenyListEntriesResponse. + * Constructs a new PurgeCompletionSuggestionsResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeSuggestionDenyListEntriesResponse. - * @implements IPurgeSuggestionDenyListEntriesResponse + * @classdesc Represents a PurgeCompletionSuggestionsResponse. + * @implements IPurgeCompletionSuggestionsResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse=} [properties] Properties to set */ - function PurgeSuggestionDenyListEntriesResponse(properties) { + function PurgeCompletionSuggestionsResponse(properties) { this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -18692,47 +22536,47 @@ } /** - * PurgeSuggestionDenyListEntriesResponse purgeCount. - * @member {number|Long} purgeCount - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * PurgeCompletionSuggestionsResponse purgeSucceeded. + * @member {boolean} purgeSucceeded + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @instance */ - PurgeSuggestionDenyListEntriesResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PurgeCompletionSuggestionsResponse.prototype.purgeSucceeded = false; /** - * PurgeSuggestionDenyListEntriesResponse errorSamples. + * PurgeCompletionSuggestionsResponse errorSamples. * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @instance */ - PurgeSuggestionDenyListEntriesResponse.prototype.errorSamples = $util.emptyArray; + PurgeCompletionSuggestionsResponse.prototype.errorSamples = $util.emptyArray; /** - * Creates a new PurgeSuggestionDenyListEntriesResponse instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} PurgeCompletionSuggestionsResponse instance */ - PurgeSuggestionDenyListEntriesResponse.create = function create(properties) { - return new PurgeSuggestionDenyListEntriesResponse(properties); + PurgeCompletionSuggestionsResponse.create = function create(properties) { + return new PurgeCompletionSuggestionsResponse(properties); }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse} message PurgeCompletionSuggestionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesResponse.encode = function encode(message, writer) { + PurgeCompletionSuggestionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.purgeCount != null && Object.hasOwnProperty.call(message, "purgeCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.purgeCount); + if (message.purgeSucceeded != null && Object.hasOwnProperty.call(message, "purgeSucceeded")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.purgeSucceeded); if (message.errorSamples != null && message.errorSamples.length) for (var i = 0; i < message.errorSamples.length; ++i) $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); @@ -18740,38 +22584,38 @@ }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse} message PurgeCompletionSuggestionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + PurgeCompletionSuggestionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} PurgeCompletionSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesResponse.decode = function decode(reader, length) { + PurgeCompletionSuggestionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.purgeCount = reader.int64(); + message.purgeSucceeded = reader.bool(); break; } case 2: { @@ -18789,35 +22633,35 @@ }; /** - * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} PurgeCompletionSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + PurgeCompletionSuggestionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeSuggestionDenyListEntriesResponse message. + * Verifies a PurgeCompletionSuggestionsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeSuggestionDenyListEntriesResponse.verify = function verify(message) { + PurgeCompletionSuggestionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) - if (!$util.isInteger(message.purgeCount) && !(message.purgeCount && $util.isInteger(message.purgeCount.low) && $util.isInteger(message.purgeCount.high))) - return "purgeCount: integer|Long expected"; + if (message.purgeSucceeded != null && message.hasOwnProperty("purgeSucceeded")) + if (typeof message.purgeSucceeded !== "boolean") + return "purgeSucceeded: boolean expected"; if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { if (!Array.isArray(message.errorSamples)) return "errorSamples: array expected"; @@ -18831,33 +22675,26 @@ }; /** - * Creates a PurgeSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} PurgeCompletionSuggestionsResponse */ - PurgeSuggestionDenyListEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse) + PurgeCompletionSuggestionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse(); - if (object.purgeCount != null) - if ($util.Long) - (message.purgeCount = $util.Long.fromValue(object.purgeCount)).unsigned = false; - else if (typeof object.purgeCount === "string") - message.purgeCount = parseInt(object.purgeCount, 10); - else if (typeof object.purgeCount === "number") - message.purgeCount = object.purgeCount; - else if (typeof object.purgeCount === "object") - message.purgeCount = new $util.LongBits(object.purgeCount.low >>> 0, object.purgeCount.high >>> 0).toNumber(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse(); + if (object.purgeSucceeded != null) + message.purgeSucceeded = Boolean(object.purgeSucceeded); if (object.errorSamples) { if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.errorSamples: array expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.errorSamples: array expected"); message.errorSamples = []; for (var i = 0; i < object.errorSamples.length; ++i) { if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.errorSamples: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.errorSamples: object expected"); message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); } } @@ -18865,31 +22702,24 @@ }; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a PurgeCompletionSuggestionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static - * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse + * @param {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} message PurgeCompletionSuggestionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeSuggestionDenyListEntriesResponse.toObject = function toObject(message, options) { + PurgeCompletionSuggestionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.errorSamples = []; if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.purgeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.purgeCount = options.longs === String ? "0" : 0; - if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) - if (typeof message.purgeCount === "number") - object.purgeCount = options.longs === String ? String(message.purgeCount) : message.purgeCount; - else - object.purgeCount = options.longs === String ? $util.Long.prototype.toString.call(message.purgeCount) : options.longs === Number ? new $util.LongBits(message.purgeCount.low >>> 0, message.purgeCount.high >>> 0).toNumber() : message.purgeCount; + object.purgeSucceeded = false; + if (message.purgeSucceeded != null && message.hasOwnProperty("purgeSucceeded")) + object.purgeSucceeded = message.purgeSucceeded; if (message.errorSamples && message.errorSamples.length) { object.errorSamples = []; for (var j = 0; j < message.errorSamples.length; ++j) @@ -18899,53 +22729,53 @@ }; /** - * Converts this PurgeSuggestionDenyListEntriesResponse to JSON. + * Converts this PurgeCompletionSuggestionsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @instance * @returns {Object.} JSON object */ - PurgeSuggestionDenyListEntriesResponse.prototype.toJSON = function toJSON() { + PurgeCompletionSuggestionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesResponse + * Gets the default type url for PurgeCompletionSuggestionsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeSuggestionDenyListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeCompletionSuggestionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse"; }; - return PurgeSuggestionDenyListEntriesResponse; + return PurgeCompletionSuggestionsResponse; })(); - v1.PurgeSuggestionDenyListEntriesMetadata = (function() { + v1.PurgeCompletionSuggestionsMetadata = (function() { /** - * Properties of a PurgeSuggestionDenyListEntriesMetadata. + * Properties of a PurgeCompletionSuggestionsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeSuggestionDenyListEntriesMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] PurgeSuggestionDenyListEntriesMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeSuggestionDenyListEntriesMetadata updateTime + * @interface IPurgeCompletionSuggestionsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] PurgeCompletionSuggestionsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeCompletionSuggestionsMetadata updateTime */ /** - * Constructs a new PurgeSuggestionDenyListEntriesMetadata. + * Constructs a new PurgeCompletionSuggestionsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeSuggestionDenyListEntriesMetadata. - * @implements IPurgeSuggestionDenyListEntriesMetadata + * @classdesc Represents a PurgeCompletionSuggestionsMetadata. + * @implements IPurgeCompletionSuggestionsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata=} [properties] Properties to set */ - function PurgeSuggestionDenyListEntriesMetadata(properties) { + function PurgeCompletionSuggestionsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18953,43 +22783,43 @@ } /** - * PurgeSuggestionDenyListEntriesMetadata createTime. + * PurgeCompletionSuggestionsMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @instance */ - PurgeSuggestionDenyListEntriesMetadata.prototype.createTime = null; + PurgeCompletionSuggestionsMetadata.prototype.createTime = null; /** - * PurgeSuggestionDenyListEntriesMetadata updateTime. + * PurgeCompletionSuggestionsMetadata updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @instance */ - PurgeSuggestionDenyListEntriesMetadata.prototype.updateTime = null; + PurgeCompletionSuggestionsMetadata.prototype.updateTime = null; /** - * Creates a new PurgeSuggestionDenyListEntriesMetadata instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} PurgeCompletionSuggestionsMetadata instance */ - PurgeSuggestionDenyListEntriesMetadata.create = function create(properties) { - return new PurgeSuggestionDenyListEntriesMetadata(properties); + PurgeCompletionSuggestionsMetadata.create = function create(properties) { + return new PurgeCompletionSuggestionsMetadata(properties); }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata} message PurgeCompletionSuggestionsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesMetadata.encode = function encode(message, writer) { + PurgeCompletionSuggestionsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) @@ -19000,33 +22830,33 @@ }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata} message PurgeCompletionSuggestionsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + PurgeCompletionSuggestionsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} PurgeCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesMetadata.decode = function decode(reader, length) { + PurgeCompletionSuggestionsMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -19047,30 +22877,30 @@ }; /** - * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} PurgeCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { + PurgeCompletionSuggestionsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeSuggestionDenyListEntriesMetadata message. + * Verifies a PurgeCompletionSuggestionsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeSuggestionDenyListEntriesMetadata.verify = function verify(message) { + PurgeCompletionSuggestionsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -19087,40 +22917,40 @@ }; /** - * Creates a PurgeSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} PurgeCompletionSuggestionsMetadata */ - PurgeSuggestionDenyListEntriesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata) + PurgeCompletionSuggestionsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata(); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.createTime: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.updateTime: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a PurgeCompletionSuggestionsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata + * @param {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} message PurgeCompletionSuggestionsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeSuggestionDenyListEntriesMetadata.toObject = function toObject(message, options) { + PurgeCompletionSuggestionsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -19136,32 +22966,32 @@ }; /** - * Converts this PurgeSuggestionDenyListEntriesMetadata to JSON. + * Converts this PurgeCompletionSuggestionsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @instance * @returns {Object.} JSON object */ - PurgeSuggestionDenyListEntriesMetadata.prototype.toJSON = function toJSON() { + PurgeCompletionSuggestionsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesMetadata + * Gets the default type url for PurgeCompletionSuggestionsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeSuggestionDenyListEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeCompletionSuggestionsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata"; }; - return PurgeSuggestionDenyListEntriesMetadata; + return PurgeCompletionSuggestionsMetadata; })(); v1.Condition = (function() { @@ -24459,6 +28289,7 @@ * @property {string|null} [canonicalFilter] SearchRequest canonicalFilter * @property {string|null} [orderBy] SearchRequest orderBy * @property {google.cloud.discoveryengine.v1.IUserInfo|null} [userInfo] SearchRequest userInfo + * @property {string|null} [languageCode] SearchRequest languageCode * @property {Array.|null} [facetSpecs] SearchRequest facetSpecs * @property {google.cloud.discoveryengine.v1.SearchRequest.IBoostSpec|null} [boostSpec] SearchRequest boostSpec * @property {Object.|null} [params] SearchRequest params @@ -24468,6 +28299,9 @@ * @property {google.cloud.discoveryengine.v1.SearchRequest.IContentSearchSpec|null} [contentSearchSpec] SearchRequest contentSearchSpec * @property {boolean|null} [safeSearch] SearchRequest safeSearch * @property {Object.|null} [userLabels] SearchRequest userLabels + * @property {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null} [searchAsYouTypeSpec] SearchRequest searchAsYouTypeSpec + * @property {string|null} [session] SearchRequest session + * @property {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null} [sessionSpec] SearchRequest sessionSpec */ /** @@ -24585,6 +28419,14 @@ */ SearchRequest.prototype.userInfo = null; + /** + * SearchRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @instance + */ + SearchRequest.prototype.languageCode = ""; + /** * SearchRequest facetSpecs. * @member {Array.} facetSpecs @@ -24657,6 +28499,30 @@ */ SearchRequest.prototype.userLabels = $util.emptyObject; + /** + * SearchRequest searchAsYouTypeSpec. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null|undefined} searchAsYouTypeSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @instance + */ + SearchRequest.prototype.searchAsYouTypeSpec = null; + + /** + * SearchRequest session. + * @member {string} session + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @instance + */ + SearchRequest.prototype.session = ""; + + /** + * SearchRequest sessionSpec. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null|undefined} sessionSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @instance + */ + SearchRequest.prototype.sessionSpec = null; + /** * Creates a new SearchRequest instance using the specified properties. * @function create @@ -24726,9 +28592,17 @@ $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.encode(message.contentSearchSpec, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); if (message.canonicalFilter != null && Object.hasOwnProperty.call(message, "canonicalFilter")) writer.uint32(/* id 29, wireType 2 =*/234).string(message.canonicalFilter); + if (message.searchAsYouTypeSpec != null && Object.hasOwnProperty.call(message, "searchAsYouTypeSpec")) + $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.encode(message.searchAsYouTypeSpec, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); if (message.dataStoreSpecs != null && message.dataStoreSpecs.length) for (var i = 0; i < message.dataStoreSpecs.length; ++i) $root.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.encode(message.dataStoreSpecs[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 35, wireType 2 =*/282).string(message.languageCode); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.session); + if (message.sessionSpec != null && Object.hasOwnProperty.call(message, "sessionSpec")) + $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.encode(message.sessionSpec, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); return writer; }; @@ -24813,6 +28687,10 @@ message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.decode(reader, reader.uint32()); break; } + case 35: { + message.languageCode = reader.string(); + break; + } case 9: { if (!(message.facetSpecs && message.facetSpecs.length)) message.facetSpecs = []; @@ -24889,6 +28767,18 @@ message.userLabels[key] = value; break; } + case 31: { + message.searchAsYouTypeSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.decode(reader, reader.uint32()); + break; + } + case 41: { + message.session = reader.string(); + break; + } + case 42: { + message.sessionSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24970,6 +28860,9 @@ if (error) return "userInfo." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; if (message.facetSpecs != null && message.hasOwnProperty("facetSpecs")) { if (!Array.isArray(message.facetSpecs)) return "facetSpecs: array expected"; @@ -25023,6 +28916,19 @@ if (!$util.isString(message.userLabels[key[i]])) return "userLabels: string{k:string} expected"; } + if (message.searchAsYouTypeSpec != null && message.hasOwnProperty("searchAsYouTypeSpec")) { + var error = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify(message.searchAsYouTypeSpec); + if (error) + return "searchAsYouTypeSpec." + error; + } + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) { + var error = $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify(message.sessionSpec); + if (error) + return "sessionSpec." + error; + } return null; }; @@ -25076,6 +28982,8 @@ throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.userInfo: object expected"); message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.fromObject(object.userInfo); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); if (object.facetSpecs) { if (!Array.isArray(object.facetSpecs)) throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.facetSpecs: array expected"); @@ -25127,6 +29035,18 @@ for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); } + if (object.searchAsYouTypeSpec != null) { + if (typeof object.searchAsYouTypeSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.searchAsYouTypeSpec: object expected"); + message.searchAsYouTypeSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.fromObject(object.searchAsYouTypeSpec); + } + if (object.session != null) + message.session = String(object.session); + if (object.sessionSpec != null) { + if (typeof object.sessionSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.sessionSpec: object expected"); + message.sessionSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.fromObject(object.sessionSpec); + } return message; }; @@ -25169,6 +29089,10 @@ object.userInfo = null; object.contentSearchSpec = null; object.canonicalFilter = ""; + object.searchAsYouTypeSpec = null; + object.languageCode = ""; + object.session = ""; + object.sessionSpec = null; } if (message.servingConfig != null && message.hasOwnProperty("servingConfig")) object.servingConfig = message.servingConfig; @@ -25220,11 +29144,19 @@ object.contentSearchSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.toObject(message.contentSearchSpec, options); if (message.canonicalFilter != null && message.hasOwnProperty("canonicalFilter")) object.canonicalFilter = message.canonicalFilter; + if (message.searchAsYouTypeSpec != null && message.hasOwnProperty("searchAsYouTypeSpec")) + object.searchAsYouTypeSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.toObject(message.searchAsYouTypeSpec, options); if (message.dataStoreSpecs && message.dataStoreSpecs.length) { object.dataStoreSpecs = []; for (var j = 0; j < message.dataStoreSpecs.length; ++j) object.dataStoreSpecs[j] = $root.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.toObject(message.dataStoreSpecs[j], options); } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) + object.sessionSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.toObject(message.sessionSpec, options); return object; }; @@ -27356,6 +31288,8 @@ * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ISnippetSpec|null} [snippetSpec] ContentSearchSpec snippetSpec * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ISummarySpec|null} [summarySpec] ContentSearchSpec summarySpec * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec|null} [extractiveContentSpec] ContentSearchSpec extractiveContentSpec + * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|null} [searchResultMode] ContentSearchSpec searchResultMode + * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec|null} [chunkSpec] ContentSearchSpec chunkSpec */ /** @@ -27397,6 +31331,22 @@ */ ContentSearchSpec.prototype.extractiveContentSpec = null; + /** + * ContentSearchSpec searchResultMode. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode} searchResultMode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + * @instance + */ + ContentSearchSpec.prototype.searchResultMode = 0; + + /** + * ContentSearchSpec chunkSpec. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec|null|undefined} chunkSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + * @instance + */ + ContentSearchSpec.prototype.chunkSpec = null; + /** * Creates a new ContentSearchSpec instance using the specified properties. * @function create @@ -27427,6 +31377,10 @@ $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.encode(message.summarySpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.extractiveContentSpec != null && Object.hasOwnProperty.call(message, "extractiveContentSpec")) $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.encode(message.extractiveContentSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.searchResultMode != null && Object.hasOwnProperty.call(message, "searchResultMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.searchResultMode); + if (message.chunkSpec != null && Object.hasOwnProperty.call(message, "chunkSpec")) + $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.encode(message.chunkSpec, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -27473,6 +31427,14 @@ message.extractiveContentSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.decode(reader, reader.uint32()); break; } + case 4: { + message.searchResultMode = reader.int32(); + break; + } + case 5: { + message.chunkSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27523,6 +31485,20 @@ if (error) return "extractiveContentSpec." + error; } + if (message.searchResultMode != null && message.hasOwnProperty("searchResultMode")) + switch (message.searchResultMode) { + default: + return "searchResultMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.chunkSpec != null && message.hasOwnProperty("chunkSpec")) { + var error = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify(message.chunkSpec); + if (error) + return "chunkSpec." + error; + } return null; }; @@ -27553,6 +31529,31 @@ throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.extractiveContentSpec: object expected"); message.extractiveContentSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.fromObject(object.extractiveContentSpec); } + switch (object.searchResultMode) { + default: + if (typeof object.searchResultMode === "number") { + message.searchResultMode = object.searchResultMode; + break; + } + break; + case "SEARCH_RESULT_MODE_UNSPECIFIED": + case 0: + message.searchResultMode = 0; + break; + case "DOCUMENTS": + case 1: + message.searchResultMode = 1; + break; + case "CHUNKS": + case 2: + message.searchResultMode = 2; + break; + } + if (object.chunkSpec != null) { + if (typeof object.chunkSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.chunkSpec: object expected"); + message.chunkSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.fromObject(object.chunkSpec); + } return message; }; @@ -27573,6 +31574,8 @@ object.snippetSpec = null; object.summarySpec = null; object.extractiveContentSpec = null; + object.searchResultMode = options.enums === String ? "SEARCH_RESULT_MODE_UNSPECIFIED" : 0; + object.chunkSpec = null; } if (message.snippetSpec != null && message.hasOwnProperty("snippetSpec")) object.snippetSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec.toObject(message.snippetSpec, options); @@ -27580,6 +31583,10 @@ object.summarySpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.toObject(message.summarySpec, options); if (message.extractiveContentSpec != null && message.hasOwnProperty("extractiveContentSpec")) object.extractiveContentSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.toObject(message.extractiveContentSpec, options); + if (message.searchResultMode != null && message.hasOwnProperty("searchResultMode")) + object.searchResultMode = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode[message.searchResultMode] === undefined ? message.searchResultMode : $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode[message.searchResultMode] : message.searchResultMode; + if (message.chunkSpec != null && message.hasOwnProperty("chunkSpec")) + object.chunkSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.toObject(message.chunkSpec, options); return object; }; @@ -28746,54 +32753,305 @@ }; /** - * Encodes the specified ExtractiveContentSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.verify|verify} messages. + * Encodes the specified ExtractiveContentSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec} message ExtractiveContentSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtractiveContentSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtractiveContentSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtractiveContentSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxExtractiveAnswerCount = reader.int32(); + break; + } + case 2: { + message.maxExtractiveSegmentCount = reader.int32(); + break; + } + case 3: { + message.returnExtractiveSegmentScore = reader.bool(); + break; + } + case 4: { + message.numPreviousSegments = reader.int32(); + break; + } + case 5: { + message.numNextSegments = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtractiveContentSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtractiveContentSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtractiveContentSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtractiveContentSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxExtractiveAnswerCount != null && message.hasOwnProperty("maxExtractiveAnswerCount")) + if (!$util.isInteger(message.maxExtractiveAnswerCount)) + return "maxExtractiveAnswerCount: integer expected"; + if (message.maxExtractiveSegmentCount != null && message.hasOwnProperty("maxExtractiveSegmentCount")) + if (!$util.isInteger(message.maxExtractiveSegmentCount)) + return "maxExtractiveSegmentCount: integer expected"; + if (message.returnExtractiveSegmentScore != null && message.hasOwnProperty("returnExtractiveSegmentScore")) + if (typeof message.returnExtractiveSegmentScore !== "boolean") + return "returnExtractiveSegmentScore: boolean expected"; + if (message.numPreviousSegments != null && message.hasOwnProperty("numPreviousSegments")) + if (!$util.isInteger(message.numPreviousSegments)) + return "numPreviousSegments: integer expected"; + if (message.numNextSegments != null && message.hasOwnProperty("numNextSegments")) + if (!$util.isInteger(message.numNextSegments)) + return "numNextSegments: integer expected"; + return null; + }; + + /** + * Creates an ExtractiveContentSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + */ + ExtractiveContentSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec(); + if (object.maxExtractiveAnswerCount != null) + message.maxExtractiveAnswerCount = object.maxExtractiveAnswerCount | 0; + if (object.maxExtractiveSegmentCount != null) + message.maxExtractiveSegmentCount = object.maxExtractiveSegmentCount | 0; + if (object.returnExtractiveSegmentScore != null) + message.returnExtractiveSegmentScore = Boolean(object.returnExtractiveSegmentScore); + if (object.numPreviousSegments != null) + message.numPreviousSegments = object.numPreviousSegments | 0; + if (object.numNextSegments != null) + message.numNextSegments = object.numNextSegments | 0; + return message; + }; + + /** + * Creates a plain object from an ExtractiveContentSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} message ExtractiveContentSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtractiveContentSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxExtractiveAnswerCount = 0; + object.maxExtractiveSegmentCount = 0; + object.returnExtractiveSegmentScore = false; + object.numPreviousSegments = 0; + object.numNextSegments = 0; + } + if (message.maxExtractiveAnswerCount != null && message.hasOwnProperty("maxExtractiveAnswerCount")) + object.maxExtractiveAnswerCount = message.maxExtractiveAnswerCount; + if (message.maxExtractiveSegmentCount != null && message.hasOwnProperty("maxExtractiveSegmentCount")) + object.maxExtractiveSegmentCount = message.maxExtractiveSegmentCount; + if (message.returnExtractiveSegmentScore != null && message.hasOwnProperty("returnExtractiveSegmentScore")) + object.returnExtractiveSegmentScore = message.returnExtractiveSegmentScore; + if (message.numPreviousSegments != null && message.hasOwnProperty("numPreviousSegments")) + object.numPreviousSegments = message.numPreviousSegments; + if (message.numNextSegments != null && message.hasOwnProperty("numNextSegments")) + object.numNextSegments = message.numNextSegments; + return object; + }; + + /** + * Converts this ExtractiveContentSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @instance + * @returns {Object.} JSON object + */ + ExtractiveContentSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtractiveContentSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtractiveContentSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec"; + }; + + return ExtractiveContentSpec; + })(); + + ContentSearchSpec.ChunkSpec = (function() { + + /** + * Properties of a ChunkSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + * @interface IChunkSpec + * @property {number|null} [numPreviousChunks] ChunkSpec numPreviousChunks + * @property {number|null} [numNextChunks] ChunkSpec numNextChunks + */ + + /** + * Constructs a new ChunkSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + * @classdesc Represents a ChunkSpec. + * @implements IChunkSpec + * @constructor + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec=} [properties] Properties to set + */ + function ChunkSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChunkSpec numPreviousChunks. + * @member {number} numPreviousChunks + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec + * @instance + */ + ChunkSpec.prototype.numPreviousChunks = 0; + + /** + * ChunkSpec numNextChunks. + * @member {number} numNextChunks + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec + * @instance + */ + ChunkSpec.prototype.numNextChunks = 0; + + /** + * Creates a new ChunkSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} ChunkSpec instance + */ + ChunkSpec.create = function create(properties) { + return new ChunkSpec(properties); + }; + + /** + * Encodes the specified ChunkSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec} message ChunkSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numPreviousChunks != null && Object.hasOwnProperty.call(message, "numPreviousChunks")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numPreviousChunks); + if (message.numNextChunks != null && Object.hasOwnProperty.call(message, "numNextChunks")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numNextChunks); + return writer; + }; + + /** + * Encodes the specified ChunkSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static - * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec} message ExtractiveContentSpec message or plain object to encode + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec} message ChunkSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtractiveContentSpec.encodeDelimited = function encodeDelimited(message, writer) { + ChunkSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtractiveContentSpec message from the specified reader or buffer. + * Decodes a ChunkSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} ChunkSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtractiveContentSpec.decode = function decode(reader, length) { + ChunkSpec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.maxExtractiveAnswerCount = reader.int32(); + message.numPreviousChunks = reader.int32(); break; } case 2: { - message.maxExtractiveSegmentCount = reader.int32(); - break; - } - case 3: { - message.returnExtractiveSegmentScore = reader.bool(); - break; - } - case 4: { - message.numPreviousSegments = reader.int32(); - break; - } - case 5: { - message.numNextSegments = reader.int32(); + message.numNextChunks = reader.int32(); break; } default: @@ -28805,140 +33063,620 @@ }; /** - * Decodes an ExtractiveContentSpec message from the specified reader or buffer, length delimited. + * Decodes a ChunkSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} ChunkSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtractiveContentSpec.decodeDelimited = function decodeDelimited(reader) { + ChunkSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtractiveContentSpec message. + * Verifies a ChunkSpec message. * @function verify - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtractiveContentSpec.verify = function verify(message) { + ChunkSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.maxExtractiveAnswerCount != null && message.hasOwnProperty("maxExtractiveAnswerCount")) - if (!$util.isInteger(message.maxExtractiveAnswerCount)) - return "maxExtractiveAnswerCount: integer expected"; - if (message.maxExtractiveSegmentCount != null && message.hasOwnProperty("maxExtractiveSegmentCount")) - if (!$util.isInteger(message.maxExtractiveSegmentCount)) - return "maxExtractiveSegmentCount: integer expected"; - if (message.returnExtractiveSegmentScore != null && message.hasOwnProperty("returnExtractiveSegmentScore")) - if (typeof message.returnExtractiveSegmentScore !== "boolean") - return "returnExtractiveSegmentScore: boolean expected"; - if (message.numPreviousSegments != null && message.hasOwnProperty("numPreviousSegments")) - if (!$util.isInteger(message.numPreviousSegments)) - return "numPreviousSegments: integer expected"; - if (message.numNextSegments != null && message.hasOwnProperty("numNextSegments")) - if (!$util.isInteger(message.numNextSegments)) - return "numNextSegments: integer expected"; + if (message.numPreviousChunks != null && message.hasOwnProperty("numPreviousChunks")) + if (!$util.isInteger(message.numPreviousChunks)) + return "numPreviousChunks: integer expected"; + if (message.numNextChunks != null && message.hasOwnProperty("numNextChunks")) + if (!$util.isInteger(message.numNextChunks)) + return "numNextChunks: integer expected"; return null; }; /** - * Creates an ExtractiveContentSpec message from a plain object. Also converts values to their respective internal types. + * Creates a ChunkSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} ChunkSpec */ - ExtractiveContentSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + ChunkSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec) return object; - var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec(); - if (object.maxExtractiveAnswerCount != null) - message.maxExtractiveAnswerCount = object.maxExtractiveAnswerCount | 0; - if (object.maxExtractiveSegmentCount != null) - message.maxExtractiveSegmentCount = object.maxExtractiveSegmentCount | 0; - if (object.returnExtractiveSegmentScore != null) - message.returnExtractiveSegmentScore = Boolean(object.returnExtractiveSegmentScore); - if (object.numPreviousSegments != null) - message.numPreviousSegments = object.numPreviousSegments | 0; - if (object.numNextSegments != null) - message.numNextSegments = object.numNextSegments | 0; + var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec(); + if (object.numPreviousChunks != null) + message.numPreviousChunks = object.numPreviousChunks | 0; + if (object.numNextChunks != null) + message.numNextChunks = object.numNextChunks | 0; return message; }; /** - * Creates a plain object from an ExtractiveContentSpec message. Also converts values to other types if specified. + * Creates a plain object from a ChunkSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static - * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} message ExtractiveContentSpec + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} message ChunkSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtractiveContentSpec.toObject = function toObject(message, options) { + ChunkSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.maxExtractiveAnswerCount = 0; - object.maxExtractiveSegmentCount = 0; - object.returnExtractiveSegmentScore = false; - object.numPreviousSegments = 0; - object.numNextSegments = 0; + object.numPreviousChunks = 0; + object.numNextChunks = 0; } - if (message.maxExtractiveAnswerCount != null && message.hasOwnProperty("maxExtractiveAnswerCount")) - object.maxExtractiveAnswerCount = message.maxExtractiveAnswerCount; - if (message.maxExtractiveSegmentCount != null && message.hasOwnProperty("maxExtractiveSegmentCount")) - object.maxExtractiveSegmentCount = message.maxExtractiveSegmentCount; - if (message.returnExtractiveSegmentScore != null && message.hasOwnProperty("returnExtractiveSegmentScore")) - object.returnExtractiveSegmentScore = message.returnExtractiveSegmentScore; - if (message.numPreviousSegments != null && message.hasOwnProperty("numPreviousSegments")) - object.numPreviousSegments = message.numPreviousSegments; - if (message.numNextSegments != null && message.hasOwnProperty("numNextSegments")) - object.numNextSegments = message.numNextSegments; + if (message.numPreviousChunks != null && message.hasOwnProperty("numPreviousChunks")) + object.numPreviousChunks = message.numPreviousChunks; + if (message.numNextChunks != null && message.hasOwnProperty("numNextChunks")) + object.numNextChunks = message.numNextChunks; return object; }; /** - * Converts this ExtractiveContentSpec to JSON. + * Converts this ChunkSpec to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @instance * @returns {Object.} JSON object */ - ExtractiveContentSpec.prototype.toJSON = function toJSON() { + ChunkSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExtractiveContentSpec + * Gets the default type url for ChunkSpec * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExtractiveContentSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChunkSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec"; }; - return ExtractiveContentSpec; + return ChunkSpec; + })(); + + /** + * SearchResultMode enum. + * @name google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode + * @enum {number} + * @property {number} SEARCH_RESULT_MODE_UNSPECIFIED=0 SEARCH_RESULT_MODE_UNSPECIFIED value + * @property {number} DOCUMENTS=1 DOCUMENTS value + * @property {number} CHUNKS=2 CHUNKS value + */ + ContentSearchSpec.SearchResultMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_RESULT_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOCUMENTS"] = 1; + values[valuesById[2] = "CHUNKS"] = 2; + return values; })(); return ContentSearchSpec; })(); + SearchRequest.SearchAsYouTypeSpec = (function() { + + /** + * Properties of a SearchAsYouTypeSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @interface ISearchAsYouTypeSpec + * @property {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition|null} [condition] SearchAsYouTypeSpec condition + */ + + /** + * Constructs a new SearchAsYouTypeSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @classdesc Represents a SearchAsYouTypeSpec. + * @implements ISearchAsYouTypeSpec + * @constructor + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec=} [properties] Properties to set + */ + function SearchAsYouTypeSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchAsYouTypeSpec condition. + * @member {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition} condition + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @instance + */ + SearchAsYouTypeSpec.prototype.condition = 0; + + /** + * Creates a new SearchAsYouTypeSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} SearchAsYouTypeSpec instance + */ + SearchAsYouTypeSpec.create = function create(properties) { + return new SearchAsYouTypeSpec(properties); + }; + + /** + * Encodes the specified SearchAsYouTypeSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec} message SearchAsYouTypeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchAsYouTypeSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.condition); + return writer; + }; + + /** + * Encodes the specified SearchAsYouTypeSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec} message SearchAsYouTypeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchAsYouTypeSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchAsYouTypeSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} SearchAsYouTypeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchAsYouTypeSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.condition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchAsYouTypeSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} SearchAsYouTypeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchAsYouTypeSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchAsYouTypeSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchAsYouTypeSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + switch (message.condition) { + default: + return "condition: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SearchAsYouTypeSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} SearchAsYouTypeSpec + */ + SearchAsYouTypeSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec(); + switch (object.condition) { + default: + if (typeof object.condition === "number") { + message.condition = object.condition; + break; + } + break; + case "CONDITION_UNSPECIFIED": + case 0: + message.condition = 0; + break; + case "DISABLED": + case 1: + message.condition = 1; + break; + case "ENABLED": + case 2: + message.condition = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SearchAsYouTypeSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} message SearchAsYouTypeSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchAsYouTypeSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.condition = options.enums === String ? "CONDITION_UNSPECIFIED" : 0; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition[message.condition] === undefined ? message.condition : $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition[message.condition] : message.condition; + return object; + }; + + /** + * Converts this SearchAsYouTypeSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @instance + * @returns {Object.} JSON object + */ + SearchAsYouTypeSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchAsYouTypeSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchAsYouTypeSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec"; + }; + + /** + * Condition enum. + * @name google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition + * @enum {number} + * @property {number} CONDITION_UNSPECIFIED=0 CONDITION_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} ENABLED=2 ENABLED value + */ + SearchAsYouTypeSpec.Condition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONDITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "ENABLED"] = 2; + return values; + })(); + + return SearchAsYouTypeSpec; + })(); + + SearchRequest.SessionSpec = (function() { + + /** + * Properties of a SessionSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @interface ISessionSpec + * @property {string|null} [queryId] SessionSpec queryId + * @property {number|null} [searchResultPersistenceCount] SessionSpec searchResultPersistenceCount + */ + + /** + * Constructs a new SessionSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @classdesc Represents a SessionSpec. + * @implements ISessionSpec + * @constructor + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec=} [properties] Properties to set + */ + function SessionSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionSpec queryId. + * @member {string} queryId + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @instance + */ + SessionSpec.prototype.queryId = ""; + + /** + * SessionSpec searchResultPersistenceCount. + * @member {number|null|undefined} searchResultPersistenceCount + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @instance + */ + SessionSpec.prototype.searchResultPersistenceCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionSpec _searchResultPersistenceCount. + * @member {"searchResultPersistenceCount"|undefined} _searchResultPersistenceCount + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @instance + */ + Object.defineProperty(SessionSpec.prototype, "_searchResultPersistenceCount", { + get: $util.oneOfGetter($oneOfFields = ["searchResultPersistenceCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} SessionSpec instance + */ + SessionSpec.create = function create(properties) { + return new SessionSpec(properties); + }; + + /** + * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec} message SessionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); + if (message.searchResultPersistenceCount != null && Object.hasOwnProperty.call(message, "searchResultPersistenceCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.searchResultPersistenceCount); + return writer; + }; + + /** + * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec} message SessionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.queryId = reader.string(); + break; + } + case 2: { + message.searchResultPersistenceCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + if (message.searchResultPersistenceCount != null && message.hasOwnProperty("searchResultPersistenceCount")) { + properties._searchResultPersistenceCount = 1; + if (!$util.isInteger(message.searchResultPersistenceCount)) + return "searchResultPersistenceCount: integer expected"; + } + return null; + }; + + /** + * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} SessionSpec + */ + SessionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec(); + if (object.queryId != null) + message.queryId = String(object.queryId); + if (object.searchResultPersistenceCount != null) + message.searchResultPersistenceCount = object.searchResultPersistenceCount | 0; + return message; + }; + + /** + * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} message SessionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.queryId = ""; + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + if (message.searchResultPersistenceCount != null && message.hasOwnProperty("searchResultPersistenceCount")) { + object.searchResultPersistenceCount = message.searchResultPersistenceCount; + if (options.oneofs) + object._searchResultPersistenceCount = "searchResultPersistenceCount"; + } + return object; + }; + + /** + * Converts this SessionSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @instance + * @returns {Object.} JSON object + */ + SessionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.SessionSpec"; + }; + + return SessionSpec; + })(); + return SearchRequest; })(); @@ -28957,6 +33695,7 @@ * @property {string|null} [correctedQuery] SearchResponse correctedQuery * @property {google.cloud.discoveryengine.v1.SearchResponse.ISummary|null} [summary] SearchResponse summary * @property {google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo|null} [queryExpansionInfo] SearchResponse queryExpansionInfo + * @property {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null} [sessionInfo] SearchResponse sessionInfo */ /** @@ -29048,6 +33787,14 @@ */ SearchResponse.prototype.queryExpansionInfo = null; + /** + * SearchResponse sessionInfo. + * @member {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null|undefined} sessionInfo + * @memberof google.cloud.discoveryengine.v1.SearchResponse + * @instance + */ + SearchResponse.prototype.sessionInfo = null; + /** * Creates a new SearchResponse instance using the specified properties. * @function create @@ -29092,6 +33839,8 @@ writer.uint32(/* id 12, wireType 2 =*/98).string(message.redirectUri); if (message.queryExpansionInfo != null && Object.hasOwnProperty.call(message, "queryExpansionInfo")) $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.encode(message.queryExpansionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) + $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; @@ -29166,6 +33915,10 @@ message.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.decode(reader, reader.uint32()); break; } + case 19: { + message.sessionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29244,6 +33997,11 @@ if (error) return "queryExpansionInfo." + error; } + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { + var error = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify(message.sessionInfo); + if (error) + return "sessionInfo." + error; + } return null; }; @@ -29299,6 +34057,11 @@ throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.queryExpansionInfo: object expected"); message.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.fromObject(object.queryExpansionInfo); } + if (object.sessionInfo != null) { + if (typeof object.sessionInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.sessionInfo: object expected"); + message.sessionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.fromObject(object.sessionInfo); + } return message; }; @@ -29327,6 +34090,7 @@ object.summary = null; object.redirectUri = ""; object.queryExpansionInfo = null; + object.sessionInfo = null; } if (message.results && message.results.length) { object.results = []; @@ -29352,6 +34116,8 @@ object.redirectUri = message.redirectUri; if (message.queryExpansionInfo != null && message.hasOwnProperty("queryExpansionInfo")) object.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.toObject(message.queryExpansionInfo, options); + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) + object.sessionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.toObject(message.sessionInfo, options); return object; }; @@ -29389,6 +34155,7 @@ * @interface ISearchResult * @property {string|null} [id] SearchResult id * @property {google.cloud.discoveryengine.v1.IDocument|null} [document] SearchResult document + * @property {google.cloud.discoveryengine.v1.IChunk|null} [chunk] SearchResult chunk */ /** @@ -29422,6 +34189,14 @@ */ SearchResult.prototype.document = null; + /** + * SearchResult chunk. + * @member {google.cloud.discoveryengine.v1.IChunk|null|undefined} chunk + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SearchResult + * @instance + */ + SearchResult.prototype.chunk = null; + /** * Creates a new SearchResult instance using the specified properties. * @function create @@ -29450,6 +34225,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.discoveryengine.v1.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + $root.google.cloud.discoveryengine.v1.Chunk.encode(message.chunk, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -29492,6 +34269,10 @@ message.document = $root.google.cloud.discoveryengine.v1.Document.decode(reader, reader.uint32()); break; } + case 18: { + message.chunk = $root.google.cloud.discoveryengine.v1.Chunk.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29535,6 +34316,11 @@ if (error) return "document." + error; } + if (message.chunk != null && message.hasOwnProperty("chunk")) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.verify(message.chunk); + if (error) + return "chunk." + error; + } return null; }; @@ -29557,6 +34343,11 @@ throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.SearchResult.document: object expected"); message.document = $root.google.cloud.discoveryengine.v1.Document.fromObject(object.document); } + if (object.chunk != null) { + if (typeof object.chunk !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.SearchResult.chunk: object expected"); + message.chunk = $root.google.cloud.discoveryengine.v1.Chunk.fromObject(object.chunk); + } return message; }; @@ -29576,11 +34367,14 @@ if (options.defaults) { object.id = ""; object.document = null; + object.chunk = null; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.document != null && message.hasOwnProperty("document")) object.document = $root.google.cloud.discoveryengine.v1.Document.toObject(message.document, options); + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = $root.google.cloud.discoveryengine.v1.Chunk.toObject(message.chunk, options); return object; }; @@ -32596,6 +37390,233 @@ return QueryExpansionInfo; })(); + SearchResponse.SessionInfo = (function() { + + /** + * Properties of a SessionInfo. + * @memberof google.cloud.discoveryengine.v1.SearchResponse + * @interface ISessionInfo + * @property {string|null} [name] SessionInfo name + * @property {string|null} [queryId] SessionInfo queryId + */ + + /** + * Constructs a new SessionInfo. + * @memberof google.cloud.discoveryengine.v1.SearchResponse + * @classdesc Represents a SessionInfo. + * @implements ISessionInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo=} [properties] Properties to set + */ + function SessionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionInfo name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @instance + */ + SessionInfo.prototype.name = ""; + + /** + * SessionInfo queryId. + * @member {string} queryId + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @instance + */ + SessionInfo.prototype.queryId = ""; + + /** + * Creates a new SessionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} SessionInfo instance + */ + SessionInfo.create = function create(properties) { + return new SessionInfo(properties); + }; + + /** + * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo} message SessionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryId); + return writer; + }; + + /** + * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo} message SessionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} SessionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.queryId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} SessionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + return null; + }; + + /** + * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} SessionInfo + */ + SessionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.queryId != null) + message.queryId = String(object.queryId); + return message; + }; + + /** + * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} message SessionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.queryId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + return object; + }; + + /** + * Converts this SessionInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @instance + * @returns {Object.} JSON object + */ + SessionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.SessionInfo"; + }; + + return SessionInfo; + })(); + return SearchResponse; })(); @@ -35224,6 +40245,7 @@ * @property {google.cloud.discoveryengine.v1.AnswerQueryRequest.IQueryUnderstandingSpec|null} [queryUnderstandingSpec] AnswerQueryRequest queryUnderstandingSpec * @property {boolean|null} [asynchronousMode] AnswerQueryRequest asynchronousMode * @property {string|null} [userPseudoId] AnswerQueryRequest userPseudoId + * @property {Object.|null} [userLabels] AnswerQueryRequest userLabels */ /** @@ -35235,6 +40257,7 @@ * @param {google.cloud.discoveryengine.v1.IAnswerQueryRequest=} [properties] Properties to set */ function AnswerQueryRequest(properties) { + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35321,6 +40344,14 @@ */ AnswerQueryRequest.prototype.userPseudoId = ""; + /** + * AnswerQueryRequest userLabels. + * @member {Object.} userLabels + * @memberof google.cloud.discoveryengine.v1.AnswerQueryRequest + * @instance + */ + AnswerQueryRequest.prototype.userLabels = $util.emptyObject; + /** * Creates a new AnswerQueryRequest instance using the specified properties. * @function create @@ -35365,6 +40396,9 @@ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.asynchronousMode); if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.userPseudoId); + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); return writer; }; @@ -35395,7 +40429,7 @@ AnswerQueryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.AnswerQueryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.AnswerQueryRequest(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -35439,6 +40473,29 @@ message.userPseudoId = reader.string(); break; } + case 13: { + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.userLabels[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -35516,6 +40573,14 @@ if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) if (!$util.isString(message.userPseudoId)) return "userPseudoId: string expected"; + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } return null; }; @@ -35569,6 +40634,13 @@ message.asynchronousMode = Boolean(object.asynchronousMode); if (object.userPseudoId != null) message.userPseudoId = String(object.userPseudoId); + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.AnswerQueryRequest.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } return message; }; @@ -35585,6 +40657,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.userLabels = {}; if (options.defaults) { object.servingConfig = ""; object.query = null; @@ -35617,6 +40691,12 @@ object.asynchronousMode = message.asynchronousMode; if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) object.userPseudoId = message.userPseudoId; + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + } return object; }; @@ -37098,6 +42178,7 @@ * @property {string|null} [filter] SearchParams filter * @property {google.cloud.discoveryengine.v1.SearchRequest.IBoostSpec|null} [boostSpec] SearchParams boostSpec * @property {string|null} [orderBy] SearchParams orderBy + * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|null} [searchResultMode] SearchParams searchResultMode * @property {Array.|null} [dataStoreSpecs] SearchParams dataStoreSpecs */ @@ -37149,6 +42230,14 @@ */ SearchParams.prototype.orderBy = ""; + /** + * SearchParams searchResultMode. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode} searchResultMode + * @memberof google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParams + * @instance + */ + SearchParams.prototype.searchResultMode = 0; + /** * SearchParams dataStoreSpecs. * @member {Array.} dataStoreSpecs @@ -37189,6 +42278,8 @@ $root.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.encode(message.boostSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.searchResultMode != null && Object.hasOwnProperty.call(message, "searchResultMode")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.searchResultMode); if (message.dataStoreSpecs != null && message.dataStoreSpecs.length) for (var i = 0; i < message.dataStoreSpecs.length; ++i) $root.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.encode(message.dataStoreSpecs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); @@ -37242,6 +42333,10 @@ message.orderBy = reader.string(); break; } + case 5: { + message.searchResultMode = reader.int32(); + break; + } case 7: { if (!(message.dataStoreSpecs && message.dataStoreSpecs.length)) message.dataStoreSpecs = []; @@ -37297,6 +42392,15 @@ if (message.orderBy != null && message.hasOwnProperty("orderBy")) if (!$util.isString(message.orderBy)) return "orderBy: string expected"; + if (message.searchResultMode != null && message.hasOwnProperty("searchResultMode")) + switch (message.searchResultMode) { + default: + return "searchResultMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.dataStoreSpecs != null && message.hasOwnProperty("dataStoreSpecs")) { if (!Array.isArray(message.dataStoreSpecs)) return "dataStoreSpecs: array expected"; @@ -37332,6 +42436,26 @@ } if (object.orderBy != null) message.orderBy = String(object.orderBy); + switch (object.searchResultMode) { + default: + if (typeof object.searchResultMode === "number") { + message.searchResultMode = object.searchResultMode; + break; + } + break; + case "SEARCH_RESULT_MODE_UNSPECIFIED": + case 0: + message.searchResultMode = 0; + break; + case "DOCUMENTS": + case 1: + message.searchResultMode = 1; + break; + case "CHUNKS": + case 2: + message.searchResultMode = 2; + break; + } if (object.dataStoreSpecs) { if (!Array.isArray(object.dataStoreSpecs)) throw TypeError(".google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParams.dataStoreSpecs: array expected"); @@ -37365,6 +42489,7 @@ object.filter = ""; object.boostSpec = null; object.orderBy = ""; + object.searchResultMode = options.enums === String ? "SEARCH_RESULT_MODE_UNSPECIFIED" : 0; } if (message.maxReturnResults != null && message.hasOwnProperty("maxReturnResults")) object.maxReturnResults = message.maxReturnResults; @@ -37374,6 +42499,8 @@ object.boostSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.toObject(message.boostSpec, options); if (message.orderBy != null && message.hasOwnProperty("orderBy")) object.orderBy = message.orderBy; + if (message.searchResultMode != null && message.hasOwnProperty("searchResultMode")) + object.searchResultMode = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode[message.searchResultMode] === undefined ? message.searchResultMode : $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode[message.searchResultMode] : message.searchResultMode; if (message.dataStoreSpecs && message.dataStoreSpecs.length) { object.dataStoreSpecs = []; for (var j = 0; j < message.dataStoreSpecs.length; ++j) @@ -39700,6 +44827,7 @@ * @memberof google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec * @interface IQueryRephraserSpec * @property {boolean|null} [disable] QueryRephraserSpec disable + * @property {number|null} [maxRephraseSteps] QueryRephraserSpec maxRephraseSteps */ /** @@ -39725,6 +44853,14 @@ */ QueryRephraserSpec.prototype.disable = false; + /** + * QueryRephraserSpec maxRephraseSteps. + * @member {number} maxRephraseSteps + * @memberof google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec + * @instance + */ + QueryRephraserSpec.prototype.maxRephraseSteps = 0; + /** * Creates a new QueryRephraserSpec instance using the specified properties. * @function create @@ -39751,6 +44887,8 @@ writer = $Writer.create(); if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disable); + if (message.maxRephraseSteps != null && Object.hasOwnProperty.call(message, "maxRephraseSteps")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxRephraseSteps); return writer; }; @@ -39789,6 +44927,10 @@ message.disable = reader.bool(); break; } + case 2: { + message.maxRephraseSteps = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -39827,6 +44969,9 @@ if (message.disable != null && message.hasOwnProperty("disable")) if (typeof message.disable !== "boolean") return "disable: boolean expected"; + if (message.maxRephraseSteps != null && message.hasOwnProperty("maxRephraseSteps")) + if (!$util.isInteger(message.maxRephraseSteps)) + return "maxRephraseSteps: integer expected"; return null; }; @@ -39844,6 +44989,8 @@ var message = new $root.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec(); if (object.disable != null) message.disable = Boolean(object.disable); + if (object.maxRephraseSteps != null) + message.maxRephraseSteps = object.maxRephraseSteps | 0; return message; }; @@ -39860,10 +45007,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.disable = false; + object.maxRephraseSteps = 0; + } if (message.disable != null && message.hasOwnProperty("disable")) object.disable = message.disable; + if (message.maxRephraseSteps != null && message.hasOwnProperty("maxRephraseSteps")) + object.maxRephraseSteps = message.maxRephraseSteps; return object; }; @@ -43190,6 +48341,7 @@ * @memberof google.cloud.discoveryengine.v1 * @interface IDocumentProcessingConfig * @property {string|null} [name] DocumentProcessingConfig name + * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig|null} [chunkingConfig] DocumentProcessingConfig chunkingConfig * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null} [defaultParsingConfig] DocumentProcessingConfig defaultParsingConfig * @property {Object.|null} [parsingConfigOverrides] DocumentProcessingConfig parsingConfigOverrides */ @@ -43218,6 +48370,14 @@ */ DocumentProcessingConfig.prototype.name = ""; + /** + * DocumentProcessingConfig chunkingConfig. + * @member {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig|null|undefined} chunkingConfig + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @instance + */ + DocumentProcessingConfig.prototype.chunkingConfig = null; + /** * DocumentProcessingConfig defaultParsingConfig. * @member {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null|undefined} defaultParsingConfig @@ -43260,6 +48420,8 @@ writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.chunkingConfig != null && Object.hasOwnProperty.call(message, "chunkingConfig")) + $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.encode(message.chunkingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.defaultParsingConfig != null && Object.hasOwnProperty.call(message, "defaultParsingConfig")) $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.encode(message.defaultParsingConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.parsingConfigOverrides != null && Object.hasOwnProperty.call(message, "parsingConfigOverrides")) @@ -43270,213 +48432,684 @@ return writer; }; - /** - * Encodes the specified DocumentProcessingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {google.cloud.discoveryengine.v1.IDocumentProcessingConfig} message DocumentProcessingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentProcessingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DocumentProcessingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {google.cloud.discoveryengine.v1.IDocumentProcessingConfig} message DocumentProcessingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentProcessingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentProcessingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentProcessingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.chunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.parsingConfigOverrides === $util.emptyObject) + message.parsingConfigOverrides = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parsingConfigOverrides[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentProcessingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentProcessingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentProcessingConfig message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentProcessingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.chunkingConfig != null && message.hasOwnProperty("chunkingConfig")) { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify(message.chunkingConfig); + if (error) + return "chunkingConfig." + error; + } + if (message.defaultParsingConfig != null && message.hasOwnProperty("defaultParsingConfig")) { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.verify(message.defaultParsingConfig); + if (error) + return "defaultParsingConfig." + error; + } + if (message.parsingConfigOverrides != null && message.hasOwnProperty("parsingConfigOverrides")) { + if (!$util.isObject(message.parsingConfigOverrides)) + return "parsingConfigOverrides: object expected"; + var key = Object.keys(message.parsingConfigOverrides); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.verify(message.parsingConfigOverrides[key[i]]); + if (error) + return "parsingConfigOverrides." + error; + } + } + return null; + }; + + /** + * Creates a DocumentProcessingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig + */ + DocumentProcessingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig) + return object; + var message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.chunkingConfig != null) { + if (typeof object.chunkingConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.chunkingConfig: object expected"); + message.chunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.fromObject(object.chunkingConfig); + } + if (object.defaultParsingConfig != null) { + if (typeof object.defaultParsingConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.defaultParsingConfig: object expected"); + message.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.fromObject(object.defaultParsingConfig); + } + if (object.parsingConfigOverrides) { + if (typeof object.parsingConfigOverrides !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.parsingConfigOverrides: object expected"); + message.parsingConfigOverrides = {}; + for (var keys = Object.keys(object.parsingConfigOverrides), i = 0; i < keys.length; ++i) { + if (typeof object.parsingConfigOverrides[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.parsingConfigOverrides: object expected"); + message.parsingConfigOverrides[keys[i]] = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.fromObject(object.parsingConfigOverrides[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a DocumentProcessingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig} message DocumentProcessingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentProcessingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parsingConfigOverrides = {}; + if (options.defaults) { + object.name = ""; + object.chunkingConfig = null; + object.defaultParsingConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.chunkingConfig != null && message.hasOwnProperty("chunkingConfig")) + object.chunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.toObject(message.chunkingConfig, options); + if (message.defaultParsingConfig != null && message.hasOwnProperty("defaultParsingConfig")) + object.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.toObject(message.defaultParsingConfig, options); + var keys2; + if (message.parsingConfigOverrides && (keys2 = Object.keys(message.parsingConfigOverrides)).length) { + object.parsingConfigOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.parsingConfigOverrides[keys2[j]] = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.toObject(message.parsingConfigOverrides[keys2[j]], options); + } + return object; + }; + + /** + * Converts this DocumentProcessingConfig to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @instance + * @returns {Object.} JSON object + */ + DocumentProcessingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentProcessingConfig + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentProcessingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig"; + }; + + DocumentProcessingConfig.ChunkingConfig = (function() { + + /** + * Properties of a ChunkingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @interface IChunkingConfig + * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig|null} [layoutBasedChunkingConfig] ChunkingConfig layoutBasedChunkingConfig + */ + + /** + * Constructs a new ChunkingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @classdesc Represents a ChunkingConfig. + * @implements IChunkingConfig + * @constructor + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig=} [properties] Properties to set + */ + function ChunkingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChunkingConfig layoutBasedChunkingConfig. + * @member {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig|null|undefined} layoutBasedChunkingConfig + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @instance + */ + ChunkingConfig.prototype.layoutBasedChunkingConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChunkingConfig chunkMode. + * @member {"layoutBasedChunkingConfig"|undefined} chunkMode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @instance + */ + Object.defineProperty(ChunkingConfig.prototype, "chunkMode", { + get: $util.oneOfGetter($oneOfFields = ["layoutBasedChunkingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChunkingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} ChunkingConfig instance + */ + ChunkingConfig.create = function create(properties) { + return new ChunkingConfig(properties); + }; + + /** + * Encodes the specified ChunkingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig} message ChunkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.layoutBasedChunkingConfig != null && Object.hasOwnProperty.call(message, "layoutBasedChunkingConfig")) + $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.encode(message.layoutBasedChunkingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChunkingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig} message ChunkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChunkingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} ChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.layoutBasedChunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChunkingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} ChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChunkingConfig message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChunkingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.layoutBasedChunkingConfig != null && message.hasOwnProperty("layoutBasedChunkingConfig")) { + properties.chunkMode = 1; + { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify(message.layoutBasedChunkingConfig); + if (error) + return "layoutBasedChunkingConfig." + error; + } + } + return null; + }; + + /** + * Creates a ChunkingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} ChunkingConfig + */ + ChunkingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig) + return object; + var message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig(); + if (object.layoutBasedChunkingConfig != null) { + if (typeof object.layoutBasedChunkingConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.layoutBasedChunkingConfig: object expected"); + message.layoutBasedChunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.fromObject(object.layoutBasedChunkingConfig); + } + return message; + }; + + /** + * Creates a plain object from a ChunkingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} message ChunkingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChunkingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.layoutBasedChunkingConfig != null && message.hasOwnProperty("layoutBasedChunkingConfig")) { + object.layoutBasedChunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.toObject(message.layoutBasedChunkingConfig, options); + if (options.oneofs) + object.chunkMode = "layoutBasedChunkingConfig"; + } + return object; + }; + + /** + * Converts this ChunkingConfig to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @instance + * @returns {Object.} JSON object + */ + ChunkingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChunkingConfig + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChunkingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig"; + }; + + ChunkingConfig.LayoutBasedChunkingConfig = (function() { + + /** + * Properties of a LayoutBasedChunkingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @interface ILayoutBasedChunkingConfig + * @property {number|null} [chunkSize] LayoutBasedChunkingConfig chunkSize + * @property {boolean|null} [includeAncestorHeadings] LayoutBasedChunkingConfig includeAncestorHeadings + */ + + /** + * Constructs a new LayoutBasedChunkingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @classdesc Represents a LayoutBasedChunkingConfig. + * @implements ILayoutBasedChunkingConfig + * @constructor + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig=} [properties] Properties to set + */ + function LayoutBasedChunkingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LayoutBasedChunkingConfig chunkSize. + * @member {number} chunkSize + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @instance + */ + LayoutBasedChunkingConfig.prototype.chunkSize = 0; + + /** + * LayoutBasedChunkingConfig includeAncestorHeadings. + * @member {boolean} includeAncestorHeadings + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @instance + */ + LayoutBasedChunkingConfig.prototype.includeAncestorHeadings = false; + + /** + * Creates a new LayoutBasedChunkingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} LayoutBasedChunkingConfig instance + */ + LayoutBasedChunkingConfig.create = function create(properties) { + return new LayoutBasedChunkingConfig(properties); + }; + + /** + * Encodes the specified LayoutBasedChunkingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig} message LayoutBasedChunkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutBasedChunkingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chunkSize != null && Object.hasOwnProperty.call(message, "chunkSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chunkSize); + if (message.includeAncestorHeadings != null && Object.hasOwnProperty.call(message, "includeAncestorHeadings")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeAncestorHeadings); + return writer; + }; + + /** + * Encodes the specified LayoutBasedChunkingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig} message LayoutBasedChunkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutBasedChunkingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DocumentProcessingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentProcessingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 4: { - message.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - if (message.parsingConfigOverrides === $util.emptyObject) - message.parsingConfigOverrides = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.decode(reader, reader.uint32()); + /** + * Decodes a LayoutBasedChunkingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} LayoutBasedChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutBasedChunkingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.chunkSize = reader.int32(); break; - default: - reader.skipType(tag2 & 7); + } + case 2: { + message.includeAncestorHeadings = reader.bool(); break; } + default: + reader.skipType(tag & 7); + break; } - message.parsingConfigOverrides[key] = value; - break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a DocumentProcessingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentProcessingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LayoutBasedChunkingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} LayoutBasedChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutBasedChunkingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a DocumentProcessingConfig message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DocumentProcessingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.defaultParsingConfig != null && message.hasOwnProperty("defaultParsingConfig")) { - var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.verify(message.defaultParsingConfig); - if (error) - return "defaultParsingConfig." + error; - } - if (message.parsingConfigOverrides != null && message.hasOwnProperty("parsingConfigOverrides")) { - if (!$util.isObject(message.parsingConfigOverrides)) - return "parsingConfigOverrides: object expected"; - var key = Object.keys(message.parsingConfigOverrides); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.verify(message.parsingConfigOverrides[key[i]]); - if (error) - return "parsingConfigOverrides." + error; - } - } - return null; - }; + /** + * Verifies a LayoutBasedChunkingConfig message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LayoutBasedChunkingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunkSize != null && message.hasOwnProperty("chunkSize")) + if (!$util.isInteger(message.chunkSize)) + return "chunkSize: integer expected"; + if (message.includeAncestorHeadings != null && message.hasOwnProperty("includeAncestorHeadings")) + if (typeof message.includeAncestorHeadings !== "boolean") + return "includeAncestorHeadings: boolean expected"; + return null; + }; - /** - * Creates a DocumentProcessingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig - */ - DocumentProcessingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig) - return object; - var message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.defaultParsingConfig != null) { - if (typeof object.defaultParsingConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.defaultParsingConfig: object expected"); - message.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.fromObject(object.defaultParsingConfig); - } - if (object.parsingConfigOverrides) { - if (typeof object.parsingConfigOverrides !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.parsingConfigOverrides: object expected"); - message.parsingConfigOverrides = {}; - for (var keys = Object.keys(object.parsingConfigOverrides), i = 0; i < keys.length; ++i) { - if (typeof object.parsingConfigOverrides[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.parsingConfigOverrides: object expected"); - message.parsingConfigOverrides[keys[i]] = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.fromObject(object.parsingConfigOverrides[keys[i]]); - } - } - return message; - }; + /** + * Creates a LayoutBasedChunkingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} LayoutBasedChunkingConfig + */ + LayoutBasedChunkingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig) + return object; + var message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig(); + if (object.chunkSize != null) + message.chunkSize = object.chunkSize | 0; + if (object.includeAncestorHeadings != null) + message.includeAncestorHeadings = Boolean(object.includeAncestorHeadings); + return message; + }; - /** - * Creates a plain object from a DocumentProcessingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig} message DocumentProcessingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DocumentProcessingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.parsingConfigOverrides = {}; - if (options.defaults) { - object.name = ""; - object.defaultParsingConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.defaultParsingConfig != null && message.hasOwnProperty("defaultParsingConfig")) - object.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.toObject(message.defaultParsingConfig, options); - var keys2; - if (message.parsingConfigOverrides && (keys2 = Object.keys(message.parsingConfigOverrides)).length) { - object.parsingConfigOverrides = {}; - for (var j = 0; j < keys2.length; ++j) - object.parsingConfigOverrides[keys2[j]] = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.toObject(message.parsingConfigOverrides[keys2[j]], options); - } - return object; - }; + /** + * Creates a plain object from a LayoutBasedChunkingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} message LayoutBasedChunkingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LayoutBasedChunkingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.chunkSize = 0; + object.includeAncestorHeadings = false; + } + if (message.chunkSize != null && message.hasOwnProperty("chunkSize")) + object.chunkSize = message.chunkSize; + if (message.includeAncestorHeadings != null && message.hasOwnProperty("includeAncestorHeadings")) + object.includeAncestorHeadings = message.includeAncestorHeadings; + return object; + }; - /** - * Converts this DocumentProcessingConfig to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @instance - * @returns {Object.} JSON object - */ - DocumentProcessingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this LayoutBasedChunkingConfig to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @instance + * @returns {Object.} JSON object + */ + LayoutBasedChunkingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for DocumentProcessingConfig - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DocumentProcessingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig"; - }; + /** + * Gets the default type url for LayoutBasedChunkingConfig + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LayoutBasedChunkingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig"; + }; + + return LayoutBasedChunkingConfig; + })(); + + return ChunkingConfig; + })(); DocumentProcessingConfig.ParsingConfig = (function() { @@ -43486,6 +49119,7 @@ * @interface IParsingConfig * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.IDigitalParsingConfig|null} [digitalParsingConfig] ParsingConfig digitalParsingConfig * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.IOcrParsingConfig|null} [ocrParsingConfig] ParsingConfig ocrParsingConfig + * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig|null} [layoutParsingConfig] ParsingConfig layoutParsingConfig */ /** @@ -43519,17 +49153,25 @@ */ ParsingConfig.prototype.ocrParsingConfig = null; + /** + * ParsingConfig layoutParsingConfig. + * @member {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig|null|undefined} layoutParsingConfig + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig + * @instance + */ + ParsingConfig.prototype.layoutParsingConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * ParsingConfig typeDedicatedConfig. - * @member {"digitalParsingConfig"|"ocrParsingConfig"|undefined} typeDedicatedConfig + * @member {"digitalParsingConfig"|"ocrParsingConfig"|"layoutParsingConfig"|undefined} typeDedicatedConfig * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig * @instance */ Object.defineProperty(ParsingConfig.prototype, "typeDedicatedConfig", { - get: $util.oneOfGetter($oneOfFields = ["digitalParsingConfig", "ocrParsingConfig"]), + get: $util.oneOfGetter($oneOfFields = ["digitalParsingConfig", "ocrParsingConfig", "layoutParsingConfig"]), set: $util.oneOfSetter($oneOfFields) }); @@ -43561,6 +49203,8 @@ $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.DigitalParsingConfig.encode(message.digitalParsingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.ocrParsingConfig != null && Object.hasOwnProperty.call(message, "ocrParsingConfig")) $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig.encode(message.ocrParsingConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.layoutParsingConfig != null && Object.hasOwnProperty.call(message, "layoutParsingConfig")) + $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.encode(message.layoutParsingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -43603,6 +49247,10 @@ message.ocrParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig.decode(reader, reader.uint32()); break; } + case 3: { + message.layoutParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -43657,6 +49305,16 @@ return "ocrParsingConfig." + error; } } + if (message.layoutParsingConfig != null && message.hasOwnProperty("layoutParsingConfig")) { + if (properties.typeDedicatedConfig === 1) + return "typeDedicatedConfig: multiple values"; + properties.typeDedicatedConfig = 1; + { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify(message.layoutParsingConfig); + if (error) + return "layoutParsingConfig." + error; + } + } return null; }; @@ -43682,6 +49340,11 @@ throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ocrParsingConfig: object expected"); message.ocrParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig.fromObject(object.ocrParsingConfig); } + if (object.layoutParsingConfig != null) { + if (typeof object.layoutParsingConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.layoutParsingConfig: object expected"); + message.layoutParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.fromObject(object.layoutParsingConfig); + } return message; }; @@ -43708,6 +49371,11 @@ if (options.oneofs) object.typeDedicatedConfig = "ocrParsingConfig"; } + if (message.layoutParsingConfig != null && message.hasOwnProperty("layoutParsingConfig")) { + object.layoutParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.toObject(message.layoutParsingConfig, options); + if (options.oneofs) + object.typeDedicatedConfig = "layoutParsingConfig"; + } return object; }; @@ -44155,6 +49823,181 @@ return OcrParsingConfig; })(); + ParsingConfig.LayoutParsingConfig = (function() { + + /** + * Properties of a LayoutParsingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig + * @interface ILayoutParsingConfig + */ + + /** + * Constructs a new LayoutParsingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig + * @classdesc Represents a LayoutParsingConfig. + * @implements ILayoutParsingConfig + * @constructor + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig=} [properties] Properties to set + */ + function LayoutParsingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new LayoutParsingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} LayoutParsingConfig instance + */ + LayoutParsingConfig.create = function create(properties) { + return new LayoutParsingConfig(properties); + }; + + /** + * Encodes the specified LayoutParsingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig} message LayoutParsingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutParsingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified LayoutParsingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig} message LayoutParsingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutParsingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LayoutParsingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} LayoutParsingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutParsingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LayoutParsingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} LayoutParsingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutParsingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LayoutParsingConfig message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LayoutParsingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a LayoutParsingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} LayoutParsingConfig + */ + LayoutParsingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig) + return object; + return new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig(); + }; + + /** + * Creates a plain object from a LayoutParsingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} message LayoutParsingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LayoutParsingConfig.toObject = function toObject() { + return {}; + }; + + /** + * Converts this LayoutParsingConfig to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @instance + * @returns {Object.} JSON object + */ + LayoutParsingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LayoutParsingConfig + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LayoutParsingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig"; + }; + + return LayoutParsingConfig; + })(); + return ParsingConfig; })(); diff --git a/packages/google-cloud-discoveryengine/protos/protos.json b/packages/google-cloud-discoveryengine/protos/protos.json index d9ef2d2619a..e7d2421d50c 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.json +++ b/packages/google-cloud-discoveryengine/protos/protos.json @@ -16,8 +16,8 @@ "objc_class_prefix": "DISCOVERYENGINE", "php_namespace": "Google\\Cloud\\DiscoveryEngine\\V1", "ruby_package": "Google::Cloud::DiscoveryEngine::V1", - "(google.api.resource_definition).type": "discoveryengine.googleapis.com/Chunk", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" + "(google.api.resource_definition).type": "healthcare.googleapis.com/FhirStore", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}" }, "nested": { "Answer": { @@ -317,6 +317,10 @@ "rule": "repeated", "type": "ChunkInfo", "id": 5 + }, + "structData": { + "type": "google.protobuf.Struct", + "id": 6 } }, "nested": { @@ -420,7 +424,109 @@ "ADVERSARIAL_QUERY_IGNORED": 1, "NON_ANSWER_SEEKING_QUERY_IGNORED": 2, "OUT_OF_DOMAIN_QUERY_IGNORED": 3, - "POTENTIAL_POLICY_VIOLATION": 4 + "POTENTIAL_POLICY_VIOLATION": 4, + "NO_RELEVANT_CONTENT": 5 + } + } + } + }, + "Chunk": { + "options": { + "(google.api.resource).type": "discoveryengine.googleapis.com/Chunk", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" + }, + "oneofs": { + "_relevanceScore": { + "oneof": [ + "relevanceScore" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "id": { + "type": "string", + "id": 2 + }, + "content": { + "type": "string", + "id": 3 + }, + "relevanceScore": { + "type": "double", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "documentMetadata": { + "type": "DocumentMetadata", + "id": 5 + }, + "derivedStructData": { + "type": "google.protobuf.Struct", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pageSpan": { + "type": "PageSpan", + "id": 6 + }, + "chunkMetadata": { + "type": "ChunkMetadata", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "DocumentMetadata": { + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "structData": { + "type": "google.protobuf.Struct", + "id": 3 + } + } + }, + "PageSpan": { + "fields": { + "pageStart": { + "type": "int32", + "id": 1 + }, + "pageEnd": { + "type": "int32", + "id": 2 + } + } + }, + "ChunkMetadata": { + "fields": { + "previousChunks": { + "rule": "repeated", + "type": "Chunk", + "id": 1 + }, + "nextChunks": { + "rule": "repeated", + "type": "Chunk", + "id": 2 + } } } } @@ -549,6 +655,50 @@ } } }, + "CompletionSuggestion": { + "oneofs": { + "rankingInfo": { + "oneof": [ + "globalScore", + "frequency" + ] + } + }, + "fields": { + "globalScore": { + "type": "double", + "id": 2 + }, + "frequency": { + "type": "int64", + "id": 3 + }, + "suggestion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 4 + }, + "groupId": { + "type": "string", + "id": 5 + }, + "groupScore": { + "type": "double", + "id": 6 + }, + "alternativePhrases": { + "rule": "repeated", + "type": "string", + "id": 7 + } + } + }, "CompletionService": { "options": { "(google.api.default_host)": "discoveryengine.googleapis.com", @@ -632,6 +782,66 @@ } } ] + }, + "ImportCompletionSuggestions": { + "requestType": "ImportCompletionSuggestionsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:import", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:import", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:import", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:import", + "body": "*" + } + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse", + "metadata_type": "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata" + } + } + ] + }, + "PurgeCompletionSuggestions": { + "requestType": "PurgeCompletionSuggestionsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:purge", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:purge", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:purge", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:purge", + "body": "*" + } + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse", + "metadata_type": "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata" + } + } + ] } } }, @@ -944,6 +1154,46 @@ } } }, + "AlloyDbSource": { + "fields": { + "projectId": { + "type": "string", + "id": 1 + }, + "locationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "databaseId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tableId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gcsStagingDir": { + "type": "string", + "id": 6 + } + } + }, "FirestoreSource": { "fields": { "projectId": { @@ -1112,6 +1362,7 @@ "spannerSource", "cloudSqlSource", "firestoreSource", + "alloyDbSource", "bigtableSource" ] } @@ -1145,6 +1396,10 @@ "type": "FirestoreSource", "id": 13 }, + "alloyDbSource": { + "type": "AlloyDbSource", + "id": 14 + }, "bigtableSource": { "type": "BigtableSource", "id": 15 @@ -1284,6 +1539,90 @@ } } }, + "ImportCompletionSuggestionsRequest": { + "oneofs": { + "source": { + "oneof": [ + "inlineSource", + "gcsSource", + "bigquerySource" + ] + } + }, + "fields": { + "inlineSource": { + "type": "InlineSource", + "id": 2 + }, + "gcsSource": { + "type": "GcsSource", + "id": 3 + }, + "bigquerySource": { + "type": "BigQuerySource", + "id": 4 + }, + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + }, + "errorConfig": { + "type": "ImportErrorConfig", + "id": 5 + } + }, + "nested": { + "InlineSource": { + "fields": { + "suggestions": { + "rule": "repeated", + "type": "CompletionSuggestion", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ImportCompletionSuggestionsResponse": { + "fields": { + "errorSamples": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 1 + }, + "errorConfig": { + "type": "ImportErrorConfig", + "id": 2 + } + } + }, + "ImportCompletionSuggestionsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "successCount": { + "type": "int64", + "id": 3 + }, + "failureCount": { + "type": "int64", + "id": 4 + } + } + }, "Document": { "options": { "(google.api.resource).type": "discoveryengine.googleapis.com/Document", @@ -1806,6 +2145,43 @@ } } }, + "PurgeCompletionSuggestionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + } + } + }, + "PurgeCompletionSuggestionsResponse": { + "fields": { + "purgeSucceeded": { + "type": "bool", + "id": 1 + }, + "errorSamples": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 2 + } + } + }, + "PurgeCompletionSuggestionsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, "Condition": { "fields": { "queryTerms": { @@ -2458,6 +2834,10 @@ "type": "UserInfo", "id": 21 }, + "languageCode": { + "type": "string", + "id": 35 + }, "facetSpecs": { "rule": "repeated", "type": "FacetSpec", @@ -2496,6 +2876,21 @@ "keyType": "string", "type": "string", "id": 22 + }, + "searchAsYouTypeSpec": { + "type": "SearchAsYouTypeSpec", + "id": 31 + }, + "session": { + "type": "string", + "id": 41, + "options": { + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/Session" + } + }, + "sessionSpec": { + "type": "SessionSpec", + "id": 42 } }, "nested": { @@ -2665,6 +3060,14 @@ "extractiveContentSpec": { "type": "ExtractiveContentSpec", "id": 3 + }, + "searchResultMode": { + "type": "SearchResultMode", + "id": 4 + }, + "chunkSpec": { + "type": "ChunkSpec", + "id": 5 } }, "nested": { @@ -2767,6 +3170,64 @@ "id": 5 } } + }, + "ChunkSpec": { + "fields": { + "numPreviousChunks": { + "type": "int32", + "id": 1 + }, + "numNextChunks": { + "type": "int32", + "id": 2 + } + } + }, + "SearchResultMode": { + "values": { + "SEARCH_RESULT_MODE_UNSPECIFIED": 0, + "DOCUMENTS": 1, + "CHUNKS": 2 + } + } + } + }, + "SearchAsYouTypeSpec": { + "fields": { + "condition": { + "type": "Condition", + "id": 1 + } + }, + "nested": { + "Condition": { + "values": { + "CONDITION_UNSPECIFIED": 0, + "DISABLED": 1, + "ENABLED": 2 + } + } + } + }, + "SessionSpec": { + "oneofs": { + "_searchResultPersistenceCount": { + "oneof": [ + "searchResultPersistenceCount" + ] + } + }, + "fields": { + "queryId": { + "type": "string", + "id": 1 + }, + "searchResultPersistenceCount": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } } } } @@ -2811,6 +3272,10 @@ "queryExpansionInfo": { "type": "QueryExpansionInfo", "id": 14 + }, + "sessionInfo": { + "type": "SessionInfo", + "id": 19 } }, "nested": { @@ -2823,6 +3288,10 @@ "document": { "type": "Document", "id": 2 + }, + "chunk": { + "type": "Chunk", + "id": 18 } } }, @@ -3017,6 +3486,18 @@ "id": 2 } } + }, + "SessionInfo": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "queryId": { + "type": "string", + "id": 2 + } + } } } }, @@ -3623,6 +4104,11 @@ "userPseudoId": { "type": "string", "id": 12 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 13 } }, "nested": { @@ -3740,6 +4226,10 @@ "type": "string", "id": 4 }, + "searchResultMode": { + "type": "SearchRequest.ContentSearchSpec.SearchResultMode", + "id": 5 + }, "dataStoreSpecs": { "rule": "repeated", "type": "SearchRequest.DataStoreSpec", @@ -3904,6 +4394,10 @@ "disable": { "type": "bool", "id": 1 + }, + "maxRephraseSteps": { + "type": "int32", + "id": 2 } } } @@ -4205,6 +4699,10 @@ "type": "string", "id": 1 }, + "chunkingConfig": { + "type": "ChunkingConfig", + "id": 3 + }, "defaultParsingConfig": { "type": "ParsingConfig", "id": 4 @@ -4216,12 +4714,42 @@ } }, "nested": { + "ChunkingConfig": { + "oneofs": { + "chunkMode": { + "oneof": [ + "layoutBasedChunkingConfig" + ] + } + }, + "fields": { + "layoutBasedChunkingConfig": { + "type": "LayoutBasedChunkingConfig", + "id": 1 + } + }, + "nested": { + "LayoutBasedChunkingConfig": { + "fields": { + "chunkSize": { + "type": "int32", + "id": 1 + }, + "includeAncestorHeadings": { + "type": "bool", + "id": 2 + } + } + } + } + }, "ParsingConfig": { "oneofs": { "typeDedicatedConfig": { "oneof": [ "digitalParsingConfig", - "ocrParsingConfig" + "ocrParsingConfig", + "layoutParsingConfig" ] } }, @@ -4233,6 +4761,10 @@ "ocrParsingConfig": { "type": "OcrParsingConfig", "id": 2 + }, + "layoutParsingConfig": { + "type": "LayoutParsingConfig", + "id": 3 } }, "nested": { @@ -4254,6 +4786,9 @@ "id": 2 } } + }, + "LayoutParsingConfig": { + "fields": {} } } } @@ -6996,15 +7531,20 @@ "responseType": "google.api.HttpBody", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/userEvents:collect" }, "parsedOptions": [ { "(google.api.http)": { "get": "/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", - "additional_bindings": { - "get": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" - } + "additional_bindings": [ + { + "get": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + }, + { + "get": "/v1/{parent=projects/*/locations/*}/userEvents:collect" + } + ] } } ] diff --git a/packages/google-cloud-discoveryengine/samples/README.md b/packages/google-cloud-discoveryengine/samples/README.md index 49ead2abaaf..e1216d96c31 100644 --- a/packages/google-cloud-discoveryengine/samples/README.md +++ b/packages/google-cloud-discoveryengine/samples/README.md @@ -13,7 +13,9 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) * [Completion_service.complete_query](#completion_service.complete_query) + * [Completion_service.import_completion_suggestions](#completion_service.import_completion_suggestions) * [Completion_service.import_suggestion_deny_list_entries](#completion_service.import_suggestion_deny_list_entries) + * [Completion_service.purge_completion_suggestions](#completion_service.purge_completion_suggestions) * [Completion_service.purge_suggestion_deny_list_entries](#completion_service.purge_suggestion_deny_list_entries) * [Control_service.create_control](#control_service.create_control) * [Control_service.delete_control](#control_service.delete_control) @@ -262,6 +264,23 @@ __Usage:__ +### Completion_service.import_completion_suggestions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js` + + +----- + + + + ### Completion_service.import_suggestion_deny_list_entries View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js). @@ -279,6 +298,23 @@ __Usage:__ +### Completion_service.purge_completion_suggestions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js` + + +----- + + + + ### Completion_service.purge_suggestion_deny_list_entries View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js). diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js b/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js new file mode 100644 index 00000000000..2eff78fc6ad --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The Inline source for suggestion entries. + */ + // const inlineSource = {} + /** + * Cloud Storage location for the input content. + */ + // const gcsSource = {} + /** + * BigQuery input source. + */ + // const bigquerySource = {} + /** + * Required. The parent data store resource name for which to import customer + * autocomplete suggestions. + * Follows pattern `projects/* /locations/* /collections/* /dataStores/*` + */ + // const parent = 'abc123' + /** + * The desired location of errors incurred during the Import. + */ + // const errorConfig = {} + + // Imports the Discoveryengine library + const {CompletionServiceClient} = require('@google-cloud/discoveryengine').v1; + + // Instantiates a client + const discoveryengineClient = new CompletionServiceClient(); + + async function callImportCompletionSuggestions() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await discoveryengineClient.importCompletionSuggestions(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportCompletionSuggestions(); + // [END discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js b/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js new file mode 100644 index 00000000000..ceda06f3d13 --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent data store resource name for which to purge completion + * suggestions. Follows pattern + * projects/* /locations/* /collections/* /dataStores/*. + */ + // const parent = 'abc123' + + // Imports the Discoveryengine library + const {CompletionServiceClient} = require('@google-cloud/discoveryengine').v1; + + // Instantiates a client + const discoveryengineClient = new CompletionServiceClient(); + + async function callPurgeCompletionSuggestions() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await discoveryengineClient.purgeCompletionSuggestions(request); + const [response] = await operation.promise(); + console.log(response); + } + + callPurgeCompletionSuggestions(); + // [END discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.answer_query.js b/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.answer_query.js index 0d11e2895af..8e012f51964 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.answer_query.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.answer_query.js @@ -89,6 +89,24 @@ function main(servingConfig, query) { * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. */ // const userPseudoId = 'abc123' + /** + * 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. + */ + // const userLabels = [1,2,3,4] // Imports the Discoveryengine library const {ConversationalSearchServiceClient} = require('@google-cloud/discoveryengine').v1; diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/document_service.import_documents.js b/packages/google-cloud-discoveryengine/samples/generated/v1/document_service.import_documents.js index 64da7e2fb30..147af563360 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/document_service.import_documents.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/document_service.import_documents.js @@ -56,6 +56,10 @@ function main(parent) { * Firestore input source. */ // const firestoreSource = {} + /** + * AlloyDB input source. + */ + // const alloyDbSource = {} /** * Cloud Bigtable input source. */ diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search.js b/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search.js index 9d6c8cc744e..aca8ca4fd3f 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search.js @@ -134,6 +134,14 @@ function main(servingConfig) { * is used to deduce `device_type` for analytics. */ // const userInfo = {} + /** + * 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. + */ + // const languageCode = 'abc123' /** * Facet specifications for faceted search. If empty, no facets are returned. * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` @@ -211,6 +219,41 @@ function main(servingConfig) { * for more details. */ // const userLabels = [1,2,3,4] + /** + * Search as you type configuration. Only supported for the + * IndustryVertical.MEDIA google.cloud.discoveryengine.v1.IndustryVertical.MEDIA + * vertical. + */ + // const searchAsYouTypeSpec = {} + /** + * 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): + * 1. Call /search API with the auto-session mode (see below). + * 2. 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): + * 1. Call /search API with the auto-session mode (see below). + * 2. 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. + * Auto-session mode: when `projects/.../sessions/-` is used, a new session + * gets automatically created. Otherwise, users can use the create-session API + * to create a session manually. + * 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. + */ + // const session = 'abc123' + /** + * Session specification. + * Can be used only when `session` is set. + */ + // const sessionSpec = {} // Imports the Discoveryengine library const {SearchServiceClient} = require('@google-cloud/discoveryengine').v1; diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json index c44b54c6973..c400d997ecc 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -155,6 +155,102 @@ } } }, + { + "regionTag": "discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async", + "title": "CompletionService importCompletionSuggestions Sample", + "origin": "API_DEFINITION", + "description": " Imports [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.", + "canonical": true, + "file": "completion_service.import_completion_suggestions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportCompletionSuggestions", + "fullName": "google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions", + "async": true, + "parameters": [ + { + "name": "inline_source", + "type": ".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource" + }, + { + "name": "gcs_source", + "type": ".google.cloud.discoveryengine.v1.GcsSource" + }, + { + "name": "bigquery_source", + "type": ".google.cloud.discoveryengine.v1.BigQuerySource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "error_config", + "type": ".google.cloud.discoveryengine.v1.ImportErrorConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CompletionServiceClient", + "fullName": "google.cloud.discoveryengine.v1.CompletionServiceClient" + }, + "method": { + "shortName": "ImportCompletionSuggestions", + "fullName": "google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions", + "service": { + "shortName": "CompletionService", + "fullName": "google.cloud.discoveryengine.v1.CompletionService" + } + } + } + }, + { + "regionTag": "discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async", + "title": "CompletionService purgeCompletionSuggestions Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes all [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.", + "canonical": true, + "file": "completion_service.purge_completion_suggestions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PurgeCompletionSuggestions", + "fullName": "google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CompletionServiceClient", + "fullName": "google.cloud.discoveryengine.v1.CompletionServiceClient" + }, + "method": { + "shortName": "PurgeCompletionSuggestions", + "fullName": "google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions", + "service": { + "shortName": "CompletionService", + "fullName": "google.cloud.discoveryengine.v1.CompletionService" + } + } + } + }, { "regionTag": "discoveryengine_v1_generated_ControlService_CreateControl_async", "title": "CompletionService createControl Sample", @@ -686,7 +782,7 @@ "segments": [ { "start": 25, - "end": 111, + "end": 129, "type": "FULL" } ], @@ -734,6 +830,10 @@ { "name": "user_pseudo_id", "type": "TYPE_STRING" + }, + { + "name": "user_labels", + "type": "TYPE_MESSAGE[]" } ], "resultType": ".google.cloud.discoveryengine.v1.AnswerQueryResponse", @@ -1478,7 +1578,7 @@ "segments": [ { "start": 25, - "end": 159, + "end": 163, "type": "FULL" } ], @@ -1515,6 +1615,10 @@ "name": "firestore_source", "type": ".google.cloud.discoveryengine.v1.FirestoreSource" }, + { + "name": "alloy_db_source", + "type": ".google.cloud.discoveryengine.v1.AlloyDbSource" + }, { "name": "bigtable_source", "type": ".google.cloud.discoveryengine.v1.BigtableSource" @@ -2294,7 +2398,7 @@ "segments": [ { "start": 25, - "end": 234, + "end": 277, "type": "FULL" } ], @@ -2351,6 +2455,10 @@ "name": "user_info", "type": ".google.cloud.discoveryengine.v1.UserInfo" }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, { "name": "facet_specs", "type": "TYPE_MESSAGE[]" @@ -2386,6 +2494,18 @@ { "name": "user_labels", "type": "TYPE_MESSAGE[]" + }, + { + "name": "search_as_you_type_spec", + "type": ".google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec" + }, + { + "name": "session", + "type": "TYPE_STRING" + }, + { + "name": "session_spec", + "type": ".google.cloud.discoveryengine.v1.SearchRequest.SessionSpec" } ], "resultType": ".google.cloud.discoveryengine.v1.SearchResponse", diff --git a/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts index 752cefca26f..a42ff11d4d4 100644 --- a/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts @@ -221,6 +221,10 @@ export class CompletionServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -276,6 +280,10 @@ export class CompletionServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -437,6 +445,18 @@ export class CompletionServiceClient { const purgeSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup( '.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata' ) as gax.protobuf.Type; + const importCompletionSuggestionsResponse = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse' + ) as gax.protobuf.Type; + const importCompletionSuggestionsMetadata = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata' + ) as gax.protobuf.Type; + const purgeCompletionSuggestionsResponse = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse' + ) as gax.protobuf.Type; + const purgeCompletionSuggestionsMetadata = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { importSuggestionDenyListEntries: @@ -458,6 +478,24 @@ export class CompletionServiceClient { purgeSuggestionDenyListEntriesMetadata ) ), + importCompletionSuggestions: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importCompletionSuggestionsResponse.decode.bind( + importCompletionSuggestionsResponse + ), + importCompletionSuggestionsMetadata.decode.bind( + importCompletionSuggestionsMetadata + ) + ), + purgeCompletionSuggestions: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + purgeCompletionSuggestionsResponse.decode.bind( + purgeCompletionSuggestionsResponse + ), + purgeCompletionSuggestionsMetadata.decode.bind( + purgeCompletionSuggestionsMetadata + ) + ), }; // Put together the default options sent with requests. @@ -514,6 +552,8 @@ export class CompletionServiceClient { 'completeQuery', 'importSuggestionDenyListEntries', 'purgeSuggestionDenyListEntries', + 'importCompletionSuggestions', + 'purgeCompletionSuggestions', ]; for (const methodName of completionServiceStubMethods) { const callPromise = this.completionServiceStub.then( @@ -1059,6 +1099,303 @@ export class CompletionServiceClient { protos.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata >; } + /** + * Imports + * {@link protos.google.cloud.discoveryengine.v1.CompletionSuggestion|CompletionSuggestion}s + * for a DataStore. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} request.inlineSource + * The Inline source for suggestion entries. + * @param {google.cloud.discoveryengine.v1.GcsSource} request.gcsSource + * Cloud Storage location for the input content. + * @param {google.cloud.discoveryengine.v1.BigQuerySource} request.bigquerySource + * BigQuery input source. + * @param {string} request.parent + * Required. The parent data store resource name for which to import customer + * autocomplete suggestions. + * + * Follows pattern `projects/* /locations/* /collections/* /dataStores/*` + * @param {google.cloud.discoveryengine.v1.ImportErrorConfig} request.errorConfig + * The desired location of errors incurred during the Import. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/completion_service.import_completion_suggestions.js + * region_tag:discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async + */ + importCompletionSuggestions( + request?: protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + importCompletionSuggestions( + request: protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importCompletionSuggestions( + request: protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importCompletionSuggestions( + request?: protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.importCompletionSuggestions( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `importCompletionSuggestions()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/completion_service.import_completion_suggestions.js + * region_tag:discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async + */ + async checkImportCompletionSuggestionsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.importCompletionSuggestions, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata + >; + } + /** + * Permanently deletes all + * {@link protos.google.cloud.discoveryengine.v1.CompletionSuggestion|CompletionSuggestion}s + * for a DataStore. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent data store resource name for which to purge completion + * suggestions. Follows pattern + * projects/* /locations/* /collections/* /dataStores/*. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/completion_service.purge_completion_suggestions.js + * region_tag:discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async + */ + purgeCompletionSuggestions( + request?: protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + purgeCompletionSuggestions( + request: protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + purgeCompletionSuggestions( + request: protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + purgeCompletionSuggestions( + request?: protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.purgeCompletionSuggestions( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `purgeCompletionSuggestions()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/completion_service.purge_completion_suggestions.js + * region_tag:discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async + */ + async checkPurgeCompletionSuggestionsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.purgeCompletionSuggestions, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata + >; + } /** * Gets information about a location. * @@ -1612,6 +1949,145 @@ export class CompletionServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3016,6 +3492,127 @@ export class CompletionServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/completion_service_client_config.json b/packages/google-cloud-discoveryengine/src/v1/completion_service_client_config.json index 2136f588531..b48335cdf73 100644 --- a/packages/google-cloud-discoveryengine/src/v1/completion_service_client_config.json +++ b/packages/google-cloud-discoveryengine/src/v1/completion_service_client_config.json @@ -46,6 +46,16 @@ "timeout_millis": 5000, "retry_codes_name": "unavailable", "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e" + }, + "ImportCompletionSuggestions": { + "timeout_millis": 5000, + "retry_codes_name": "unavailable", + "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e" + }, + "PurgeCompletionSuggestions": { + "timeout_millis": 5000, + "retry_codes_name": "unavailable", + "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e" } } } diff --git a/packages/google-cloud-discoveryengine/src/v1/completion_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/completion_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/completion_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/completion_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts index 68f6752f238..b615bfaaa19 100644 --- a/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts @@ -226,6 +226,10 @@ export class ControlServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -281,6 +285,10 @@ export class ControlServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1524,6 +1532,145 @@ export class ControlServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2928,6 +3075,127 @@ export class ControlServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/control_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/control_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/control_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/control_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts index 5d696cd54a6..acbeb181d61 100644 --- a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts @@ -221,6 +221,10 @@ export class ConversationalSearchServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -284,6 +288,10 @@ export class ConversationalSearchServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1129,6 +1137,24 @@ export class ConversationalSearchServiceClient { * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @param {number[]} request.userLabels + * 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. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2559,6 +2585,145 @@ export class ConversationalSearchServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -4169,6 +4334,127 @@ export class ConversationalSearchServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts index 9440222ee39..f443a8faf94 100644 --- a/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts @@ -227,6 +227,10 @@ export class DataStoreServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -282,6 +286,10 @@ export class DataStoreServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -2015,6 +2023,145 @@ export class DataStoreServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3419,6 +3566,127 @@ export class DataStoreServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/data_store_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/data_store_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/data_store_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/data_store_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts index abcadee1d9e..862bf928957 100644 --- a/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts @@ -228,6 +228,10 @@ export class DocumentServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -287,6 +291,10 @@ export class DocumentServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1089,6 +1097,8 @@ export class DocumentServiceClient { * Cloud SQL input source. * @param {google.cloud.discoveryengine.v1.FirestoreSource} request.firestoreSource * Firestore input source. + * @param {google.cloud.discoveryengine.v1.AlloyDbSource} request.alloyDbSource + * AlloyDB input source. * @param {google.cloud.discoveryengine.v1.BigtableSource} request.bigtableSource * Cloud Bigtable input source. * @param {string} request.parent @@ -2358,6 +2368,145 @@ export class DocumentServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3847,6 +3996,127 @@ export class DocumentServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/document_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/document_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/document_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/document_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts index 04c30060f5b..ea6daf080c2 100644 --- a/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts @@ -227,6 +227,10 @@ export class EngineServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -282,6 +286,10 @@ export class EngineServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1933,6 +1941,145 @@ export class EngineServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3337,6 +3484,127 @@ export class EngineServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/engine_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/engine_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/engine_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/engine_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/gapic_metadata.json b/packages/google-cloud-discoveryengine/src/v1/gapic_metadata.json index fc7963b1a35..bf77fe662c5 100644 --- a/packages/google-cloud-discoveryengine/src/v1/gapic_metadata.json +++ b/packages/google-cloud-discoveryengine/src/v1/gapic_metadata.json @@ -24,6 +24,16 @@ "methods": [ "purgeSuggestionDenyListEntries" ] + }, + "ImportCompletionSuggestions": { + "methods": [ + "importCompletionSuggestions" + ] + }, + "PurgeCompletionSuggestions": { + "methods": [ + "purgeCompletionSuggestions" + ] } } }, @@ -44,6 +54,16 @@ "methods": [ "purgeSuggestionDenyListEntries" ] + }, + "ImportCompletionSuggestions": { + "methods": [ + "importCompletionSuggestions" + ] + }, + "PurgeCompletionSuggestions": { + "methods": [ + "purgeCompletionSuggestions" + ] } } } diff --git a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts index 00613602961..915ab5e2eea 100644 --- a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts @@ -222,6 +222,10 @@ export class GroundedGenerationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -277,6 +281,10 @@ export class GroundedGenerationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1029,6 +1037,145 @@ export class GroundedGenerationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2433,6 +2580,127 @@ export class GroundedGenerationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts index 3f5ef124736..251f7eeacfb 100644 --- a/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts @@ -222,6 +222,10 @@ export class ProjectServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -277,6 +281,10 @@ export class ProjectServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1311,6 +1319,145 @@ export class ProjectServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2715,6 +2862,127 @@ export class ProjectServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/project_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/project_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/project_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/project_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts index c780c0347ba..a449a7975c7 100644 --- a/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts @@ -218,6 +218,10 @@ export class RankServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -273,6 +277,10 @@ export class RankServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -972,6 +980,145 @@ export class RankServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2376,6 +2523,127 @@ export class RankServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/rank_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/rank_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/rank_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/rank_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts index ebb775c113d..c202636fdbf 100644 --- a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts @@ -219,6 +219,10 @@ export class RecommendationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -282,6 +286,10 @@ export class RecommendationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1066,6 +1074,145 @@ export class RecommendationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2676,6 +2823,127 @@ export class RecommendationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts index 42ec7059521..0eef8acce6a 100644 --- a/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts @@ -223,6 +223,10 @@ export class SchemaServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -278,6 +282,10 @@ export class SchemaServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1942,6 +1950,145 @@ export class SchemaServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3346,6 +3493,127 @@ export class SchemaServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/schema_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/schema_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/schema_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/schema_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts index b595d803da8..a81ecb9c02f 100644 --- a/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts @@ -224,6 +224,10 @@ export class SearchServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -291,6 +295,10 @@ export class SearchServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -603,6 +611,12 @@ export class SearchServiceClient { * Highly recommended for analytics. * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent} * is used to deduce `device_type` for analytics. + * @param {string} request.languageCode + * 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. * @param {number[]} request.facetSpecs * Facet specifications for faceted search. If empty, no facets are returned. * @@ -672,6 +686,41 @@ export class SearchServiceClient { * See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec + * Search as you type configuration. Only supported for the + * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA} + * vertical. + * @param {string} request.session + * 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): + * 1. Call /search API with the auto-session mode (see below). + * 2. 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): + * 1. Call /search API with the auto-session mode (see below). + * 2. 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. + * + * Auto-session mode: when `projects/.../sessions/-` is used, a new session + * gets automatically created. Otherwise, users can use the create-session API + * to create a session manually. + * + * 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. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec + * Session specification. + * + * Can be used only when `session` is set. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -851,6 +900,12 @@ export class SearchServiceClient { * Highly recommended for analytics. * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent} * is used to deduce `device_type` for analytics. + * @param {string} request.languageCode + * 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. * @param {number[]} request.facetSpecs * Facet specifications for faceted search. If empty, no facets are returned. * @@ -920,6 +975,41 @@ export class SearchServiceClient { * See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec + * Search as you type configuration. Only supported for the + * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA} + * vertical. + * @param {string} request.session + * 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): + * 1. Call /search API with the auto-session mode (see below). + * 2. 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): + * 1. Call /search API with the auto-session mode (see below). + * 2. 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. + * + * Auto-session mode: when `projects/.../sessions/-` is used, a new session + * gets automatically created. Otherwise, users can use the create-session API + * to create a session manually. + * + * 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. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec + * Session specification. + * + * Can be used only when `session` is set. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1053,6 +1143,12 @@ export class SearchServiceClient { * Highly recommended for analytics. * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent} * is used to deduce `device_type` for analytics. + * @param {string} request.languageCode + * 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. * @param {number[]} request.facetSpecs * Facet specifications for faceted search. If empty, no facets are returned. * @@ -1122,6 +1218,41 @@ export class SearchServiceClient { * See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec + * Search as you type configuration. Only supported for the + * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA} + * vertical. + * @param {string} request.session + * 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): + * 1. Call /search API with the auto-session mode (see below). + * 2. 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): + * 1. Call /search API with the auto-session mode (see below). + * 2. 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. + * + * Auto-session mode: when `projects/.../sessions/-` is used, a new session + * gets automatically created. Otherwise, users can use the create-session API + * to create a session manually. + * + * 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. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec + * Session specification. + * + * Can be used only when `session` is set. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1636,6 +1767,145 @@ export class SearchServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3331,6 +3601,127 @@ export class SearchServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/search_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/search_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/search_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/search_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts index 193269ff01e..da6f1894946 100644 --- a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts @@ -224,6 +224,10 @@ export class SiteSearchEngineServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -279,6 +283,10 @@ export class SiteSearchEngineServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -3089,6 +3097,145 @@ export class SiteSearchEngineServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -4493,6 +4640,127 @@ export class SiteSearchEngineServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts index 2d554a7b849..ae82dd91945 100644 --- a/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts @@ -221,6 +221,10 @@ export class UserEventServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -276,6 +280,10 @@ export class UserEventServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1531,6 +1539,145 @@ export class UserEventServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2935,6 +3082,127 @@ export class UserEventServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/user_event_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/user_event_service_proto_list.json index 9deb6123f5a..1da503d8002 100644 --- a/packages/google-cloud-discoveryengine/src/v1/user_event_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/user_event_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts index 3ba1fba1bcd..ab0987d018d 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts @@ -826,6 +826,402 @@ describe('v1.CompletionServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); + + describe('importCompletionSuggestions', () => { + it('invokes importCompletionSuggestions without error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importCompletionSuggestions = + stubLongRunningCall(expectedResponse); + const [operation] = await client.importCompletionSuggestions(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importCompletionSuggestions without error using callback', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importCompletionSuggestions = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importCompletionSuggestions( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importCompletionSuggestions with call error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importCompletionSuggestions = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.importCompletionSuggestions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importCompletionSuggestions with LRO error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importCompletionSuggestions = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.importCompletionSuggestions(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportCompletionSuggestionsProgress without error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkImportCompletionSuggestionsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportCompletionSuggestionsProgress with error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkImportCompletionSuggestionsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('purgeCompletionSuggestions', () => { + it('invokes purgeCompletionSuggestions without error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.purgeCompletionSuggestions = + stubLongRunningCall(expectedResponse); + const [operation] = await client.purgeCompletionSuggestions(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeCompletionSuggestions without error using callback', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.purgeCompletionSuggestions = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.purgeCompletionSuggestions( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeCompletionSuggestions with call error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.purgeCompletionSuggestions = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.purgeCompletionSuggestions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeCompletionSuggestions with LRO error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.purgeCompletionSuggestions = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.purgeCompletionSuggestions(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkPurgeCompletionSuggestionsProgress without error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkPurgeCompletionSuggestionsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkPurgeCompletionSuggestionsProgress with error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkPurgeCompletionSuggestionsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); describe('getLocation', () => { it('invokes getLocation without error', async () => { const client = new completionserviceModule.v1.CompletionServiceClient({ @@ -1692,6 +2088,171 @@ describe('v1.CompletionServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3411,6 +3972,151 @@ describe('v1.CompletionServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts index 22a1a90cb33..3a15ecc4150 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts @@ -1768,6 +1768,171 @@ describe('v1.ControlServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new controlserviceModule.v1.ControlServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3487,6 +3652,151 @@ describe('v1.ControlServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new controlserviceModule.v1.ControlServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts index 4cb5eff6ff6..4bc2c93f8ba 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts @@ -3194,6 +3194,174 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new conversationalsearchserviceModule.v1.ConversationalSearchServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -5214,6 +5382,154 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new conversationalsearchserviceModule.v1.ConversationalSearchServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts index 7b42af39ddd..44ba6234359 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts @@ -2254,6 +2254,171 @@ describe('v1.DataStoreServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new datastoreserviceModule.v1.DataStoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3973,6 +4138,151 @@ describe('v1.DataStoreServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new datastoreserviceModule.v1.DataStoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts index 0ce380e3b1e..4660094b61c 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts @@ -2574,6 +2574,171 @@ describe('v1.DocumentServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new documentserviceModule.v1.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -4386,6 +4551,151 @@ describe('v1.DocumentServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new documentserviceModule.v1.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts index ae05a5881d0..e6cbfc04307 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts @@ -2244,6 +2244,171 @@ describe('v1.EngineServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new engineserviceModule.v1.EngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3963,6 +4128,151 @@ describe('v1.EngineServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new engineserviceModule.v1.EngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts index 407cb320b02..e983fd0eee1 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts @@ -1053,6 +1053,172 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new groundedgenerationserviceModule.v1.GroundedGenerationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -2786,6 +2952,152 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new groundedgenerationserviceModule.v1.GroundedGenerationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts index 1f2ff404529..cc1dedeccd4 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts @@ -1355,6 +1355,171 @@ describe('v1.ProjectServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new projectserviceModule.v1.ProjectServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3074,6 +3239,151 @@ describe('v1.ProjectServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new projectserviceModule.v1.ProjectServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts index 128d0028fb6..835db9a5396 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts @@ -949,6 +949,171 @@ describe('v1.RankServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new rankserviceModule.v1.RankServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -2668,6 +2833,151 @@ describe('v1.RankServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new rankserviceModule.v1.RankServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts index 90393fe3d3e..5b0e01df033 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts @@ -984,6 +984,172 @@ describe('v1.RecommendationServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new recommendationserviceModule.v1.RecommendationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -2972,6 +3138,152 @@ describe('v1.RecommendationServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new recommendationserviceModule.v1.RecommendationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts index 9b438e3a5ba..fd3b9eae18d 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts @@ -2240,6 +2240,171 @@ describe('v1.SchemaServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new schemaserviceModule.v1.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3959,6 +4124,151 @@ describe('v1.SchemaServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new schemaserviceModule.v1.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts index 8143374f107..07549c1c5f5 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts @@ -1328,6 +1328,171 @@ describe('v1.SearchServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new searchserviceModule.v1.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3393,6 +3558,151 @@ describe('v1.SearchServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new searchserviceModule.v1.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts index 4da4042717a..9fb4c93cddc 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts @@ -3831,6 +3831,172 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new sitesearchengineserviceModule.v1.SiteSearchEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -5564,6 +5730,152 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new sitesearchengineserviceModule.v1.SiteSearchEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts index bad04ef309b..2ae2ab4f87b 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts @@ -1621,6 +1621,171 @@ describe('v1.UserEventServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new usereventserviceModule.v1.UserEventServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3340,6 +3505,151 @@ describe('v1.UserEventServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new usereventserviceModule.v1.UserEventServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = {