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

export interface EbsVolumeArgs extends core.SchemaArgs {
  encrypted?: boolean | core.BooleanOut;

  iops?: number | core.NumberOut;

  mountPoint: string | core.StringOut;

  numberOfDisks: number | core.NumberOut;

  raidLevel?: string | core.StringOut;

  size: number | core.NumberOut;

  type?: string | core.StringOut;
}

export class EbsVolume extends core.Schema<EbsVolumeArgs> {
  @core.attr(Boolean)
  public encrypted?: boolean | core.BooleanOut;

  @core.attr(Number)
  public iops?: number | core.NumberOut;

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

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

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

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

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

export interface LogStreamsArgs extends core.SchemaArgs {
  batchCount?: number | core.NumberOut;

  batchSize?: number | core.NumberOut;

  bufferDuration?: number | core.NumberOut;

  datetimeFormat?: string | core.StringOut;

  encoding?: string | core.StringOut;

  file: string | core.StringOut;

  fileFingerprintLines?: string | core.StringOut;

  initialPosition?: string | core.StringOut;

  logGroupName: string | core.StringOut;

  multilineStartPattern?: string | core.StringOut;

  timeZone?: string | core.StringOut;
}

export class LogStreams extends core.Schema<LogStreamsArgs> {
  @core.attr(Number)
  public batchCount?: number | core.NumberOut;

  @core.attr(Number)
  public batchSize?: number | core.NumberOut;

  @core.attr(Number)
  public bufferDuration?: number | core.NumberOut;

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

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

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

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

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

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

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

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

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

  logStreams?: core.Array<LogStreams> | core.ArrayOut<LogStreams>;
}

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

  @core.attr(LogStreams, { kind: "array" })
  public logStreams?: core.Array<LogStreams> | core.ArrayOut<LogStreams>;
}

export interface GangliaLayerArgs extends core.ResourceArgs {
  autoAssignElasticIps?: boolean | core.BooleanOut;

  autoAssignPublicIps?: boolean | core.BooleanOut;

  autoHealing?: boolean | core.BooleanOut;

  cloudwatchConfiguration?: CloudwatchConfiguration;

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

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

  customInstanceProfileArn?: string | core.StringOut;

  customJson?: string | core.StringOut;

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

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

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

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

  drainElbOnShutdown?: boolean | core.BooleanOut;

  ebsVolume?: core.Array<EbsVolume> | core.ArrayOut<EbsVolume>;

  elasticLoadBalancer?: string | core.StringOut;

  installUpdatesOnBoot?: boolean | core.BooleanOut;

  instanceShutdownTimeout?: number | core.NumberOut;

  name?: string | core.StringOut;

  password: string | core.StringOut;

  stackId: string | core.StringOut;

  systemPackages?: 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>;

  url?: string | core.StringOut;

  useEbsOptimizedInstances?: boolean | core.BooleanOut;

  username?: string | core.StringOut;
}

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

  @core.attr(Boolean)
  public autoAssignElasticIps?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public autoAssignPublicIps?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public autoHealing?: boolean | core.BooleanOut;

  @core.attr(CloudwatchConfiguration)
  public cloudwatchConfiguration?: CloudwatchConfiguration;

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

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

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

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

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

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

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

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

  @core.attr(Boolean)
  public drainElbOnShutdown?: boolean | core.BooleanOut;

  @core.attr(EbsVolume, { computed: true, kind: "array" })
  public ebsVolume?: core.Array<EbsVolume> | core.ArrayOut<EbsVolume>;

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

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

  @core.attr(Boolean)
  public installUpdatesOnBoot?: boolean | core.BooleanOut;

  @core.attr(Number)
  public instanceShutdownTimeout?: number | core.NumberOut;

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

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

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

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

  @core.attr(Boolean)
  public useEbsOptimizedInstances?: boolean | core.BooleanOut;

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

  constructor(name: string, args?: GangliaLayerArgs) {
    super(name, "aws_opsworks_ganglia_layer", args);
  }

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