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

export interface RuleArgs extends core.SchemaArgs {
  attribute?: string | core.StringOut;

  operator?: string | core.StringOut;

  value?: string | core.StringOut;
}

export class Rule extends core.Schema<RuleArgs> {
  @core.attr(String)
  public attribute?: string | core.StringOut;

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

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

export interface DevicePoolArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

  maxDevices?: number | core.NumberOut;

  name: string | core.StringOut;

  projectArn: string | core.StringOut;

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

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

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

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

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

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

  @core.attr(Number)
  public maxDevices?: number | core.NumberOut;

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

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

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

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

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

  constructor(name: string, args?: DevicePoolArgs) {
    super(name, "aws_devicefarm_device_pool", args);
  }

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