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

export interface AclConfigurationArgs extends core.SchemaArgs {
  s3AclOption: string | core.StringOut;
}

export class AclConfiguration extends core.Schema<AclConfigurationArgs> {
  @core.attr(String)
  public s3AclOption!: string | core.StringOut;
}

export interface EncryptionConfigurationArgs extends core.SchemaArgs {
  encryptionOption?: string | core.StringOut;

  kmsKeyArn?: string | core.StringOut;
}

export class EncryptionConfiguration extends core.Schema<EncryptionConfigurationArgs> {
  @core.attr(String)
  public encryptionOption?: string | core.StringOut;

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

export interface ResultConfigurationArgs extends core.SchemaArgs {
  aclConfiguration?: AclConfiguration;

  encryptionConfiguration?: EncryptionConfiguration;

  expectedBucketOwner?: string | core.StringOut;

  outputLocation?: string | core.StringOut;
}

export class ResultConfiguration extends core.Schema<ResultConfigurationArgs> {
  @core.attr(AclConfiguration)
  public aclConfiguration?: AclConfiguration;

  @core.attr(EncryptionConfiguration)
  public encryptionConfiguration?: EncryptionConfiguration;

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

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

export interface EngineVersionArgs extends core.SchemaArgs {
  effectiveEngineVersion: string | core.StringOut;

  selectedEngineVersion?: string | core.StringOut;
}

export class EngineVersion extends core.Schema<EngineVersionArgs> {
  @core.attr(String, { computed: true })
  public effectiveEngineVersion!: string | core.StringOut;

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

export interface ConfigurationArgs extends core.SchemaArgs {
  bytesScannedCutoffPerQuery?: number | core.NumberOut;

  enforceWorkgroupConfiguration?: boolean | core.BooleanOut;

  engineVersion?: EngineVersion;

  publishCloudwatchMetricsEnabled?: boolean | core.BooleanOut;

  requesterPaysEnabled?: boolean | core.BooleanOut;

  resultConfiguration?: ResultConfiguration;
}

export class Configuration extends core.Schema<ConfigurationArgs> {
  @core.attr(Number)
  public bytesScannedCutoffPerQuery?: number | core.NumberOut;

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

  @core.attr(EngineVersion)
  public engineVersion?: EngineVersion;

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

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

  @core.attr(ResultConfiguration)
  public resultConfiguration?: ResultConfiguration;
}

export interface WorkgroupArgs extends core.ResourceArgs {
  configuration?: Configuration;

  description?: string | core.StringOut;

  forceDestroy?: boolean | core.BooleanOut;

  name: string | core.StringOut;

  state?: string | core.StringOut;

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

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

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

  @core.attr(Configuration)
  public configuration?: Configuration;

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

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

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

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

  @core.attr(String)
  public state?: 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>;

  constructor(name: string, args?: WorkgroupArgs) {
    super(name, "aws_athena_workgroup", args);
  }

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