Skip to content

Commit c1b0ff8

Browse files
authored
Generate the property type for generated objects (#1467)
1 parent 9066a79 commit c1b0ff8

File tree

9 files changed

+51
-0
lines changed

9 files changed

+51
-0
lines changed

src/Exception/RejectedRecordsException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
*/
2929
final class RejectedRecordsException extends ClientException
3030
{
31+
/**
32+
* @var RejectedRecord[]
33+
*/
3134
private $rejectedRecords;
3235

3336
/**

src/Result/DescribeEndpointsResponse.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class DescribeEndpointsResponse extends Result
1010
{
1111
/**
1212
* An `Endpoints` object is returned when a `DescribeEndpoints` request is made.
13+
*
14+
* @var Endpoint[]
1315
*/
1416
private $endpoints;
1517

src/Result/WriteRecordsResponse.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class WriteRecordsResponse extends Result
1010
{
1111
/**
1212
* Information on the records ingested by this request.
13+
*
14+
* @var RecordsIngested|null
1315
*/
1416
private $recordsIngested;
1517

src/ValueObject/Dimension.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,22 @@ final class Dimension
1818
* For constraints on dimension names, see Naming Constraints [^1].
1919
*
2020
* [^1]: https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html#limits.naming
21+
*
22+
* @var string
2123
*/
2224
private $name;
2325

2426
/**
2527
* The value of the dimension.
28+
*
29+
* @var string
2630
*/
2731
private $value;
2832

2933
/**
3034
* The data type of the dimension for the time-series data point.
35+
*
36+
* @var DimensionValueType::*|null
3137
*/
3238
private $dimensionValueType;
3339

src/ValueObject/Endpoint.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ final class Endpoint implements EndpointInterface
1212
{
1313
/**
1414
* An endpoint address.
15+
*
16+
* @var string
1517
*/
1618
private $address;
1719

1820
/**
1921
* The TTL for the endpoint, in minutes.
22+
*
23+
* @var int
2024
*/
2125
private $cachePeriodInMinutes;
2226

src/ValueObject/MeasureValue.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,24 @@ final class MeasureValue
2020
* For constraints on MeasureValue names, see Naming Constraints [^1] in the Amazon Timestream Developer Guide.
2121
*
2222
* [^1]: https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html#limits.naming
23+
*
24+
* @var string
2325
*/
2426
private $name;
2527

2628
/**
2729
* The value for the MeasureValue. For information, see Data types [^1].
2830
*
2931
* [^1]: https://docs.aws.amazon.com/timestream/latest/developerguide/writes.html#writes.data-types
32+
*
33+
* @var string
3034
*/
3135
private $value;
3236

3337
/**
3438
* Contains the data type of the MeasureValue for the time-series data point.
39+
*
40+
* @var MeasureValueType::*
3541
*/
3642
private $type;
3743

src/ValueObject/Record.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,23 @@ final class Record
2323
{
2424
/**
2525
* Contains the list of dimensions for time-series data points.
26+
*
27+
* @var Dimension[]|null
2628
*/
2729
private $dimensions;
2830

2931
/**
3032
* Measure represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the
3133
* RPM of a wind turbine are measures.
34+
*
35+
* @var string|null
3236
*/
3337
private $measureName;
3438

3539
/**
3640
* Contains the measure value for the time-series data point.
41+
*
42+
* @var string|null
3743
*/
3844
private $measureValue;
3945

@@ -42,19 +48,25 @@ final class Record
4248
* information, see Data types [^1].
4349
*
4450
* [^1]: https://docs.aws.amazon.com/timestream/latest/developerguide/writes.html#writes.data-types
51+
*
52+
* @var MeasureValueType::*|null
4553
*/
4654
private $measureValueType;
4755

4856
/**
4957
* Contains the time at which the measure value for the data point was collected. The time value plus the unit provides
5058
* the time elapsed since the epoch. For example, if the time value is `12345` and the unit is `ms`, then `12345 ms`
5159
* have elapsed since the epoch.
60+
*
61+
* @var string|null
5262
*/
5363
private $time;
5464

5565
/**
5666
* The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds, or
5767
* other supported values. Default is `MILLISECONDS`.
68+
*
69+
* @var TimeUnit::*|null
5870
*/
5971
private $timeUnit;
6072

@@ -64,13 +76,17 @@ final class Record
6476
* updated. Default value is `1`.
6577
*
6678
* > `Version` must be `1` or greater, or you will receive a `ValidationException` error.
79+
*
80+
* @var int|null
6781
*/
6882
private $version;
6983

7084
/**
7185
* Contains the list of MeasureValue for time-series data points.
7286
*
7387
* This is only allowed for type `MULTI`. For scalar values, use `MeasureValue` attribute of the record directly.
88+
*
89+
* @var MeasureValue[]|null
7490
*/
7591
private $measureValues;
7692

src/ValueObject/RecordsIngested.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@ final class RecordsIngested
99
{
1010
/**
1111
* Total count of successfully ingested records.
12+
*
13+
* @var int|null
1214
*/
1315
private $total;
1416

1517
/**
1618
* Count of records ingested into the memory store.
19+
*
20+
* @var int|null
1721
*/
1822
private $memoryStore;
1923

2024
/**
2125
* Count of records ingested into the magnetic store.
26+
*
27+
* @var int|null
2228
*/
2329
private $magneticStore;
2430

src/ValueObject/RejectedRecord.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ final class RejectedRecord
1010
{
1111
/**
1212
* The index of the record in the input request for WriteRecords. Indexes begin with 0.
13+
*
14+
* @var int|null
1315
*/
1416
private $recordIndex;
1517

@@ -40,12 +42,16 @@ final class RejectedRecord
4042
* [^1]: https://docs.aws.amazon.com/timestream/latest/developerguide/best-practices.html#configuration
4143
* [^2]: https://docs.aws.amazon.com/timestream/latest/developerguide/storage.html
4244
* [^3]: https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html
45+
*
46+
* @var string|null
4347
*/
4448
private $reason;
4549

4650
/**
4751
* The existing version of the record. This value is populated in scenarios where an identical record exists with a
4852
* higher version than the version in the write request.
53+
*
54+
* @var int|null
4955
*/
5056
private $existingVersion;
5157

0 commit comments

Comments
 (0)