class EdgesAnswerer extends Answerer {

  @VisibleForTesting
  static TableMetadata getTableMetadata(EdgeType edgeType) {
    ImmutableList.Builder<ColumnMetadata> columnBuilder = ImmutableList.builder();
    switch (edgeType) {
      case LAYER3:
        columnBuilder.add(
            new ColumnMetadata(
                COL_INTERFACE,
                Schema.INTERFACE,
                "Interface from which the edge originates",
                Boolean.TRUE,
                Boolean.FALSE));
        columnBuilder.add(
            new ColumnMetadata(COL_IPS, Schema.set(Schema.IP), "IPs", Boolean.FALSE, Boolean.TRUE));

        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_INTERFACE,
                Schema.INTERFACE,
                "Interface at which the edge terminates",
                Boolean.TRUE,
                Boolean.FALSE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_IPS, Schema.set(Schema.IP), "Remote IPs", Boolean.FALSE, Boolean.TRUE));
        break;

      case BGP:
        columnBuilder.add(
            new ColumnMetadata(
                COL_NODE,
                Schema.NODE,
                "Node from which the edge originates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_IP, Schema.IP, "IP at the side of originator", Boolean.FALSE, Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_INTERFACE,
                Schema.STRING,
                "Interface at which the edge originates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_AS_NUMBER,
                Schema.STRING,
                "AS Number at the side of originator",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_NODE,
                Schema.NODE,
                "Node at which the edge terminates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_IP,
                Schema.IP,
                "IP at the side of the responder",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_INTERFACE,
                Schema.STRING,
                "Interface at which the edge terminates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_AS_NUMBER,
                Schema.STRING,
                "AS Number at the side of responder",
                Boolean.FALSE,
                Boolean.TRUE));
        break;
      case VXLAN:
        columnBuilder.add(
            new ColumnMetadata(
                COL_VNI,
                Schema.INTEGER,
                "VNI of the VXLAN tunnel edge",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_NODE,
                Schema.NODE,
                "Node from which the edge originates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_NODE,
                Schema.NODE,
                "Node at which the edge terminates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_VTEP_ADDRESS,
                Schema.IP,
                "VTEP IP of node from which the edge originates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_VTEP_ADDRESS,
                Schema.IP,
                "VTEP IP of node at which the edge terminates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_VLAN,
                Schema.INTEGER,
                "VLAN associated with VNI on node from which the edge originates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_VLAN,
                Schema.INTEGER,
                "VLAN associated with VNI on node at which the edge terminates",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_UDP_PORT,
                Schema.INTEGER,
                "UDP port of the VXLAN tunnel transport",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_MULTICAST_GROUP,
                Schema.IP,
                "Multicast group of the VXLAN tunnel transport",
                Boolean.FALSE,
                Boolean.TRUE));
        break;
      case IPSEC:
        columnBuilder.add(
            new ColumnMetadata(
                COL_SOURCE_INTERFACE,
                Schema.INTERFACE,
                "Source interface used in the IPsec session",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_TUNNEL_INTERFACE,
                Schema.INTERFACE,
                "Tunnel interface (if any) used in the IPsec session",
                Boolean.FALSE,
                Boolean.TRUE));

        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_SOURCE_INTERFACE,
                Schema.INTERFACE,
                "Remote source interface used in the IPsec session",
                Boolean.FALSE,
                Boolean.TRUE));
        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_TUNNEL_INTERFACE,
                Schema.INTERFACE,
                "Remote tunnel interface (if any) used in the IPsec session",
                Boolean.FALSE,
                Boolean.TRUE));
        break;
      case OSPF:
      case ISIS:
      case EIGRP:
      case LAYER1:
      default:
        columnBuilder.add(
            new ColumnMetadata(
                COL_INTERFACE,
                Schema.INTERFACE,
                "Interface from which the edge originates",
                Boolean.FALSE,
                Boolean.TRUE));

        columnBuilder.add(
            new ColumnMetadata(
                COL_REMOTE_INTERFACE,
                Schema.INTERFACE,
                "Interface at which the edge terminates",
                Boolean.FALSE,
                Boolean.TRUE));
    }
    return new TableMetadata(columnBuilder.build(), "Display Edges");
  }

    EdgesAnswerer(Question question, IBatfish batfish);

}