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

export interface DetailsArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  policy: string | core.StringOut;
}

export class Details extends core.Schema<DetailsArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

export interface MultiRegionAccessPointPolicyArgs extends core.ResourceArgs {
  accountId?: string | core.StringOut;

  details: Details;
}

export class MultiRegionAccessPointPolicy extends core.Resource<MultiRegionAccessPointPolicyArgs> {
  @core.attr(String, { computed: true })
  public accountId?: string | core.StringOut;

  @core.attr(Details)
  public details!: Details;

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

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

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

  constructor(name: string, args?: MultiRegionAccessPointPolicyArgs) {
    super(name, "aws_s3control_multi_region_access_point_policy", args);
  }

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