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

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 DomainJoinInfoArgs extends core.SchemaArgs {
  directoryName?: string | core.StringOut;

  organizationalUnitDistinguishedName?: string | core.StringOut;
}

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

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

export interface AccessEndpointArgs extends core.SchemaArgs {
  endpointType: string | core.StringOut;

  vpceId?: string | core.StringOut;
}

export class AccessEndpoint extends core.Schema<AccessEndpointArgs> {
  @core.attr(String)
  public endpointType!: string | core.StringOut;

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

export interface ImageBuilderArgs extends core.ResourceArgs {
  accessEndpoint?: core.Array<AccessEndpoint> | core.ArrayOut<AccessEndpoint>;

  appstreamAgentVersion?: string | core.StringOut;

  description?: string | core.StringOut;

  displayName?: string | core.StringOut;

  domainJoinInfo?: DomainJoinInfo;

  enableDefaultInternetAccess?: boolean | core.BooleanOut;

  iamRoleArn?: string | core.StringOut;

  imageArn?: string | core.StringOut;

  imageName?: string | core.StringOut;

  instanceType: string | core.StringOut;

  name: 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 ImageBuilder extends core.Resource<ImageBuilderArgs> {
  @core.attr(AccessEndpoint, { kind: "array" })
  public accessEndpoint?:
    | core.Array<AccessEndpoint>
    | core.ArrayOut<AccessEndpoint>;

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

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

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

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

  @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 iamRoleArn?: string | core.StringOut;

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

  @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(String)
  public name!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public state!: 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?: ImageBuilderArgs) {
    super(name, "aws_appstream_image_builder", args);
  }

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