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

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

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

  uid: number | core.NumberOut;
}

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

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

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

export interface CreationInfoArgs extends core.SchemaArgs {
  ownerGid: number | core.NumberOut;

  ownerUid: number | core.NumberOut;

  permissions: string | core.StringOut;
}

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

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

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

export interface RootDirectoryArgs extends core.SchemaArgs {
  creationInfo: core.Array<CreationInfo> | core.ArrayOut<CreationInfo>;

  path: string | core.StringOut;
}

export class RootDirectory extends core.Schema<RootDirectoryArgs> {
  @core.attr(CreationInfo, { computed: true, kind: "array" })
  public creationInfo!: core.Array<CreationInfo> | core.ArrayOut<CreationInfo>;

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

export interface DsAccessPointArgs {
  accessPointId: string | core.StringOut;

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

export class DsAccessPoint extends core.Data<DsAccessPointArgs> {
  @core.attr(String)
  public accessPointId!: string | core.StringOut;

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

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

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

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

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

  @core.attr(PosixUser, { computed: true, kind: "array" })
  public posixUser!: core.Array<PosixUser> | core.ArrayOut<PosixUser>;

  @core.attr(RootDirectory, { computed: true, kind: "array" })
  public rootDirectory!:
    | core.Array<RootDirectory>
    | core.ArrayOut<RootDirectory>;

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: DsAccessPointArgs) {
    super(name, "aws_efs_access_point", args);
  }

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