Class: Google::Apis::DeveloperknowledgeV1::DocumentChunk
- Inherits:
-
Object
- Object
- Google::Apis::DeveloperknowledgeV1::DocumentChunk
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/developerknowledge_v1/classes.rb,
lib/google/apis/developerknowledge_v1/representations.rb,
lib/google/apis/developerknowledge_v1/representations.rb
Overview
A DocumentChunk represents a piece of content from a Document in the
DeveloperKnowledge corpus. To fetch the entire document content, pass the
parent to DeveloperKnowledge.GetDocument or DeveloperKnowledge.
BatchGetDocuments.
Instance Attribute Summary collapse
-
#content ⇒ String
Output only.
-
#document ⇒ Google::Apis::DeveloperknowledgeV1::Document
A Document represents a piece of content from the Developer Knowledge corpus.
-
#id ⇒ String
Output only.
-
#parent ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DocumentChunk
constructor
A new instance of DocumentChunk.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DocumentChunk
Returns a new instance of DocumentChunk.
141 142 143 |
# File 'lib/google/apis/developerknowledge_v1/classes.rb', line 141 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content ⇒ String
Output only. Contains the content of the document chunk.
Corresponds to the JSON property content
120 121 122 |
# File 'lib/google/apis/developerknowledge_v1/classes.rb', line 120 def content @content end |
#document ⇒ Google::Apis::DeveloperknowledgeV1::Document
A Document represents a piece of content from the Developer Knowledge corpus.
Corresponds to the JSON property document
125 126 127 |
# File 'lib/google/apis/developerknowledge_v1/classes.rb', line 125 def document @document end |
#id ⇒ String
Output only. Specifies the ID of this chunk within the document. The chunk ID
is unique within a document, but not globally unique across documents. The
chunk ID is not stable and may change over time.
Corresponds to the JSON property id
132 133 134 |
# File 'lib/google/apis/developerknowledge_v1/classes.rb', line 132 def id @id end |
#parent ⇒ String
Output only. Contains the resource name of the document this chunk is from.
Format: documents/uri_without_scheme`Example:documents/docs.cloud.google.
com/storage/docs/creating-buckets
Corresponds to the JSON propertyparent`
139 140 141 |
# File 'lib/google/apis/developerknowledge_v1/classes.rb', line 139 def parent @parent end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
146 147 148 149 150 151 |
# File 'lib/google/apis/developerknowledge_v1/classes.rb', line 146 def update!(**args) @content = args[:content] if args.key?(:content) @document = args[:document] if args.key?(:document) @id = args[:id] if args.key?(:id) @parent = args[:parent] if args.key?(:parent) end |