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, { computed: true })
  public dimensionKey!: string | core.StringOut;

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

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

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

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

  @core.attr(String, { computed: true, kind: "array" })
  public values!: core.Array<string> | core.ArrayOut<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, { computed: true })
  public key!: string | core.StringOut;

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

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

export interface AndArgs extends core.SchemaArgs {
  costCategory: core.Array<CostCategoryBlk> | core.ArrayOut<CostCategoryBlk>;

  dimension: core.Array<Dimension> | core.ArrayOut<Dimension>;

  tags: core.Array<Tags> | core.ArrayOut<Tags>;
}

export class And extends core.Schema<AndArgs> {
  @core.attr(CostCategoryBlk, { computed: true, kind: "array" })
  public costCategory!:
    | core.Array<CostCategoryBlk>
    | core.ArrayOut<CostCategoryBlk>;

  @core.attr(Dimension, { computed: true, kind: "array" })
  public dimension!: core.Array<Dimension> | core.ArrayOut<Dimension>;

  @core.attr(Tags, { computed: true, kind: "array" })
  public tags!: core.Array<Tags> | core.ArrayOut<Tags>;
}

export interface NotArgs extends core.SchemaArgs {
  costCategory: core.Array<CostCategoryBlk> | core.ArrayOut<CostCategoryBlk>;

  dimension: core.Array<Dimension> | core.ArrayOut<Dimension>;

  tags: core.Array<Tags> | core.ArrayOut<Tags>;
}

export class Not extends core.Schema<NotArgs> {
  @core.attr(CostCategoryBlk, { computed: true, kind: "array" })
  public costCategory!:
    | core.Array<CostCategoryBlk>
    | core.ArrayOut<CostCategoryBlk>;

  @core.attr(Dimension, { computed: true, kind: "array" })
  public dimension!: core.Array<Dimension> | core.ArrayOut<Dimension>;

  @core.attr(Tags, { computed: true, kind: "array" })
  public tags!: core.Array<Tags> | core.ArrayOut<Tags>;
}

export interface OrArgs extends core.SchemaArgs {
  costCategory: core.Array<CostCategoryBlk> | core.ArrayOut<CostCategoryBlk>;

  dimension: core.Array<Dimension> | core.ArrayOut<Dimension>;

  tags: core.Array<Tags> | core.ArrayOut<Tags>;
}

export class Or extends core.Schema<OrArgs> {
  @core.attr(CostCategoryBlk, { computed: true, kind: "array" })
  public costCategory!:
    | core.Array<CostCategoryBlk>
    | core.ArrayOut<CostCategoryBlk>;

  @core.attr(Dimension, { computed: true, kind: "array" })
  public dimension!: core.Array<Dimension> | core.ArrayOut<Dimension>;

  @core.attr(Tags, { computed: true, kind: "array" })
  public tags!: core.Array<Tags> | core.ArrayOut<Tags>;
}

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

  costCategory: core.Array<CostCategoryBlk> | core.ArrayOut<CostCategoryBlk>;

  dimension: core.Array<Dimension> | core.ArrayOut<Dimension>;

  not: core.Array<Not> | core.ArrayOut<Not>;

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

  tags: core.Array<Tags> | core.ArrayOut<Tags>;
}

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

  @core.attr(CostCategoryBlk, { computed: true, kind: "array" })
  public costCategory!:
    | core.Array<CostCategoryBlk>
    | core.ArrayOut<CostCategoryBlk>;

  @core.attr(Dimension, { computed: true, kind: "array" })
  public dimension!: core.Array<Dimension> | core.ArrayOut<Dimension>;

  @core.attr(Not, { computed: true, kind: "array" })
  public not!: core.Array<Not> | core.ArrayOut<Not>;

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

  @core.attr(Tags, { computed: true, kind: "array" })
  public tags!: core.Array<Tags> | core.ArrayOut<Tags>;
}

export interface RuleArgs extends core.SchemaArgs {
  inheritedValue: core.Array<InheritedValue> | core.ArrayOut<InheritedValue>;

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

  type: string | core.StringOut;

  value: string | core.StringOut;
}

export class Rule extends core.Schema<RuleArgs> {
  @core.attr(InheritedValue, { computed: true, kind: "array" })
  public inheritedValue!:
    | core.Array<InheritedValue>
    | core.ArrayOut<InheritedValue>;

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

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

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

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

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

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

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

export interface DsCostCategoryArgs {
  costCategoryArn: string | core.StringOut;

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

export class DsCostCategory extends core.Data<DsCostCategoryArgs> {
  @core.attr(String)
  public costCategoryArn!: 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, { computed: true })
  public name!: string | core.StringOut;

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

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

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

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

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

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