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

export interface ServiceAccountCredentialsArgs extends core.SchemaArgs {
  accountName: string | core.StringOut;

  accountPassword: string | core.StringOut;
}

export class ServiceAccountCredentials extends core.Schema<ServiceAccountCredentialsArgs> {
  @core.attr(String)
  public accountName!: string | core.StringOut;

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

export interface DirectoryConfigArgs extends core.ResourceArgs {
  directoryName: string | core.StringOut;

  organizationalUnitDistinguishedNames:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  serviceAccountCredentials: ServiceAccountCredentials;
}

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

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

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

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

  @core.attr(ServiceAccountCredentials)
  public serviceAccountCredentials!: ServiceAccountCredentials;

  constructor(name: string, args?: DirectoryConfigArgs) {
    super(name, "aws_appstream_directory_config", args);
  }

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