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

export interface ResourceQueryArgs extends core.SchemaArgs {
  query: string | core.StringOut;

  type?: string | core.StringOut;
}

export class ResourceQuery extends core.Schema<ResourceQueryArgs> {
  @core.attr(String)
  public query!: string | core.StringOut;

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

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

  name: string | core.StringOut;

  resourceQuery: ResourceQuery;

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

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

export class Group extends core.Resource<GroupArgs> {
  @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(String)
  public name!: string | core.StringOut;

  @core.attr(ResourceQuery)
  public resourceQuery!: ResourceQuery;

  @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?: GroupArgs) {
    super(name, "aws_resourcegroups_group", args);
  }

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