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

export interface NotificationArgs extends core.SchemaArgs {
  comparisonOperator: string | core.StringOut;

  notificationType: string | core.StringOut;

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

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

  threshold: number | core.NumberOut;

  thresholdType: string | core.StringOut;
}

export class Notification extends core.Schema<NotificationArgs> {
  @core.attr(String)
  public comparisonOperator!: string | core.StringOut;

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

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

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

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

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

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

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

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

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

export interface CostTypesArgs extends core.SchemaArgs {
  includeCredit?: boolean | core.BooleanOut;

  includeDiscount?: boolean | core.BooleanOut;

  includeOtherSubscription?: boolean | core.BooleanOut;

  includeRecurring?: boolean | core.BooleanOut;

  includeRefund?: boolean | core.BooleanOut;

  includeSubscription?: boolean | core.BooleanOut;

  includeSupport?: boolean | core.BooleanOut;

  includeTax?: boolean | core.BooleanOut;

  includeUpfront?: boolean | core.BooleanOut;

  useAmortized?: boolean | core.BooleanOut;

  useBlended?: boolean | core.BooleanOut;
}

export class CostTypes extends core.Schema<CostTypesArgs> {
  @core.attr(Boolean)
  public includeCredit?: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

  budgetType: string | core.StringOut;

  costFilter?: core.Array<CostFilter> | core.ArrayOut<CostFilter>;

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

  costTypes?: CostTypes;

  limitAmount: string | core.StringOut;

  limitUnit: string | core.StringOut;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  notification?: core.Array<Notification> | core.ArrayOut<Notification>;

  timePeriodEnd?: string | core.StringOut;

  timePeriodStart?: string | core.StringOut;

  timeUnit: string | core.StringOut;
}

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

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

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

  @core.attr(CostFilter, { computed: true, kind: "array" })
  public costFilter?: core.Array<CostFilter> | core.ArrayOut<CostFilter>;

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

  @core.attr(CostTypes, { computed: true })
  public costTypes?: CostTypes;

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: BudgetArgs) {
    super(name, "aws_budgets_budget", args);
  }

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