![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.gcp.discoveryengine.kotlin.SchemaArgs.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.discoveryengine.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.discoveryengine.SchemaArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Schema defines the structure and layout of a type of document data.
* To get more information about Schema, see:
* * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.dataStores.schemas)
* * How-to Guides
* * [Provide a schema for your data store](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)
* ## Example Usage
* ### Discoveryengine Schema Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const basicDataStore = new gcp.discoveryengine.DataStore("basic", {
* location: "global",
* dataStoreId: "data-store-id",
* displayName: "tf-test-structured-datastore",
* industryVertical: "GENERIC",
* contentConfig: "NO_CONTENT",
* solutionTypes: ["SOLUTION_TYPE_SEARCH"],
* createAdvancedSiteSearch: false,
* skipDefaultSchemaCreation: true,
* });
* const basic = new gcp.discoveryengine.Schema("basic", {
* location: basicDataStore.location,
* dataStoreId: basicDataStore.dataStoreId,
* schemaId: "schema-id",
* jsonSchema: "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"datetime_detection\":true,\"type\":\"object\",\"geolocation_detection\":true}",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* basic_data_store = gcp.discoveryengine.DataStore("basic",
* location="global",
* data_store_id="data-store-id",
* display_name="tf-test-structured-datastore",
* industry_vertical="GENERIC",
* content_config="NO_CONTENT",
* solution_types=["SOLUTION_TYPE_SEARCH"],
* create_advanced_site_search=False,
* skip_default_schema_creation=True)
* basic = gcp.discoveryengine.Schema("basic",
* location=basic_data_store.location,
* data_store_id=basic_data_store.data_store_id,
* schema_id="schema-id",
* json_schema="{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"datetime_detection\":true,\"type\":\"object\",\"geolocation_detection\":true}")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var basicDataStore = new Gcp.DiscoveryEngine.DataStore("basic", new()
* {
* Location = "global",
* DataStoreId = "data-store-id",
* DisplayName = "tf-test-structured-datastore",
* IndustryVertical = "GENERIC",
* ContentConfig = "NO_CONTENT",
* SolutionTypes = new[]
* {
* "SOLUTION_TYPE_SEARCH",
* },
* CreateAdvancedSiteSearch = false,
* SkipDefaultSchemaCreation = true,
* });
* var basic = new Gcp.DiscoveryEngine.Schema("basic", new()
* {
* Location = basicDataStore.Location,
* DataStoreId = basicDataStore.DataStoreId,
* SchemaId = "schema-id",
* JsonSchema = "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"datetime_detection\":true,\"type\":\"object\",\"geolocation_detection\":true}",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/discoveryengine"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* basicDataStore, err := discoveryengine.NewDataStore(ctx, "basic", &discoveryengine.DataStoreArgs{
* Location: pulumi.String("global"),
* DataStoreId: pulumi.String("data-store-id"),
* DisplayName: pulumi.String("tf-test-structured-datastore"),
* IndustryVertical: pulumi.String("GENERIC"),
* ContentConfig: pulumi.String("NO_CONTENT"),
* SolutionTypes: pulumi.StringArray{
* pulumi.String("SOLUTION_TYPE_SEARCH"),
* },
* CreateAdvancedSiteSearch: pulumi.Bool(false),
* SkipDefaultSchemaCreation: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = discoveryengine.NewSchema(ctx, "basic", &discoveryengine.SchemaArgs{
* Location: basicDataStore.Location,
* DataStoreId: basicDataStore.DataStoreId,
* SchemaId: pulumi.String("schema-id"),
* JsonSchema: pulumi.String("{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"datetime_detection\":true,\"type\":\"object\",\"geolocation_detection\":true}"),
* })
* 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.discoveryengine.DataStore;
* import com.pulumi.gcp.discoveryengine.DataStoreArgs;
* import com.pulumi.gcp.discoveryengine.Schema;
* import com.pulumi.gcp.discoveryengine.SchemaArgs;
* 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) {
* var basicDataStore = new DataStore("basicDataStore", DataStoreArgs.builder()
* .location("global")
* .dataStoreId("data-store-id")
* .displayName("tf-test-structured-datastore")
* .industryVertical("GENERIC")
* .contentConfig("NO_CONTENT")
* .solutionTypes("SOLUTION_TYPE_SEARCH")
* .createAdvancedSiteSearch(false)
* .skipDefaultSchemaCreation(true)
* .build());
* var basic = new Schema("basic", SchemaArgs.builder()
* .location(basicDataStore.location())
* .dataStoreId(basicDataStore.dataStoreId())
* .schemaId("schema-id")
* .jsonSchema("{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"datetime_detection\":true,\"type\":\"object\",\"geolocation_detection\":true}")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* basic:
* type: gcp:discoveryengine:Schema
* properties:
* location: ${basicDataStore.location}
* dataStoreId: ${basicDataStore.dataStoreId}
* schemaId: schema-id
* jsonSchema: '{"$schema":"https://json-schema.org/draft/2020-12/schema","datetime_detection":true,"type":"object","geolocation_detection":true}'
* basicDataStore:
* type: gcp:discoveryengine:DataStore
* name: basic
* properties:
* location: global
* dataStoreId: data-store-id
* displayName: tf-test-structured-datastore
* industryVertical: GENERIC
* contentConfig: NO_CONTENT
* solutionTypes:
* - SOLUTION_TYPE_SEARCH
* createAdvancedSiteSearch: false
* skipDefaultSchemaCreation: true
* ```
*
* ## Import
* Schema can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}/schemas/{{schema_id}}`
* * `{{project}}/{{location}}/{{data_store_id}}/{{schema_id}}`
* * `{{location}}/{{data_store_id}}/{{schema_id}}`
* When using the `pulumi import` command, Schema can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:discoveryengine/schema:Schema default projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}/schemas/{{schema_id}}
* ```
* ```sh
* $ pulumi import gcp:discoveryengine/schema:Schema default {{project}}/{{location}}/{{data_store_id}}/{{schema_id}}
* ```
* ```sh
* $ pulumi import gcp:discoveryengine/schema:Schema default {{location}}/{{data_store_id}}/{{schema_id}}
* ```
* @property dataStoreId The unique id of the data store.
* @property jsonSchema The JSON representation of the schema.
* @property location The geographic location where the data store should reside. The value can
* only be one of "global", "us" and "eu".
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property schemaId The unique id of the schema.
* - - -
*/
public data class SchemaArgs(
public val dataStoreId: Output? = null,
public val jsonSchema: Output? = null,
public val location: Output? = null,
public val project: Output? = null,
public val schemaId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.discoveryengine.SchemaArgs =
com.pulumi.gcp.discoveryengine.SchemaArgs.builder()
.dataStoreId(dataStoreId?.applyValue({ args0 -> args0 }))
.jsonSchema(jsonSchema?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.schemaId(schemaId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SchemaArgs].
*/
@PulumiTagMarker
public class SchemaArgsBuilder internal constructor() {
private var dataStoreId: Output? = null
private var jsonSchema: Output? = null
private var location: Output? = null
private var project: Output? = null
private var schemaId: Output? = null
/**
* @param value The unique id of the data store.
*/
@JvmName("tliecrochdgnmndj")
public suspend fun dataStoreId(`value`: Output) {
this.dataStoreId = value
}
/**
* @param value The JSON representation of the schema.
*/
@JvmName("npxbekauijejgjxa")
public suspend fun jsonSchema(`value`: Output) {
this.jsonSchema = value
}
/**
* @param value The geographic location where the data store should reside. The value can
* only be one of "global", "us" and "eu".
*/
@JvmName("jxdyoecxbbhfsglc")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("cxkbnqicipmhehaj")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The unique id of the schema.
* - - -
*/
@JvmName("crxekpwlouheacna")
public suspend fun schemaId(`value`: Output) {
this.schemaId = value
}
/**
* @param value The unique id of the data store.
*/
@JvmName("nlgxydvgmsryyfyy")
public suspend fun dataStoreId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.dataStoreId = mapped
}
/**
* @param value The JSON representation of the schema.
*/
@JvmName("dypnaxschhqxfekn")
public suspend fun jsonSchema(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.jsonSchema = mapped
}
/**
* @param value The geographic location where the data store should reside. The value can
* only be one of "global", "us" and "eu".
*/
@JvmName("wbbhqymktkveaynl")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("lcnddbnrrgpocbtg")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value The unique id of the schema.
* - - -
*/
@JvmName("rqttotgtvgivwtvl")
public suspend fun schemaId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.schemaId = mapped
}
internal fun build(): SchemaArgs = SchemaArgs(
dataStoreId = dataStoreId,
jsonSchema = jsonSchema,
location = location,
project = project,
schemaId = schemaId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy