Skip to content

Commit be84dc1

Browse files
authored
Add Comprehend client (#1259)
* Add Comprehend client * Added tests * fixed broken tests * Update baseline * Updated docs
1 parent 3168826 commit be84dc1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/AwsClientFactory.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use AsyncAws\CodeCommit\CodeCommitClient;
1414
use AsyncAws\CodeDeploy\CodeDeployClient;
1515
use AsyncAws\CognitoIdentityProvider\CognitoIdentityProviderClient;
16+
use AsyncAws\Comprehend\ComprehendClient;
1617
use AsyncAws\Core\Credentials\CacheProvider;
1718
use AsyncAws\Core\Credentials\ChainProvider;
1819
use AsyncAws\Core\Credentials\CredentialProvider;
@@ -200,6 +201,19 @@ public function codeDeploy(): CodeDeployClient
200201
return $this->serviceCache[__METHOD__];
201202
}
202203

204+
public function comprehend(): ComprehendClient
205+
{
206+
if (!class_exists(ComprehendClient::class)) {
207+
throw MissingDependency::create('async-aws/comprehend', 'ComprehendClient');
208+
}
209+
210+
if (!isset($this->serviceCache[__METHOD__])) {
211+
$this->serviceCache[__METHOD__] = new ComprehendClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger);
212+
}
213+
214+
return $this->serviceCache[__METHOD__];
215+
}
216+
203217
public function dynamoDb(): DynamoDbClient
204218
{
205219
if (!class_exists(DynamoDbClient::class)) {

0 commit comments

Comments
 (0)