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

export interface ApiCacheArgs extends core.ResourceArgs {
  apiCachingBehavior: string | core.StringOut;

  apiId: string | core.StringOut;

  atRestEncryptionEnabled?: boolean | core.BooleanOut;

  transitEncryptionEnabled?: boolean | core.BooleanOut;

  ttl: number | core.NumberOut;

  type: string | core.StringOut;
}

export class ApiCache extends core.Resource<ApiCacheArgs> {
  @core.attr(String)
  public apiCachingBehavior!: string | core.StringOut;

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

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

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

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

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

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

  constructor(name: string, args?: ApiCacheArgs) {
    super(name, "aws_appsync_api_cache", args);
  }

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