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

export interface DataCatalogConfigArgs extends core.SchemaArgs {
  catalog?: string | core.StringOut;

  database?: string | core.StringOut;

  tableName?: string | core.StringOut;
}

export class DataCatalogConfig extends core.Schema<DataCatalogConfigArgs> {
  @core.attr(String, { computed: true })
  public catalog?: string | core.StringOut;

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

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

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

  s3Uri: string | core.StringOut;
}

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

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

export interface OfflineStoreConfigArgs extends core.SchemaArgs {
  dataCatalogConfig?: DataCatalogConfig;

  disableGlueTableCreation?: boolean | core.BooleanOut;

  s3StorageConfig: S3StorageConfig;
}

export class OfflineStoreConfig extends core.Schema<OfflineStoreConfigArgs> {
  @core.attr(DataCatalogConfig, { computed: true })
  public dataCatalogConfig?: DataCatalogConfig;

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

  @core.attr(S3StorageConfig)
  public s3StorageConfig!: S3StorageConfig;
}

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

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

export interface OnlineStoreConfigArgs extends core.SchemaArgs {
  enableOnlineStore?: boolean | core.BooleanOut;

  securityConfig?: SecurityConfig;
}

export class OnlineStoreConfig extends core.Schema<OnlineStoreConfigArgs> {
  @core.attr(Boolean)
  public enableOnlineStore?: boolean | core.BooleanOut;

  @core.attr(SecurityConfig)
  public securityConfig?: SecurityConfig;
}

export interface FeatureDefinitionArgs extends core.SchemaArgs {
  featureName?: string | core.StringOut;

  featureType?: string | core.StringOut;
}

export class FeatureDefinition extends core.Schema<FeatureDefinitionArgs> {
  @core.attr(String)
  public featureName?: string | core.StringOut;

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

export interface FeatureGroupArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

  eventTimeFeatureName: string | core.StringOut;

  featureDefinition:
    | core.Array<FeatureDefinition>
    | core.ArrayOut<FeatureDefinition>;

  featureGroupName: string | core.StringOut;

  offlineStoreConfig?: OfflineStoreConfig;

  onlineStoreConfig?: OnlineStoreConfig;

  recordIdentifierFeatureName: string | core.StringOut;

  roleArn: string | core.StringOut;

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

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

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

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

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

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

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

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

  @core.attr(OfflineStoreConfig)
  public offlineStoreConfig?: OfflineStoreConfig;

  @core.attr(OnlineStoreConfig)
  public onlineStoreConfig?: OnlineStoreConfig;

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

  @core.attr(String)
  public roleArn!: 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>;

  constructor(name: string, args?: FeatureGroupArgs) {
    super(name, "aws_sagemaker_feature_group", args);
  }

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