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

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

  name?: string | core.StringOut;

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

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

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

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

export interface ParameterArgs extends core.SchemaArgs {
  defaultValue?: string | core.StringOut;

  description?: string | core.StringOut;

  name?: string | core.StringOut;

  type?: string | core.StringOut;
}

export class Parameter extends core.Schema<ParameterArgs> {
  @core.attr(String)
  public defaultValue?: string | core.StringOut;

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

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

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

export interface DocumentArgs extends core.ResourceArgs {
  attachmentsSource?:
    | core.Array<AttachmentsSource>
    | core.ArrayOut<AttachmentsSource>;

  content: string | core.StringOut;

  documentFormat?: string | core.StringOut;

  documentType: string | core.StringOut;

  name: string | core.StringOut;

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

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

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

  targetType?: string | core.StringOut;

  versionName?: string | core.StringOut;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DocumentArgs) {
    super(name, "aws_ssm_document", args);
  }

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