google-apis-discoveryengine_v1 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -276,6 +276,64 @@ module Google
276
276
  end
277
277
  end
278
278
 
279
+ # AlloyDB source import data from.
280
+ class GoogleCloudDiscoveryengineV1AlloyDbSource
281
+ include Google::Apis::Core::Hashable
282
+
283
+ # Required. The AlloyDB cluster to copy the data from with a length limit of 256
284
+ # characters.
285
+ # Corresponds to the JSON property `clusterId`
286
+ # @return [String]
287
+ attr_accessor :cluster_id
288
+
289
+ # Required. The AlloyDB database to copy the data from with a length limit of
290
+ # 256 characters.
291
+ # Corresponds to the JSON property `databaseId`
292
+ # @return [String]
293
+ attr_accessor :database_id
294
+
295
+ # Intermediate Cloud Storage directory used for the import with a length limit
296
+ # of 2,000 characters. Can be specified if one wants to have the AlloyDB export
297
+ # to a specific Cloud Storage directory. Ensure that the AlloyDB service account
298
+ # has the necessary Cloud Storage Admin permissions to access the specified
299
+ # Cloud Storage directory.
300
+ # Corresponds to the JSON property `gcsStagingDir`
301
+ # @return [String]
302
+ attr_accessor :gcs_staging_dir
303
+
304
+ # Required. The AlloyDB location to copy the data from with a length limit of
305
+ # 256 characters.
306
+ # Corresponds to the JSON property `locationId`
307
+ # @return [String]
308
+ attr_accessor :location_id
309
+
310
+ # The project ID that the AlloyDB source is in with a length limit of 128
311
+ # characters. If not specified, inherits the project ID from the parent request.
312
+ # Corresponds to the JSON property `projectId`
313
+ # @return [String]
314
+ attr_accessor :project_id
315
+
316
+ # Required. The AlloyDB table to copy the data from with a length limit of 256
317
+ # characters.
318
+ # Corresponds to the JSON property `tableId`
319
+ # @return [String]
320
+ attr_accessor :table_id
321
+
322
+ def initialize(**args)
323
+ update!(**args)
324
+ end
325
+
326
+ # Update properties of this object
327
+ def update!(**args)
328
+ @cluster_id = args[:cluster_id] if args.key?(:cluster_id)
329
+ @database_id = args[:database_id] if args.key?(:database_id)
330
+ @gcs_staging_dir = args[:gcs_staging_dir] if args.key?(:gcs_staging_dir)
331
+ @location_id = args[:location_id] if args.key?(:location_id)
332
+ @project_id = args[:project_id] if args.key?(:project_id)
333
+ @table_id = args[:table_id] if args.key?(:table_id)
334
+ end
335
+ end
336
+
279
337
  # Defines an answer.
280
338
  class GoogleCloudDiscoveryengineV1Answer
281
339
  include Google::Apis::Core::Hashable
@@ -459,6 +517,21 @@ module Google
459
517
  # @return [String]
460
518
  attr_accessor :session
461
519
 
520
+ # The user labels applied to a resource must meet the following requirements: *
521
+ # Each resource can have multiple labels, up to a maximum of 64. * Each label
522
+ # must be a key-value pair. * Keys have a minimum length of 1 character and a
523
+ # maximum length of 63 characters and cannot be empty. Values can be empty and
524
+ # have a maximum length of 63 characters. * Keys and values can contain only
525
+ # lowercase letters, numeric characters, underscores, and dashes. All characters
526
+ # must use UTF-8 encoding, and international characters are allowed. * The key
527
+ # portion of a label must be unique. However, you can use the same key with
528
+ # multiple resources. * Keys must start with a lowercase letter or international
529
+ # character. See [Google Cloud Document](https://cloud.google.com/resource-
530
+ # manager/docs/creating-managing-labels#requirements) for more details.
531
+ # Corresponds to the JSON property `userLabels`
532
+ # @return [Hash<String,String>]
533
+ attr_accessor :user_labels
534
+
462
535
  # A unique identifier for tracking visitors. For example, this could be
463
536
  # implemented with an HTTP cookie, which should be able to uniquely identify a
464
537
  # visitor on a single device. This unique identifier should not change if the
@@ -484,6 +557,7 @@ module Google
484
557
  @safety_spec = args[:safety_spec] if args.key?(:safety_spec)
485
558
  @search_spec = args[:search_spec] if args.key?(:search_spec)
486
559
  @session = args[:session] if args.key?(:session)
560
+ @user_labels = args[:user_labels] if args.key?(:user_labels)
487
561
  @user_pseudo_id = args[:user_pseudo_id] if args.key?(:user_pseudo_id)
488
562
  end
489
563
  end
@@ -778,6 +852,15 @@ module Google
778
852
  # @return [String]
779
853
  attr_accessor :order_by
780
854
 
855
+ # Specifies the search result mode. If unspecified, the search result mode is
856
+ # based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.
857
+ # DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`.
858
+ # * Otherwise, it defaults to `DOCUMENTS`. See [parse and chunk documents](
859
+ # https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
860
+ # Corresponds to the JSON property `searchResultMode`
861
+ # @return [String]
862
+ attr_accessor :search_result_mode
863
+
781
864
  def initialize(**args)
782
865
  update!(**args)
783
866
  end
@@ -789,6 +872,7 @@ module Google
789
872
  @filter = args[:filter] if args.key?(:filter)
790
873
  @max_return_results = args[:max_return_results] if args.key?(:max_return_results)
791
874
  @order_by = args[:order_by] if args.key?(:order_by)
875
+ @search_result_mode = args[:search_result_mode] if args.key?(:search_result_mode)
792
876
  end
793
877
  end
794
878
 
@@ -1904,6 +1988,164 @@ module Google
1904
1988
  end
1905
1989
  end
1906
1990
 
1991
+ # Chunk captures all raw metadata information of items to be recommended or
1992
+ # searched in the chunk mode.
1993
+ class GoogleCloudDiscoveryengineV1Chunk
1994
+ include Google::Apis::Core::Hashable
1995
+
1996
+ # Metadata of the current chunk. This field is only populated on SearchService.
1997
+ # Search API.
1998
+ # Corresponds to the JSON property `chunkMetadata`
1999
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1ChunkChunkMetadata]
2000
+ attr_accessor :chunk_metadata
2001
+
2002
+ # Content is a string from a document (parsed content).
2003
+ # Corresponds to the JSON property `content`
2004
+ # @return [String]
2005
+ attr_accessor :content
2006
+
2007
+ # Output only. This field is OUTPUT_ONLY. It contains derived data that are not
2008
+ # in the original input document.
2009
+ # Corresponds to the JSON property `derivedStructData`
2010
+ # @return [Hash<String,Object>]
2011
+ attr_accessor :derived_struct_data
2012
+
2013
+ # Document metadata contains the information of the document of the current
2014
+ # chunk.
2015
+ # Corresponds to the JSON property `documentMetadata`
2016
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1ChunkDocumentMetadata]
2017
+ attr_accessor :document_metadata
2018
+
2019
+ # Unique chunk ID of the current chunk.
2020
+ # Corresponds to the JSON property `id`
2021
+ # @return [String]
2022
+ attr_accessor :id
2023
+
2024
+ # The full resource name of the chunk. Format: `projects/`project`/locations/`
2025
+ # location`/collections/`collection`/dataStores/`data_store`/branches/`branch`/
2026
+ # documents/`document_id`/chunks/`chunk_id``. This field must be a UTF-8 encoded
2027
+ # string with a length limit of 1024 characters.
2028
+ # Corresponds to the JSON property `name`
2029
+ # @return [String]
2030
+ attr_accessor :name
2031
+
2032
+ # Page span of the chunk.
2033
+ # Corresponds to the JSON property `pageSpan`
2034
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1ChunkPageSpan]
2035
+ attr_accessor :page_span
2036
+
2037
+ # Output only. Represents the relevance score based on similarity. Higher score
2038
+ # indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only
2039
+ # populated on SearchService.SearchResponse.
2040
+ # Corresponds to the JSON property `relevanceScore`
2041
+ # @return [Float]
2042
+ attr_accessor :relevance_score
2043
+
2044
+ def initialize(**args)
2045
+ update!(**args)
2046
+ end
2047
+
2048
+ # Update properties of this object
2049
+ def update!(**args)
2050
+ @chunk_metadata = args[:chunk_metadata] if args.key?(:chunk_metadata)
2051
+ @content = args[:content] if args.key?(:content)
2052
+ @derived_struct_data = args[:derived_struct_data] if args.key?(:derived_struct_data)
2053
+ @document_metadata = args[:document_metadata] if args.key?(:document_metadata)
2054
+ @id = args[:id] if args.key?(:id)
2055
+ @name = args[:name] if args.key?(:name)
2056
+ @page_span = args[:page_span] if args.key?(:page_span)
2057
+ @relevance_score = args[:relevance_score] if args.key?(:relevance_score)
2058
+ end
2059
+ end
2060
+
2061
+ # Metadata of the current chunk. This field is only populated on SearchService.
2062
+ # Search API.
2063
+ class GoogleCloudDiscoveryengineV1ChunkChunkMetadata
2064
+ include Google::Apis::Core::Hashable
2065
+
2066
+ # The next chunks of the current chunk. The number is controlled by
2067
+ # SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is only
2068
+ # populated on SearchService.Search API.
2069
+ # Corresponds to the JSON property `nextChunks`
2070
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Chunk>]
2071
+ attr_accessor :next_chunks
2072
+
2073
+ # The previous chunks of the current chunk. The number is controlled by
2074
+ # SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This field is
2075
+ # only populated on SearchService.Search API.
2076
+ # Corresponds to the JSON property `previousChunks`
2077
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Chunk>]
2078
+ attr_accessor :previous_chunks
2079
+
2080
+ def initialize(**args)
2081
+ update!(**args)
2082
+ end
2083
+
2084
+ # Update properties of this object
2085
+ def update!(**args)
2086
+ @next_chunks = args[:next_chunks] if args.key?(:next_chunks)
2087
+ @previous_chunks = args[:previous_chunks] if args.key?(:previous_chunks)
2088
+ end
2089
+ end
2090
+
2091
+ # Document metadata contains the information of the document of the current
2092
+ # chunk.
2093
+ class GoogleCloudDiscoveryengineV1ChunkDocumentMetadata
2094
+ include Google::Apis::Core::Hashable
2095
+
2096
+ # Data representation. The structured JSON data for the document. It should
2097
+ # conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.
2098
+ # Corresponds to the JSON property `structData`
2099
+ # @return [Hash<String,Object>]
2100
+ attr_accessor :struct_data
2101
+
2102
+ # Title of the document.
2103
+ # Corresponds to the JSON property `title`
2104
+ # @return [String]
2105
+ attr_accessor :title
2106
+
2107
+ # Uri of the document.
2108
+ # Corresponds to the JSON property `uri`
2109
+ # @return [String]
2110
+ attr_accessor :uri
2111
+
2112
+ def initialize(**args)
2113
+ update!(**args)
2114
+ end
2115
+
2116
+ # Update properties of this object
2117
+ def update!(**args)
2118
+ @struct_data = args[:struct_data] if args.key?(:struct_data)
2119
+ @title = args[:title] if args.key?(:title)
2120
+ @uri = args[:uri] if args.key?(:uri)
2121
+ end
2122
+ end
2123
+
2124
+ # Page span of the chunk.
2125
+ class GoogleCloudDiscoveryengineV1ChunkPageSpan
2126
+ include Google::Apis::Core::Hashable
2127
+
2128
+ # The end page of the chunk.
2129
+ # Corresponds to the JSON property `pageEnd`
2130
+ # @return [Fixnum]
2131
+ attr_accessor :page_end
2132
+
2133
+ # The start page of the chunk.
2134
+ # Corresponds to the JSON property `pageStart`
2135
+ # @return [Fixnum]
2136
+ attr_accessor :page_start
2137
+
2138
+ def initialize(**args)
2139
+ update!(**args)
2140
+ end
2141
+
2142
+ # Update properties of this object
2143
+ def update!(**args)
2144
+ @page_end = args[:page_end] if args.key?(:page_end)
2145
+ @page_start = args[:page_start] if args.key?(:page_start)
2146
+ end
2147
+ end
2148
+
1907
2149
  # Cloud SQL source import data from.
1908
2150
  class GoogleCloudDiscoveryengineV1CloudSqlSource
1909
2151
  include Google::Apis::Core::Hashable
@@ -3136,6 +3378,11 @@ module Google
3136
3378
  class GoogleCloudDiscoveryengineV1DocumentProcessingConfig
3137
3379
  include Google::Apis::Core::Hashable
3138
3380
 
3381
+ # Configuration for chunking config.
3382
+ # Corresponds to the JSON property `chunkingConfig`
3383
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig]
3384
+ attr_accessor :chunking_config
3385
+
3139
3386
  # Related configurations applied to a specific type of document parser.
3140
3387
  # Corresponds to the JSON property `defaultParsingConfig`
3141
3388
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig]
@@ -3163,12 +3410,60 @@ module Google
3163
3410
 
3164
3411
  # Update properties of this object
3165
3412
  def update!(**args)
3413
+ @chunking_config = args[:chunking_config] if args.key?(:chunking_config)
3166
3414
  @default_parsing_config = args[:default_parsing_config] if args.key?(:default_parsing_config)
3167
3415
  @name = args[:name] if args.key?(:name)
3168
3416
  @parsing_config_overrides = args[:parsing_config_overrides] if args.key?(:parsing_config_overrides)
3169
3417
  end
3170
3418
  end
3171
3419
 
3420
+ # Configuration for chunking config.
3421
+ class GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig
3422
+ include Google::Apis::Core::Hashable
3423
+
3424
+ # Configuration for the layout based chunking.
3425
+ # Corresponds to the JSON property `layoutBasedChunkingConfig`
3426
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig]
3427
+ attr_accessor :layout_based_chunking_config
3428
+
3429
+ def initialize(**args)
3430
+ update!(**args)
3431
+ end
3432
+
3433
+ # Update properties of this object
3434
+ def update!(**args)
3435
+ @layout_based_chunking_config = args[:layout_based_chunking_config] if args.key?(:layout_based_chunking_config)
3436
+ end
3437
+ end
3438
+
3439
+ # Configuration for the layout based chunking.
3440
+ class GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig
3441
+ include Google::Apis::Core::Hashable
3442
+
3443
+ # The token size limit for each chunk. Supported values: 100-500 (inclusive).
3444
+ # Default value: 500.
3445
+ # Corresponds to the JSON property `chunkSize`
3446
+ # @return [Fixnum]
3447
+ attr_accessor :chunk_size
3448
+
3449
+ # Whether to include appending different levels of headings to chunks from the
3450
+ # middle of the document to prevent context loss. Default value: False.
3451
+ # Corresponds to the JSON property `includeAncestorHeadings`
3452
+ # @return [Boolean]
3453
+ attr_accessor :include_ancestor_headings
3454
+ alias_method :include_ancestor_headings?, :include_ancestor_headings
3455
+
3456
+ def initialize(**args)
3457
+ update!(**args)
3458
+ end
3459
+
3460
+ # Update properties of this object
3461
+ def update!(**args)
3462
+ @chunk_size = args[:chunk_size] if args.key?(:chunk_size)
3463
+ @include_ancestor_headings = args[:include_ancestor_headings] if args.key?(:include_ancestor_headings)
3464
+ end
3465
+ end
3466
+
3172
3467
  # Related configurations applied to a specific type of document parser.
3173
3468
  class GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig
3174
3469
  include Google::Apis::Core::Hashable
@@ -3178,6 +3473,11 @@ module Google
3178
3473
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig]
3179
3474
  attr_accessor :digital_parsing_config
3180
3475
 
3476
+ # The layout parsing configurations for documents.
3477
+ # Corresponds to the JSON property `layoutParsingConfig`
3478
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig]
3479
+ attr_accessor :layout_parsing_config
3480
+
3181
3481
  # The OCR parsing configurations for documents.
3182
3482
  # Corresponds to the JSON property `ocrParsingConfig`
3183
3483
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig]
@@ -3190,6 +3490,7 @@ module Google
3190
3490
  # Update properties of this object
3191
3491
  def update!(**args)
3192
3492
  @digital_parsing_config = args[:digital_parsing_config] if args.key?(:digital_parsing_config)
3493
+ @layout_parsing_config = args[:layout_parsing_config] if args.key?(:layout_parsing_config)
3193
3494
  @ocr_parsing_config = args[:ocr_parsing_config] if args.key?(:ocr_parsing_config)
3194
3495
  end
3195
3496
  end
@@ -3207,6 +3508,19 @@ module Google
3207
3508
  end
3208
3509
  end
3209
3510
 
3511
+ # The layout parsing configurations for documents.
3512
+ class GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig
3513
+ include Google::Apis::Core::Hashable
3514
+
3515
+ def initialize(**args)
3516
+ update!(**args)
3517
+ end
3518
+
3519
+ # Update properties of this object
3520
+ def update!(**args)
3521
+ end
3522
+ end
3523
+
3210
3524
  # The OCR parsing configurations for documents.
3211
3525
  class GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig
3212
3526
  include Google::Apis::Core::Hashable
@@ -3792,6 +4106,11 @@ module Google
3792
4106
  class GoogleCloudDiscoveryengineV1ImportDocumentsRequest
3793
4107
  include Google::Apis::Core::Hashable
3794
4108
 
4109
+ # AlloyDB source import data from.
4110
+ # Corresponds to the JSON property `alloyDbSource`
4111
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AlloyDbSource]
4112
+ attr_accessor :alloy_db_source
4113
+
3795
4114
  # Whether to automatically generate IDs for the documents if absent. If set to `
3796
4115
  # true`, Document.ids are automatically generated based on the hash of the
3797
4116
  # payload, where IDs may not be consistent during multiple imports. In which
@@ -3889,6 +4208,7 @@ module Google
3889
4208
 
3890
4209
  # Update properties of this object
3891
4210
  def update!(**args)
4211
+ @alloy_db_source = args[:alloy_db_source] if args.key?(:alloy_db_source)
3892
4212
  @auto_generate_ids = args[:auto_generate_ids] if args.key?(:auto_generate_ids)
3893
4213
  @bigquery_source = args[:bigquery_source] if args.key?(:bigquery_source)
3894
4214
  @bigtable_source = args[:bigtable_source] if args.key?(:bigtable_source)
@@ -5385,6 +5705,14 @@ module Google
5385
5705
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestImageQuery]
5386
5706
  attr_accessor :image_query
5387
5707
 
5708
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more information,
5709
+ # see [Standard fields](https://cloud.google.com/apis/design/standard_fields).
5710
+ # This field helps to better interpret the query. If a value isn't specified,
5711
+ # the query language code is automatically detected, which may not be accurate.
5712
+ # Corresponds to the JSON property `languageCode`
5713
+ # @return [String]
5714
+ attr_accessor :language_code
5715
+
5388
5716
  # A 0-indexed integer that specifies the current offset (that is, starting
5389
5717
  # result location, amongst the Documents deemed by the API as relevant) in
5390
5718
  # search results. This field is only considered if page_token is unset. If this
@@ -5498,6 +5826,7 @@ module Google
5498
5826
  @facet_specs = args[:facet_specs] if args.key?(:facet_specs)
5499
5827
  @filter = args[:filter] if args.key?(:filter)
5500
5828
  @image_query = args[:image_query] if args.key?(:image_query)
5829
+ @language_code = args[:language_code] if args.key?(:language_code)
5501
5830
  @offset = args[:offset] if args.key?(:offset)
5502
5831
  @order_by = args[:order_by] if args.key?(:order_by)
5503
5832
  @page_size = args[:page_size] if args.key?(:page_size)
@@ -5580,11 +5909,26 @@ module Google
5580
5909
  class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec
5581
5910
  include Google::Apis::Core::Hashable
5582
5911
 
5912
+ # Specifies the chunk spec to be returned from the search response. Only
5913
+ # available if the SearchRequest.ContentSearchSpec.search_result_mode is set to
5914
+ # CHUNKS
5915
+ # Corresponds to the JSON property `chunkSpec`
5916
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec]
5917
+ attr_accessor :chunk_spec
5918
+
5583
5919
  # A specification for configuring the extractive content in a search response.
5584
5920
  # Corresponds to the JSON property `extractiveContentSpec`
5585
5921
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec]
5586
5922
  attr_accessor :extractive_content_spec
5587
5923
 
5924
+ # Specifies the search result mode. If unspecified, the search result mode is
5925
+ # based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.
5926
+ # DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`.
5927
+ # * Otherwise, it defaults to `DOCUMENTS`.
5928
+ # Corresponds to the JSON property `searchResultMode`
5929
+ # @return [String]
5930
+ attr_accessor :search_result_mode
5931
+
5588
5932
  # A specification for configuring snippets in a search response.
5589
5933
  # Corresponds to the JSON property `snippetSpec`
5590
5934
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec]
@@ -5601,12 +5945,43 @@ module Google
5601
5945
 
5602
5946
  # Update properties of this object
5603
5947
  def update!(**args)
5948
+ @chunk_spec = args[:chunk_spec] if args.key?(:chunk_spec)
5604
5949
  @extractive_content_spec = args[:extractive_content_spec] if args.key?(:extractive_content_spec)
5950
+ @search_result_mode = args[:search_result_mode] if args.key?(:search_result_mode)
5605
5951
  @snippet_spec = args[:snippet_spec] if args.key?(:snippet_spec)
5606
5952
  @summary_spec = args[:summary_spec] if args.key?(:summary_spec)
5607
5953
  end
5608
5954
  end
5609
5955
 
5956
+ # Specifies the chunk spec to be returned from the search response. Only
5957
+ # available if the SearchRequest.ContentSearchSpec.search_result_mode is set to
5958
+ # CHUNKS
5959
+ class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec
5960
+ include Google::Apis::Core::Hashable
5961
+
5962
+ # The number of next chunks to be returned of the current chunk. The maximum
5963
+ # allowed value is 3. If not specified, no next chunks will be returned.
5964
+ # Corresponds to the JSON property `numNextChunks`
5965
+ # @return [Fixnum]
5966
+ attr_accessor :num_next_chunks
5967
+
5968
+ # The number of previous chunks to be returned of the current chunk. The maximum
5969
+ # allowed value is 3. If not specified, no previous chunks will be returned.
5970
+ # Corresponds to the JSON property `numPreviousChunks`
5971
+ # @return [Fixnum]
5972
+ attr_accessor :num_previous_chunks
5973
+
5974
+ def initialize(**args)
5975
+ update!(**args)
5976
+ end
5977
+
5978
+ # Update properties of this object
5979
+ def update!(**args)
5980
+ @num_next_chunks = args[:num_next_chunks] if args.key?(:num_next_chunks)
5981
+ @num_previous_chunks = args[:num_previous_chunks] if args.key?(:num_previous_chunks)
5982
+ end
5983
+ end
5984
+
5610
5985
  # A specification for configuring the extractive content in a search response.
5611
5986
  class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec
5612
5987
  include Google::Apis::Core::Hashable
@@ -6258,6 +6633,12 @@ module Google
6258
6633
  class GoogleCloudDiscoveryengineV1SearchResponseSearchResult
6259
6634
  include Google::Apis::Core::Hashable
6260
6635
 
6636
+ # Chunk captures all raw metadata information of items to be recommended or
6637
+ # searched in the chunk mode.
6638
+ # Corresponds to the JSON property `chunk`
6639
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Chunk]
6640
+ attr_accessor :chunk
6641
+
6261
6642
  # Document captures all raw metadata information of items to be recommended or
6262
6643
  # searched.
6263
6644
  # Corresponds to the JSON property `document`
@@ -6275,6 +6656,7 @@ module Google
6275
6656
 
6276
6657
  # Update properties of this object
6277
6658
  def update!(**args)
6659
+ @chunk = args[:chunk] if args.key?(:chunk)
6278
6660
  @document = args[:document] if args.key?(:document)
6279
6661
  @id = args[:id] if args.key?(:id)
6280
6662
  end
@@ -8334,6 +8716,11 @@ module Google
8334
8716
  # @return [String]
8335
8717
  attr_accessor :industry_vertical
8336
8718
 
8719
+ # Language info for DataStore.
8720
+ # Corresponds to the JSON property `languageInfo`
8721
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1alphaLanguageInfo]
8722
+ attr_accessor :language_info
8723
+
8337
8724
  # Immutable. The full resource name of the data store. Format: `projects/`
8338
8725
  # project`/locations/`location`/collections/`collection_id`/dataStores/`
8339
8726
  # data_store_id``. This field must be a UTF-8 encoded string with a length limit
@@ -8369,6 +8756,7 @@ module Google
8369
8756
  @document_processing_config = args[:document_processing_config] if args.key?(:document_processing_config)
8370
8757
  @idp_config = args[:idp_config] if args.key?(:idp_config)
8371
8758
  @industry_vertical = args[:industry_vertical] if args.key?(:industry_vertical)
8759
+ @language_info = args[:language_info] if args.key?(:language_info)
8372
8760
  @name = args[:name] if args.key?(:name)
8373
8761
  @solution_types = args[:solution_types] if args.key?(:solution_types)
8374
8762
  @starting_schema = args[:starting_schema] if args.key?(:starting_schema)
@@ -9597,6 +9985,47 @@ module Google
9597
9985
  end
9598
9986
  end
9599
9987
 
9988
+ # Language info for DataStore.
9989
+ class GoogleCloudDiscoveryengineV1alphaLanguageInfo
9990
+ include Google::Apis::Core::Hashable
9991
+
9992
+ # Output only. Language part of normalized_language_code. E.g.: `en-US` -> `en`,
9993
+ # `zh-Hans-HK` -> `zh`, `en` -> `en`.
9994
+ # Corresponds to the JSON property `language`
9995
+ # @return [String]
9996
+ attr_accessor :language
9997
+
9998
+ # The language code for the DataStore.
9999
+ # Corresponds to the JSON property `languageCode`
10000
+ # @return [String]
10001
+ attr_accessor :language_code
10002
+
10003
+ # Output only. This is the normalized form of language_code. E.g.: language_code
10004
+ # of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `
10005
+ # en-GB`.
10006
+ # Corresponds to the JSON property `normalizedLanguageCode`
10007
+ # @return [String]
10008
+ attr_accessor :normalized_language_code
10009
+
10010
+ # Output only. Region part of normalized_language_code, if present. E.g.: `en-US`
10011
+ # -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``.
10012
+ # Corresponds to the JSON property `region`
10013
+ # @return [String]
10014
+ attr_accessor :region
10015
+
10016
+ def initialize(**args)
10017
+ update!(**args)
10018
+ end
10019
+
10020
+ # Update properties of this object
10021
+ def update!(**args)
10022
+ @language = args[:language] if args.key?(:language)
10023
+ @language_code = args[:language_code] if args.key?(:language_code)
10024
+ @normalized_language_code = args[:normalized_language_code] if args.key?(:normalized_language_code)
10025
+ @region = args[:region] if args.key?(:region)
10026
+ end
10027
+ end
10028
+
9600
10029
  # Response message for SearchTuningService.ListCustomModels method.
9601
10030
  class GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse
9602
10031
  include Google::Apis::Core::Hashable
@@ -11016,6 +11445,11 @@ module Google
11016
11445
  # @return [String]
11017
11446
  attr_accessor :industry_vertical
11018
11447
 
11448
+ # Language info for DataStore.
11449
+ # Corresponds to the JSON property `languageInfo`
11450
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaLanguageInfo]
11451
+ attr_accessor :language_info
11452
+
11019
11453
  # Immutable. The full resource name of the data store. Format: `projects/`
11020
11454
  # project`/locations/`location`/collections/`collection_id`/dataStores/`
11021
11455
  # data_store_id``. This field must be a UTF-8 encoded string with a length limit
@@ -11049,6 +11483,7 @@ module Google
11049
11483
  @display_name = args[:display_name] if args.key?(:display_name)
11050
11484
  @document_processing_config = args[:document_processing_config] if args.key?(:document_processing_config)
11051
11485
  @industry_vertical = args[:industry_vertical] if args.key?(:industry_vertical)
11486
+ @language_info = args[:language_info] if args.key?(:language_info)
11052
11487
  @name = args[:name] if args.key?(:name)
11053
11488
  @solution_types = args[:solution_types] if args.key?(:solution_types)
11054
11489
  @starting_schema = args[:starting_schema] if args.key?(:starting_schema)
@@ -11211,6 +11646,11 @@ module Google
11211
11646
  class GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig
11212
11647
  include Google::Apis::Core::Hashable
11213
11648
 
11649
+ # Configuration for chunking config.
11650
+ # Corresponds to the JSON property `chunkingConfig`
11651
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig]
11652
+ attr_accessor :chunking_config
11653
+
11214
11654
  # Related configurations applied to a specific type of document parser.
11215
11655
  # Corresponds to the JSON property `defaultParsingConfig`
11216
11656
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig]
@@ -11238,12 +11678,60 @@ module Google
11238
11678
 
11239
11679
  # Update properties of this object
11240
11680
  def update!(**args)
11681
+ @chunking_config = args[:chunking_config] if args.key?(:chunking_config)
11241
11682
  @default_parsing_config = args[:default_parsing_config] if args.key?(:default_parsing_config)
11242
11683
  @name = args[:name] if args.key?(:name)
11243
11684
  @parsing_config_overrides = args[:parsing_config_overrides] if args.key?(:parsing_config_overrides)
11244
11685
  end
11245
11686
  end
11246
11687
 
11688
+ # Configuration for chunking config.
11689
+ class GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig
11690
+ include Google::Apis::Core::Hashable
11691
+
11692
+ # Configuration for the layout based chunking.
11693
+ # Corresponds to the JSON property `layoutBasedChunkingConfig`
11694
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig]
11695
+ attr_accessor :layout_based_chunking_config
11696
+
11697
+ def initialize(**args)
11698
+ update!(**args)
11699
+ end
11700
+
11701
+ # Update properties of this object
11702
+ def update!(**args)
11703
+ @layout_based_chunking_config = args[:layout_based_chunking_config] if args.key?(:layout_based_chunking_config)
11704
+ end
11705
+ end
11706
+
11707
+ # Configuration for the layout based chunking.
11708
+ class GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig
11709
+ include Google::Apis::Core::Hashable
11710
+
11711
+ # The token size limit for each chunk. Supported values: 100-500 (inclusive).
11712
+ # Default value: 500.
11713
+ # Corresponds to the JSON property `chunkSize`
11714
+ # @return [Fixnum]
11715
+ attr_accessor :chunk_size
11716
+
11717
+ # Whether to include appending different levels of headings to chunks from the
11718
+ # middle of the document to prevent context loss. Default value: False.
11719
+ # Corresponds to the JSON property `includeAncestorHeadings`
11720
+ # @return [Boolean]
11721
+ attr_accessor :include_ancestor_headings
11722
+ alias_method :include_ancestor_headings?, :include_ancestor_headings
11723
+
11724
+ def initialize(**args)
11725
+ update!(**args)
11726
+ end
11727
+
11728
+ # Update properties of this object
11729
+ def update!(**args)
11730
+ @chunk_size = args[:chunk_size] if args.key?(:chunk_size)
11731
+ @include_ancestor_headings = args[:include_ancestor_headings] if args.key?(:include_ancestor_headings)
11732
+ end
11733
+ end
11734
+
11247
11735
  # Related configurations applied to a specific type of document parser.
11248
11736
  class GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig
11249
11737
  include Google::Apis::Core::Hashable
@@ -11253,6 +11741,11 @@ module Google
11253
11741
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig]
11254
11742
  attr_accessor :digital_parsing_config
11255
11743
 
11744
+ # The layout parsing configurations for documents.
11745
+ # Corresponds to the JSON property `layoutParsingConfig`
11746
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig]
11747
+ attr_accessor :layout_parsing_config
11748
+
11256
11749
  # The OCR parsing configurations for documents.
11257
11750
  # Corresponds to the JSON property `ocrParsingConfig`
11258
11751
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig]
@@ -11265,6 +11758,7 @@ module Google
11265
11758
  # Update properties of this object
11266
11759
  def update!(**args)
11267
11760
  @digital_parsing_config = args[:digital_parsing_config] if args.key?(:digital_parsing_config)
11761
+ @layout_parsing_config = args[:layout_parsing_config] if args.key?(:layout_parsing_config)
11268
11762
  @ocr_parsing_config = args[:ocr_parsing_config] if args.key?(:ocr_parsing_config)
11269
11763
  end
11270
11764
  end
@@ -11282,6 +11776,19 @@ module Google
11282
11776
  end
11283
11777
  end
11284
11778
 
11779
+ # The layout parsing configurations for documents.
11780
+ class GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig
11781
+ include Google::Apis::Core::Hashable
11782
+
11783
+ def initialize(**args)
11784
+ update!(**args)
11785
+ end
11786
+
11787
+ # Update properties of this object
11788
+ def update!(**args)
11789
+ end
11790
+ end
11791
+
11285
11792
  # The OCR parsing configurations for documents.
11286
11793
  class GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig
11287
11794
  include Google::Apis::Core::Hashable
@@ -11822,6 +12329,47 @@ module Google
11822
12329
  end
11823
12330
  end
11824
12331
 
12332
+ # Language info for DataStore.
12333
+ class GoogleCloudDiscoveryengineV1betaLanguageInfo
12334
+ include Google::Apis::Core::Hashable
12335
+
12336
+ # Output only. Language part of normalized_language_code. E.g.: `en-US` -> `en`,
12337
+ # `zh-Hans-HK` -> `zh`, `en` -> `en`.
12338
+ # Corresponds to the JSON property `language`
12339
+ # @return [String]
12340
+ attr_accessor :language
12341
+
12342
+ # The language code for the DataStore.
12343
+ # Corresponds to the JSON property `languageCode`
12344
+ # @return [String]
12345
+ attr_accessor :language_code
12346
+
12347
+ # Output only. This is the normalized form of language_code. E.g.: language_code
12348
+ # of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `
12349
+ # en-GB`.
12350
+ # Corresponds to the JSON property `normalizedLanguageCode`
12351
+ # @return [String]
12352
+ attr_accessor :normalized_language_code
12353
+
12354
+ # Output only. Region part of normalized_language_code, if present. E.g.: `en-US`
12355
+ # -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``.
12356
+ # Corresponds to the JSON property `region`
12357
+ # @return [String]
12358
+ attr_accessor :region
12359
+
12360
+ def initialize(**args)
12361
+ update!(**args)
12362
+ end
12363
+
12364
+ # Update properties of this object
12365
+ def update!(**args)
12366
+ @language = args[:language] if args.key?(:language)
12367
+ @language_code = args[:language_code] if args.key?(:language_code)
12368
+ @normalized_language_code = args[:normalized_language_code] if args.key?(:normalized_language_code)
12369
+ @region = args[:region] if args.key?(:region)
12370
+ end
12371
+ end
12372
+
11825
12373
  # Response message for SearchTuningService.ListCustomModels method.
11826
12374
  class GoogleCloudDiscoveryengineV1betaListCustomModelsResponse
11827
12375
  include Google::Apis::Core::Hashable