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

export interface AuthorizerArgs extends core.ResourceArgs {
  authorizerFunctionArn: string | core.StringOut;

  enableCachingForHttp?: boolean | core.BooleanOut;

  name: string | core.StringOut;

  signingDisabled?: boolean | core.BooleanOut;

  status?: string | core.StringOut;

  tokenKeyName?: string | core.StringOut;

  tokenSigningPublicKeys?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;
}

export class Authorizer extends core.Resource<AuthorizerArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

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

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

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

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

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

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

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

  @core.attr(String, { kind: "map" })
  public tokenSigningPublicKeys?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

  constructor(name: string, args?: AuthorizerArgs) {
    super(name, "aws_iot_authorizer", args);
  }

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