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

export interface InheritedValueArgs extends core.SchemaArgs {
  dimensionKey?: string | core.StringOut;

  dimensionName?: string | core.StringOut;
}

export class InheritedValue extends core.Schema<InheritedValueArgs> {
  @core.attr(String)
  public dimensionKey?: string | core.StringOut;

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

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

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

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

export class CostCategoryBlk extends core.Schema<CostCategoryBlkArgs> {
  @core.attr(String)
  public key?: string | core.StringOut;

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

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

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

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

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

export class Dimension extends core.Schema<DimensionArgs> {
  @core.attr(String)
  public key?: string | core.StringOut;

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

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

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

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

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

export class Tags extends core.Schema<TagsArgs> {
  @core.attr(String)
  public key?: string | core.StringOut;

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

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

export interface AndArgs extends core.SchemaArgs {
  costCategory?: CostCategoryBlk;

  dimension?: Dimension;

  tags?: Tags;
}

export class And extends core.Schema<AndArgs> {
  @core.attr(CostCategoryBlk)
  public costCategory?: CostCategoryBlk;

  @core.attr(Dimension)
  public dimension?: Dimension;

  @core.attr(Tags)
  public tags?: Tags;
}

export interface NotArgs extends core.SchemaArgs {
  costCategory?: CostCategoryBlk;

  dimension?: Dimension;

  tags?: Tags;
}

export class Not extends core.Schema<NotArgs> {
  @core.attr(CostCategoryBlk)
  public costCategory?: CostCategoryBlk;

  @core.attr(Dimension)
  public dimension?: Dimension;

  @core.attr(Tags)
  public tags?: Tags;
}

export interface OrArgs extends core.SchemaArgs {
  costCategory?: CostCategoryBlk;

  dimension?: Dimension;

  tags?: Tags;
}

export class Or extends core.Schema<OrArgs> {
  @core.attr(CostCategoryBlk)
  public costCategory?: CostCategoryBlk;

  @core.attr(Dimension)
  public dimension?: Dimension;

  @core.attr(Tags)
  public tags?: Tags;
}

export interface RuleRuleArgs extends core.SchemaArgs {
  and?: core.Array<And> | core.ArrayOut<And>;

  costCategory?: CostCategoryBlk;

  dimension?: Dimension;

  not?: Not;

  or?: core.Array<Or> | core.ArrayOut<Or>;

  tags?: Tags;
}

export class RuleRule extends core.Schema<RuleRuleArgs> {
  @core.attr(And, { kind: "array" })
  public and?: core.Array<And> | core.ArrayOut<And>;

  @core.attr(CostCategoryBlk)
  public costCategory?: CostCategoryBlk;

  @core.attr(Dimension)
  public dimension?: Dimension;

  @core.attr(Not)
  public not?: Not;

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

  @core.attr(Tags)
  public tags?: Tags;
}

export interface RuleArgs extends core.SchemaArgs {
  inheritedValue?: InheritedValue;

  rule?: RuleRule;

  type?: string | core.StringOut;

  value?: string | core.StringOut;
}

export class Rule extends core.Schema<RuleArgs> {
  @core.attr(InheritedValue)
  public inheritedValue?: InheritedValue;

  @core.attr(RuleRule)
  public rule?: RuleRule;

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

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

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

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

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

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

export interface SplitChargeRuleArgs extends core.SchemaArgs {
  method: string | core.StringOut;

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

  source: string | core.StringOut;

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

export class SplitChargeRule extends core.Schema<SplitChargeRuleArgs> {
  @core.attr(String)
  public method!: string | core.StringOut;

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

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

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

export interface CostCategoryArgs extends core.ResourceArgs {
  defaultValue?: string | core.StringOut;

  name: string | core.StringOut;

  rule: core.Array<Rule> | core.ArrayOut<Rule>;

  ruleVersion: string | core.StringOut;

  splitChargeRule?:
    | core.Array<SplitChargeRule>
    | core.ArrayOut<SplitChargeRule>;

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

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

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

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

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

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

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

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

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

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

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

  @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>;

  constructor(name: string, args?: CostCategoryArgs) {
    super(name, "aws_ce_cost_category", args);
  }

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