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

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

  value: string | core.StringOut;
}

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

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

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

  value: string | core.StringOut;
}

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

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

export interface ActionArgs extends core.SchemaArgs {
  actionId: string | core.StringOut;

  description?: string | core.StringOut;

  name: string | core.StringOut;

  parameter?: core.Array<Parameter> | core.ArrayOut<Parameter>;

  startAfter?: core.Array<string> | core.ArrayOut<core.StringOut>;

  target?: ActionTarget;
}

export class Action extends core.Schema<ActionArgs> {
  @core.attr(String)
  public actionId!: string | core.StringOut;

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

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

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

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

  @core.attr(ActionTarget)
  public target?: ActionTarget;
}

export interface StopConditionArgs extends core.SchemaArgs {
  source: string | core.StringOut;

  value?: string | core.StringOut;
}

export class StopCondition extends core.Schema<StopConditionArgs> {
  @core.attr(String)
  public source!: string | core.StringOut;

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

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

  value: string | core.StringOut;
}

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

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

export interface FilterArgs extends core.SchemaArgs {
  path: string | core.StringOut;

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

export class Filter extends core.Schema<FilterArgs> {
  @core.attr(String)
  public path!: string | core.StringOut;

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

export interface TargetArgs extends core.SchemaArgs {
  filter?: core.Array<Filter> | core.ArrayOut<Filter>;

  name: string | core.StringOut;

  resourceArns?: core.Array<string> | core.ArrayOut<core.StringOut>;

  resourceTag?: core.Array<ResourceTag> | core.ArrayOut<ResourceTag>;

  resourceType: string | core.StringOut;

  selectionMode: string | core.StringOut;
}

export class Target extends core.Schema<TargetArgs> {
  @core.attr(Filter, { kind: "array" })
  public filter?: core.Array<Filter> | core.ArrayOut<Filter>;

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

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

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

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

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

export interface ExperimentTemplateArgs extends core.ResourceArgs {
  action: core.Array<Action> | core.ArrayOut<Action>;

  description: string | core.StringOut;

  roleArn: string | core.StringOut;

  stopCondition: core.Array<StopCondition> | core.ArrayOut<StopCondition>;

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

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

  target?: core.Array<Target> | core.ArrayOut<Target>;
}

export class ExperimentTemplate extends core.Resource<ExperimentTemplateArgs> {
  @core.attr(Action, { kind: "array" })
  public action!: core.Array<Action> | core.ArrayOut<Action>;

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

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

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

  @core.attr(StopCondition, { kind: "array" })
  public stopCondition!:
    | core.Array<StopCondition>
    | core.ArrayOut<StopCondition>;

  @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(Target, { kind: "array" })
  public target?: core.Array<Target> | core.ArrayOut<Target>;

  constructor(name: string, args?: ExperimentTemplateArgs) {
    super(name, "aws_fis_experiment_template", args);
  }

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