code: public PagedList<VirtualNetworkGatewayConnectionListEntityInner> listConnections(final String resourceGroupName, final String virtualNetworkGatewayName) {
          ServiceResponse<Page<VirtualNetworkGatewayConnectionListEntityInner>> response = listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single();
          return new PagedList<VirtualNetworkGatewayConnectionListEntityInner>(response.body()) {
              @Override
              public Page<VirtualNetworkGatewayConnectionListEntityInner> nextPage(String nextPageLink) {
                  return listConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
              }
          };
      }
docs: Gets all the connections in a virtual network gateway.
  
  @param resourceGroupName The name of the resource group.
  @param virtualNetworkGatewayName The name of the virtual network gateway.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws CloudException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the PagedList&lt;VirtualNetworkGatewayConnectionListEntityInner&gt; object if successful.