import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../../types/output"; import * as enums from "../../types/enums"; /** * Creates a new document. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: Document */ export declare class Document extends pulumi.CustomResource { /** * Get an existing Document resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Document; /** * Returns true if the given object is an instance of Document. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Document; /** * 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. */ readonly contentUri: pulumi.Output; /** * The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. */ readonly displayName: pulumi.Output; /** * 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. PERMISSION_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. */ readonly enableAutoReload: pulumi.Output; readonly knowledgeBaseId: pulumi.Output; /** * The knowledge type of document content. */ readonly knowledgeTypes: pulumi.Output; /** * The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded. */ readonly latestReloadStatus: pulumi.Output; readonly location: pulumi.Output; /** * 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. */ readonly metadata: pulumi.Output<{ [key: string]: string; }>; /** * The MIME type of this document. */ readonly mimeType: pulumi.Output; /** * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. */ readonly name: pulumi.Output; readonly project: pulumi.Output; /** * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. */ readonly rawContent: pulumi.Output; /** * The current state of the document. */ readonly state: pulumi.Output; /** * Create a Document resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DocumentArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a Document resource. */ export interface DocumentArgs { /** * 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. */ contentUri?: pulumi.Input; /** * The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. */ displayName: pulumi.Input; /** * 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. PERMISSION_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. */ enableAutoReload?: pulumi.Input; knowledgeBaseId: pulumi.Input; /** * The knowledge type of document content. */ knowledgeTypes: pulumi.Input[]>; location?: pulumi.Input; /** * 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. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The MIME type of this document. */ mimeType: pulumi.Input; /** * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. */ name?: pulumi.Input; project?: pulumi.Input; /** * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. */ rawContent?: pulumi.Input; }