-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathListCollectionsData.php
47 lines (41 loc) · 1.18 KB
/
ListCollectionsData.php
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
<?php
declare(strict_types=1);
namespace MoeMizrak\Rekognition\Data;
use MoeMizrak\Rekognition\Data\Contracts\RekognitionDataFormatInterface;
use Spatie\LaravelData\Data;
/**
* ListCollectionsData is for listCollections method related context data such as maxResults and nextToken.
* For more detail: https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-rekognition-2016-06-27.html#listcollections
*
* @class ListCollectionsData
*/
final class ListCollectionsData extends Data implements RekognitionDataFormatInterface
{
public function __construct(
/*
* Maximum number of collection IDs to return.
*
* @param int|null
*/
public ?int $maxResults = null,
/*
* Pagination token from the previous response.
*
* @param string|null
*/
public ?string $nextToken = null,
) {}
/**
* @inheritDoc
*/
public function toRekognitionDataFormat(): array
{
return array_filter(
[
'MaxResults' => $this->maxResults,
'NextToken' => $this->nextToken,
],
fn ($value) => $value !== null
);
}
}