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

export interface VpcConfigArgs extends core.SchemaArgs {
  securityGroupIds: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export class VpcConfig extends core.Schema<VpcConfigArgs> {
  @core.attr(String, { kind: "array" })
  public securityGroupIds!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface InferenceExecutionConfigArgs extends core.SchemaArgs {
  mode: string | core.StringOut;
}

export class InferenceExecutionConfig extends core.Schema<InferenceExecutionConfigArgs> {
  @core.attr(String)
  public mode!: string | core.StringOut;
}

export interface RepositoryAuthConfigArgs extends core.SchemaArgs {
  repositoryCredentialsProviderArn: string | core.StringOut;
}

export class RepositoryAuthConfig extends core.Schema<RepositoryAuthConfigArgs> {
  @core.attr(String)
  public repositoryCredentialsProviderArn!: string | core.StringOut;
}

export interface ImageConfigArgs extends core.SchemaArgs {
  repositoryAccessMode: string | core.StringOut;

  repositoryAuthConfig?: RepositoryAuthConfig;
}

export class ImageConfig extends core.Schema<ImageConfigArgs> {
  @core.attr(String)
  public repositoryAccessMode!: string | core.StringOut;

  @core.attr(RepositoryAuthConfig)
  public repositoryAuthConfig?: RepositoryAuthConfig;
}

export interface ContainerArgs extends core.SchemaArgs {
  containerHostname?: string | core.StringOut;

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

  image: string | core.StringOut;

  imageConfig?: ImageConfig;

  mode?: string | core.StringOut;

  modelDataUrl?: string | core.StringOut;
}

export class Container extends core.Schema<ContainerArgs> {
  @core.attr(String)
  public containerHostname?: string | core.StringOut;

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

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

  @core.attr(ImageConfig)
  public imageConfig?: ImageConfig;

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

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

export interface PrimaryContainerArgs extends core.SchemaArgs {
  containerHostname?: string | core.StringOut;

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

  image: string | core.StringOut;

  imageConfig?: ImageConfig;

  mode?: string | core.StringOut;

  modelDataUrl?: string | core.StringOut;
}

export class PrimaryContainer extends core.Schema<PrimaryContainerArgs> {
  @core.attr(String)
  public containerHostname?: string | core.StringOut;

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

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

  @core.attr(ImageConfig)
  public imageConfig?: ImageConfig;

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

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

export interface ModelArgs extends core.ResourceArgs {
  container?: core.Array<Container> | core.ArrayOut<Container>;

  enableNetworkIsolation?: boolean | core.BooleanOut;

  executionRoleArn: string | core.StringOut;

  inferenceExecutionConfig?: InferenceExecutionConfig;

  name?: string | core.StringOut;

  primaryContainer?: PrimaryContainer;

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

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

  vpcConfig?: VpcConfig;
}

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

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

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

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

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

  @core.attr(InferenceExecutionConfig, { computed: true })
  public inferenceExecutionConfig?: InferenceExecutionConfig;

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

  @core.attr(PrimaryContainer)
  public primaryContainer?: PrimaryContainer;

  @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(VpcConfig)
  public vpcConfig?: VpcConfig;

  constructor(name: string, args?: ModelArgs) {
    super(name, "aws_sagemaker_model", args);
  }

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