com.pulumi.gcp.essentialcontacts.kotlin.DocumentAiWarehouseDocumentSchemaArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.essentialcontacts.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.essentialcontacts.DocumentAiWarehouseDocumentSchemaArgs.builder
import com.pulumi.gcp.essentialcontacts.kotlin.inputs.DocumentAiWarehouseDocumentSchemaPropertyDefinitionArgs
import com.pulumi.gcp.essentialcontacts.kotlin.inputs.DocumentAiWarehouseDocumentSchemaPropertyDefinitionArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* A document schema is used to define document structure.
* To get more information about DocumentSchema, see:
* * [API documentation](https://cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.documentSchemas)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/document-warehouse/docs/manage-document-schemas)
* ## Example Usage
* ### Document Ai Warehouse Document Schema Text
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = gcp.organizations.getProject({});
* const exampleText = new gcp.essentialcontacts.DocumentAiWarehouseDocumentSchema("example_text", {
* projectNumber: project.then(project => project.number),
* displayName: "test-property-text",
* location: "us",
* documentIsFolder: false,
* propertyDefinitions: [{
* name: "prop3",
* displayName: "propdisp3",
* isRepeatable: false,
* isFilterable: true,
* isSearchable: true,
* isMetadata: false,
* isRequired: false,
* retrievalImportance: "HIGHEST",
* schemaSources: [{
* name: "dummy_source",
* processorType: "dummy_processor",
* }],
* textTypeOptions: {},
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.get_project()
* example_text = gcp.essentialcontacts.DocumentAiWarehouseDocumentSchema("example_text",
* project_number=project.number,
* display_name="test-property-text",
* location="us",
* document_is_folder=False,
* property_definitions=[gcp.essentialcontacts.DocumentAiWarehouseDocumentSchemaPropertyDefinitionArgs(
* name="prop3",
* display_name="propdisp3",
* is_repeatable=False,
* is_filterable=True,
* is_searchable=True,
* is_metadata=False,
* is_required=False,
* retrieval_importance="HIGHEST",
* schema_sources=[gcp.essentialcontacts.DocumentAiWarehouseDocumentSchemaPropertyDefinitionSchemaSourceArgs(
* name="dummy_source",
* processor_type="dummy_processor",
* )],
* text_type_options=gcp.essentialcontacts.DocumentAiWarehouseDocumentSchemaPropertyDefinitionTextTypeOptionsArgs(),
* )])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var project = Gcp.Organizations.GetProject.Invoke();
* var exampleText = new Gcp.EssentialContacts.DocumentAiWarehouseDocumentSchema("example_text", new()
* {
* ProjectNumber = project.Apply(getProjectResult => getProjectResult.Number),
* DisplayName = "test-property-text",
* Location = "us",
* DocumentIsFolder = false,
* PropertyDefinitions = new[]
* {
* new Gcp.EssentialContacts.Inputs.DocumentAiWarehouseDocumentSchemaPropertyDefinitionArgs
* {
* Name = "prop3",
* DisplayName = "propdisp3",
* IsRepeatable = false,
* IsFilterable = true,
* IsSearchable = true,
* IsMetadata = false,
* IsRequired = false,
* RetrievalImportance = "HIGHEST",
* SchemaSources = new[]
* {
* new Gcp.EssentialContacts.Inputs.DocumentAiWarehouseDocumentSchemaPropertyDefinitionSchemaSourceArgs
* {
* Name = "dummy_source",
* ProcessorType = "dummy_processor",
* },
* },
* TextTypeOptions = null,
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/essentialcontacts"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* project, err := organizations.LookupProject(ctx, nil, nil)
* if err != nil {
* return err
* }
* _, err = essentialcontacts.NewDocumentAiWarehouseDocumentSchema(ctx, "example_text", &essentialcontacts.DocumentAiWarehouseDocumentSchemaArgs{
* ProjectNumber: pulumi.String(project.Number),
* DisplayName: pulumi.String("test-property-text"),
* Location: pulumi.String("us"),
* DocumentIsFolder: pulumi.Bool(false),
* PropertyDefinitions: essentialcontacts.DocumentAiWarehouseDocumentSchemaPropertyDefinitionArray{
* &essentialcontacts.DocumentAiWarehouseDocumentSchemaPropertyDefinitionArgs{
* Name: pulumi.String("prop3"),
* DisplayName: pulumi.String("propdisp3"),
* IsRepeatable: pulumi.Bool(false),
* IsFilterable: pulumi.Bool(true),
* IsSearchable: pulumi.Bool(true),
* IsMetadata: pulumi.Bool(false),
* IsRequired: pulumi.Bool(false),
* RetrievalImportance: pulumi.String("HIGHEST"),
* SchemaSources: essentialcontacts.DocumentAiWarehouseDocumentSchemaPropertyDefinitionSchemaSourceArray{
* &essentialcontacts.DocumentAiWarehouseDocumentSchemaPropertyDefinitionSchemaSourceArgs{
* Name: pulumi.String("dummy_source"),
* ProcessorType: pulumi.String("dummy_processor"),
* },
* },
* TextTypeOptions: nil,
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
* import com.pulumi.gcp.essentialcontacts.DocumentAiWarehouseDocumentSchema;
* import com.pulumi.gcp.essentialcontacts.DocumentAiWarehouseDocumentSchemaArgs;
* import com.pulumi.gcp.essentialcontacts.inputs.DocumentAiWarehouseDocumentSchemaPropertyDefinitionArgs;
* import com.pulumi.gcp.essentialcontacts.inputs.DocumentAiWarehouseDocumentSchemaPropertyDefinitionTextTypeOptionsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* final var project = OrganizationsFunctions.getProject();
* var exampleText = new DocumentAiWarehouseDocumentSchema("exampleText", DocumentAiWarehouseDocumentSchemaArgs.builder()
* .projectNumber(project.applyValue(getProjectResult -> getProjectResult.number()))
* .displayName("test-property-text")
* .location("us")
* .documentIsFolder(false)
* .propertyDefinitions(DocumentAiWarehouseDocumentSchemaPropertyDefinitionArgs.builder()
* .name("prop3")
* .displayName("propdisp3")
* .isRepeatable(false)
* .isFilterable(true)
* .isSearchable(true)
* .isMetadata(false)
* .isRequired(false)
* .retrievalImportance("HIGHEST")
* .schemaSources(DocumentAiWarehouseDocumentSchemaPropertyDefinitionSchemaSourceArgs.builder()
* .name("dummy_source")
* .processorType("dummy_processor")
* .build())
* .textTypeOptions()
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleText:
* type: gcp:essentialcontacts:DocumentAiWarehouseDocumentSchema
* name: example_text
* properties:
* projectNumber: ${project.number}
* displayName: test-property-text
* location: us
* documentIsFolder: false
* propertyDefinitions:
* - name: prop3
* displayName: propdisp3
* isRepeatable: false
* isFilterable: true
* isSearchable: true
* isMetadata: false
* isRequired: false
* retrievalImportance: HIGHEST
* schemaSources:
* - name: dummy_source
* processorType: dummy_processor
* textTypeOptions: {}
* variables:
* project:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* ```
*
* ## Import
* DocumentSchema can be imported using any of these accepted formats:
* * `projects/{{project_number}}/locations/{{location}}/documentSchemas/{{name}}`
* * `{{project_number}}/{{location}}/{{name}}`
* When using the `pulumi import` command, DocumentSchema can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:essentialcontacts/documentAiWarehouseDocumentSchema:DocumentAiWarehouseDocumentSchema default projects/{{project_number}}/locations/{{location}}/documentSchemas/{{name}}
* ```
* ```sh
* $ pulumi import gcp:essentialcontacts/documentAiWarehouseDocumentSchema:DocumentAiWarehouseDocumentSchema default {{project_number}}/{{location}}/{{name}}
* ```
* @property displayName Name of the schema given by the user.
* @property documentIsFolder Tells whether the document is a folder or a typical document.
* @property location The location of the resource.
* @property projectNumber The unique identifier of the project.
* @property propertyDefinitions Defines the metadata for a schema property.
* Structure is documented below.
*/
public data class DocumentAiWarehouseDocumentSchemaArgs(
public val displayName: Output? = null,
public val documentIsFolder: Output? = null,
public val location: Output? = null,
public val projectNumber: Output? = null,
public val propertyDefinitions: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.essentialcontacts.DocumentAiWarehouseDocumentSchemaArgs =
com.pulumi.gcp.essentialcontacts.DocumentAiWarehouseDocumentSchemaArgs.builder()
.displayName(displayName?.applyValue({ args0 -> args0 }))
.documentIsFolder(documentIsFolder?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.projectNumber(projectNumber?.applyValue({ args0 -> args0 }))
.propertyDefinitions(
propertyDefinitions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [DocumentAiWarehouseDocumentSchemaArgs].
*/
@PulumiTagMarker
public class DocumentAiWarehouseDocumentSchemaArgsBuilder internal constructor() {
private var displayName: Output? = null
private var documentIsFolder: Output? = null
private var location: Output? = null
private var projectNumber: Output? = null
private var propertyDefinitions:
Output>? = null
/**
* @param value Name of the schema given by the user.
*/
@JvmName("qmfpdwkiysuwugsv")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value Tells whether the document is a folder or a typical document.
*/
@JvmName("gfqnmnwvxnomunkb")
public suspend fun documentIsFolder(`value`: Output) {
this.documentIsFolder = value
}
/**
* @param value The location of the resource.
*/
@JvmName("kkqhvgxketvrxaxp")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The unique identifier of the project.
*/
@JvmName("ctrjgeothnxxofsn")
public suspend fun projectNumber(`value`: Output) {
this.projectNumber = value
}
/**
* @param value Defines the metadata for a schema property.
* Structure is documented below.
*/
@JvmName("mypdccbqhpswknvw")
public suspend fun propertyDefinitions(`value`: Output>) {
this.propertyDefinitions = value
}
@JvmName("xtnjnonjtnbcemds")
public suspend fun propertyDefinitions(vararg values: Output) {
this.propertyDefinitions = Output.all(values.asList())
}
/**
* @param values Defines the metadata for a schema property.
* Structure is documented below.
*/
@JvmName("xfxcfvxrusrkfywx")
public suspend fun propertyDefinitions(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy