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

export interface DomainJoinInfoArgs extends core.SchemaArgs {
  directoryName?: string | core.StringOut;

  organizationalUnitDistinguishedName?: string | core.StringOut;
}

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

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

export interface VpcConfigArgs extends core.SchemaArgs {
  securityGroupIds?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export class VpcConfig extends core.Schema<VpcConfigArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public securityGroupIds?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface ComputeCapacityArgs extends core.SchemaArgs {
  available: number | core.NumberOut;

  desiredInstances: number | core.NumberOut;

  inUse: number | core.NumberOut;

  running: number | core.NumberOut;
}

export class ComputeCapacity extends core.Schema<ComputeCapacityArgs> {
  @core.attr(Number, { computed: true })
  public available!: number | core.NumberOut;

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

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

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

export interface FleetArgs extends core.ResourceArgs {
  computeCapacity: ComputeCapacity;

  description?: string | core.StringOut;

  disconnectTimeoutInSeconds?: number | core.NumberOut;

  displayName?: string | core.StringOut;

  domainJoinInfo?: DomainJoinInfo;

  enableDefaultInternetAccess?: boolean | core.BooleanOut;

  fleetType?: string | core.StringOut;

  iamRoleArn?: string | core.StringOut;

  idleDisconnectTimeoutInSeconds?: number | core.NumberOut;

  imageArn?: string | core.StringOut;

  imageName?: string | core.StringOut;

  instanceType: string | core.StringOut;

  maxUserDurationInSeconds?: number | core.NumberOut;

  name: string | core.StringOut;

  streamView?: string | core.StringOut;

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

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

  vpcConfig?: VpcConfig;
}

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

  @core.attr(ComputeCapacity)
  public computeCapacity!: ComputeCapacity;

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

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

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

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

  @core.attr(DomainJoinInfo, { computed: true })
  public domainJoinInfo?: DomainJoinInfo;

  @core.attr(Boolean, { computed: true })
  public enableDefaultInternetAccess?: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(VpcConfig, { computed: true })
  public vpcConfig?: VpcConfig;

  constructor(name: string, args?: FleetArgs) {
    super(name, "aws_appstream_fleet", args);
  }

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