github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lex/intent.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package lex
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an Amazon Lex Intent resource. For more information see
    16  // [Amazon Lex: How It Works](https://docs.aws.amazon.com/lex/latest/dg/how-it-works.html)
    17  //
    18  // ## Example Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := lex.NewIntent(ctx, "order_flowers_intent", &lex.IntentArgs{
    34  //				ConfirmationPrompt: &lex.IntentConfirmationPromptArgs{
    35  //					MaxAttempts: pulumi.Int(2),
    36  //					Messages: lex.IntentConfirmationPromptMessageArray{
    37  //						&lex.IntentConfirmationPromptMessageArgs{
    38  //							Content:     pulumi.String("Okay, your {FlowerType} will be ready for pickup by {PickupTime} on {PickupDate}.  Does this sound okay?"),
    39  //							ContentType: pulumi.String("PlainText"),
    40  //						},
    41  //					},
    42  //				},
    43  //				CreateVersion: pulumi.Bool(false),
    44  //				Name:          pulumi.String("OrderFlowers"),
    45  //				Description:   pulumi.String("Intent to order a bouquet of flowers for pick up"),
    46  //				FulfillmentActivity: &lex.IntentFulfillmentActivityArgs{
    47  //					Type: pulumi.String("ReturnIntent"),
    48  //				},
    49  //				RejectionStatement: &lex.IntentRejectionStatementArgs{
    50  //					Messages: lex.IntentRejectionStatementMessageArray{
    51  //						&lex.IntentRejectionStatementMessageArgs{
    52  //							Content:     pulumi.String("Okay, I will not place your order."),
    53  //							ContentType: pulumi.String("PlainText"),
    54  //						},
    55  //					},
    56  //				},
    57  //				SampleUtterances: pulumi.StringArray{
    58  //					pulumi.String("I would like to order some flowers"),
    59  //					pulumi.String("I would like to pick up flowers"),
    60  //				},
    61  //				Slots: lex.IntentSlotArray{
    62  //					&lex.IntentSlotArgs{
    63  //						Description: pulumi.String("The type of flowers to pick up"),
    64  //						Name:        pulumi.String("FlowerType"),
    65  //						Priority:    pulumi.Int(1),
    66  //						SampleUtterances: pulumi.StringArray{
    67  //							pulumi.String("I would like to order {FlowerType}"),
    68  //						},
    69  //						SlotConstraint:  pulumi.String("Required"),
    70  //						SlotType:        pulumi.String("FlowerTypes"),
    71  //						SlotTypeVersion: pulumi.String("$$LATEST"),
    72  //						ValueElicitationPrompt: &lex.IntentSlotValueElicitationPromptArgs{
    73  //							MaxAttempts: pulumi.Int(2),
    74  //							Messages: lex.IntentSlotValueElicitationPromptMessageArray{
    75  //								&lex.IntentSlotValueElicitationPromptMessageArgs{
    76  //									Content:     pulumi.String("What type of flowers would you like to order?"),
    77  //									ContentType: pulumi.String("PlainText"),
    78  //								},
    79  //							},
    80  //						},
    81  //					},
    82  //					&lex.IntentSlotArgs{
    83  //						Description: pulumi.String("The date to pick up the flowers"),
    84  //						Name:        pulumi.String("PickupDate"),
    85  //						Priority:    pulumi.Int(2),
    86  //						SampleUtterances: pulumi.StringArray{
    87  //							pulumi.String("I would like to order {FlowerType}"),
    88  //						},
    89  //						SlotConstraint:  pulumi.String("Required"),
    90  //						SlotType:        pulumi.String("AMAZON.DATE"),
    91  //						SlotTypeVersion: pulumi.String("$$LATEST"),
    92  //						ValueElicitationPrompt: &lex.IntentSlotValueElicitationPromptArgs{
    93  //							MaxAttempts: pulumi.Int(2),
    94  //							Messages: lex.IntentSlotValueElicitationPromptMessageArray{
    95  //								&lex.IntentSlotValueElicitationPromptMessageArgs{
    96  //									Content:     pulumi.String("What day do you want the {FlowerType} to be picked up?"),
    97  //									ContentType: pulumi.String("PlainText"),
    98  //								},
    99  //							},
   100  //						},
   101  //					},
   102  //					&lex.IntentSlotArgs{
   103  //						Description: pulumi.String("The time to pick up the flowers"),
   104  //						Name:        pulumi.String("PickupTime"),
   105  //						Priority:    pulumi.Int(3),
   106  //						SampleUtterances: pulumi.StringArray{
   107  //							pulumi.String("I would like to order {FlowerType}"),
   108  //						},
   109  //						SlotConstraint:  pulumi.String("Required"),
   110  //						SlotType:        pulumi.String("AMAZON.TIME"),
   111  //						SlotTypeVersion: pulumi.String("$$LATEST"),
   112  //						ValueElicitationPrompt: &lex.IntentSlotValueElicitationPromptArgs{
   113  //							MaxAttempts: pulumi.Int(2),
   114  //							Messages: lex.IntentSlotValueElicitationPromptMessageArray{
   115  //								&lex.IntentSlotValueElicitationPromptMessageArgs{
   116  //									Content:     pulumi.String("Pick up the {FlowerType} at what time on {PickupDate}?"),
   117  //									ContentType: pulumi.String("PlainText"),
   118  //								},
   119  //							},
   120  //						},
   121  //					},
   122  //				},
   123  //			})
   124  //			if err != nil {
   125  //				return err
   126  //			}
   127  //			return nil
   128  //		})
   129  //	}
   130  //
   131  // ```
   132  // <!--End PulumiCodeChooser -->
   133  //
   134  // ## Import
   135  //
   136  // Using `pulumi import`, import intents using their name. For example:
   137  //
   138  // ```sh
   139  // $ pulumi import aws:lex/intent:Intent order_flowers_intent OrderFlowers
   140  // ```
   141  type Intent struct {
   142  	pulumi.CustomResourceState
   143  
   144  	// The ARN of the Lex intent.
   145  	Arn pulumi.StringOutput `pulumi:"arn"`
   146  	// Checksum identifying the version of the intent that was created. The checksum is not
   147  	// included as an argument because the resource will add it automatically when updating the intent.
   148  	Checksum pulumi.StringOutput `pulumi:"checksum"`
   149  	// The statement that you want Amazon Lex to convey to the user
   150  	// after the intent is successfully fulfilled by the Lambda function. This element is relevant only if
   151  	// you provide a Lambda function in the `fulfillmentActivity`. If you return the intent to the client
   152  	// application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
   153  	// mutually exclusive. You can specify only one. Attributes are documented under statement.
   154  	ConclusionStatement IntentConclusionStatementPtrOutput `pulumi:"conclusionStatement"`
   155  	// Prompts the user to confirm the intent. This question should
   156  	// have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
   157  	// or neither. Attributes are documented under prompt.
   158  	ConfirmationPrompt IntentConfirmationPromptPtrOutput `pulumi:"confirmationPrompt"`
   159  	// Determines if a new slot type version is created when the initial
   160  	// resource is created and on each update. Defaults to `false`.
   161  	CreateVersion pulumi.BoolPtrOutput `pulumi:"createVersion"`
   162  	// The date when the intent version was created.
   163  	CreatedDate pulumi.StringOutput `pulumi:"createdDate"`
   164  	// A description of the intent. Must be less than or equal to 200 characters in length.
   165  	Description pulumi.StringPtrOutput `pulumi:"description"`
   166  	// Specifies a Lambda function to invoke for each user input. You can
   167  	// invoke this Lambda function to personalize user interaction. Attributes are documented under code_hook.
   168  	DialogCodeHook IntentDialogCodeHookPtrOutput `pulumi:"dialogCodeHook"`
   169  	// Amazon Lex uses this prompt to solicit additional activity after
   170  	// fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the
   171  	// user to order a drink. The `followUpPrompt` field and the `conclusionStatement` field are mutually
   172  	// exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
   173  	FollowUpPrompt IntentFollowUpPromptPtrOutput `pulumi:"followUpPrompt"`
   174  	// Describes how the intent is fulfilled. For example, after a
   175  	// user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
   176  	// places an order with a local pizza store. Attributes are documented under fulfillment_activity.
   177  	FulfillmentActivity IntentFulfillmentActivityOutput `pulumi:"fulfillmentActivity"`
   178  	// The date when the $LATEST version of this intent was updated.
   179  	LastUpdatedDate pulumi.StringOutput `pulumi:"lastUpdatedDate"`
   180  	// The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
   181  	Name pulumi.StringOutput `pulumi:"name"`
   182  	// A unique identifier for the built-in intent to base this
   183  	// intent on. To find the signature for an intent, see
   184  	// [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents)
   185  	// in the Alexa Skills Kit.
   186  	ParentIntentSignature pulumi.StringPtrOutput `pulumi:"parentIntentSignature"`
   187  	// When the user answers "no" to the question defined in
   188  	// `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
   189  	// canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
   190  	// Attributes are documented under statement.
   191  	RejectionStatement IntentRejectionStatementPtrOutput `pulumi:"rejectionStatement"`
   192  	// An array of utterances (strings) that a user might say to signal
   193  	// the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
   194  	// In each utterance, a slot name is enclosed in curly braces. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
   195  	SampleUtterances pulumi.StringArrayOutput `pulumi:"sampleUtterances"`
   196  	// An list of intent slots. At runtime, Amazon Lex elicits required slot values
   197  	// from the user using prompts defined in the slots. Attributes are documented under slot.
   198  	Slots IntentSlotArrayOutput `pulumi:"slots"`
   199  	// The version of the bot.
   200  	Version pulumi.StringOutput `pulumi:"version"`
   201  }
   202  
   203  // NewIntent registers a new resource with the given unique name, arguments, and options.
   204  func NewIntent(ctx *pulumi.Context,
   205  	name string, args *IntentArgs, opts ...pulumi.ResourceOption) (*Intent, error) {
   206  	if args == nil {
   207  		return nil, errors.New("missing one or more required arguments")
   208  	}
   209  
   210  	if args.FulfillmentActivity == nil {
   211  		return nil, errors.New("invalid value for required argument 'FulfillmentActivity'")
   212  	}
   213  	opts = internal.PkgResourceDefaultOpts(opts)
   214  	var resource Intent
   215  	err := ctx.RegisterResource("aws:lex/intent:Intent", name, args, &resource, opts...)
   216  	if err != nil {
   217  		return nil, err
   218  	}
   219  	return &resource, nil
   220  }
   221  
   222  // GetIntent gets an existing Intent resource's state with the given name, ID, and optional
   223  // state properties that are used to uniquely qualify the lookup (nil if not required).
   224  func GetIntent(ctx *pulumi.Context,
   225  	name string, id pulumi.IDInput, state *IntentState, opts ...pulumi.ResourceOption) (*Intent, error) {
   226  	var resource Intent
   227  	err := ctx.ReadResource("aws:lex/intent:Intent", name, id, state, &resource, opts...)
   228  	if err != nil {
   229  		return nil, err
   230  	}
   231  	return &resource, nil
   232  }
   233  
   234  // Input properties used for looking up and filtering Intent resources.
   235  type intentState struct {
   236  	// The ARN of the Lex intent.
   237  	Arn *string `pulumi:"arn"`
   238  	// Checksum identifying the version of the intent that was created. The checksum is not
   239  	// included as an argument because the resource will add it automatically when updating the intent.
   240  	Checksum *string `pulumi:"checksum"`
   241  	// The statement that you want Amazon Lex to convey to the user
   242  	// after the intent is successfully fulfilled by the Lambda function. This element is relevant only if
   243  	// you provide a Lambda function in the `fulfillmentActivity`. If you return the intent to the client
   244  	// application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
   245  	// mutually exclusive. You can specify only one. Attributes are documented under statement.
   246  	ConclusionStatement *IntentConclusionStatement `pulumi:"conclusionStatement"`
   247  	// Prompts the user to confirm the intent. This question should
   248  	// have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
   249  	// or neither. Attributes are documented under prompt.
   250  	ConfirmationPrompt *IntentConfirmationPrompt `pulumi:"confirmationPrompt"`
   251  	// Determines if a new slot type version is created when the initial
   252  	// resource is created and on each update. Defaults to `false`.
   253  	CreateVersion *bool `pulumi:"createVersion"`
   254  	// The date when the intent version was created.
   255  	CreatedDate *string `pulumi:"createdDate"`
   256  	// A description of the intent. Must be less than or equal to 200 characters in length.
   257  	Description *string `pulumi:"description"`
   258  	// Specifies a Lambda function to invoke for each user input. You can
   259  	// invoke this Lambda function to personalize user interaction. Attributes are documented under code_hook.
   260  	DialogCodeHook *IntentDialogCodeHook `pulumi:"dialogCodeHook"`
   261  	// Amazon Lex uses this prompt to solicit additional activity after
   262  	// fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the
   263  	// user to order a drink. The `followUpPrompt` field and the `conclusionStatement` field are mutually
   264  	// exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
   265  	FollowUpPrompt *IntentFollowUpPrompt `pulumi:"followUpPrompt"`
   266  	// Describes how the intent is fulfilled. For example, after a
   267  	// user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
   268  	// places an order with a local pizza store. Attributes are documented under fulfillment_activity.
   269  	FulfillmentActivity *IntentFulfillmentActivity `pulumi:"fulfillmentActivity"`
   270  	// The date when the $LATEST version of this intent was updated.
   271  	LastUpdatedDate *string `pulumi:"lastUpdatedDate"`
   272  	// The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
   273  	Name *string `pulumi:"name"`
   274  	// A unique identifier for the built-in intent to base this
   275  	// intent on. To find the signature for an intent, see
   276  	// [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents)
   277  	// in the Alexa Skills Kit.
   278  	ParentIntentSignature *string `pulumi:"parentIntentSignature"`
   279  	// When the user answers "no" to the question defined in
   280  	// `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
   281  	// canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
   282  	// Attributes are documented under statement.
   283  	RejectionStatement *IntentRejectionStatement `pulumi:"rejectionStatement"`
   284  	// An array of utterances (strings) that a user might say to signal
   285  	// the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
   286  	// In each utterance, a slot name is enclosed in curly braces. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
   287  	SampleUtterances []string `pulumi:"sampleUtterances"`
   288  	// An list of intent slots. At runtime, Amazon Lex elicits required slot values
   289  	// from the user using prompts defined in the slots. Attributes are documented under slot.
   290  	Slots []IntentSlot `pulumi:"slots"`
   291  	// The version of the bot.
   292  	Version *string `pulumi:"version"`
   293  }
   294  
   295  type IntentState struct {
   296  	// The ARN of the Lex intent.
   297  	Arn pulumi.StringPtrInput
   298  	// Checksum identifying the version of the intent that was created. The checksum is not
   299  	// included as an argument because the resource will add it automatically when updating the intent.
   300  	Checksum pulumi.StringPtrInput
   301  	// The statement that you want Amazon Lex to convey to the user
   302  	// after the intent is successfully fulfilled by the Lambda function. This element is relevant only if
   303  	// you provide a Lambda function in the `fulfillmentActivity`. If you return the intent to the client
   304  	// application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
   305  	// mutually exclusive. You can specify only one. Attributes are documented under statement.
   306  	ConclusionStatement IntentConclusionStatementPtrInput
   307  	// Prompts the user to confirm the intent. This question should
   308  	// have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
   309  	// or neither. Attributes are documented under prompt.
   310  	ConfirmationPrompt IntentConfirmationPromptPtrInput
   311  	// Determines if a new slot type version is created when the initial
   312  	// resource is created and on each update. Defaults to `false`.
   313  	CreateVersion pulumi.BoolPtrInput
   314  	// The date when the intent version was created.
   315  	CreatedDate pulumi.StringPtrInput
   316  	// A description of the intent. Must be less than or equal to 200 characters in length.
   317  	Description pulumi.StringPtrInput
   318  	// Specifies a Lambda function to invoke for each user input. You can
   319  	// invoke this Lambda function to personalize user interaction. Attributes are documented under code_hook.
   320  	DialogCodeHook IntentDialogCodeHookPtrInput
   321  	// Amazon Lex uses this prompt to solicit additional activity after
   322  	// fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the
   323  	// user to order a drink. The `followUpPrompt` field and the `conclusionStatement` field are mutually
   324  	// exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
   325  	FollowUpPrompt IntentFollowUpPromptPtrInput
   326  	// Describes how the intent is fulfilled. For example, after a
   327  	// user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
   328  	// places an order with a local pizza store. Attributes are documented under fulfillment_activity.
   329  	FulfillmentActivity IntentFulfillmentActivityPtrInput
   330  	// The date when the $LATEST version of this intent was updated.
   331  	LastUpdatedDate pulumi.StringPtrInput
   332  	// The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
   333  	Name pulumi.StringPtrInput
   334  	// A unique identifier for the built-in intent to base this
   335  	// intent on. To find the signature for an intent, see
   336  	// [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents)
   337  	// in the Alexa Skills Kit.
   338  	ParentIntentSignature pulumi.StringPtrInput
   339  	// When the user answers "no" to the question defined in
   340  	// `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
   341  	// canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
   342  	// Attributes are documented under statement.
   343  	RejectionStatement IntentRejectionStatementPtrInput
   344  	// An array of utterances (strings) that a user might say to signal
   345  	// the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
   346  	// In each utterance, a slot name is enclosed in curly braces. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
   347  	SampleUtterances pulumi.StringArrayInput
   348  	// An list of intent slots. At runtime, Amazon Lex elicits required slot values
   349  	// from the user using prompts defined in the slots. Attributes are documented under slot.
   350  	Slots IntentSlotArrayInput
   351  	// The version of the bot.
   352  	Version pulumi.StringPtrInput
   353  }
   354  
   355  func (IntentState) ElementType() reflect.Type {
   356  	return reflect.TypeOf((*intentState)(nil)).Elem()
   357  }
   358  
   359  type intentArgs struct {
   360  	// The statement that you want Amazon Lex to convey to the user
   361  	// after the intent is successfully fulfilled by the Lambda function. This element is relevant only if
   362  	// you provide a Lambda function in the `fulfillmentActivity`. If you return the intent to the client
   363  	// application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
   364  	// mutually exclusive. You can specify only one. Attributes are documented under statement.
   365  	ConclusionStatement *IntentConclusionStatement `pulumi:"conclusionStatement"`
   366  	// Prompts the user to confirm the intent. This question should
   367  	// have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
   368  	// or neither. Attributes are documented under prompt.
   369  	ConfirmationPrompt *IntentConfirmationPrompt `pulumi:"confirmationPrompt"`
   370  	// Determines if a new slot type version is created when the initial
   371  	// resource is created and on each update. Defaults to `false`.
   372  	CreateVersion *bool `pulumi:"createVersion"`
   373  	// A description of the intent. Must be less than or equal to 200 characters in length.
   374  	Description *string `pulumi:"description"`
   375  	// Specifies a Lambda function to invoke for each user input. You can
   376  	// invoke this Lambda function to personalize user interaction. Attributes are documented under code_hook.
   377  	DialogCodeHook *IntentDialogCodeHook `pulumi:"dialogCodeHook"`
   378  	// Amazon Lex uses this prompt to solicit additional activity after
   379  	// fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the
   380  	// user to order a drink. The `followUpPrompt` field and the `conclusionStatement` field are mutually
   381  	// exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
   382  	FollowUpPrompt *IntentFollowUpPrompt `pulumi:"followUpPrompt"`
   383  	// Describes how the intent is fulfilled. For example, after a
   384  	// user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
   385  	// places an order with a local pizza store. Attributes are documented under fulfillment_activity.
   386  	FulfillmentActivity IntentFulfillmentActivity `pulumi:"fulfillmentActivity"`
   387  	// The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
   388  	Name *string `pulumi:"name"`
   389  	// A unique identifier for the built-in intent to base this
   390  	// intent on. To find the signature for an intent, see
   391  	// [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents)
   392  	// in the Alexa Skills Kit.
   393  	ParentIntentSignature *string `pulumi:"parentIntentSignature"`
   394  	// When the user answers "no" to the question defined in
   395  	// `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
   396  	// canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
   397  	// Attributes are documented under statement.
   398  	RejectionStatement *IntentRejectionStatement `pulumi:"rejectionStatement"`
   399  	// An array of utterances (strings) that a user might say to signal
   400  	// the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
   401  	// In each utterance, a slot name is enclosed in curly braces. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
   402  	SampleUtterances []string `pulumi:"sampleUtterances"`
   403  	// An list of intent slots. At runtime, Amazon Lex elicits required slot values
   404  	// from the user using prompts defined in the slots. Attributes are documented under slot.
   405  	Slots []IntentSlot `pulumi:"slots"`
   406  }
   407  
   408  // The set of arguments for constructing a Intent resource.
   409  type IntentArgs struct {
   410  	// The statement that you want Amazon Lex to convey to the user
   411  	// after the intent is successfully fulfilled by the Lambda function. This element is relevant only if
   412  	// you provide a Lambda function in the `fulfillmentActivity`. If you return the intent to the client
   413  	// application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
   414  	// mutually exclusive. You can specify only one. Attributes are documented under statement.
   415  	ConclusionStatement IntentConclusionStatementPtrInput
   416  	// Prompts the user to confirm the intent. This question should
   417  	// have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
   418  	// or neither. Attributes are documented under prompt.
   419  	ConfirmationPrompt IntentConfirmationPromptPtrInput
   420  	// Determines if a new slot type version is created when the initial
   421  	// resource is created and on each update. Defaults to `false`.
   422  	CreateVersion pulumi.BoolPtrInput
   423  	// A description of the intent. Must be less than or equal to 200 characters in length.
   424  	Description pulumi.StringPtrInput
   425  	// Specifies a Lambda function to invoke for each user input. You can
   426  	// invoke this Lambda function to personalize user interaction. Attributes are documented under code_hook.
   427  	DialogCodeHook IntentDialogCodeHookPtrInput
   428  	// Amazon Lex uses this prompt to solicit additional activity after
   429  	// fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the
   430  	// user to order a drink. The `followUpPrompt` field and the `conclusionStatement` field are mutually
   431  	// exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
   432  	FollowUpPrompt IntentFollowUpPromptPtrInput
   433  	// Describes how the intent is fulfilled. For example, after a
   434  	// user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
   435  	// places an order with a local pizza store. Attributes are documented under fulfillment_activity.
   436  	FulfillmentActivity IntentFulfillmentActivityInput
   437  	// The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
   438  	Name pulumi.StringPtrInput
   439  	// A unique identifier for the built-in intent to base this
   440  	// intent on. To find the signature for an intent, see
   441  	// [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents)
   442  	// in the Alexa Skills Kit.
   443  	ParentIntentSignature pulumi.StringPtrInput
   444  	// When the user answers "no" to the question defined in
   445  	// `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
   446  	// canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
   447  	// Attributes are documented under statement.
   448  	RejectionStatement IntentRejectionStatementPtrInput
   449  	// An array of utterances (strings) that a user might say to signal
   450  	// the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
   451  	// In each utterance, a slot name is enclosed in curly braces. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
   452  	SampleUtterances pulumi.StringArrayInput
   453  	// An list of intent slots. At runtime, Amazon Lex elicits required slot values
   454  	// from the user using prompts defined in the slots. Attributes are documented under slot.
   455  	Slots IntentSlotArrayInput
   456  }
   457  
   458  func (IntentArgs) ElementType() reflect.Type {
   459  	return reflect.TypeOf((*intentArgs)(nil)).Elem()
   460  }
   461  
   462  type IntentInput interface {
   463  	pulumi.Input
   464  
   465  	ToIntentOutput() IntentOutput
   466  	ToIntentOutputWithContext(ctx context.Context) IntentOutput
   467  }
   468  
   469  func (*Intent) ElementType() reflect.Type {
   470  	return reflect.TypeOf((**Intent)(nil)).Elem()
   471  }
   472  
   473  func (i *Intent) ToIntentOutput() IntentOutput {
   474  	return i.ToIntentOutputWithContext(context.Background())
   475  }
   476  
   477  func (i *Intent) ToIntentOutputWithContext(ctx context.Context) IntentOutput {
   478  	return pulumi.ToOutputWithContext(ctx, i).(IntentOutput)
   479  }
   480  
   481  // IntentArrayInput is an input type that accepts IntentArray and IntentArrayOutput values.
   482  // You can construct a concrete instance of `IntentArrayInput` via:
   483  //
   484  //	IntentArray{ IntentArgs{...} }
   485  type IntentArrayInput interface {
   486  	pulumi.Input
   487  
   488  	ToIntentArrayOutput() IntentArrayOutput
   489  	ToIntentArrayOutputWithContext(context.Context) IntentArrayOutput
   490  }
   491  
   492  type IntentArray []IntentInput
   493  
   494  func (IntentArray) ElementType() reflect.Type {
   495  	return reflect.TypeOf((*[]*Intent)(nil)).Elem()
   496  }
   497  
   498  func (i IntentArray) ToIntentArrayOutput() IntentArrayOutput {
   499  	return i.ToIntentArrayOutputWithContext(context.Background())
   500  }
   501  
   502  func (i IntentArray) ToIntentArrayOutputWithContext(ctx context.Context) IntentArrayOutput {
   503  	return pulumi.ToOutputWithContext(ctx, i).(IntentArrayOutput)
   504  }
   505  
   506  // IntentMapInput is an input type that accepts IntentMap and IntentMapOutput values.
   507  // You can construct a concrete instance of `IntentMapInput` via:
   508  //
   509  //	IntentMap{ "key": IntentArgs{...} }
   510  type IntentMapInput interface {
   511  	pulumi.Input
   512  
   513  	ToIntentMapOutput() IntentMapOutput
   514  	ToIntentMapOutputWithContext(context.Context) IntentMapOutput
   515  }
   516  
   517  type IntentMap map[string]IntentInput
   518  
   519  func (IntentMap) ElementType() reflect.Type {
   520  	return reflect.TypeOf((*map[string]*Intent)(nil)).Elem()
   521  }
   522  
   523  func (i IntentMap) ToIntentMapOutput() IntentMapOutput {
   524  	return i.ToIntentMapOutputWithContext(context.Background())
   525  }
   526  
   527  func (i IntentMap) ToIntentMapOutputWithContext(ctx context.Context) IntentMapOutput {
   528  	return pulumi.ToOutputWithContext(ctx, i).(IntentMapOutput)
   529  }
   530  
   531  type IntentOutput struct{ *pulumi.OutputState }
   532  
   533  func (IntentOutput) ElementType() reflect.Type {
   534  	return reflect.TypeOf((**Intent)(nil)).Elem()
   535  }
   536  
   537  func (o IntentOutput) ToIntentOutput() IntentOutput {
   538  	return o
   539  }
   540  
   541  func (o IntentOutput) ToIntentOutputWithContext(ctx context.Context) IntentOutput {
   542  	return o
   543  }
   544  
   545  // The ARN of the Lex intent.
   546  func (o IntentOutput) Arn() pulumi.StringOutput {
   547  	return o.ApplyT(func(v *Intent) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   548  }
   549  
   550  // Checksum identifying the version of the intent that was created. The checksum is not
   551  // included as an argument because the resource will add it automatically when updating the intent.
   552  func (o IntentOutput) Checksum() pulumi.StringOutput {
   553  	return o.ApplyT(func(v *Intent) pulumi.StringOutput { return v.Checksum }).(pulumi.StringOutput)
   554  }
   555  
   556  // The statement that you want Amazon Lex to convey to the user
   557  // after the intent is successfully fulfilled by the Lambda function. This element is relevant only if
   558  // you provide a Lambda function in the `fulfillmentActivity`. If you return the intent to the client
   559  // application, you can't specify this element. The `followUpPrompt` and `conclusionStatement` are
   560  // mutually exclusive. You can specify only one. Attributes are documented under statement.
   561  func (o IntentOutput) ConclusionStatement() IntentConclusionStatementPtrOutput {
   562  	return o.ApplyT(func(v *Intent) IntentConclusionStatementPtrOutput { return v.ConclusionStatement }).(IntentConclusionStatementPtrOutput)
   563  }
   564  
   565  // Prompts the user to confirm the intent. This question should
   566  // have a yes or no answer. You you must provide both the `rejectionStatement` and `confirmationPrompt`,
   567  // or neither. Attributes are documented under prompt.
   568  func (o IntentOutput) ConfirmationPrompt() IntentConfirmationPromptPtrOutput {
   569  	return o.ApplyT(func(v *Intent) IntentConfirmationPromptPtrOutput { return v.ConfirmationPrompt }).(IntentConfirmationPromptPtrOutput)
   570  }
   571  
   572  // Determines if a new slot type version is created when the initial
   573  // resource is created and on each update. Defaults to `false`.
   574  func (o IntentOutput) CreateVersion() pulumi.BoolPtrOutput {
   575  	return o.ApplyT(func(v *Intent) pulumi.BoolPtrOutput { return v.CreateVersion }).(pulumi.BoolPtrOutput)
   576  }
   577  
   578  // The date when the intent version was created.
   579  func (o IntentOutput) CreatedDate() pulumi.StringOutput {
   580  	return o.ApplyT(func(v *Intent) pulumi.StringOutput { return v.CreatedDate }).(pulumi.StringOutput)
   581  }
   582  
   583  // A description of the intent. Must be less than or equal to 200 characters in length.
   584  func (o IntentOutput) Description() pulumi.StringPtrOutput {
   585  	return o.ApplyT(func(v *Intent) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   586  }
   587  
   588  // Specifies a Lambda function to invoke for each user input. You can
   589  // invoke this Lambda function to personalize user interaction. Attributes are documented under code_hook.
   590  func (o IntentOutput) DialogCodeHook() IntentDialogCodeHookPtrOutput {
   591  	return o.ApplyT(func(v *Intent) IntentDialogCodeHookPtrOutput { return v.DialogCodeHook }).(IntentDialogCodeHookPtrOutput)
   592  }
   593  
   594  // Amazon Lex uses this prompt to solicit additional activity after
   595  // fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the
   596  // user to order a drink. The `followUpPrompt` field and the `conclusionStatement` field are mutually
   597  // exclusive. You can specify only one. Attributes are documented under follow_up_prompt.
   598  func (o IntentOutput) FollowUpPrompt() IntentFollowUpPromptPtrOutput {
   599  	return o.ApplyT(func(v *Intent) IntentFollowUpPromptPtrOutput { return v.FollowUpPrompt }).(IntentFollowUpPromptPtrOutput)
   600  }
   601  
   602  // Describes how the intent is fulfilled. For example, after a
   603  // user provides all of the information for a pizza order, `fulfillmentActivity` defines how the bot
   604  // places an order with a local pizza store. Attributes are documented under fulfillment_activity.
   605  func (o IntentOutput) FulfillmentActivity() IntentFulfillmentActivityOutput {
   606  	return o.ApplyT(func(v *Intent) IntentFulfillmentActivityOutput { return v.FulfillmentActivity }).(IntentFulfillmentActivityOutput)
   607  }
   608  
   609  // The date when the $LATEST version of this intent was updated.
   610  func (o IntentOutput) LastUpdatedDate() pulumi.StringOutput {
   611  	return o.ApplyT(func(v *Intent) pulumi.StringOutput { return v.LastUpdatedDate }).(pulumi.StringOutput)
   612  }
   613  
   614  // The name of the intent, not case sensitive. Must be less than or equal to 100 characters in length.
   615  func (o IntentOutput) Name() pulumi.StringOutput {
   616  	return o.ApplyT(func(v *Intent) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   617  }
   618  
   619  // A unique identifier for the built-in intent to base this
   620  // intent on. To find the signature for an intent, see
   621  // [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents)
   622  // in the Alexa Skills Kit.
   623  func (o IntentOutput) ParentIntentSignature() pulumi.StringPtrOutput {
   624  	return o.ApplyT(func(v *Intent) pulumi.StringPtrOutput { return v.ParentIntentSignature }).(pulumi.StringPtrOutput)
   625  }
   626  
   627  // When the user answers "no" to the question defined in
   628  // `confirmationPrompt`, Amazon Lex responds with this statement to acknowledge that the intent was
   629  // canceled. You must provide both the `rejectionStatement` and the `confirmationPrompt`, or neither.
   630  // Attributes are documented under statement.
   631  func (o IntentOutput) RejectionStatement() IntentRejectionStatementPtrOutput {
   632  	return o.ApplyT(func(v *Intent) IntentRejectionStatementPtrOutput { return v.RejectionStatement }).(IntentRejectionStatementPtrOutput)
   633  }
   634  
   635  // An array of utterances (strings) that a user might say to signal
   636  // the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
   637  // In each utterance, a slot name is enclosed in curly braces. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
   638  func (o IntentOutput) SampleUtterances() pulumi.StringArrayOutput {
   639  	return o.ApplyT(func(v *Intent) pulumi.StringArrayOutput { return v.SampleUtterances }).(pulumi.StringArrayOutput)
   640  }
   641  
   642  // An list of intent slots. At runtime, Amazon Lex elicits required slot values
   643  // from the user using prompts defined in the slots. Attributes are documented under slot.
   644  func (o IntentOutput) Slots() IntentSlotArrayOutput {
   645  	return o.ApplyT(func(v *Intent) IntentSlotArrayOutput { return v.Slots }).(IntentSlotArrayOutput)
   646  }
   647  
   648  // The version of the bot.
   649  func (o IntentOutput) Version() pulumi.StringOutput {
   650  	return o.ApplyT(func(v *Intent) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput)
   651  }
   652  
   653  type IntentArrayOutput struct{ *pulumi.OutputState }
   654  
   655  func (IntentArrayOutput) ElementType() reflect.Type {
   656  	return reflect.TypeOf((*[]*Intent)(nil)).Elem()
   657  }
   658  
   659  func (o IntentArrayOutput) ToIntentArrayOutput() IntentArrayOutput {
   660  	return o
   661  }
   662  
   663  func (o IntentArrayOutput) ToIntentArrayOutputWithContext(ctx context.Context) IntentArrayOutput {
   664  	return o
   665  }
   666  
   667  func (o IntentArrayOutput) Index(i pulumi.IntInput) IntentOutput {
   668  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Intent {
   669  		return vs[0].([]*Intent)[vs[1].(int)]
   670  	}).(IntentOutput)
   671  }
   672  
   673  type IntentMapOutput struct{ *pulumi.OutputState }
   674  
   675  func (IntentMapOutput) ElementType() reflect.Type {
   676  	return reflect.TypeOf((*map[string]*Intent)(nil)).Elem()
   677  }
   678  
   679  func (o IntentMapOutput) ToIntentMapOutput() IntentMapOutput {
   680  	return o
   681  }
   682  
   683  func (o IntentMapOutput) ToIntentMapOutputWithContext(ctx context.Context) IntentMapOutput {
   684  	return o
   685  }
   686  
   687  func (o IntentMapOutput) MapIndex(k pulumi.StringInput) IntentOutput {
   688  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Intent {
   689  		return vs[0].(map[string]*Intent)[vs[1].(string)]
   690  	}).(IntentOutput)
   691  }
   692  
   693  func init() {
   694  	pulumi.RegisterInputType(reflect.TypeOf((*IntentInput)(nil)).Elem(), &Intent{})
   695  	pulumi.RegisterInputType(reflect.TypeOf((*IntentArrayInput)(nil)).Elem(), IntentArray{})
   696  	pulumi.RegisterInputType(reflect.TypeOf((*IntentMapInput)(nil)).Elem(), IntentMap{})
   697  	pulumi.RegisterOutputType(IntentOutput{})
   698  	pulumi.RegisterOutputType(IntentArrayOutput{})
   699  	pulumi.RegisterOutputType(IntentMapOutput{})
   700  }