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

export interface ResourceSpecArgs extends core.SchemaArgs {
  instanceType?: string | core.StringOut;

  lifecycleConfigArn?: string | core.StringOut;

  sagemakerImageArn?: string | core.StringOut;

  sagemakerImageVersionArn?: string | core.StringOut;
}

export class ResourceSpec extends core.Schema<ResourceSpecArgs> {
  @core.attr(String)
  public instanceType?: string | core.StringOut;

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

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

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

export interface AppArgs extends core.ResourceArgs {
  appName: string | core.StringOut;

  appType: string | core.StringOut;

  domainId: string | core.StringOut;

  resourceSpec?: ResourceSpec;

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

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

  userProfileName: string | core.StringOut;
}

export class App extends core.Resource<AppArgs> {
  @core.attr(String)
  public appName!: string | core.StringOut;

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

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

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

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

  @core.attr(ResourceSpec, { computed: true })
  public resourceSpec?: ResourceSpec;

  @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 userProfileName!: string | core.StringOut;

  constructor(name: string, args?: AppArgs) {
    super(name, "aws_sagemaker_app", args);
  }

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