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

export interface PosixProfileArgs extends core.SchemaArgs {
  gid: number | core.NumberOut;

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

  uid: number | core.NumberOut;
}

export class PosixProfile extends core.Schema<PosixProfileArgs> {
  @core.attr(Number)
  public gid!: number | core.NumberOut;

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

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

export interface HomeDirectoryMappingsArgs extends core.SchemaArgs {
  entry: string | core.StringOut;

  target: string | core.StringOut;
}

export class HomeDirectoryMappings extends core.Schema<HomeDirectoryMappingsArgs> {
  @core.attr(String)
  public entry!: string | core.StringOut;

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

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

  homeDirectoryMappings?:
    | core.Array<HomeDirectoryMappings>
    | core.ArrayOut<HomeDirectoryMappings>;

  homeDirectoryType?: string | core.StringOut;

  policy?: string | core.StringOut;

  posixProfile?: PosixProfile;

  role: string | core.StringOut;

  serverId: string | core.StringOut;

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

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

  userName: string | core.StringOut;
}

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

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

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

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

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

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

  @core.attr(PosixProfile)
  public posixProfile?: PosixProfile;

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

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

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

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