import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * An example represents a sample conversation between the user and the agent(s). * * ## Example Usage * * ### Ces Example Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const my_app = new gcp.ces.App("my-app", { * location: "us", * displayName: "my-app", * appId: "app-id", * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const my_example = new gcp.ces.Example("my-example", { * location: "us", * displayName: "my-example", * app: my_app.name, * exampleId: "example-id", * description: "example description", * messages: [{ * chunks: [ * { * image: { * mimeType: "image/png", * data: std.base64encode({ * input: "This is some fake image binary data.", * }).then(invoke => invoke.result), * }, * }, * { * text: "text_data", * }, * { * updatedVariables: JSON.stringify({ * var1: "val1", * var2: "val2", * }), * }, * ], * role: "agent", * }], * }); * ``` * * ## Import * * Example can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/apps/{{app}}/examples/{{name}}` * * * `{{project}}/{{location}}/{{app}}/{{name}}` * * * `{{location}}/{{app}}/{{name}}` * * When using the `pulumi import` command, Example can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:ces/example:Example default projects/{{project}}/locations/{{location}}/apps/{{app}}/examples/{{name}} * ``` * * ```sh * $ pulumi import gcp:ces/example:Example default {{project}}/{{location}}/{{app}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:ces/example:Example default {{location}}/{{app}}/{{name}} * ``` */ export declare class Example extends pulumi.CustomResource { /** * Get an existing Example 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ExampleState, opts?: pulumi.CustomResourceOptions): Example; /** * Returns true if the given object is an instance of Example. 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 Example; /** * Resource ID segment making up resource `name`, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ readonly app: pulumi.Output; /** * Timestamp when the example was created. */ readonly createTime: pulumi.Output; /** * Human-readable description of the example. */ readonly description: pulumi.Output; /** * Display name of the example. */ readonly displayName: pulumi.Output; /** * Etag used to ensure the object hasn't changed during a read-modify-write * operation. If the etag is empty, the update will overwrite any concurrent * changes. */ readonly etag: pulumi.Output; readonly exampleId: pulumi.Output; /** * The example may become invalid if referencing resources are deleted. * Invalid examples will not be used as few-shot examples. */ readonly invalid: pulumi.Output; /** * Resource ID segment making up resource `name`, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ readonly location: pulumi.Output; /** * The collection of messages that make up the conversation. * Structure is documented below. */ readonly messages: pulumi.Output; /** * Identifier. The unique identifier of the example. * Format: * `projects/{project}/locations/{location}/apps/{app}/examples/{example}` */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * Timestamp when the example was last updated. */ readonly updateTime: pulumi.Output; /** * Create a Example 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: ExampleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Example resources. */ export interface ExampleState { /** * Resource ID segment making up resource `name`, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ app?: pulumi.Input; /** * Timestamp when the example was created. */ createTime?: pulumi.Input; /** * Human-readable description of the example. */ description?: pulumi.Input; /** * Display name of the example. */ displayName?: pulumi.Input; /** * Etag used to ensure the object hasn't changed during a read-modify-write * operation. If the etag is empty, the update will overwrite any concurrent * changes. */ etag?: pulumi.Input; exampleId?: pulumi.Input; /** * The example may become invalid if referencing resources are deleted. * Invalid examples will not be used as few-shot examples. */ invalid?: pulumi.Input; /** * Resource ID segment making up resource `name`, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location?: pulumi.Input; /** * The collection of messages that make up the conversation. * Structure is documented below. */ messages?: pulumi.Input[]>; /** * Identifier. The unique identifier of the example. * Format: * `projects/{project}/locations/{location}/apps/{app}/examples/{example}` */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Timestamp when the example was last updated. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Example resource. */ export interface ExampleArgs { /** * Resource ID segment making up resource `name`, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ app: pulumi.Input; /** * Human-readable description of the example. */ description?: pulumi.Input; /** * Display name of the example. */ displayName: pulumi.Input; exampleId: pulumi.Input; /** * Resource ID segment making up resource `name`, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location: pulumi.Input; /** * The collection of messages that make up the conversation. * Structure is documented below. */ messages?: pulumi.Input[]>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; }