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

export interface PermissionArgs extends core.ResourceArgs {
  allowSsh?: boolean | core.BooleanOut;

  allowSudo?: boolean | core.BooleanOut;

  level?: string | core.StringOut;

  stackId?: string | core.StringOut;

  userArn: string | core.StringOut;
}

export class Permission extends core.Resource<PermissionArgs> {
  @core.attr(Boolean, { computed: true })
  public allowSsh?: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public allowSudo?: boolean | core.BooleanOut;

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

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

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

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

  constructor(name: string, args?: PermissionArgs) {
    super(name, "aws_opsworks_permission", args);
  }

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