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

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)
  public ec2SshKey?: string | core.StringOut;

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

export interface LaunchTemplateArgs extends core.SchemaArgs {
  id?: string | core.StringOut;

  name?: string | core.StringOut;

  version: string | core.StringOut;
}

export class LaunchTemplate extends core.Schema<LaunchTemplateArgs> {
  @core.attr(String, { computed: true })
  public id?: string | core.StringOut;

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

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

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

  key: string | core.StringOut;

  value?: string | core.StringOut;
}

export class Taint extends core.Schema<TaintArgs> {
  @core.attr(String)
  public effect!: string | core.StringOut;

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

  @core.attr(String)
  public value?: string | 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 UpdateConfigArgs extends core.SchemaArgs {
  maxUnavailable?: number | core.NumberOut;

  maxUnavailablePercentage?: number | core.NumberOut;
}

export class UpdateConfig extends core.Schema<UpdateConfigArgs> {
  @core.attr(Number)
  public maxUnavailable?: number | core.NumberOut;

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

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)
  public desiredSize!: number | core.NumberOut;

  @core.attr(Number)
  public maxSize!: number | core.NumberOut;

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

export interface NodeGroupArgs extends core.ResourceArgs {
  amiType?: string | core.StringOut;

  capacityType?: string | core.StringOut;

  clusterName: string | core.StringOut;

  diskSize?: number | core.NumberOut;

  forceUpdateVersion?: boolean | core.BooleanOut;

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

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

  launchTemplate?: LaunchTemplate;

  nodeGroupName?: string | core.StringOut;

  nodeGroupNamePrefix?: string | core.StringOut;

  nodeRoleArn: string | core.StringOut;

  releaseVersion?: string | core.StringOut;

  remoteAccess?: RemoteAccess;

  scalingConfig: ScalingConfig;

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

  taint?: core.Array<Taint> | core.ArrayOut<Taint>;

  updateConfig?: UpdateConfig;

  version?: string | core.StringOut;
}

export class NodeGroup extends core.Resource<NodeGroupArgs> {
  @core.attr(String, { computed: true })
  public amiType?: string | core.StringOut;

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

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

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

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

  @core.attr(Boolean)
  public forceUpdateVersion?: boolean | core.BooleanOut;

  @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, { kind: "map" })
  public labels?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(LaunchTemplate)
  public launchTemplate?: LaunchTemplate;

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

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

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

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

  @core.attr(RemoteAccess)
  public remoteAccess?: RemoteAccess;

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

  @core.attr(ScalingConfig)
  public scalingConfig!: ScalingConfig;

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

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

  @core.attr(UpdateConfig, { computed: true })
  public updateConfig?: UpdateConfig;

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

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

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