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

export interface LayerVersionPermissionArgs extends core.ResourceArgs {
  action: string | core.StringOut;

  layerName: string | core.StringOut;

  organizationId?: string | core.StringOut;

  principal: string | core.StringOut;

  statementId: string | core.StringOut;

  versionNumber: number | core.NumberOut;
}

export class LayerVersionPermission extends core.Resource<LayerVersionPermissionArgs> {
  @core.attr(String)
  public action!: string | core.StringOut;

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

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

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

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

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

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

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

  @core.attr(Number)
  public versionNumber!: number | core.NumberOut;

  constructor(name: string, args?: LayerVersionPermissionArgs) {
    super(name, "aws_lambda_layer_version_permission", args);
  }

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