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

export interface NodesArgs extends core.SchemaArgs {
  address: string | core.StringOut;

  availabilityZone: string | core.StringOut;

  id: string | core.StringOut;

  port: number | core.NumberOut;
}

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

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

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

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

export interface ServerSideEncryptionArgs extends core.SchemaArgs {
  enabled?: boolean | core.BooleanOut;
}

export class ServerSideEncryption extends core.Schema<ServerSideEncryptionArgs> {
  @core.attr(Boolean)
  public enabled?: boolean | core.BooleanOut;
}

export interface DaxClusterArgs extends core.ResourceArgs {
  availabilityZones?: core.Array<string> | core.ArrayOut<core.StringOut>;

  clusterEndpointEncryptionType?: string | core.StringOut;

  clusterName: string | core.StringOut;

  description?: string | core.StringOut;

  iamRoleArn: string | core.StringOut;

  maintenanceWindow?: string | core.StringOut;

  nodeType: string | core.StringOut;

  notificationTopicArn?: string | core.StringOut;

  parameterGroupName?: string | core.StringOut;

  replicationFactor: number | core.NumberOut;

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

  serverSideEncryption?: ServerSideEncryption;

  subnetGroupName?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(ServerSideEncryption)
  public serverSideEncryption?: ServerSideEncryption;

  @core.attr(String, { computed: true })
  public subnetGroupName?: string | 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?: DaxClusterArgs) {
    super(name, "aws_dax_cluster", args);
  }

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