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

export interface CacheAttributesArgs extends core.SchemaArgs {
  cacheStaleTimeoutInSeconds?: number | core.NumberOut;
}

export class CacheAttributes extends core.Schema<CacheAttributesArgs> {
  @core.attr(Number)
  public cacheStaleTimeoutInSeconds?: number | core.NumberOut;
}

export interface FileSystemAssociationArgs extends core.ResourceArgs {
  auditDestinationArn?: string | core.StringOut;

  cacheAttributes?: CacheAttributes;

  gatewayArn: string | core.StringOut;

  locationArn: string | core.StringOut;

  password: string | core.StringOut;

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

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

  username: string | core.StringOut;
}

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

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

  @core.attr(CacheAttributes)
  public cacheAttributes?: CacheAttributes;

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

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

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

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

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

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

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

  constructor(name: string, args?: FileSystemAssociationArgs) {
    super(name, "aws_storagegateway_file_system_association", args);
  }

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