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

export interface TieringArgs extends core.SchemaArgs {
  accessTier: string | core.StringOut;

  days: number | core.NumberOut;
}

export class Tiering extends core.Schema<TieringArgs> {
  @core.attr(String)
  public accessTier!: string | core.StringOut;

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

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 BucketIntelligentTieringConfigurationArgs
  extends core.ResourceArgs {
  bucket: string | core.StringOut;

  filter?: Filter;

  name: string | core.StringOut;

  status?: string | core.StringOut;

  tiering: core.Array<Tiering> | core.ArrayOut<Tiering>;
}

export class BucketIntelligentTieringConfiguration extends core.Resource<BucketIntelligentTieringConfigurationArgs> {
  @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(String)
  public status?: string | core.StringOut;

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

  constructor(name: string, args?: BucketIntelligentTieringConfigurationArgs) {
    super(name, "aws_s3_bucket_intelligent_tiering_configuration", args);
  }

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