DocumentArgs

data class DocumentArgs(val contentUri: Output<String>? = null, val displayName: Output<String>? = null, val enableAutoReload: Output<Boolean>? = null, val knowledgeBaseId: Output<String>? = null, val knowledgeTypes: Output<List<DocumentKnowledgeTypesItem>>? = null, val location: Output<String>? = null, val metadata: Output<Map<String, String>>? = null, val mimeType: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val rawContent: Output<String>? = null) : ConvertibleToJava<DocumentArgs>

Creates a new document. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: KnowledgeOperationMetadata - response: Document

Constructors

Link copied to clipboard
fun DocumentArgs(contentUri: Output<String>? = null, displayName: Output<String>? = null, enableAutoReload: Output<Boolean>? = null, knowledgeBaseId: Output<String>? = null, knowledgeTypes: Output<List<DocumentKnowledgeTypesItem>>? = null, location: Output<String>? = null, metadata: Output<Map<String, String>>? = null, mimeType: Output<String>? = null, name: Output<String>? = null, project: Output<String>? = null, rawContent: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): DocumentArgs

Properties

Link copied to clipboard
val contentUri: Output<String>? = null

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 the gs:// format URI described above.

Link copied to clipboard
val displayName: Output<String>? = null

The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.

Link copied to clipboard
val enableAutoReload: Output<Boolean>? = null

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 source field for the source types. Reload status can be tracked in latest_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. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.

Link copied to clipboard
val knowledgeBaseId: Output<String>? = null
Link copied to clipboard

The knowledge type of document content.

Link copied to clipboard
val location: Output<String>? = null
Link copied to clipboard
val metadata: Output<Map<String, String>>? = null

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 key or a value of the metadata is 1024 bytes.

Link copied to clipboard
val mimeType: Output<String>? = null

The MIME type of this document.

Link copied to clipboard
val name: Output<String>? = null

Optional. The document resource name. The name must be empty when creating a document. Format: projects//locations//knowledgeBases//documents/.

Link copied to clipboard
val project: Output<String>? = null
Link copied to clipboard
val rawContent: Output<String>? = null

The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.