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

export interface FaqStatisticsArgs extends core.SchemaArgs {
  indexedQuestionAnswersCount: number | core.NumberOut;
}

export class FaqStatistics extends core.Schema<FaqStatisticsArgs> {
  @core.attr(Number, { computed: true })
  public indexedQuestionAnswersCount!: number | core.NumberOut;
}

export interface TextDocumentStatisticsArgs extends core.SchemaArgs {
  indexedTextBytes: number | core.NumberOut;

  indexedTextDocumentsCount: number | core.NumberOut;
}

export class TextDocumentStatistics extends core.Schema<TextDocumentStatisticsArgs> {
  @core.attr(Number, { computed: true })
  public indexedTextBytes!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public indexedTextDocumentsCount!: number | core.NumberOut;
}

export interface IndexStatisticsArgs extends core.SchemaArgs {
  faqStatistics: core.Array<FaqStatistics> | core.ArrayOut<FaqStatistics>;

  textDocumentStatistics:
    | core.Array<TextDocumentStatistics>
    | core.ArrayOut<TextDocumentStatistics>;
}

export class IndexStatistics extends core.Schema<IndexStatisticsArgs> {
  @core.attr(FaqStatistics, { computed: true, kind: "array" })
  public faqStatistics!:
    | core.Array<FaqStatistics>
    | core.ArrayOut<FaqStatistics>;

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

export interface ServerSideEncryptionConfigurationArgs extends core.SchemaArgs {
  kmsKeyId: string | core.StringOut;
}

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

export interface CapacityUnitsArgs extends core.SchemaArgs {
  queryCapacityUnits: number | core.NumberOut;

  storageCapacityUnits: number | core.NumberOut;
}

export class CapacityUnits extends core.Schema<CapacityUnitsArgs> {
  @core.attr(Number, { computed: true })
  public queryCapacityUnits!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public storageCapacityUnits!: number | core.NumberOut;
}

export interface UserGroupResolutionConfigurationArgs extends core.SchemaArgs {
  userGroupResolutionMode: string | core.StringOut;
}

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

export interface JsonTokenTypeConfigurationArgs extends core.SchemaArgs {
  groupAttributeField: string | core.StringOut;

  userNameAttributeField: string | core.StringOut;
}

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

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

export interface JwtTokenTypeConfigurationArgs extends core.SchemaArgs {
  claimRegex: string | core.StringOut;

  groupAttributeField: string | core.StringOut;

  issuer: string | core.StringOut;

  keyLocation: string | core.StringOut;

  secretsManagerArn: string | core.StringOut;

  url: string | core.StringOut;

  userNameAttributeField: string | core.StringOut;
}

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

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

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

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

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

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

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

export interface UserTokenConfigurationsArgs extends core.SchemaArgs {
  jsonTokenTypeConfiguration:
    | core.Array<JsonTokenTypeConfiguration>
    | core.ArrayOut<JsonTokenTypeConfiguration>;

  jwtTokenTypeConfiguration:
    | core.Array<JwtTokenTypeConfiguration>
    | core.ArrayOut<JwtTokenTypeConfiguration>;
}

export class UserTokenConfigurations extends core.Schema<UserTokenConfigurationsArgs> {
  @core.attr(JsonTokenTypeConfiguration, { computed: true, kind: "array" })
  public jsonTokenTypeConfiguration!:
    | core.Array<JsonTokenTypeConfiguration>
    | core.ArrayOut<JsonTokenTypeConfiguration>;

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

export interface SearchArgs extends core.SchemaArgs {
  displayable: boolean | core.BooleanOut;

  facetable: boolean | core.BooleanOut;

  searchable: boolean | core.BooleanOut;

  sortable: boolean | core.BooleanOut;
}

export class Search extends core.Schema<SearchArgs> {
  @core.attr(Boolean, { computed: true })
  public displayable!: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public facetable!: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public searchable!: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public sortable!: boolean | core.BooleanOut;
}

export interface RelevanceArgs extends core.SchemaArgs {
  duration: string | core.StringOut;

  freshness: boolean | core.BooleanOut;

  importance: number | core.NumberOut;

  rankOrder: string | core.StringOut;

  valuesImportanceMap: core.Map<string, number> | core.MapOut<core.NumberOut>;
}

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

  @core.attr(Boolean, { computed: true })
  public freshness!: boolean | core.BooleanOut;

  @core.attr(Number, { computed: true })
  public importance!: number | core.NumberOut;

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

  @core.attr(Number, { computed: true, kind: "map" })
  public valuesImportanceMap!:
    | core.Map<string, number>
    | core.MapOut<core.NumberOut>;
}

export interface DocumentMetadataConfigurationUpdatesArgs
  extends core.SchemaArgs {
  name: string | core.StringOut;

  relevance: core.Array<Relevance> | core.ArrayOut<Relevance>;

  search: core.Array<Search> | core.ArrayOut<Search>;

  type: string | core.StringOut;
}

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

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

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

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

export interface DsIndexArgs {
  id: string | core.StringOut;

  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(String, { computed: true, kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

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

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

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

  constructor(name: string, args?: DsIndexArgs) {
    super(name, "aws_kendra_index", args);
  }

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