code: public RegistryStatisticsInner getStats(String resourceGroupName, String resourceName) {
          return getStatsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body();
      }
docs: Get the statistics from an IoT hub.
  Get the statistics from an IoT hub.
  
  @param resourceGroupName The name of the resource group that contains the IoT hub.
  @param resourceName The name of the IoT hub.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws ErrorDetailsException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the RegistryStatisticsInner object if successful.