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

export interface LogDeliveryConfigurationArgs extends core.SchemaArgs {
  destination: string | core.StringOut;

  destinationType: string | core.StringOut;

  logFormat: string | core.StringOut;

  logType: string | core.StringOut;
}

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

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

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

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

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

  availabilityZone: string | core.StringOut;

  id: string | core.StringOut;

  port: number | core.NumberOut;
}

export class CacheNodes extends core.Schema<CacheNodesArgs> {
  @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 DsClusterArgs {
  clusterId: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsClusterArgs) {
    super(name, "aws_elasticache_cluster", args);
  }

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