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

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

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

  @core.attr(String)
  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 ClusterArgs extends core.ResourceArgs {
  applyImmediately?: boolean | core.BooleanOut;

  autoMinorVersionUpgrade?: string | core.StringOut;

  availabilityZone?: string | core.StringOut;

  azMode?: string | core.StringOut;

  clusterId: string | core.StringOut;

  engine?: string | core.StringOut;

  engineVersion?: string | core.StringOut;

  finalSnapshotIdentifier?: string | core.StringOut;

  logDeliveryConfiguration?:
    | core.Array<LogDeliveryConfiguration>
    | core.ArrayOut<LogDeliveryConfiguration>;

  maintenanceWindow?: string | core.StringOut;

  nodeType?: string | core.StringOut;

  notificationTopicArn?: string | core.StringOut;

  numCacheNodes?: number | core.NumberOut;

  parameterGroupName?: string | core.StringOut;

  port?: number | core.NumberOut;

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

  replicationGroupId?: string | core.StringOut;

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

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

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

  snapshotName?: string | core.StringOut;

  snapshotRetentionLimit?: number | core.NumberOut;

  snapshotWindow?: string | core.StringOut;

  subnetGroupName?: string | core.StringOut;

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

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

export class Cluster extends core.Resource<ClusterArgs> {
  @core.attr(Boolean, { computed: true })
  public applyImmediately?: boolean | core.BooleanOut;

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

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

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

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

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

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

  @core.attr(LogDeliveryConfiguration, { 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)
  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, { kind: "array" })
  public preferredAvailabilityZones?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

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

  @core.attr(Number)
  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, { 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?: ClusterArgs) {
    super(name, "aws_elasticache_cluster", args);
  }

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