/usr/share/php/Aws/MachineLearning/MachineLearningClient.php is in php-aws-sdk 3.15.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | <?php
namespace Aws\MachineLearning;
use Aws\AwsClient;
use Aws\CommandInterface;
use GuzzleHttp\Psr7\Uri;
use Psr\Http\Message\RequestInterface;
/**
* Amazon Machine Learning client.
*
* @method \Aws\Result createBatchPrediction(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBatchPredictionAsync(array $args = [])
* @method \Aws\Result createDataSourceFromRDS(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDataSourceFromRDSAsync(array $args = [])
* @method \Aws\Result createDataSourceFromRedshift(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDataSourceFromRedshiftAsync(array $args = [])
* @method \Aws\Result createDataSourceFromS3(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDataSourceFromS3Async(array $args = [])
* @method \Aws\Result createEvaluation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEvaluationAsync(array $args = [])
* @method \Aws\Result createMLModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMLModelAsync(array $args = [])
* @method \Aws\Result createRealtimeEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRealtimeEndpointAsync(array $args = [])
* @method \Aws\Result deleteBatchPrediction(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBatchPredictionAsync(array $args = [])
* @method \Aws\Result deleteDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDataSourceAsync(array $args = [])
* @method \Aws\Result deleteEvaluation(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEvaluationAsync(array $args = [])
* @method \Aws\Result deleteMLModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMLModelAsync(array $args = [])
* @method \Aws\Result deleteRealtimeEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRealtimeEndpointAsync(array $args = [])
* @method \Aws\Result describeBatchPredictions(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeBatchPredictionsAsync(array $args = [])
* @method \Aws\Result describeDataSources(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeDataSourcesAsync(array $args = [])
* @method \Aws\Result describeEvaluations(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeEvaluationsAsync(array $args = [])
* @method \Aws\Result describeMLModels(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeMLModelsAsync(array $args = [])
* @method \Aws\Result getBatchPrediction(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBatchPredictionAsync(array $args = [])
* @method \Aws\Result getDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDataSourceAsync(array $args = [])
* @method \Aws\Result getEvaluation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEvaluationAsync(array $args = [])
* @method \Aws\Result getMLModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMLModelAsync(array $args = [])
* @method \Aws\Result predict(array $args = [])
* @method \GuzzleHttp\Promise\Promise predictAsync(array $args = [])
* @method \Aws\Result updateBatchPrediction(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBatchPredictionAsync(array $args = [])
* @method \Aws\Result updateDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDataSourceAsync(array $args = [])
* @method \Aws\Result updateEvaluation(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateEvaluationAsync(array $args = [])
* @method \Aws\Result updateMLModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateMLModelAsync(array $args = [])
*/
class MachineLearningClient extends AwsClient
{
public function __construct(array $config)
{
parent::__construct($config);
$list = $this->getHandlerList();
$list->appendBuild($this->predictEndpoint(), 'ml.predict_endpoint');
}
/**
* Changes the endpoint of the Predict operation to the provided endpoint.
*
* @return callable
*/
private function predictEndpoint()
{
return static function (callable $handler) {
return function (
CommandInterface $command,
RequestInterface $request = null
) use ($handler) {
if ($command->getName() === 'Predict') {
$request = $request->withUri(new Uri($command['PredictEndpoint']));
}
return $handler($command, $request);
};
};
}
}
|