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

export interface DagProcessingLogsArgs extends core.SchemaArgs {
  cloudWatchLogGroupArn: string | core.StringOut;

  enabled?: boolean | core.BooleanOut;

  logLevel?: string | core.StringOut;
}

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

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

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

export interface SchedulerLogsArgs extends core.SchemaArgs {
  cloudWatchLogGroupArn: string | core.StringOut;

  enabled?: boolean | core.BooleanOut;

  logLevel?: string | core.StringOut;
}

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

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

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

export interface TaskLogsArgs extends core.SchemaArgs {
  cloudWatchLogGroupArn: string | core.StringOut;

  enabled?: boolean | core.BooleanOut;

  logLevel?: string | core.StringOut;
}

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

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

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

export interface WebserverLogsArgs extends core.SchemaArgs {
  cloudWatchLogGroupArn: string | core.StringOut;

  enabled?: boolean | core.BooleanOut;

  logLevel?: string | core.StringOut;
}

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

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

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

export interface WorkerLogsArgs extends core.SchemaArgs {
  cloudWatchLogGroupArn: string | core.StringOut;

  enabled?: boolean | core.BooleanOut;

  logLevel?: string | core.StringOut;
}

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

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

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

export interface LoggingConfigurationArgs extends core.SchemaArgs {
  dagProcessingLogs?: DagProcessingLogs;

  schedulerLogs?: SchedulerLogs;

  taskLogs?: TaskLogs;

  webserverLogs?: WebserverLogs;

  workerLogs?: WorkerLogs;
}

export class LoggingConfiguration extends core.Schema<LoggingConfigurationArgs> {
  @core.attr(DagProcessingLogs, { computed: true })
  public dagProcessingLogs?: DagProcessingLogs;

  @core.attr(SchedulerLogs, { computed: true })
  public schedulerLogs?: SchedulerLogs;

  @core.attr(TaskLogs, { computed: true })
  public taskLogs?: TaskLogs;

  @core.attr(WebserverLogs, { computed: true })
  public webserverLogs?: WebserverLogs;

  @core.attr(WorkerLogs, { computed: true })
  public workerLogs?: WorkerLogs;
}

export interface ErrorArgs extends core.SchemaArgs {
  errorCode: string | core.StringOut;

  errorMessage: string | core.StringOut;
}

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

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

export interface LastUpdatedArgs extends core.SchemaArgs {
  createdAt: string | core.StringOut;

  error: core.Array<Error> | core.ArrayOut<Error>;

  status: string | core.StringOut;
}

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

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

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

export interface NetworkConfigurationArgs extends core.SchemaArgs {
  securityGroupIds: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export class NetworkConfiguration extends core.Schema<NetworkConfigurationArgs> {
  @core.attr(String, { kind: "array" })
  public securityGroupIds!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface EnvironmentArgs extends core.ResourceArgs {
  airflowConfigurationOptions?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

  airflowVersion?: string | core.StringOut;

  dagS3Path: string | core.StringOut;

  environmentClass?: string | core.StringOut;

  executionRoleArn: string | core.StringOut;

  kmsKey?: string | core.StringOut;

  loggingConfiguration?: LoggingConfiguration;

  maxWorkers?: number | core.NumberOut;

  minWorkers?: number | core.NumberOut;

  name: string | core.StringOut;

  networkConfiguration: NetworkConfiguration;

  pluginsS3ObjectVersion?: string | core.StringOut;

  pluginsS3Path?: string | core.StringOut;

  requirementsS3ObjectVersion?: string | core.StringOut;

  requirementsS3Path?: string | core.StringOut;

  schedulers?: number | core.NumberOut;

  sourceBucketArn: string | core.StringOut;

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

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

  webserverAccessMode?: string | core.StringOut;

  weeklyMaintenanceWindowStart?: string | core.StringOut;
}

export class Environment extends core.Resource<EnvironmentArgs> {
  @core.attr(String, { kind: "map" })
  public airflowConfigurationOptions?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

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

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

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

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

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

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

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

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

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

  @core.attr(LoggingConfiguration, { computed: true })
  public loggingConfiguration?: LoggingConfiguration;

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

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

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

  @core.attr(NetworkConfiguration)
  public networkConfiguration!: NetworkConfiguration;

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

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

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

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

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

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

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

  @core.attr(String, { computed: true })
  public status!: string | 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(String, { computed: true })
  public webserverAccessMode?: string | core.StringOut;

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

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

  constructor(name: string, args?: EnvironmentArgs) {
    super(name, "aws_mwaa_environment", args);
  }

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