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

export interface PhoneConfigArgs extends core.SchemaArgs {
  afterContactWorkTimeLimit?: number | core.NumberOut;

  autoAccept?: boolean | core.BooleanOut;

  deskPhoneNumber?: string | core.StringOut;

  phoneType: string | core.StringOut;
}

export class PhoneConfig extends core.Schema<PhoneConfigArgs> {
  @core.attr(Number)
  public afterContactWorkTimeLimit?: number | core.NumberOut;

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

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

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

export interface IdentityInfoArgs extends core.SchemaArgs {
  email?: string | core.StringOut;

  firstName?: string | core.StringOut;

  lastName?: string | core.StringOut;
}

export class IdentityInfo extends core.Schema<IdentityInfoArgs> {
  @core.attr(String)
  public email?: string | core.StringOut;

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

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

export interface UserArgs extends core.ResourceArgs {
  directoryUserId?: string | core.StringOut;

  hierarchyGroupId?: string | core.StringOut;

  identityInfo?: IdentityInfo;

  instanceId: string | core.StringOut;

  name: string | core.StringOut;

  password?: string | core.StringOut;

  phoneConfig: PhoneConfig;

  routingProfileId: string | core.StringOut;

  securityProfileIds: 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>;
}

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

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

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

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

  @core.attr(IdentityInfo)
  public identityInfo?: IdentityInfo;

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

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

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

  @core.attr(PhoneConfig)
  public phoneConfig!: PhoneConfig;

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

  @core.attr(String, { kind: "array" })
  public securityProfileIds!:
    | 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, { computed: true })
  public userId!: string | core.StringOut;

  constructor(name: string, args?: UserArgs) {
    super(name, "aws_connect_user", args);
  }

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