Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaChunk

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb

Overview

Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaChunk

Returns a new instance of GoogleCloudDiscoveryengineV1alphaChunk.



2034
2035
2036
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2034

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#chunk_metadataGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata

Metadata of the current chunk. This field is only populated on SearchService. Search API. Corresponds to the JSON property chunkMetadata



1997
1998
1999
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1997

def 
  @chunk_metadata
end

#contentString

Content is a string from a document (parsed content). Corresponds to the JSON property content

Returns:

  • (String)


2002
2003
2004
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2002

def content
  @content
end

#derived_struct_dataHash<String,Object>

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. Corresponds to the JSON property derivedStructData

Returns:

  • (Hash<String,Object>)


2008
2009
2010
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2008

def derived_struct_data
  @derived_struct_data
end

#document_metadataGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata

Document metadata contains the information of the document of the current chunk. Corresponds to the JSON property documentMetadata



2014
2015
2016
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2014

def 
  @document_metadata
end

#idString

Unique chunk id of the current chunk. Corresponds to the JSON property id

Returns:

  • (String)


2019
2020
2021
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2019

def id
  @id
end

#nameString

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. Corresponds to the JSON propertyname`

Returns:

  • (String)


2027
2028
2029
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2027

def name
  @name
end

#page_spanGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaChunkPageSpan

Page span of the chunk. Corresponds to the JSON property pageSpan



2032
2033
2034
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2032

def page_span
  @page_span
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2039
2040
2041
2042
2043
2044
2045
2046
2047
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2039

def update!(**args)
  @chunk_metadata = args[:chunk_metadata] if args.key?(:chunk_metadata)
  @content = args[:content] if args.key?(:content)
  @derived_struct_data = args[:derived_struct_data] if args.key?(:derived_struct_data)
  @document_metadata = args[:document_metadata] if args.key?(:document_metadata)
  @id = args[:id] if args.key?(:id)
  @name = args[:name] if args.key?(:name)
  @page_span = args[:page_span] if args.key?(:page_span)
end