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

export interface SettingArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  namespace: string | core.StringOut;

  resource?: string | core.StringOut;

  value: string | core.StringOut;
}

export class Setting extends core.Schema<SettingArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

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

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

export interface ConfigurationTemplateArgs extends core.ResourceArgs {
  application: string | core.StringOut;

  description?: string | core.StringOut;

  environmentId?: string | core.StringOut;

  name: string | core.StringOut;

  setting?: core.Array<Setting> | core.ArrayOut<Setting>;

  solutionStackName?: string | core.StringOut;
}

export class ConfigurationTemplate extends core.Resource<ConfigurationTemplateArgs> {
  @core.attr(String)
  public application!: string | core.StringOut;

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

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

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

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

  @core.attr(Setting, { computed: true, kind: "array" })
  public setting?: core.Array<Setting> | core.ArrayOut<Setting>;

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

  constructor(name: string, args?: ConfigurationTemplateArgs) {
    super(name, "aws_elastic_beanstalk_configuration_template", args);
  }

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