Debian Codegraph @

lib/3rdParty/composer/aws/aws-sdk-php/src/S3/S3Transfer/Models/DownloadDirectoryResult.php

raw symbols SCIP
1 <?php
2
3 namespace Aws\S3\S3Transfer\Models;
4
5 use Throwable;
6
7 final class DownloadDirectoryResult
8 {
9 /** @var int */
10 private int $objectsDownloaded;
11
12 /** @var int */
13 private int $objectsFailed;
14
15 /** @var \Throwable|null */
16 private ?\Throwable $reason;
17
18 /**
19 * @param int $objectsDownloaded
20 * @param int $objectsFailed
21 * @param Throwable|null $reason
22 */
23 public function __construct(
24 int $objectsDownloaded,
25 int $objectsFailed,
26 ?Throwable $reason = null
27 ) {
28 $this->objectsDownloaded = $objectsDownloaded;
29 $this->objectsFailed = $objectsFailed;
30 $this->reason = $reason;
31 }
32
33 /**
34 * @return int
35 */
36 public function getObjectsDownloaded(): int
37 {
38 return $this->objectsDownloaded;
39 }
40
41 /**
42 * @return int
43 */
44 public function getObjectsFailed(): int
45 {
46 return $this->objectsFailed;
47 }
48
49 /**
50 * @return Throwable|null
51 */
52 public function getReason(): ?Throwable
53 {
54 return $this->reason;
55 }
56
57 /**
58 * @return string
59 */
60 public function __toString(): string
61 {
62 return sprintf(
63 "DownloadDirectoryResult: %d objects downloaded, %d objects failed",
64 $this->objectsDownloaded,
65 $this->objectsFailed
66 );
67 }
68 }