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

export interface WorkspacePropertiesArgs extends core.SchemaArgs {
  computeTypeName?: string | core.StringOut;

  rootVolumeSizeGib?: number | core.NumberOut;

  runningMode?: string | core.StringOut;

  runningModeAutoStopTimeoutInMinutes?: number | core.NumberOut;

  userVolumeSizeGib?: number | core.NumberOut;
}

export class WorkspaceProperties extends core.Schema<WorkspacePropertiesArgs> {
  @core.attr(String)
  public computeTypeName?: string | core.StringOut;

  @core.attr(Number)
  public rootVolumeSizeGib?: number | core.NumberOut;

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

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

  @core.attr(Number)
  public userVolumeSizeGib?: number | core.NumberOut;
}

export interface WorkspaceArgs extends core.ResourceArgs {
  bundleId: string | core.StringOut;

  directoryId: string | core.StringOut;

  rootVolumeEncryptionEnabled?: boolean | core.BooleanOut;

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

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

  userName: string | core.StringOut;

  userVolumeEncryptionEnabled?: boolean | core.BooleanOut;

  volumeEncryptionKey?: string | core.StringOut;

  workspaceProperties?: WorkspaceProperties;
}

export class Workspace extends core.Resource<WorkspaceArgs> {
  @core.attr(String)
  public bundleId!: string | core.StringOut;

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

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

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

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

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

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

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

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

  @core.attr(WorkspaceProperties, { computed: true })
  public workspaceProperties?: WorkspaceProperties;

  constructor(name: string, args?: WorkspaceArgs) {
    super(name, "aws_workspaces_workspace", args);
  }

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