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

export interface ClientConfigurationsArgs extends core.SchemaArgs {
  clients: string | core.StringOut;

  options: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class ClientConfigurations extends core.Schema<ClientConfigurationsArgs> {
  @core.attr(String)
  public clients!: string | core.StringOut;

  @core.attr(String, { kind: "array" })
  public options!: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface NfsExportsArgs extends core.SchemaArgs {
  clientConfigurations:
    | core.Array<ClientConfigurations>
    | core.ArrayOut<ClientConfigurations>;
}

export class NfsExports extends core.Schema<NfsExportsArgs> {
  @core.attr(ClientConfigurations, { kind: "array" })
  public clientConfigurations!:
    | core.Array<ClientConfigurations>
    | core.ArrayOut<ClientConfigurations>;
}

export interface OriginSnapshotArgs extends core.SchemaArgs {
  copyStrategy: string | core.StringOut;

  snapshotArn: string | core.StringOut;
}

export class OriginSnapshot extends core.Schema<OriginSnapshotArgs> {
  @core.attr(String)
  public copyStrategy!: string | core.StringOut;

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

export interface UserAndGroupQuotasArgs extends core.SchemaArgs {
  id: number | core.NumberOut;

  storageCapacityQuotaGib: number | core.NumberOut;

  type: string | core.StringOut;
}

export class UserAndGroupQuotas extends core.Schema<UserAndGroupQuotasArgs> {
  @core.attr(Number)
  public id!: number | core.NumberOut;

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

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

export interface OpenzfsVolumeArgs extends core.ResourceArgs {
  copyTagsToSnapshots?: boolean | core.BooleanOut;

  dataCompressionType?: string | core.StringOut;

  name: string | core.StringOut;

  nfsExports?: NfsExports;

  originSnapshot?: OriginSnapshot;

  parentVolumeId: string | core.StringOut;

  readOnly?: boolean | core.BooleanOut;

  recordSizeKib?: number | core.NumberOut;

  storageCapacityQuotaGib?: number | core.NumberOut;

  storageCapacityReservationGib?: number | core.NumberOut;

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

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

  userAndGroupQuotas?:
    | core.Array<UserAndGroupQuotas>
    | core.ArrayOut<UserAndGroupQuotas>;

  volumeType?: string | core.StringOut;
}

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

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

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

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

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

  @core.attr(NfsExports)
  public nfsExports?: NfsExports;

  @core.attr(OriginSnapshot)
  public originSnapshot?: OriginSnapshot;

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

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

  @core.attr(Number)
  public recordSizeKib?: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public storageCapacityQuotaGib?: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public storageCapacityReservationGib?: number | core.NumberOut;

  @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(UserAndGroupQuotas, { computed: true, kind: "array" })
  public userAndGroupQuotas?:
    | core.Array<UserAndGroupQuotas>
    | core.ArrayOut<UserAndGroupQuotas>;

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

  constructor(name: string, args?: OpenzfsVolumeArgs) {
    super(name, "aws_fsx_openzfs_volume", args);
  }

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