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

export interface Ec2ConfigArgs extends core.SchemaArgs {
  securityGroupArns: core.Array<string> | core.ArrayOut<core.StringOut>;

  subnetArn: string | core.StringOut;
}

export class Ec2Config extends core.Schema<Ec2ConfigArgs> {
  @core.attr(String, { kind: "array" })
  public securityGroupArns!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface LocationEfsArgs extends core.ResourceArgs {
  accessPointArn?: string | core.StringOut;

  ec2Config: Ec2Config;

  efsFileSystemArn: string | core.StringOut;

  fileSystemAccessRoleArn?: string | core.StringOut;

  inTransitEncryption?: string | core.StringOut;

  subdirectory?: string | core.StringOut;

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

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

export class LocationEfs extends core.Resource<LocationEfsArgs> {
  @core.attr(String)
  public accessPointArn?: string | core.StringOut;

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

  @core.attr(Ec2Config)
  public ec2Config!: Ec2Config;

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

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

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

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

  @core.attr(String)
  public subdirectory?: 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, { computed: true })
  public uri!: string | core.StringOut;

  constructor(name: string, args?: LocationEfsArgs) {
    super(name, "aws_datasync_location_efs", args);
  }

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