Google_HostedmodelsServiceResource

The "hostedmodels" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api/src/contrib/Google_PredictionService.php  
  1. class Google_HostedmodelsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Submit input and request an output against a hosted model. (hostedmodels.predict) 
  6. * @param string $hostedModelName The name of a hosted model. 
  7. * @param Google_Input $postBody 
  8. * @param array $optParams Optional parameters. 
  9. * @return Google_Output 
  10. */ 
  11. public function predict($hostedModelName, Google_Input $postBody, $optParams = array()) { 
  12. $params = array('hostedModelName' => $hostedModelName, 'postBody' => $postBody); 
  13. $params = array_merge($params, $optParams); 
  14. $data = $this->__call('predict', array($params)); 
  15. if ($this->useObjects()) { 
  16. return new Google_Output($data); 
  17. } else { 
  18. return $data;