Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 71 additions & 3 deletions generated/Model/ContentStateStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* ContentStateStart Class Doc Comment
*
* @category Class
* @description Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer include duration_seconds for countdowns, or set counts_down false without duration_seconds for an open-ended elapsed timer. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
* @description Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer include duration_seconds or timer_end_at for countdowns, or set counts_down false without them for an open-ended elapsed timer. Add timer_start_at for a timer that started earlier. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
* @package ActivitySmith\Generated
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
Expand Down Expand Up @@ -66,6 +66,8 @@ class ContentStateStart implements ModelInterface, ArrayAccess, \JsonSerializabl
'value' => '\ActivitySmith\Generated\Model\LiveActivityValue',
'upperLimit' => 'float',
'durationSeconds' => 'float',
'timerStartAt' => '\DateTime',
'timerEndAt' => '\DateTime',
'countsDown' => 'bool',
'isRunning' => 'bool',
'metrics' => '\ActivitySmith\Generated\Model\ActivityMetric[]',
Expand Down Expand Up @@ -94,6 +96,8 @@ class ContentStateStart implements ModelInterface, ArrayAccess, \JsonSerializabl
'value' => null,
'upperLimit' => null,
'durationSeconds' => null,
'timerStartAt' => 'date-time',
'timerEndAt' => 'date-time',
'countsDown' => null,
'isRunning' => null,
'metrics' => null,
Expand All @@ -120,6 +124,8 @@ class ContentStateStart implements ModelInterface, ArrayAccess, \JsonSerializabl
'value' => false,
'upperLimit' => false,
'durationSeconds' => false,
'timerStartAt' => false,
'timerEndAt' => false,
'countsDown' => false,
'isRunning' => false,
'metrics' => false,
Expand Down Expand Up @@ -226,6 +232,8 @@ public function isNullableSetToNull(string $property): bool
'value' => 'value',
'upperLimit' => 'upper_limit',
'durationSeconds' => 'duration_seconds',
'timerStartAt' => 'timer_start_at',
'timerEndAt' => 'timer_end_at',
'countsDown' => 'counts_down',
'isRunning' => 'is_running',
'metrics' => 'metrics',
Expand All @@ -252,6 +260,8 @@ public function isNullableSetToNull(string $property): bool
'value' => 'setValue',
'upperLimit' => 'setUpperLimit',
'durationSeconds' => 'setDurationSeconds',
'timerStartAt' => 'setTimerStartAt',
'timerEndAt' => 'setTimerEndAt',
'countsDown' => 'setCountsDown',
'isRunning' => 'setIsRunning',
'metrics' => 'setMetrics',
Expand All @@ -278,6 +288,8 @@ public function isNullableSetToNull(string $property): bool
'value' => 'getValue',
'upperLimit' => 'getUpperLimit',
'durationSeconds' => 'getDurationSeconds',
'timerStartAt' => 'getTimerStartAt',
'timerEndAt' => 'getTimerEndAt',
'countsDown' => 'getCountsDown',
'isRunning' => 'getIsRunning',
'metrics' => 'getMetrics',
Expand Down Expand Up @@ -473,6 +485,8 @@ public function __construct(array $data = null)
$this->setIfExists('value', $data ?? [], null);
$this->setIfExists('upperLimit', $data ?? [], null);
$this->setIfExists('durationSeconds', $data ?? [], null);
$this->setIfExists('timerStartAt', $data ?? [], null);
$this->setIfExists('timerEndAt', $data ?? [], null);
$this->setIfExists('countsDown', $data ?? [], true);
$this->setIfExists('isRunning', $data ?? [], true);
$this->setIfExists('metrics', $data ?? [], null);
Expand Down Expand Up @@ -601,7 +615,7 @@ public function getTitle()
/**
* Sets title
*
* @param string $title title
* @param string $title Title shown on the Live Activity. Send an empty string to show no title.
*
* @return self
*/
Expand Down Expand Up @@ -808,7 +822,7 @@ public function getDurationSeconds()
/**
* Sets durationSeconds
*
* @param float|null $durationSeconds Timer duration in seconds. For type=timer countdowns, required on start when counts_down is true or omitted.
* @param float|null $durationSeconds Timer duration in seconds. For type=timer countdowns, required on start when counts_down is true or omitted, unless you send timer_end_at. Counts from timer_start_at when you send it.
*
* @return self
*/
Expand All @@ -822,6 +836,60 @@ public function setDurationSeconds($durationSeconds)
return $this;
}

/**
* Gets timerStartAt
*
* @return \DateTime|null
*/
public function getTimerStartAt()
{
return $this->container['timerStartAt'];
}

/**
* Sets timerStartAt
*
* @param \DateTime|null $timerStartAt Use with type=timer. ISO 8601 date and time when the timer started. It can be in the past, so a countdown that started earlier shows the time already gone in its progress bar. Defaults to the request time. Must not be in the future.
*
* @return self
*/
public function setTimerStartAt($timerStartAt)
{
if (is_null($timerStartAt)) {
throw new \InvalidArgumentException('non-nullable timerStartAt cannot be null');
}
$this->container['timerStartAt'] = $timerStartAt;

return $this;
}

/**
* Gets timerEndAt
*
* @return \DateTime|null
*/
public function getTimerEndAt()
{
return $this->container['timerEndAt'];
}

/**
* Sets timerEndAt
*
* @param \DateTime|null $timerEndAt Use with type=timer. ISO 8601 date and time when the countdown ends. Must be after timer_start_at, or in the future when timer_start_at is omitted. Send duration_seconds or timer_end_at, not both.
*
* @return self
*/
public function setTimerEndAt($timerEndAt)
{
if (is_null($timerEndAt)) {
throw new \InvalidArgumentException('non-nullable timerEndAt cannot be null');
}
$this->container['timerEndAt'] = $timerEndAt;

return $this;
}

/**
* Gets countsDown
*
Expand Down
72 changes: 70 additions & 2 deletions generated/Model/ContentStateUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class ContentStateUpdate implements ModelInterface, ArrayAccess, \JsonSerializab
'value' => '\ActivitySmith\Generated\Model\LiveActivityValue',
'upperLimit' => 'float',
'durationSeconds' => 'float',
'timerStartAt' => '\DateTime',
'timerEndAt' => '\DateTime',
'countsDown' => 'bool',
'isRunning' => 'bool',
'metrics' => '\ActivitySmith\Generated\Model\ActivityMetric[]',
Expand Down Expand Up @@ -94,6 +96,8 @@ class ContentStateUpdate implements ModelInterface, ArrayAccess, \JsonSerializab
'value' => null,
'upperLimit' => null,
'durationSeconds' => null,
'timerStartAt' => 'date-time',
'timerEndAt' => 'date-time',
'countsDown' => null,
'isRunning' => null,
'metrics' => null,
Expand All @@ -120,6 +124,8 @@ class ContentStateUpdate implements ModelInterface, ArrayAccess, \JsonSerializab
'value' => false,
'upperLimit' => false,
'durationSeconds' => false,
'timerStartAt' => false,
'timerEndAt' => false,
'countsDown' => false,
'isRunning' => false,
'metrics' => false,
Expand Down Expand Up @@ -226,6 +232,8 @@ public function isNullableSetToNull(string $property): bool
'value' => 'value',
'upperLimit' => 'upper_limit',
'durationSeconds' => 'duration_seconds',
'timerStartAt' => 'timer_start_at',
'timerEndAt' => 'timer_end_at',
'countsDown' => 'counts_down',
'isRunning' => 'is_running',
'metrics' => 'metrics',
Expand All @@ -252,6 +260,8 @@ public function isNullableSetToNull(string $property): bool
'value' => 'setValue',
'upperLimit' => 'setUpperLimit',
'durationSeconds' => 'setDurationSeconds',
'timerStartAt' => 'setTimerStartAt',
'timerEndAt' => 'setTimerEndAt',
'countsDown' => 'setCountsDown',
'isRunning' => 'setIsRunning',
'metrics' => 'setMetrics',
Expand All @@ -278,6 +288,8 @@ public function isNullableSetToNull(string $property): bool
'value' => 'getValue',
'upperLimit' => 'getUpperLimit',
'durationSeconds' => 'getDurationSeconds',
'timerStartAt' => 'getTimerStartAt',
'timerEndAt' => 'getTimerEndAt',
'countsDown' => 'getCountsDown',
'isRunning' => 'getIsRunning',
'metrics' => 'getMetrics',
Expand Down Expand Up @@ -473,6 +485,8 @@ public function __construct(array $data = null)
$this->setIfExists('value', $data ?? [], null);
$this->setIfExists('upperLimit', $data ?? [], null);
$this->setIfExists('durationSeconds', $data ?? [], null);
$this->setIfExists('timerStartAt', $data ?? [], null);
$this->setIfExists('timerEndAt', $data ?? [], null);
$this->setIfExists('countsDown', $data ?? [], true);
$this->setIfExists('isRunning', $data ?? [], true);
$this->setIfExists('metrics', $data ?? [], null);
Expand Down Expand Up @@ -598,7 +612,7 @@ public function getTitle()
/**
* Sets title
*
* @param string $title title
* @param string $title Title shown on the Live Activity. Send an empty string to show no title.
*
* @return self
*/
Expand Down Expand Up @@ -805,7 +819,7 @@ public function getDurationSeconds()
/**
* Sets durationSeconds
*
* @param float|null $durationSeconds Timer duration in seconds. For type=timer, sending duration_seconds resets the timer window from the update request time; omit it to preserve the existing timer window.
* @param float|null $durationSeconds Timer duration in seconds. For type=timer, sending duration_seconds resets the timer window from the update request time, or from timer_start_at when you send it. Omit it to preserve the existing timer window.
*
* @return self
*/
Expand All @@ -819,6 +833,60 @@ public function setDurationSeconds($durationSeconds)
return $this;
}

/**
* Gets timerStartAt
*
* @return \DateTime|null
*/
public function getTimerStartAt()
{
return $this->container['timerStartAt'];
}

/**
* Sets timerStartAt
*
* @param \DateTime|null $timerStartAt Use with type=timer. ISO 8601 date and time when the timer started. It can be in the past, so a countdown that started earlier shows the time already gone in its progress bar. Defaults to the request time. Must not be in the future.
*
* @return self
*/
public function setTimerStartAt($timerStartAt)
{
if (is_null($timerStartAt)) {
throw new \InvalidArgumentException('non-nullable timerStartAt cannot be null');
}
$this->container['timerStartAt'] = $timerStartAt;

return $this;
}

/**
* Gets timerEndAt
*
* @return \DateTime|null
*/
public function getTimerEndAt()
{
return $this->container['timerEndAt'];
}

/**
* Sets timerEndAt
*
* @param \DateTime|null $timerEndAt Use with type=timer. ISO 8601 date and time when the countdown ends. Must be after timer_start_at, or in the future when timer_start_at is omitted. Send duration_seconds or timer_end_at, not both. Send timer_end_at alone to move the end and keep the current start.
*
* @return self
*/
public function setTimerEndAt($timerEndAt)
{
if (is_null($timerEndAt)) {
throw new \InvalidArgumentException('non-nullable timerEndAt cannot be null');
}
$this->container['timerEndAt'] = $timerEndAt;

return $this;
}

/**
* Gets countsDown
*
Expand Down
Loading
Loading