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

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

  sortOrder?: string | core.StringOut;
}

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

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

export interface TimePeriodArgs extends core.SchemaArgs {
  end: string | core.StringOut;

  start: string | core.StringOut;
}

export class TimePeriod extends core.Schema<TimePeriodArgs> {
  @core.attr(String)
  public end!: string | core.StringOut;

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

export interface TagsBlkArgs 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 TagsBlk extends core.Schema<TagsBlkArgs> {
  @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 CostCategoryArgs 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 CostCategory extends core.Schema<CostCategoryArgs> {
  @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 AndArgs extends core.SchemaArgs {
  costCategory?: CostCategory;

  dimension?: Dimension;

  tags?: TagsBlk;
}

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

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

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

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

  dimension?: Dimension;

  tags?: TagsBlk;
}

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

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

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

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

  dimension?: Dimension;

  tags?: TagsBlk;
}

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

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

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

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

  costCategory?: CostCategory;

  dimension?: Dimension;

  not?: Not;

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

  tags?: TagsBlk;
}

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

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

  @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(TagsBlk)
  public tags?: TagsBlk;
}

export interface DsTagsArgs {
  filter?: Filter;

  searchString?: string | core.StringOut;

  sortBy?: core.Array<SortBy> | core.ArrayOut<SortBy>;

  tagKey?: string | core.StringOut;

  timePeriod: TimePeriod;
}

export class DsTags extends core.Data<DsTagsArgs> {
  @core.attr(Filter)
  public filter?: Filter;

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

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

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

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

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

  @core.attr(TimePeriod)
  public timePeriod!: TimePeriod;

  constructor(name: string, args?: DsTagsArgs) {
    super(name, "aws_ce_tags", args);
  }

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