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

export interface DefaultCapacityProviderStrategyArgs extends core.SchemaArgs {
  base?: number | core.NumberOut;

  capacityProvider: string | core.StringOut;

  weight?: number | core.NumberOut;
}

export class DefaultCapacityProviderStrategy extends core.Schema<DefaultCapacityProviderStrategyArgs> {
  @core.attr(Number)
  public base?: number | core.NumberOut;

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

  @core.attr(Number)
  public weight?: number | core.NumberOut;
}

export interface SettingArgs extends core.SchemaArgs {
  name: 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 value!: string | core.StringOut;
}

export interface LogConfigurationArgs extends core.SchemaArgs {
  cloudWatchEncryptionEnabled?: boolean | core.BooleanOut;

  cloudWatchLogGroupName?: string | core.StringOut;

  s3BucketEncryptionEnabled?: boolean | core.BooleanOut;

  s3BucketName?: string | core.StringOut;

  s3KeyPrefix?: string | core.StringOut;
}

export class LogConfiguration extends core.Schema<LogConfigurationArgs> {
  @core.attr(Boolean)
  public cloudWatchEncryptionEnabled?: boolean | core.BooleanOut;

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

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

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

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

export interface ExecuteCommandConfigurationArgs extends core.SchemaArgs {
  kmsKeyId?: string | core.StringOut;

  logConfiguration?: LogConfiguration;

  logging?: string | core.StringOut;
}

export class ExecuteCommandConfiguration extends core.Schema<ExecuteCommandConfigurationArgs> {
  @core.attr(String)
  public kmsKeyId?: string | core.StringOut;

  @core.attr(LogConfiguration)
  public logConfiguration?: LogConfiguration;

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

export interface ConfigurationArgs extends core.SchemaArgs {
  executeCommandConfiguration?: ExecuteCommandConfiguration;
}

export class Configuration extends core.Schema<ConfigurationArgs> {
  @core.attr(ExecuteCommandConfiguration)
  public executeCommandConfiguration?: ExecuteCommandConfiguration;
}

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

  configuration?: Configuration;

  defaultCapacityProviderStrategy?:
    | core.Array<DefaultCapacityProviderStrategy>
    | core.ArrayOut<DefaultCapacityProviderStrategy>;

  name: string | core.StringOut;

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

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

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

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

  @core.attr(String, { computed: true, kind: "array" })
  public capacityProviders?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

  @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, { 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?: ClusterArgs) {
    super(name, "aws_ecs_cluster", args);
  }

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