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

export interface VersioningConfigurationArgs extends core.SchemaArgs {
  mfaDelete?: string | core.StringOut;

  status: string | core.StringOut;
}

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

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

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

  expectedBucketOwner?: string | core.StringOut;

  mfa?: string | core.StringOut;

  versioningConfiguration: VersioningConfiguration;
}

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

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

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

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

  @core.attr(VersioningConfiguration)
  public versioningConfiguration!: VersioningConfiguration;

  constructor(name: string, args?: BucketVersioningArgs) {
    super(name, "aws_s3_bucket_versioning", args);
  }

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