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

export interface S3ConfigArgs extends core.SchemaArgs {
  bucketAccessRoleArn: string | core.StringOut;
}

export class S3Config extends core.Schema<S3ConfigArgs> {
  @core.attr(String)
  public bucketAccessRoleArn!: string | core.StringOut;
}

export interface LocationS3Args extends core.ResourceArgs {
  agentArns?: core.Array<string> | core.ArrayOut<core.StringOut>;

  s3BucketArn: string | core.StringOut;

  s3Config: S3Config;

  s3StorageClass?: 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 LocationS3 extends core.Resource<LocationS3Args> {
  @core.attr(String, { kind: "array" })
  public agentArns?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

  @core.attr(S3Config)
  public s3Config!: S3Config;

  @core.attr(String, { computed: true })
  public s3StorageClass?: 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?: LocationS3Args) {
    super(name, "aws_datasync_location_s3", args);
  }

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