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

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

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

  username: string | core.StringOut;
}

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

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

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

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, { computed: true })
  public useAwsOwnedKey!: boolean | core.BooleanOut;
}

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 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, { computed: true })
  public dayOfWeek!: string | core.StringOut;

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

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

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 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, { computed: true, kind: "array" })
  public hosts!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

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

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

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

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

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

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

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

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

  general: boolean | core.BooleanOut;
}

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

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

export interface DsBrokerArgs {
  brokerId?: string | core.StringOut;

  brokerName?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(String, { computed: true })
  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, { computed: true, kind: "array" })
  public ldapServerMetadata!:
    | core.Array<LdapServerMetadata>
    | core.ArrayOut<LdapServerMetadata>;

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

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

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

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

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

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

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