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

export interface LogsArgs extends core.SchemaArgs {
  audit?: string | core.StringOut;

  general?: boolean | core.BooleanOut;
}

export class Logs extends core.Schema<LogsArgs> {
  @core.attr(String)
  public audit?: string | core.StringOut;

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

export interface UserArgs extends core.SchemaArgs {
  consoleAccess?: boolean | core.BooleanOut;

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

  password: string | core.StringOut;

  username: string | core.StringOut;
}

export class User extends core.Schema<UserArgs> {
  @core.attr(Boolean)
  public consoleAccess?: boolean | core.BooleanOut;

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

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

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

export interface InstancesArgs extends core.SchemaArgs {
  consoleUrl: string | core.StringOut;

  endpoints: core.Array<string> | core.ArrayOut<core.StringOut>;

  ipAddress: string | core.StringOut;
}

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

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

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

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

  roleBase?: string | core.StringOut;

  roleName?: string | core.StringOut;

  roleSearchMatching?: string | core.StringOut;

  roleSearchSubtree?: boolean | core.BooleanOut;

  serviceAccountPassword?: string | core.StringOut;

  serviceAccountUsername?: string | core.StringOut;

  userBase?: string | core.StringOut;

  userRoleName?: string | core.StringOut;

  userSearchMatching?: string | core.StringOut;

  userSearchSubtree?: boolean | core.BooleanOut;
}

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

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

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

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

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

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

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

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

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

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

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

export interface ConfigurationArgs extends core.SchemaArgs {
  id?: string | core.StringOut;

  revision?: number | core.NumberOut;
}

export class Configuration extends core.Schema<ConfigurationArgs> {
  @core.attr(String, { computed: true })
  public id?: string | core.StringOut;

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

export interface EncryptionOptionsArgs extends core.SchemaArgs {
  kmsKeyId?: string | core.StringOut;

  useAwsOwnedKey?: boolean | core.BooleanOut;
}

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

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

export interface MaintenanceWindowStartTimeArgs extends core.SchemaArgs {
  dayOfWeek: string | core.StringOut;

  timeOfDay: string | core.StringOut;

  timeZone: string | core.StringOut;
}

export class MaintenanceWindowStartTime extends core.Schema<MaintenanceWindowStartTimeArgs> {
  @core.attr(String)
  public dayOfWeek!: string | core.StringOut;

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

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

export interface BrokerArgs extends core.ResourceArgs {
  applyImmediately?: boolean | core.BooleanOut;

  authenticationStrategy?: string | core.StringOut;

  autoMinorVersionUpgrade?: boolean | core.BooleanOut;

  brokerName: string | core.StringOut;

  configuration?: Configuration;

  deploymentMode?: string | core.StringOut;

  encryptionOptions?: EncryptionOptions;

  engineType: string | core.StringOut;

  engineVersion: string | core.StringOut;

  hostInstanceType: string | core.StringOut;

  ldapServerMetadata?: LdapServerMetadata;

  logs?: Logs;

  maintenanceWindowStartTime?: MaintenanceWindowStartTime;

  publiclyAccessible?: boolean | core.BooleanOut;

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

  storageType?: string | core.StringOut;

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

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

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

  user: core.Array<User> | core.ArrayOut<User>;
}

export class Broker extends core.Resource<BrokerArgs> {
  @core.attr(Boolean)
  public applyImmediately?: boolean | core.BooleanOut;

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

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

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

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

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

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

  @core.attr(EncryptionOptions)
  public encryptionOptions?: EncryptionOptions;

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

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

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

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

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

  @core.attr(LdapServerMetadata)
  public ldapServerMetadata?: LdapServerMetadata;

  @core.attr(Logs)
  public logs?: Logs;

  @core.attr(MaintenanceWindowStartTime, { computed: true })
  public maintenanceWindowStartTime?: MaintenanceWindowStartTime;

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

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

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

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

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

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

  @core.attr(User, { kind: "array" })
  public user!: core.Array<User> | core.ArrayOut<User>;

  constructor(name: string, args?: BrokerArgs) {
    super(name, "aws_mq_broker", args);
  }

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