class NettyChannelBuilder extends AbstractManagedChannelImplBuilder<NettyChannelBuilder> {

  @VisibleForTesting
  @CheckReturnValue
  static ProtocolNegotiator createProtocolNegotiatorByType(
      NegotiationType negotiationType,
      SslContext sslContext) {
    switch (negotiationType) {
      case PLAINTEXT:
        return ProtocolNegotiators.plaintext();
      case PLAINTEXT_UPGRADE:
        return ProtocolNegotiators.plaintextUpgrade();
      case TLS:
        return ProtocolNegotiators.tls(sslContext);
      default:
        throw new IllegalArgumentException("Unsupported negotiationType: " + negotiationType);
    }
  }

  @CheckReturnValue  NettyChannelBuilder(String host, int port);
  @CheckReturnValue  NettyChannelBuilder(String target);
  @CheckReturnValue  NettyChannelBuilder(SocketAddress address);

}