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

export interface ConnectorArgs extends core.SchemaArgs {
  priority: number | core.NumberOut;

  voiceConnectorId: string | core.StringOut;
}

export class Connector extends core.Schema<ConnectorArgs> {
  @core.attr(Number)
  public priority!: number | core.NumberOut;

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

export interface VoiceConnectorGroupArgs extends core.ResourceArgs {
  connector?: core.Array<Connector> | core.ArrayOut<Connector>;

  name: string | core.StringOut;
}

export class VoiceConnectorGroup extends core.Resource<VoiceConnectorGroupArgs> {
  @core.attr(Connector, { kind: "array" })
  public connector?: core.Array<Connector> | core.ArrayOut<Connector>;

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

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

  constructor(name: string, args?: VoiceConnectorGroupArgs) {
    super(name, "aws_chime_voice_connector_group", args);
  }

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