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

export interface BucketPublicAccessBlockArgs extends core.ResourceArgs {
  blockPublicAcls?: boolean | core.BooleanOut;

  blockPublicPolicy?: boolean | core.BooleanOut;

  bucket: string | core.StringOut;

  ignorePublicAcls?: boolean | core.BooleanOut;

  restrictPublicBuckets?: boolean | core.BooleanOut;
}

export class BucketPublicAccessBlock extends core.Resource<BucketPublicAccessBlockArgs> {
  @core.attr(Boolean)
  public blockPublicAcls?: boolean | core.BooleanOut;

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

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

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

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

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

  constructor(name: string, args?: BucketPublicAccessBlockArgs) {
    super(name, "aws_s3_bucket_public_access_block", args);
  }

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