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

export interface S3BucketDestinationArgs extends core.SchemaArgs {
  bucketAccountId?: string | core.StringOut;

  bucketArn: string | core.StringOut;

  format?: string | core.StringOut;

  prefix?: string | core.StringOut;
}

export class S3BucketDestination extends core.Schema<S3BucketDestinationArgs> {
  @core.attr(String)
  public bucketAccountId?: string | core.StringOut;

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

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

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

export interface DestinationArgs extends core.SchemaArgs {
  s3BucketDestination: S3BucketDestination;
}

export class Destination extends core.Schema<DestinationArgs> {
  @core.attr(S3BucketDestination)
  public s3BucketDestination!: S3BucketDestination;
}

export interface DataExportArgs extends core.SchemaArgs {
  destination: Destination;

  outputSchemaVersion?: string | core.StringOut;
}

export class DataExport extends core.Schema<DataExportArgs> {
  @core.attr(Destination)
  public destination!: Destination;

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

export interface StorageClassAnalysisArgs extends core.SchemaArgs {
  dataExport: DataExport;
}

export class StorageClassAnalysis extends core.Schema<StorageClassAnalysisArgs> {
  @core.attr(DataExport)
  public dataExport!: DataExport;
}

export interface FilterArgs extends core.SchemaArgs {
  prefix?: string | core.StringOut;

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

export class Filter extends core.Schema<FilterArgs> {
  @core.attr(String)
  public prefix?: string | core.StringOut;

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

export interface BucketAnalyticsConfigurationArgs extends core.ResourceArgs {
  bucket: string | core.StringOut;

  filter?: Filter;

  name: string | core.StringOut;

  storageClassAnalysis?: StorageClassAnalysis;
}

export class BucketAnalyticsConfiguration extends core.Resource<BucketAnalyticsConfigurationArgs> {
  @core.attr(String)
  public bucket!: string | core.StringOut;

  @core.attr(Filter)
  public filter?: Filter;

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

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

  @core.attr(StorageClassAnalysis)
  public storageClassAnalysis?: StorageClassAnalysis;

  constructor(name: string, args?: BucketAnalyticsConfigurationArgs) {
    super(name, "aws_s3_bucket_analytics_configuration", args);
  }

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