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

export interface AutoDeploymentArgs extends core.SchemaArgs {
  enabled?: boolean | core.BooleanOut;

  retainStacksOnAccountRemoval?: boolean | core.BooleanOut;
}

export class AutoDeployment extends core.Schema<AutoDeploymentArgs> {
  @core.attr(Boolean)
  public enabled?: boolean | core.BooleanOut;

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

export interface OperationPreferencesArgs extends core.SchemaArgs {
  failureToleranceCount?: number | core.NumberOut;

  failureTolerancePercentage?: number | core.NumberOut;

  maxConcurrentCount?: number | core.NumberOut;

  maxConcurrentPercentage?: number | core.NumberOut;

  regionConcurrencyType?: string | core.StringOut;

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

export class OperationPreferences extends core.Schema<OperationPreferencesArgs> {
  @core.attr(Number)
  public failureToleranceCount?: number | core.NumberOut;

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

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

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

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

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

export interface StackSetArgs extends core.ResourceArgs {
  administrationRoleArn?: string | core.StringOut;

  autoDeployment?: AutoDeployment;

  callAs?: string | core.StringOut;

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

  description?: string | core.StringOut;

  executionRoleName?: string | core.StringOut;

  name: string | core.StringOut;

  operationPreferences?: OperationPreferences;

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

  permissionModel?: string | core.StringOut;

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

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

  templateBody?: string | core.StringOut;

  templateUrl?: string | core.StringOut;
}

export class StackSet extends core.Resource<StackSetArgs> {
  @core.attr(String)
  public administrationRoleArn?: string | core.StringOut;

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

  @core.attr(AutoDeployment)
  public autoDeployment?: AutoDeployment;

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

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

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

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

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

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

  @core.attr(OperationPreferences)
  public operationPreferences?: OperationPreferences;

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

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

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

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

  constructor(name: string, args?: StackSetArgs) {
    super(name, "aws_cloudformation_stack_set", args);
  }

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