import * as core from "@terrascript/core";

export interface LogSettingsArgs extends core.SchemaArgs {
  destination: string | core.StringOut;

  kmsKeyArn?: string | core.StringOut;

  logType: string | core.StringOut;

  resourceArn: string | core.StringOut;

  resourcePrefix: string | core.StringOut;
}

export class LogSettings extends core.Schema<LogSettingsArgs> {
  @core.attr(String)
  public destination!: string | core.StringOut;

  @core.attr(String)
  public kmsKeyArn?: string | core.StringOut;

  @core.attr(String)
  public logType!: string | core.StringOut;

  @core.attr(String)
  public resourceArn!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public resourcePrefix!: string | core.StringOut;
}

export interface ConversationLogsArgs extends core.SchemaArgs {
  iamRoleArn: string | core.StringOut;

  logSettings?: core.Array<LogSettings> | core.ArrayOut<LogSettings>;
}

export class ConversationLogs extends core.Schema<ConversationLogsArgs> {
  @core.attr(String)
  public iamRoleArn!: string | core.StringOut;

  @core.attr(LogSettings, { kind: "array" })
  public logSettings?: core.Array<LogSettings> | core.ArrayOut<LogSettings>;
}

export interface BotAliasArgs extends core.ResourceArgs {
  botName: string | core.StringOut;

  botVersion: string | core.StringOut;

  conversationLogs?: ConversationLogs;

  description?: string | core.StringOut;

  name: string | core.StringOut;
}

export class BotAlias extends core.Resource<BotAliasArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  @core.attr(String)
  public botName!: string | core.StringOut;

  @core.attr(String)
  public botVersion!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public checksum!: string | core.StringOut;

  @core.attr(ConversationLogs)
  public conversationLogs?: ConversationLogs;

  @core.attr(String, { computed: true })
  public createdDate!: string | core.StringOut;

  @core.attr(String)
  public description?: string | core.StringOut;

  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public lastUpdatedDate!: string | core.StringOut;

  @core.attr(String)
  public name!: string | core.StringOut;

  constructor(name: string, args?: BotAliasArgs) {
    super(name, "aws_lex_bot_alias", args);
  }

  public override getNamespace(): string {
    return "aws_lex";
  }
}
