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

export interface EncryptionConfigArgs extends core.SchemaArgs {
  encryptionType: string | core.StringOut;

  keyId: string | core.StringOut;
}

export class EncryptionConfig extends core.Schema<EncryptionConfigArgs> {
  @core.attr(String)
  public encryptionType!: string | core.StringOut;

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

export interface S3ConfigArgs extends core.SchemaArgs {
  bucketName: string | core.StringOut;

  bucketPrefix: string | core.StringOut;

  encryptionConfig?: EncryptionConfig;
}

export class S3Config extends core.Schema<S3ConfigArgs> {
  @core.attr(String)
  public bucketName!: string | core.StringOut;

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

  @core.attr(EncryptionConfig)
  public encryptionConfig?: EncryptionConfig;
}

export interface KinesisFirehoseConfigArgs extends core.SchemaArgs {
  firehoseArn: string | core.StringOut;
}

export class KinesisFirehoseConfig extends core.Schema<KinesisFirehoseConfigArgs> {
  @core.attr(String)
  public firehoseArn!: string | core.StringOut;
}

export interface KinesisStreamConfigArgs extends core.SchemaArgs {
  streamArn: string | core.StringOut;
}

export class KinesisStreamConfig extends core.Schema<KinesisStreamConfigArgs> {
  @core.attr(String)
  public streamArn!: string | core.StringOut;
}

export interface KinesisVideoStreamConfigArgs extends core.SchemaArgs {
  encryptionConfig: EncryptionConfig;

  prefix: string | core.StringOut;

  retentionPeriodHours: number | core.NumberOut;
}

export class KinesisVideoStreamConfig extends core.Schema<KinesisVideoStreamConfigArgs> {
  @core.attr(EncryptionConfig)
  public encryptionConfig!: EncryptionConfig;

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

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

export interface StorageConfigArgs extends core.SchemaArgs {
  kinesisFirehoseConfig?: KinesisFirehoseConfig;

  kinesisStreamConfig?: KinesisStreamConfig;

  kinesisVideoStreamConfig?: KinesisVideoStreamConfig;

  s3Config?: S3Config;

  storageType: string | core.StringOut;
}

export class StorageConfig extends core.Schema<StorageConfigArgs> {
  @core.attr(KinesisFirehoseConfig)
  public kinesisFirehoseConfig?: KinesisFirehoseConfig;

  @core.attr(KinesisStreamConfig)
  public kinesisStreamConfig?: KinesisStreamConfig;

  @core.attr(KinesisVideoStreamConfig)
  public kinesisVideoStreamConfig?: KinesisVideoStreamConfig;

  @core.attr(S3Config)
  public s3Config?: S3Config;

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

export interface InstanceStorageConfigArgs extends core.ResourceArgs {
  instanceId: string | core.StringOut;

  resourceType: string | core.StringOut;

  storageConfig: StorageConfig;
}

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

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

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

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

  @core.attr(StorageConfig)
  public storageConfig!: StorageConfig;

  constructor(name: string, args?: InstanceStorageConfigArgs) {
    super(name, "aws_connect_instance_storage_config", args);
  }

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