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

export interface EndpointsArgs extends core.SchemaArgs {
  endpoint: string | core.StringOut;

  endpointType: string | core.StringOut;
}

export class Endpoints extends core.Schema<EndpointsArgs> {
  @core.attr(String, { computed: true })
  public endpoint!: string | core.StringOut;

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

export interface UserIdentityConfigurationArgs extends core.SchemaArgs {
  identityAttributeName: string | core.StringOut;
}

export class UserIdentityConfiguration extends core.Schema<UserIdentityConfigurationArgs> {
  @core.attr(String)
  public identityAttributeName!: string | core.StringOut;
}

export interface ContentSourceConfigurationArgs extends core.SchemaArgs {
  dataSourceIds?: core.Array<string> | core.ArrayOut<core.StringOut>;

  directPutContent?: boolean | core.BooleanOut;

  faqIds?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class ContentSourceConfiguration extends core.Schema<ContentSourceConfigurationArgs> {
  @core.attr(String, { kind: "array" })
  public dataSourceIds?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(Boolean)
  public directPutContent?: boolean | core.BooleanOut;

  @core.attr(String, { kind: "array" })
  public faqIds?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface ConfigurationArgs extends core.SchemaArgs {
  contentSourceConfiguration?: ContentSourceConfiguration;

  userIdentityConfiguration?: UserIdentityConfiguration;
}

export class Configuration extends core.Schema<ConfigurationArgs> {
  @core.attr(ContentSourceConfiguration, { computed: true })
  public contentSourceConfiguration?: ContentSourceConfiguration;

  @core.attr(UserIdentityConfiguration)
  public userIdentityConfiguration?: UserIdentityConfiguration;
}

export interface ExperienceArgs extends core.ResourceArgs {
  configuration?: Configuration;

  description?: string | core.StringOut;

  indexId: string | core.StringOut;

  name: string | core.StringOut;

  roleArn: string | core.StringOut;
}

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

  @core.attr(Configuration, { computed: true })
  public configuration?: Configuration;

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

  @core.attr(Endpoints, { computed: true, kind: "array" })
  public endpoints!: core.Array<Endpoints> | core.ArrayOut<Endpoints>;

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

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

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

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

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

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

  constructor(name: string, args?: ExperienceArgs) {
    super(name, "aws_kendra_experience", args);
  }

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