DocumentArgs class
The set of arguments for Document. The set of arguments for Document.
Constructors
-
DocumentArgs({Input<
String> ? contentUri, required Input<String> displayName, Input<bool> ? enableAutoReload, required Input<String> knowledgeBaseId, required Input<List< knowledgeTypes, Input<DocumentKnowledgeTypesItem> >String> ? location, Input<Map< ? metadata, required Input<String, String> >String> mimeType, Input<String> ? name, Input<String> ? project, Input<String> ? rawContent}) -
Creates a new DocumentArgs.
contentUriThe URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the formgs:///. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use thegs://format URI described above.displayNameThe display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.enableAutoReloadOptional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, seesourcefield for the source types. Reload status can be tracked inlatest_reload_status. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by callingReloadDocumentand clear the errors.knowledgeBaseIdRequired.knowledgeTypesThe knowledge type of document content.locationOptional.metadataOptional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of akeyor avalueof the metadata is 1024 bytes.mimeTypeThe MIME type of this document.nameOptional. The document resource name. The name must be empty when creating a document. Format:projects//locations//knowledgeBases//documents/.projectOptional.rawContentThe raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.const -
DocumentArgs.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
contentUri
→ Input<
String> ? -
The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form
gs:///. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use thegs://format URI described above.final -
displayName
→ Input<
String> -
The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
final
-
enableAutoReload
→ Input<
bool> ? -
Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see
sourcefield for the source types. Reload status can be tracked inlatest_reload_status. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by callingReloadDocumentand clear the errors.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
knowledgeBaseId
→ Input<
String> -
final
-
knowledgeTypes
→ Input<
List< DocumentKnowledgeTypesItem> > -
The knowledge type of document content.
final
-
location
→ Input<
String> ? -
final
-
metadata
→ Input<
Map< ?String, String> > -
Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a
keyor avalueof the metadata is 1024 bytes.final -
mimeType
→ Input<
String> -
The MIME type of this document.
final
-
name
→ Input<
String> ? -
Optional. The document resource name. The name must be empty when creating a document. Format:
projects//locations//knowledgeBases//documents/.final -
project
→ Input<
String> ? -
final
-
rawContent
→ Input<
String> ? -
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited