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

export interface IpSetsArgs extends core.SchemaArgs {
  ipAddresses: core.Array<string> | core.ArrayOut<core.StringOut>;

  ipFamily: string | core.StringOut;
}

export class IpSets extends core.Schema<IpSetsArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public ipAddresses!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface AttributesArgs extends core.SchemaArgs {
  flowLogsEnabled?: boolean | core.BooleanOut;

  flowLogsS3Bucket?: string | core.StringOut;

  flowLogsS3Prefix?: string | core.StringOut;
}

export class Attributes extends core.Schema<AttributesArgs> {
  @core.attr(Boolean)
  public flowLogsEnabled?: boolean | core.BooleanOut;

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

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

export interface AcceleratorArgs extends core.ResourceArgs {
  attributes?: Attributes;

  enabled?: boolean | core.BooleanOut;

  ipAddressType?: string | core.StringOut;

  name: string | core.StringOut;

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

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

export class Accelerator extends core.Resource<AcceleratorArgs> {
  @core.attr(Attributes)
  public attributes?: Attributes;

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

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

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

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

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

  @core.attr(IpSets, { computed: true, kind: "array" })
  public ipSets!: core.Array<IpSets> | core.ArrayOut<IpSets>;

  @core.attr(String)
  public name!: 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?: AcceleratorArgs) {
    super(name, "aws_globalaccelerator_accelerator", args);
  }

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