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

export interface ClusterCertificatesArgs extends core.SchemaArgs {
  awsHardwareCertificate: string | core.StringOut;

  clusterCertificate: string | core.StringOut;

  clusterCsr: string | core.StringOut;

  hsmCertificate: string | core.StringOut;

  manufacturerHardwareCertificate: string | core.StringOut;
}

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

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

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

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

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

export interface V2ClusterArgs extends core.ResourceArgs {
  hsmType: string | core.StringOut;

  sourceBackupIdentifier?: string | core.StringOut;

  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 V2Cluster extends core.Resource<V2ClusterArgs> {
  @core.attr(ClusterCertificates, { computed: true, kind: "array" })
  public clusterCertificates!:
    | core.Array<ClusterCertificates>
    | core.ArrayOut<ClusterCertificates>;

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

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

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

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

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

  @core.attr(String)
  public sourceBackupIdentifier?: 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(String, { computed: true })
  public vpcId!: string | core.StringOut;

  constructor(name: string, args?: V2ClusterArgs) {
    super(name, "aws_cloudhsm_v2_cluster", args);
  }

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