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

export interface RepositoryPermissionsPolicyArgs extends core.ResourceArgs {
  domain: string | core.StringOut;

  domainOwner?: string | core.StringOut;

  policyDocument: string | core.StringOut;

  policyRevision?: string | core.StringOut;

  repository: string | core.StringOut;
}

export class RepositoryPermissionsPolicy extends core.Resource<RepositoryPermissionsPolicyArgs> {
  @core.attr(String)
  public domain!: string | core.StringOut;

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

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

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

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

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

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

  constructor(name: string, args?: RepositoryPermissionsPolicyArgs) {
    super(name, "aws_codeartifact_repository_permissions_policy", args);
  }

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