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

export interface InitialLifecycleHookArgs extends core.SchemaArgs {
  defaultResult?: string | core.StringOut;

  heartbeatTimeout?: number | core.NumberOut;

  lifecycleTransition: string | core.StringOut;

  name: string | core.StringOut;

  notificationMetadata?: string | core.StringOut;

  notificationTargetArn?: string | core.StringOut;

  roleArn?: string | core.StringOut;
}

export class InitialLifecycleHook extends core.Schema<InitialLifecycleHookArgs> {
  @core.attr(String, { computed: true })
  public defaultResult?: string | core.StringOut;

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

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

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

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

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

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

export interface InstanceReusePolicyArgs extends core.SchemaArgs {
  reuseOnScaleIn?: boolean | core.BooleanOut;
}

export class InstanceReusePolicy extends core.Schema<InstanceReusePolicyArgs> {
  @core.attr(Boolean)
  public reuseOnScaleIn?: boolean | core.BooleanOut;
}

export interface WarmPoolArgs extends core.SchemaArgs {
  instanceReusePolicy?: InstanceReusePolicy;

  maxGroupPreparedCapacity?: number | core.NumberOut;

  minSize?: number | core.NumberOut;

  poolState?: string | core.StringOut;
}

export class WarmPool extends core.Schema<WarmPoolArgs> {
  @core.attr(InstanceReusePolicy)
  public instanceReusePolicy?: InstanceReusePolicy;

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

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

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

export interface TagArgs extends core.SchemaArgs {
  key: string | core.StringOut;

  propagateAtLaunch: boolean | core.BooleanOut;

  value: string | core.StringOut;
}

export class Tag extends core.Schema<TagArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

  @core.attr(Boolean)
  public propagateAtLaunch!: boolean | core.BooleanOut;

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

export interface PreferencesArgs extends core.SchemaArgs {
  checkpointDelay?: string | core.StringOut;

  checkpointPercentages?: core.Array<number> | core.ArrayOut<core.NumberOut>;

  instanceWarmup?: string | core.StringOut;

  minHealthyPercentage?: number | core.NumberOut;

  skipMatching?: boolean | core.BooleanOut;
}

export class Preferences extends core.Schema<PreferencesArgs> {
  @core.attr(String)
  public checkpointDelay?: string | core.StringOut;

  @core.attr(Number, { kind: "array" })
  public checkpointPercentages?:
    | core.Array<number>
    | core.ArrayOut<core.NumberOut>;

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

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

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

export interface InstanceRefreshArgs extends core.SchemaArgs {
  preferences?: Preferences;

  strategy: string | core.StringOut;

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

export class InstanceRefresh extends core.Schema<InstanceRefreshArgs> {
  @core.attr(Preferences)
  public preferences?: Preferences;

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

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

export interface LaunchTemplateArgs extends core.SchemaArgs {
  id?: string | core.StringOut;

  name?: string | core.StringOut;

  version?: string | core.StringOut;
}

export class LaunchTemplate extends core.Schema<LaunchTemplateArgs> {
  @core.attr(String, { computed: true })
  public id?: string | core.StringOut;

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

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

export interface InstancesDistributionArgs extends core.SchemaArgs {
  onDemandAllocationStrategy?: string | core.StringOut;

  onDemandBaseCapacity?: number | core.NumberOut;

  onDemandPercentageAboveBaseCapacity?: number | core.NumberOut;

  spotAllocationStrategy?: string | core.StringOut;

  spotInstancePools?: number | core.NumberOut;

  spotMaxPrice?: string | core.StringOut;
}

export class InstancesDistribution extends core.Schema<InstancesDistributionArgs> {
  @core.attr(String, { computed: true })
  public onDemandAllocationStrategy?: string | core.StringOut;

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

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

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

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

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

export interface LaunchTemplateSpecificationArgs extends core.SchemaArgs {
  launchTemplateId?: string | core.StringOut;

  launchTemplateName?: string | core.StringOut;

  version?: string | core.StringOut;
}

export class LaunchTemplateSpecification extends core.Schema<LaunchTemplateSpecificationArgs> {
  @core.attr(String, { computed: true })
  public launchTemplateId?: string | core.StringOut;

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

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

export interface VcpuCountArgs extends core.SchemaArgs {
  max?: number | core.NumberOut;

  min?: number | core.NumberOut;
}

export class VcpuCount extends core.Schema<VcpuCountArgs> {
  @core.attr(Number)
  public max?: number | core.NumberOut;

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

export interface NetworkInterfaceCountArgs extends core.SchemaArgs {
  max?: number | core.NumberOut;

  min?: number | core.NumberOut;
}

export class NetworkInterfaceCount extends core.Schema<NetworkInterfaceCountArgs> {
  @core.attr(Number)
  public max?: number | core.NumberOut;

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

export interface AcceleratorCountArgs extends core.SchemaArgs {
  max?: number | core.NumberOut;

  min?: number | core.NumberOut;
}

export class AcceleratorCount extends core.Schema<AcceleratorCountArgs> {
  @core.attr(Number)
  public max?: number | core.NumberOut;

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

export interface TotalLocalStorageGbArgs extends core.SchemaArgs {
  max?: number | core.NumberOut;

  min?: number | core.NumberOut;
}

export class TotalLocalStorageGb extends core.Schema<TotalLocalStorageGbArgs> {
  @core.attr(Number)
  public max?: number | core.NumberOut;

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

export interface MemoryGibPerVcpuArgs extends core.SchemaArgs {
  max?: number | core.NumberOut;

  min?: number | core.NumberOut;
}

export class MemoryGibPerVcpu extends core.Schema<MemoryGibPerVcpuArgs> {
  @core.attr(Number)
  public max?: number | core.NumberOut;

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

export interface MemoryMibArgs extends core.SchemaArgs {
  max?: number | core.NumberOut;

  min?: number | core.NumberOut;
}

export class MemoryMib extends core.Schema<MemoryMibArgs> {
  @core.attr(Number)
  public max?: number | core.NumberOut;

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

export interface AcceleratorTotalMemoryMibArgs extends core.SchemaArgs {
  max?: number | core.NumberOut;

  min?: number | core.NumberOut;
}

export class AcceleratorTotalMemoryMib extends core.Schema<AcceleratorTotalMemoryMibArgs> {
  @core.attr(Number)
  public max?: number | core.NumberOut;

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

export interface BaselineEbsBandwidthMbpsArgs extends core.SchemaArgs {
  max?: number | core.NumberOut;

  min?: number | core.NumberOut;
}

export class BaselineEbsBandwidthMbps extends core.Schema<BaselineEbsBandwidthMbpsArgs> {
  @core.attr(Number)
  public max?: number | core.NumberOut;

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

export interface InstanceRequirementsArgs extends core.SchemaArgs {
  acceleratorCount?: AcceleratorCount;

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

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

  acceleratorTotalMemoryMib?: AcceleratorTotalMemoryMib;

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

  bareMetal?: string | core.StringOut;

  baselineEbsBandwidthMbps?: BaselineEbsBandwidthMbps;

  burstablePerformance?: string | core.StringOut;

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

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

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

  localStorage?: string | core.StringOut;

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

  memoryGibPerVcpu?: MemoryGibPerVcpu;

  memoryMib?: MemoryMib;

  networkInterfaceCount?: NetworkInterfaceCount;

  onDemandMaxPricePercentageOverLowestPrice?: number | core.NumberOut;

  requireHibernateSupport?: boolean | core.BooleanOut;

  spotMaxPricePercentageOverLowestPrice?: number | core.NumberOut;

  totalLocalStorageGb?: TotalLocalStorageGb;

  vcpuCount?: VcpuCount;
}

export class InstanceRequirements extends core.Schema<InstanceRequirementsArgs> {
  @core.attr(AcceleratorCount)
  public acceleratorCount?: AcceleratorCount;

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

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

  @core.attr(AcceleratorTotalMemoryMib)
  public acceleratorTotalMemoryMib?: AcceleratorTotalMemoryMib;

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

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

  @core.attr(BaselineEbsBandwidthMbps)
  public baselineEbsBandwidthMbps?: BaselineEbsBandwidthMbps;

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

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

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

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

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

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

  @core.attr(MemoryGibPerVcpu)
  public memoryGibPerVcpu?: MemoryGibPerVcpu;

  @core.attr(MemoryMib)
  public memoryMib?: MemoryMib;

  @core.attr(NetworkInterfaceCount)
  public networkInterfaceCount?: NetworkInterfaceCount;

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

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

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

  @core.attr(TotalLocalStorageGb)
  public totalLocalStorageGb?: TotalLocalStorageGb;

  @core.attr(VcpuCount)
  public vcpuCount?: VcpuCount;
}

export interface OverrideArgs extends core.SchemaArgs {
  instanceRequirements?: InstanceRequirements;

  instanceType?: string | core.StringOut;

  launchTemplateSpecification?: LaunchTemplateSpecification;

  weightedCapacity?: string | core.StringOut;
}

export class Override extends core.Schema<OverrideArgs> {
  @core.attr(InstanceRequirements)
  public instanceRequirements?: InstanceRequirements;

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

  @core.attr(LaunchTemplateSpecification)
  public launchTemplateSpecification?: LaunchTemplateSpecification;

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

export interface MixedInstancesPolicyLaunchTemplateArgs
  extends core.SchemaArgs {
  launchTemplateSpecification: LaunchTemplateSpecification;

  override?: core.Array<Override> | core.ArrayOut<Override>;
}

export class MixedInstancesPolicyLaunchTemplate extends core.Schema<MixedInstancesPolicyLaunchTemplateArgs> {
  @core.attr(LaunchTemplateSpecification)
  public launchTemplateSpecification!: LaunchTemplateSpecification;

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

export interface MixedInstancesPolicyArgs extends core.SchemaArgs {
  instancesDistribution?: InstancesDistribution;

  launchTemplate: MixedInstancesPolicyLaunchTemplate;
}

export class MixedInstancesPolicy extends core.Schema<MixedInstancesPolicyArgs> {
  @core.attr(InstancesDistribution, { computed: true })
  public instancesDistribution?: InstancesDistribution;

  @core.attr(MixedInstancesPolicyLaunchTemplate)
  public launchTemplate!: MixedInstancesPolicyLaunchTemplate;
}

export interface GroupArgs extends core.ResourceArgs {
  availabilityZones?: core.Array<string> | core.ArrayOut<core.StringOut>;

  capacityRebalance?: boolean | core.BooleanOut;

  context?: string | core.StringOut;

  defaultCooldown?: number | core.NumberOut;

  defaultInstanceWarmup?: number | core.NumberOut;

  desiredCapacity?: number | core.NumberOut;

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

  forceDelete?: boolean | core.BooleanOut;

  forceDeleteWarmPool?: boolean | core.BooleanOut;

  healthCheckGracePeriod?: number | core.NumberOut;

  healthCheckType?: string | core.StringOut;

  initialLifecycleHook?:
    | core.Array<InitialLifecycleHook>
    | core.ArrayOut<InitialLifecycleHook>;

  instanceRefresh?: InstanceRefresh;

  launchConfiguration?: string | core.StringOut;

  launchTemplate?: LaunchTemplate;

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

  maxInstanceLifetime?: number | core.NumberOut;

  maxSize: number | core.NumberOut;

  metricsGranularity?: string | core.StringOut;

  minElbCapacity?: number | core.NumberOut;

  minSize: number | core.NumberOut;

  mixedInstancesPolicy?: MixedInstancesPolicy;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  placementGroup?: string | core.StringOut;

  protectFromScaleIn?: boolean | core.BooleanOut;

  serviceLinkedRoleArn?: string | core.StringOut;

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

  tag?: core.Array<Tag> | core.ArrayOut<Tag>;

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

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

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

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

  waitForCapacityTimeout?: string | core.StringOut;

  waitForElbCapacity?: number | core.NumberOut;

  warmPool?: WarmPool;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(InstanceRefresh)
  public instanceRefresh?: InstanceRefresh;

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

  @core.attr(LaunchTemplate)
  public launchTemplate?: LaunchTemplate;

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

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

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

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

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

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

  @core.attr(MixedInstancesPolicy)
  public mixedInstancesPolicy?: MixedInstancesPolicy;

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

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

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

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

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

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

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

  @core.attr(String, { kind: "map_array" })
  public tags?:
    | core.Array<Map<string, string>>
    | core.MapArrayOut<core.StringOut>;

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

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

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

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

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

  @core.attr(WarmPool)
  public warmPool?: WarmPool;

  constructor(name: string, args?: GroupArgs) {
    super(name, "aws_autoscaling_group", args);
  }

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