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

export interface SelectorArgs extends core.SchemaArgs {
  labels?: core.Map<string, string> | core.MapOut<core.StringOut>;

  namespace: string | core.StringOut;
}

export class Selector extends core.Schema<SelectorArgs> {
  @core.attr(String, { kind: "map" })
  public labels?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

export interface FargateProfileArgs extends core.ResourceArgs {
  clusterName: string | core.StringOut;

  fargateProfileName: string | core.StringOut;

  podExecutionRoleArn: string | core.StringOut;

  selector: core.Array<Selector> | core.ArrayOut<Selector>;

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

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

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

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

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

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

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

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

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

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

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

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

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