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

export interface MonitorArgs extends core.SchemaArgs {
  alarmArn: string | core.StringOut;

  alarmRoleArn?: string | core.StringOut;
}

export class Monitor extends core.Schema<MonitorArgs> {
  @core.attr(String)
  public alarmArn!: string | core.StringOut;

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

export interface EnvironmentArgs extends core.ResourceArgs {
  applicationId: string | core.StringOut;

  description?: string | core.StringOut;

  monitor?: core.Array<Monitor> | core.ArrayOut<Monitor>;

  name: string | core.StringOut;

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

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

export class Environment extends core.Resource<EnvironmentArgs> {
  @core.attr(String)
  public applicationId!: string | core.StringOut;

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

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

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

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

  @core.attr(Monitor, { kind: "array" })
  public monitor?: core.Array<Monitor> | core.ArrayOut<Monitor>;

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

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

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

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