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

export interface S3DestinationArgs extends core.SchemaArgs {
  bucketName: string | core.StringOut;

  kmsKeyArn?: string | core.StringOut;

  prefix?: string | core.StringOut;

  region: string | core.StringOut;

  syncFormat?: string | core.StringOut;
}

export class S3Destination extends core.Schema<S3DestinationArgs> {
  @core.attr(String)
  public bucketName!: string | core.StringOut;

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

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

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

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

export interface ResourceDataSyncArgs extends core.ResourceArgs {
  name: string | core.StringOut;

  s3Destination: S3Destination;
}

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

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

  @core.attr(S3Destination)
  public s3Destination!: S3Destination;

  constructor(name: string, args?: ResourceDataSyncArgs) {
    super(name, "aws_ssm_resource_data_sync", args);
  }

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