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 DsV2ClusterArgs {
  clusterId: string | core.StringOut;

  clusterState?: string | core.StringOut;
}

export class DsV2Cluster extends core.Data<DsV2ClusterArgs> {
  @core.attr(ClusterCertificates, { computed: true, kind: "array" })
  public clusterCertificates!:
    | core.Array<ClusterCertificates>
    | core.ArrayOut<ClusterCertificates>;

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

  @core.attr(String, { computed: true })
  public clusterState?: 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, { computed: true, kind: "array" })
  public subnetIds!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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