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

export interface TaintsArgs extends core.SchemaArgs {
  effect: string | core.StringOut;

  key: string | core.StringOut;

  value: string | core.StringOut;
}

export class Taints extends core.Schema<TaintsArgs> {
  @core.attr(String, { computed: true })
  public effect!: string | core.StringOut;

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

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

export interface RemoteAccessArgs extends core.SchemaArgs {
  ec2SshKey: string | core.StringOut;

  sourceSecurityGroupIds: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class RemoteAccess extends core.Schema<RemoteAccessArgs> {
  @core.attr(String, { computed: true })
  public ec2SshKey!: string | core.StringOut;

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

export interface AutoscalingGroupsArgs extends core.SchemaArgs {
  name: string | core.StringOut;
}

export class AutoscalingGroups extends core.Schema<AutoscalingGroupsArgs> {
  @core.attr(String, { computed: true })
  public name!: string | core.StringOut;
}

export interface ResourcesArgs extends core.SchemaArgs {
  autoscalingGroups:
    | core.Array<AutoscalingGroups>
    | core.ArrayOut<AutoscalingGroups>;

  remoteAccessSecurityGroupId: string | core.StringOut;
}

export class Resources extends core.Schema<ResourcesArgs> {
  @core.attr(AutoscalingGroups, { computed: true, kind: "array" })
  public autoscalingGroups!:
    | core.Array<AutoscalingGroups>
    | core.ArrayOut<AutoscalingGroups>;

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

export interface ScalingConfigArgs extends core.SchemaArgs {
  desiredSize: number | core.NumberOut;

  maxSize: number | core.NumberOut;

  minSize: number | core.NumberOut;
}

export class ScalingConfig extends core.Schema<ScalingConfigArgs> {
  @core.attr(Number, { computed: true })
  public desiredSize!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public maxSize!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public minSize!: number | core.NumberOut;
}

export interface DsNodeGroupArgs {
  clusterName: string | core.StringOut;

  nodeGroupName: string | core.StringOut;

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

export class DsNodeGroup extends core.Data<DsNodeGroupArgs> {
  @core.attr(String, { computed: true })
  public amiType!: string | core.StringOut;

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

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

  @core.attr(Number, { computed: true })
  public diskSize!: number | core.NumberOut;

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

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

  @core.attr(String, { computed: true, kind: "map" })
  public labels!: core.Map<string, string> | core.MapOut<core.StringOut>;

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

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

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

  @core.attr(RemoteAccess, { computed: true, kind: "array" })
  public remoteAccess!: core.Array<RemoteAccess> | core.ArrayOut<RemoteAccess>;

  @core.attr(Resources, { computed: true, kind: "array" })
  public resources!: core.Array<Resources> | core.ArrayOut<Resources>;

  @core.attr(ScalingConfig, { computed: true, kind: "array" })
  public scalingConfig!:
    | core.Array<ScalingConfig>
    | core.ArrayOut<ScalingConfig>;

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

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

  @core.attr(String, { computed: true, kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(Taints, { computed: true, kind: "array" })
  public taints!: core.Array<Taints> | core.ArrayOut<Taints>;

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

  constructor(name: string, args?: DsNodeGroupArgs) {
    super(name, "aws_eks_node_group", args);
  }

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