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

export interface ClientConfigArgs extends core.SchemaArgs {
  maxConcurrentInvocationsPerInstance?: number | core.NumberOut;
}

export class ClientConfig extends core.Schema<ClientConfigArgs> {
  @core.attr(Number)
  public maxConcurrentInvocationsPerInstance?: number | core.NumberOut;
}

export interface NotificationConfigArgs extends core.SchemaArgs {
  errorTopic?: string | core.StringOut;

  successTopic?: string | core.StringOut;
}

export class NotificationConfig extends core.Schema<NotificationConfigArgs> {
  @core.attr(String)
  public errorTopic?: string | core.StringOut;

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

export interface OutputConfigArgs extends core.SchemaArgs {
  kmsKeyId?: string | core.StringOut;

  notificationConfig?: NotificationConfig;

  s3OutputPath: string | core.StringOut;
}

export class OutputConfig extends core.Schema<OutputConfigArgs> {
  @core.attr(String)
  public kmsKeyId?: string | core.StringOut;

  @core.attr(NotificationConfig)
  public notificationConfig?: NotificationConfig;

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

export interface AsyncInferenceConfigArgs extends core.SchemaArgs {
  clientConfig?: ClientConfig;

  outputConfig: OutputConfig;
}

export class AsyncInferenceConfig extends core.Schema<AsyncInferenceConfigArgs> {
  @core.attr(ClientConfig)
  public clientConfig?: ClientConfig;

  @core.attr(OutputConfig)
  public outputConfig!: OutputConfig;
}

export interface CaptureOptionsArgs extends core.SchemaArgs {
  captureMode: string | core.StringOut;
}

export class CaptureOptions extends core.Schema<CaptureOptionsArgs> {
  @core.attr(String)
  public captureMode!: string | core.StringOut;
}

export interface CaptureContentTypeHeaderArgs extends core.SchemaArgs {
  csvContentTypes?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export class CaptureContentTypeHeader extends core.Schema<CaptureContentTypeHeaderArgs> {
  @core.attr(String, { kind: "array" })
  public csvContentTypes?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface DataCaptureConfigArgs extends core.SchemaArgs {
  captureContentTypeHeader?: CaptureContentTypeHeader;

  captureOptions: core.Array<CaptureOptions> | core.ArrayOut<CaptureOptions>;

  destinationS3Uri: string | core.StringOut;

  enableCapture?: boolean | core.BooleanOut;

  initialSamplingPercentage: number | core.NumberOut;

  kmsKeyId?: string | core.StringOut;
}

export class DataCaptureConfig extends core.Schema<DataCaptureConfigArgs> {
  @core.attr(CaptureContentTypeHeader)
  public captureContentTypeHeader?: CaptureContentTypeHeader;

  @core.attr(CaptureOptions, { kind: "array" })
  public captureOptions!:
    | core.Array<CaptureOptions>
    | core.ArrayOut<CaptureOptions>;

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

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

  @core.attr(Number)
  public initialSamplingPercentage!: number | core.NumberOut;

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

export interface ServerlessConfigArgs extends core.SchemaArgs {
  maxConcurrency: number | core.NumberOut;

  memorySizeInMb: number | core.NumberOut;
}

export class ServerlessConfig extends core.Schema<ServerlessConfigArgs> {
  @core.attr(Number)
  public maxConcurrency!: number | core.NumberOut;

  @core.attr(Number)
  public memorySizeInMb!: number | core.NumberOut;
}

export interface ProductionVariantsArgs extends core.SchemaArgs {
  acceleratorType?: string | core.StringOut;

  initialInstanceCount?: number | core.NumberOut;

  initialVariantWeight?: number | core.NumberOut;

  instanceType?: string | core.StringOut;

  modelName: string | core.StringOut;

  serverlessConfig?: ServerlessConfig;

  variantName?: string | core.StringOut;
}

export class ProductionVariants extends core.Schema<ProductionVariantsArgs> {
  @core.attr(String)
  public acceleratorType?: string | core.StringOut;

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

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

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

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

  @core.attr(ServerlessConfig)
  public serverlessConfig?: ServerlessConfig;

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

export interface EndpointConfigurationArgs extends core.ResourceArgs {
  asyncInferenceConfig?: AsyncInferenceConfig;

  dataCaptureConfig?: DataCaptureConfig;

  kmsKeyArn?: string | core.StringOut;

  name?: string | core.StringOut;

  productionVariants:
    | core.Array<ProductionVariants>
    | core.ArrayOut<ProductionVariants>;

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

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

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

  @core.attr(AsyncInferenceConfig)
  public asyncInferenceConfig?: AsyncInferenceConfig;

  @core.attr(DataCaptureConfig)
  public dataCaptureConfig?: DataCaptureConfig;

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

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

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

  @core.attr(ProductionVariants, { kind: "array" })
  public productionVariants!:
    | core.Array<ProductionVariants>
    | core.ArrayOut<ProductionVariants>;

  @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>;

  constructor(name: string, args?: EndpointConfigurationArgs) {
    super(name, "aws_sagemaker_endpoint_configuration", args);
  }

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