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

export interface OutputLocationArgs extends core.SchemaArgs {
  s3BucketName: string | core.StringOut;

  s3KeyPrefix?: string | core.StringOut;

  s3Region?: string | core.StringOut;
}

export class OutputLocation extends core.Schema<OutputLocationArgs> {
  @core.attr(String)
  public s3BucketName!: string | core.StringOut;

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

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

export interface TargetsArgs extends core.SchemaArgs {
  key: string | core.StringOut;

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

export class Targets extends core.Schema<TargetsArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

export interface AssociationArgs extends core.ResourceArgs {
  applyOnlyAtCronInterval?: boolean | core.BooleanOut;

  associationName?: string | core.StringOut;

  automationTargetParameterName?: string | core.StringOut;

  complianceSeverity?: string | core.StringOut;

  documentVersion?: string | core.StringOut;

  instanceId?: string | core.StringOut;

  maxConcurrency?: string | core.StringOut;

  maxErrors?: string | core.StringOut;

  name: string | core.StringOut;

  outputLocation?: OutputLocation;

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

  scheduleExpression?: string | core.StringOut;

  targets?: core.Array<Targets> | core.ArrayOut<Targets>;

  waitForSuccessTimeoutSeconds?: number | core.NumberOut;
}

export class Association extends core.Resource<AssociationArgs> {
  @core.attr(Boolean)
  public applyOnlyAtCronInterval?: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(OutputLocation)
  public outputLocation?: OutputLocation;

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

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

  @core.attr(Targets, { computed: true, kind: "array" })
  public targets?: core.Array<Targets> | core.ArrayOut<Targets>;

  @core.attr(Number)
  public waitForSuccessTimeoutSeconds?: number | core.NumberOut;

  constructor(name: string, args?: AssociationArgs) {
    super(name, "aws_ssm_association", args);
  }

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