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

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

  resourceValue?: string | core.StringOut;

  staticValue?: string | core.StringOut;

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

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

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

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

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

export interface SsmControlsArgs extends core.SchemaArgs {
  concurrentExecutionRatePercentage?: number | core.NumberOut;

  errorPercentage?: number | core.NumberOut;
}

export class SsmControls extends core.Schema<SsmControlsArgs> {
  @core.attr(Number)
  public concurrentExecutionRatePercentage?: number | core.NumberOut;

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

export interface ExecutionControlsArgs extends core.SchemaArgs {
  ssmControls?: SsmControls;
}

export class ExecutionControls extends core.Schema<ExecutionControlsArgs> {
  @core.attr(SsmControls)
  public ssmControls?: SsmControls;
}

export interface RemediationConfigurationArgs extends core.ResourceArgs {
  automatic?: boolean | core.BooleanOut;

  configRuleName: string | core.StringOut;

  executionControls?: ExecutionControls;

  maximumAutomaticAttempts?: number | core.NumberOut;

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

  resourceType?: string | core.StringOut;

  retryAttemptSeconds?: number | core.NumberOut;

  targetId: string | core.StringOut;

  targetType: string | core.StringOut;

  targetVersion?: string | core.StringOut;
}

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

  @core.attr(Boolean)
  public automatic?: boolean | core.BooleanOut;

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

  @core.attr(ExecutionControls)
  public executionControls?: ExecutionControls;

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

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

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

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

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

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

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

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

  constructor(name: string, args?: RemediationConfigurationArgs) {
    super(name, "aws_config_remediation_configuration", args);
  }

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