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

export interface RetentionPolicyArgs extends core.SchemaArgs {
  homeEfsFileSystem?: string | core.StringOut;
}

export class RetentionPolicy extends core.Schema<RetentionPolicyArgs> {
  @core.attr(String)
  public homeEfsFileSystem?: string | core.StringOut;
}

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

  lifecycleConfigArn?: string | core.StringOut;

  sagemakerImageArn?: string | core.StringOut;

  sagemakerImageVersionArn?: string | core.StringOut;
}

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

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

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

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

export interface TensorBoardAppSettingsArgs extends core.SchemaArgs {
  defaultResourceSpec?: DefaultResourceSpec;
}

export class TensorBoardAppSettings extends core.Schema<TensorBoardAppSettingsArgs> {
  @core.attr(DefaultResourceSpec)
  public defaultResourceSpec?: DefaultResourceSpec;
}

export interface JupyterServerAppSettingsArgs extends core.SchemaArgs {
  defaultResourceSpec?: DefaultResourceSpec;

  lifecycleConfigArns?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class JupyterServerAppSettings extends core.Schema<JupyterServerAppSettingsArgs> {
  @core.attr(DefaultResourceSpec)
  public defaultResourceSpec?: DefaultResourceSpec;

  @core.attr(String, { kind: "array" })
  public lifecycleConfigArns?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;
}

export interface CustomImageArgs extends core.SchemaArgs {
  appImageConfigName: string | core.StringOut;

  imageName: string | core.StringOut;

  imageVersionNumber?: number | core.NumberOut;
}

export class CustomImage extends core.Schema<CustomImageArgs> {
  @core.attr(String)
  public appImageConfigName!: string | core.StringOut;

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

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

export interface KernelGatewayAppSettingsArgs extends core.SchemaArgs {
  customImage?: core.Array<CustomImage> | core.ArrayOut<CustomImage>;

  defaultResourceSpec?: DefaultResourceSpec;

  lifecycleConfigArns?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class KernelGatewayAppSettings extends core.Schema<KernelGatewayAppSettingsArgs> {
  @core.attr(CustomImage, { kind: "array" })
  public customImage?: core.Array<CustomImage> | core.ArrayOut<CustomImage>;

  @core.attr(DefaultResourceSpec)
  public defaultResourceSpec?: DefaultResourceSpec;

  @core.attr(String, { kind: "array" })
  public lifecycleConfigArns?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;
}

export interface SharingSettingsArgs extends core.SchemaArgs {
  notebookOutputOption?: string | core.StringOut;

  s3KmsKeyId?: string | core.StringOut;

  s3OutputPath?: string | core.StringOut;
}

export class SharingSettings extends core.Schema<SharingSettingsArgs> {
  @core.attr(String)
  public notebookOutputOption?: string | core.StringOut;

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

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

export interface DefaultUserSettingsArgs extends core.SchemaArgs {
  executionRole: string | core.StringOut;

  jupyterServerAppSettings?: JupyterServerAppSettings;

  kernelGatewayAppSettings?: KernelGatewayAppSettings;

  securityGroups?: core.Array<string> | core.ArrayOut<core.StringOut>;

  sharingSettings?: SharingSettings;

  tensorBoardAppSettings?: TensorBoardAppSettings;
}

export class DefaultUserSettings extends core.Schema<DefaultUserSettingsArgs> {
  @core.attr(String)
  public executionRole!: string | core.StringOut;

  @core.attr(JupyterServerAppSettings)
  public jupyterServerAppSettings?: JupyterServerAppSettings;

  @core.attr(KernelGatewayAppSettings)
  public kernelGatewayAppSettings?: KernelGatewayAppSettings;

  @core.attr(String, { kind: "array" })
  public securityGroups?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(SharingSettings)
  public sharingSettings?: SharingSettings;

  @core.attr(TensorBoardAppSettings)
  public tensorBoardAppSettings?: TensorBoardAppSettings;
}

export interface DomainArgs extends core.ResourceArgs {
  appNetworkAccessType?: string | core.StringOut;

  authMode: string | core.StringOut;

  defaultUserSettings: DefaultUserSettings;

  domainName: string | core.StringOut;

  kmsKeyId?: string | core.StringOut;

  retentionPolicy?: RetentionPolicy;

  subnetIds: 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>;

  vpcId: string | core.StringOut;
}

export class Domain extends core.Resource<DomainArgs> {
  @core.attr(String)
  public appNetworkAccessType?: string | core.StringOut;

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

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

  @core.attr(DefaultUserSettings)
  public defaultUserSettings!: DefaultUserSettings;

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

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

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

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

  @core.attr(RetentionPolicy)
  public retentionPolicy?: RetentionPolicy;

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

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

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

  constructor(name: string, args?: DomainArgs) {
    super(name, "aws_sagemaker_domain", args);
  }

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