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

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

  value: string | core.StringOut;
}

export class StringEquals extends core.Schema<StringEqualsArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

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

  value: string | core.StringOut;
}

export class StringLike extends core.Schema<StringLikeArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

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

  value: string | core.StringOut;
}

export class StringNotEquals extends core.Schema<StringNotEqualsArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

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

  value: string | core.StringOut;
}

export class StringNotLike extends core.Schema<StringNotLikeArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

export interface ConditionArgs extends core.SchemaArgs {
  stringEquals?: core.Array<StringEquals> | core.ArrayOut<StringEquals>;

  stringLike?: core.Array<StringLike> | core.ArrayOut<StringLike>;

  stringNotEquals?:
    | core.Array<StringNotEquals>
    | core.ArrayOut<StringNotEquals>;

  stringNotLike?: core.Array<StringNotLike> | core.ArrayOut<StringNotLike>;
}

export class Condition extends core.Schema<ConditionArgs> {
  @core.attr(StringEquals, { kind: "array" })
  public stringEquals?: core.Array<StringEquals> | core.ArrayOut<StringEquals>;

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

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

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

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

  type: string | core.StringOut;

  value: string | core.StringOut;
}

export class SelectionTag extends core.Schema<SelectionTagArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

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

export interface SelectionArgs extends core.ResourceArgs {
  condition?: core.Array<Condition> | core.ArrayOut<Condition>;

  iamRoleArn: string | core.StringOut;

  name: string | core.StringOut;

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

  planId: string | core.StringOut;

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

  selectionTag?: core.Array<SelectionTag> | core.ArrayOut<SelectionTag>;
}

export class Selection extends core.Resource<SelectionArgs> {
  @core.attr(Condition, { computed: true, kind: "array" })
  public condition?: core.Array<Condition> | core.ArrayOut<Condition>;

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

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

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

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

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

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

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

  constructor(name: string, args?: SelectionArgs) {
    super(name, "aws_backup_selection", args);
  }

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