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

export interface SsmActionDefinitionArgs extends core.SchemaArgs {
  actionSubType: string | core.StringOut;

  instanceIds: core.Array<string> | core.ArrayOut<core.StringOut>;

  region: string | core.StringOut;
}

export class SsmActionDefinition extends core.Schema<SsmActionDefinitionArgs> {
  @core.attr(String)
  public actionSubType!: string | core.StringOut;

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

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

export interface ScpActionDefinitionArgs extends core.SchemaArgs {
  policyId: string | core.StringOut;

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

export class ScpActionDefinition extends core.Schema<ScpActionDefinitionArgs> {
  @core.attr(String)
  public policyId!: string | core.StringOut;

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

export interface IamActionDefinitionArgs extends core.SchemaArgs {
  groups?: core.Array<string> | core.ArrayOut<core.StringOut>;

  policyArn: string | core.StringOut;

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

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

export class IamActionDefinition extends core.Schema<IamActionDefinitionArgs> {
  @core.attr(String, { kind: "array" })
  public groups?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

export interface DefinitionArgs extends core.SchemaArgs {
  iamActionDefinition?: IamActionDefinition;

  scpActionDefinition?: ScpActionDefinition;

  ssmActionDefinition?: SsmActionDefinition;
}

export class Definition extends core.Schema<DefinitionArgs> {
  @core.attr(IamActionDefinition)
  public iamActionDefinition?: IamActionDefinition;

  @core.attr(ScpActionDefinition)
  public scpActionDefinition?: ScpActionDefinition;

  @core.attr(SsmActionDefinition)
  public ssmActionDefinition?: SsmActionDefinition;
}

export interface ActionThresholdArgs extends core.SchemaArgs {
  actionThresholdType: string | core.StringOut;

  actionThresholdValue: number | core.NumberOut;
}

export class ActionThreshold extends core.Schema<ActionThresholdArgs> {
  @core.attr(String)
  public actionThresholdType!: string | core.StringOut;

  @core.attr(Number)
  public actionThresholdValue!: number | core.NumberOut;
}

export interface SubscriberArgs extends core.SchemaArgs {
  address: string | core.StringOut;

  subscriptionType: string | core.StringOut;
}

export class Subscriber extends core.Schema<SubscriberArgs> {
  @core.attr(String)
  public address!: string | core.StringOut;

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

export interface BudgetActionArgs extends core.ResourceArgs {
  accountId?: string | core.StringOut;

  actionThreshold: ActionThreshold;

  actionType: string | core.StringOut;

  approvalModel: string | core.StringOut;

  budgetName: string | core.StringOut;

  definition: Definition;

  executionRoleArn: string | core.StringOut;

  notificationType: string | core.StringOut;

  subscriber: core.Array<Subscriber> | core.ArrayOut<Subscriber>;
}

export class BudgetAction extends core.Resource<BudgetActionArgs> {
  @core.attr(String, { computed: true })
  public accountId?: string | core.StringOut;

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

  @core.attr(ActionThreshold)
  public actionThreshold!: ActionThreshold;

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

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

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

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

  @core.attr(Definition)
  public definition!: Definition;

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

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

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

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

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

  constructor(name: string, args?: BudgetActionArgs) {
    super(name, "aws_budgets_budget_action", args);
  }

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