From f35cce51eabc754aee98e09fa84157472cf00d7f Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Tue, 26 May 2026 13:35:03 +0000 Subject: [PATCH] chore: regenerate SDK --- generated/Configuration.php | 4 +- generated/Model/ActivityMetric.php | 2 + generated/Model/ContentStateEnd.php | 125 +++++- generated/Model/ContentStateStart.php | 125 +++++- generated/Model/ContentStateUpdate.php | 125 +++++- generated/Model/LiveActivityAlertBadge.php | 456 +++++++++++++++++++++ generated/Model/LiveActivityAlertIcon.php | 456 +++++++++++++++++++++ generated/Model/LiveActivityColor.php | 86 ++++ generated/Model/StreamContentState.php | 125 +++++- 9 files changed, 1490 insertions(+), 14 deletions(-) create mode 100644 generated/Model/LiveActivityAlertBadge.php create mode 100644 generated/Model/LiveActivityAlertIcon.php create mode 100644 generated/Model/LiveActivityColor.php diff --git a/generated/Configuration.php b/generated/Configuration.php index ff17c89..86519c1 100644 --- a/generated/Configuration.php +++ b/generated/Configuration.php @@ -100,7 +100,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/1.3.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/1.4.1/PHP'; /** * Debug switch (default set to false) @@ -433,7 +433,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 1.3.0' . PHP_EOL; + $report .= ' SDK Package Version: 1.4.1' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/generated/Model/ActivityMetric.php b/generated/Model/ActivityMetric.php index 1d8c1c6..abae08c 100644 --- a/generated/Model/ActivityMetric.php +++ b/generated/Model/ActivityMetric.php @@ -255,6 +255,7 @@ public function getModelName() public const COLOR_RED = 'red'; public const COLOR_ORANGE = 'orange'; public const COLOR_YELLOW = 'yellow'; + public const COLOR_GRAY = 'gray'; /** * Gets allowable values of the enum @@ -273,6 +274,7 @@ public function getColorAllowableValues() self::COLOR_RED, self::COLOR_ORANGE, self::COLOR_YELLOW, + self::COLOR_GRAY, ]; } diff --git a/generated/Model/ContentStateEnd.php b/generated/Model/ContentStateEnd.php index e16eae8..7f5cec1 100644 --- a/generated/Model/ContentStateEnd.php +++ b/generated/Model/ContentStateEnd.php @@ -35,7 +35,7 @@ * ContentStateEnd Class Doc Comment * * @category Class - * @description End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start. + * @description End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message, with optional icon and badge. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start. * @package ActivitySmith\Generated * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -66,6 +66,9 @@ class ContentStateEnd implements ModelInterface, ArrayAccess, \JsonSerializable 'value' => 'float', 'upperLimit' => 'float', 'metrics' => '\ActivitySmith\Generated\Model\ActivityMetric[]', + 'message' => 'string', + 'icon' => '\ActivitySmith\Generated\Model\LiveActivityAlertIcon', + 'badge' => '\ActivitySmith\Generated\Model\LiveActivityAlertBadge', 'type' => 'string', 'color' => 'string', 'stepColor' => 'string', @@ -89,6 +92,9 @@ class ContentStateEnd implements ModelInterface, ArrayAccess, \JsonSerializable 'value' => null, 'upperLimit' => null, 'metrics' => null, + 'message' => null, + 'icon' => null, + 'badge' => null, 'type' => null, 'color' => null, 'stepColor' => null, @@ -110,6 +116,9 @@ class ContentStateEnd implements ModelInterface, ArrayAccess, \JsonSerializable 'value' => false, 'upperLimit' => false, 'metrics' => false, + 'message' => false, + 'icon' => false, + 'badge' => false, 'type' => false, 'color' => false, 'stepColor' => false, @@ -211,6 +220,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'value', 'upperLimit' => 'upper_limit', 'metrics' => 'metrics', + 'message' => 'message', + 'icon' => 'icon', + 'badge' => 'badge', 'type' => 'type', 'color' => 'color', 'stepColor' => 'step_color', @@ -232,6 +244,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'setValue', 'upperLimit' => 'setUpperLimit', 'metrics' => 'setMetrics', + 'message' => 'setMessage', + 'icon' => 'setIcon', + 'badge' => 'setBadge', 'type' => 'setType', 'color' => 'setColor', 'stepColor' => 'setStepColor', @@ -253,6 +268,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'getValue', 'upperLimit' => 'getUpperLimit', 'metrics' => 'getMetrics', + 'message' => 'getMessage', + 'icon' => 'getIcon', + 'badge' => 'getBadge', 'type' => 'getType', 'color' => 'getColor', 'stepColor' => 'getStepColor', @@ -305,6 +323,7 @@ public function getModelName() public const TYPE_PROGRESS = 'progress'; public const TYPE_METRICS = 'metrics'; public const TYPE_STATS = 'stats'; + public const TYPE_ALERT = 'alert'; public const COLOR_LIME = 'lime'; public const COLOR_GREEN = 'green'; public const COLOR_CYAN = 'cyan'; @@ -314,6 +333,7 @@ public function getModelName() public const COLOR_RED = 'red'; public const COLOR_ORANGE = 'orange'; public const COLOR_YELLOW = 'yellow'; + public const COLOR_GRAY = 'gray'; public const STEP_COLOR_LIME = 'lime'; public const STEP_COLOR_GREEN = 'green'; public const STEP_COLOR_CYAN = 'cyan'; @@ -323,6 +343,7 @@ public function getModelName() public const STEP_COLOR_RED = 'red'; public const STEP_COLOR_ORANGE = 'orange'; public const STEP_COLOR_YELLOW = 'yellow'; + public const STEP_COLOR_GRAY = 'gray'; public const STEP_COLORS_LIME = 'lime'; public const STEP_COLORS_GREEN = 'green'; public const STEP_COLORS_CYAN = 'cyan'; @@ -332,6 +353,7 @@ public function getModelName() public const STEP_COLORS_RED = 'red'; public const STEP_COLORS_ORANGE = 'orange'; public const STEP_COLORS_YELLOW = 'yellow'; + public const STEP_COLORS_GRAY = 'gray'; /** * Gets allowable values of the enum @@ -345,6 +367,7 @@ public function getTypeAllowableValues() self::TYPE_PROGRESS, self::TYPE_METRICS, self::TYPE_STATS, + self::TYPE_ALERT, ]; } @@ -365,6 +388,7 @@ public function getColorAllowableValues() self::COLOR_RED, self::COLOR_ORANGE, self::COLOR_YELLOW, + self::COLOR_GRAY, ]; } @@ -385,6 +409,7 @@ public function getStepColorAllowableValues() self::STEP_COLOR_RED, self::STEP_COLOR_ORANGE, self::STEP_COLOR_YELLOW, + self::STEP_COLOR_GRAY, ]; } @@ -405,6 +430,7 @@ public function getStepColorsAllowableValues() self::STEP_COLORS_RED, self::STEP_COLORS_ORANGE, self::STEP_COLORS_YELLOW, + self::STEP_COLORS_GRAY, ]; } @@ -431,8 +457,11 @@ public function __construct(array $data = null) $this->setIfExists('value', $data ?? [], null); $this->setIfExists('upperLimit', $data ?? [], null); $this->setIfExists('metrics', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('icon', $data ?? [], null); + $this->setIfExists('badge', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('color', $data ?? [], 'blue'); + $this->setIfExists('color', $data ?? [], null); $this->setIfExists('stepColor', $data ?? [], null); $this->setIfExists('stepColors', $data ?? [], null); $this->setIfExists('autoDismissMinutes', $data ?? [], 3); @@ -492,6 +521,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'metrics', number of items must be greater than or equal to 1."; } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) < 1)) { + $invalidProperties[] = "invalid value for 'message', the character length must be bigger than or equal to 1."; + } + $allowedValues = $this->getTypeAllowableValues(); if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -779,6 +812,92 @@ public function setMetrics($metrics) return $this; } + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message Alert message. Use for type=alert. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + + if ((mb_strlen($message) < 1)) { + throw new \InvalidArgumentException('invalid length for $message when calling ContentStateEnd., must be bigger than or equal to 1.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets icon + * + * @return \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon for type=alert. + * + * @return self + */ + public function setIcon($icon) + { + if (is_null($icon)) { + throw new \InvalidArgumentException('non-nullable icon cannot be null'); + } + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets badge + * + * @return \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null + */ + public function getBadge() + { + return $this->container['badge']; + } + + /** + * Sets badge + * + * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge for type=alert. + * + * @return self + */ + public function setBadge($badge) + { + if (is_null($badge)) { + throw new \InvalidArgumentException('non-nullable badge cannot be null'); + } + $this->container['badge'] = $badge; + + return $this; + } + /** * Gets type * @@ -829,7 +948,7 @@ public function getColor() /** * Sets color * - * @param string|null $color Optional. Accent color for the Live Activity. Defaults to blue. + * @param string|null $color Optional. Accent color for progress, segmented_progress, and metrics Live Activities. * * @return self */ diff --git a/generated/Model/ContentStateStart.php b/generated/Model/ContentStateStart.php index efbe68a..a19c0c7 100644 --- a/generated/Model/ContentStateStart.php +++ b/generated/Model/ContentStateStart.php @@ -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 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 alert include message, with optional icon and badge. 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 @@ -66,6 +66,9 @@ class ContentStateStart implements ModelInterface, ArrayAccess, \JsonSerializabl 'value' => 'float', 'upperLimit' => 'float', 'metrics' => '\ActivitySmith\Generated\Model\ActivityMetric[]', + 'message' => 'string', + 'icon' => '\ActivitySmith\Generated\Model\LiveActivityAlertIcon', + 'badge' => '\ActivitySmith\Generated\Model\LiveActivityAlertBadge', 'type' => 'string', 'color' => 'string', 'stepColor' => 'string', @@ -88,6 +91,9 @@ class ContentStateStart implements ModelInterface, ArrayAccess, \JsonSerializabl 'value' => null, 'upperLimit' => null, 'metrics' => null, + 'message' => null, + 'icon' => null, + 'badge' => null, 'type' => null, 'color' => null, 'stepColor' => null, @@ -108,6 +114,9 @@ class ContentStateStart implements ModelInterface, ArrayAccess, \JsonSerializabl 'value' => false, 'upperLimit' => false, 'metrics' => false, + 'message' => false, + 'icon' => false, + 'badge' => false, 'type' => false, 'color' => false, 'stepColor' => false, @@ -208,6 +217,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'value', 'upperLimit' => 'upper_limit', 'metrics' => 'metrics', + 'message' => 'message', + 'icon' => 'icon', + 'badge' => 'badge', 'type' => 'type', 'color' => 'color', 'stepColor' => 'step_color', @@ -228,6 +240,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'setValue', 'upperLimit' => 'setUpperLimit', 'metrics' => 'setMetrics', + 'message' => 'setMessage', + 'icon' => 'setIcon', + 'badge' => 'setBadge', 'type' => 'setType', 'color' => 'setColor', 'stepColor' => 'setStepColor', @@ -248,6 +263,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'getValue', 'upperLimit' => 'getUpperLimit', 'metrics' => 'getMetrics', + 'message' => 'getMessage', + 'icon' => 'getIcon', + 'badge' => 'getBadge', 'type' => 'getType', 'color' => 'getColor', 'stepColor' => 'getStepColor', @@ -299,6 +317,7 @@ public function getModelName() public const TYPE_PROGRESS = 'progress'; public const TYPE_METRICS = 'metrics'; public const TYPE_STATS = 'stats'; + public const TYPE_ALERT = 'alert'; public const COLOR_LIME = 'lime'; public const COLOR_GREEN = 'green'; public const COLOR_CYAN = 'cyan'; @@ -308,6 +327,7 @@ public function getModelName() public const COLOR_RED = 'red'; public const COLOR_ORANGE = 'orange'; public const COLOR_YELLOW = 'yellow'; + public const COLOR_GRAY = 'gray'; public const STEP_COLOR_LIME = 'lime'; public const STEP_COLOR_GREEN = 'green'; public const STEP_COLOR_CYAN = 'cyan'; @@ -317,6 +337,7 @@ public function getModelName() public const STEP_COLOR_RED = 'red'; public const STEP_COLOR_ORANGE = 'orange'; public const STEP_COLOR_YELLOW = 'yellow'; + public const STEP_COLOR_GRAY = 'gray'; public const STEP_COLORS_LIME = 'lime'; public const STEP_COLORS_GREEN = 'green'; public const STEP_COLORS_CYAN = 'cyan'; @@ -326,6 +347,7 @@ public function getModelName() public const STEP_COLORS_RED = 'red'; public const STEP_COLORS_ORANGE = 'orange'; public const STEP_COLORS_YELLOW = 'yellow'; + public const STEP_COLORS_GRAY = 'gray'; /** * Gets allowable values of the enum @@ -339,6 +361,7 @@ public function getTypeAllowableValues() self::TYPE_PROGRESS, self::TYPE_METRICS, self::TYPE_STATS, + self::TYPE_ALERT, ]; } @@ -359,6 +382,7 @@ public function getColorAllowableValues() self::COLOR_RED, self::COLOR_ORANGE, self::COLOR_YELLOW, + self::COLOR_GRAY, ]; } @@ -379,6 +403,7 @@ public function getStepColorAllowableValues() self::STEP_COLOR_RED, self::STEP_COLOR_ORANGE, self::STEP_COLOR_YELLOW, + self::STEP_COLOR_GRAY, ]; } @@ -399,6 +424,7 @@ public function getStepColorsAllowableValues() self::STEP_COLORS_RED, self::STEP_COLORS_ORANGE, self::STEP_COLORS_YELLOW, + self::STEP_COLORS_GRAY, ]; } @@ -425,8 +451,11 @@ public function __construct(array $data = null) $this->setIfExists('value', $data ?? [], null); $this->setIfExists('upperLimit', $data ?? [], null); $this->setIfExists('metrics', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('icon', $data ?? [], null); + $this->setIfExists('badge', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('color', $data ?? [], 'blue'); + $this->setIfExists('color', $data ?? [], null); $this->setIfExists('stepColor', $data ?? [], null); $this->setIfExists('stepColors', $data ?? [], null); } @@ -485,6 +514,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'metrics', number of items must be greater than or equal to 1."; } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) < 1)) { + $invalidProperties[] = "invalid value for 'message', the character length must be bigger than or equal to 1."; + } + if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -771,6 +804,92 @@ public function setMetrics($metrics) return $this; } + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message Required for type=alert. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + + if ((mb_strlen($message) < 1)) { + throw new \InvalidArgumentException('invalid length for $message when calling ContentStateStart., must be bigger than or equal to 1.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets icon + * + * @return \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon for type=alert. + * + * @return self + */ + public function setIcon($icon) + { + if (is_null($icon)) { + throw new \InvalidArgumentException('non-nullable icon cannot be null'); + } + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets badge + * + * @return \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null + */ + public function getBadge() + { + return $this->container['badge']; + } + + /** + * Sets badge + * + * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge for type=alert. + * + * @return self + */ + public function setBadge($badge) + { + if (is_null($badge)) { + throw new \InvalidArgumentException('non-nullable badge cannot be null'); + } + $this->container['badge'] = $badge; + + return $this; + } + /** * Gets type * @@ -821,7 +940,7 @@ public function getColor() /** * Sets color * - * @param string|null $color Optional. Accent color for the Live Activity. Defaults to blue. + * @param string|null $color Optional. Accent color for progress, segmented_progress, and metrics Live Activities. * * @return self */ diff --git a/generated/Model/ContentStateUpdate.php b/generated/Model/ContentStateUpdate.php index d64088e..abea5e5 100644 --- a/generated/Model/ContentStateUpdate.php +++ b/generated/Model/ContentStateUpdate.php @@ -35,7 +35,7 @@ * ContentStateUpdate Class Doc Comment * * @category Class - * @description Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates. + * @description Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message, with optional icon and badge. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates. * @package ActivitySmith\Generated * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -66,6 +66,9 @@ class ContentStateUpdate implements ModelInterface, ArrayAccess, \JsonSerializab 'value' => 'float', 'upperLimit' => 'float', 'metrics' => '\ActivitySmith\Generated\Model\ActivityMetric[]', + 'message' => 'string', + 'icon' => '\ActivitySmith\Generated\Model\LiveActivityAlertIcon', + 'badge' => '\ActivitySmith\Generated\Model\LiveActivityAlertBadge', 'type' => 'string', 'color' => 'string', 'stepColor' => 'string', @@ -88,6 +91,9 @@ class ContentStateUpdate implements ModelInterface, ArrayAccess, \JsonSerializab 'value' => null, 'upperLimit' => null, 'metrics' => null, + 'message' => null, + 'icon' => null, + 'badge' => null, 'type' => null, 'color' => null, 'stepColor' => null, @@ -108,6 +114,9 @@ class ContentStateUpdate implements ModelInterface, ArrayAccess, \JsonSerializab 'value' => false, 'upperLimit' => false, 'metrics' => false, + 'message' => false, + 'icon' => false, + 'badge' => false, 'type' => false, 'color' => false, 'stepColor' => false, @@ -208,6 +217,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'value', 'upperLimit' => 'upper_limit', 'metrics' => 'metrics', + 'message' => 'message', + 'icon' => 'icon', + 'badge' => 'badge', 'type' => 'type', 'color' => 'color', 'stepColor' => 'step_color', @@ -228,6 +240,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'setValue', 'upperLimit' => 'setUpperLimit', 'metrics' => 'setMetrics', + 'message' => 'setMessage', + 'icon' => 'setIcon', + 'badge' => 'setBadge', 'type' => 'setType', 'color' => 'setColor', 'stepColor' => 'setStepColor', @@ -248,6 +263,9 @@ public function isNullableSetToNull(string $property): bool 'value' => 'getValue', 'upperLimit' => 'getUpperLimit', 'metrics' => 'getMetrics', + 'message' => 'getMessage', + 'icon' => 'getIcon', + 'badge' => 'getBadge', 'type' => 'getType', 'color' => 'getColor', 'stepColor' => 'getStepColor', @@ -299,6 +317,7 @@ public function getModelName() public const TYPE_PROGRESS = 'progress'; public const TYPE_METRICS = 'metrics'; public const TYPE_STATS = 'stats'; + public const TYPE_ALERT = 'alert'; public const COLOR_LIME = 'lime'; public const COLOR_GREEN = 'green'; public const COLOR_CYAN = 'cyan'; @@ -308,6 +327,7 @@ public function getModelName() public const COLOR_RED = 'red'; public const COLOR_ORANGE = 'orange'; public const COLOR_YELLOW = 'yellow'; + public const COLOR_GRAY = 'gray'; public const STEP_COLOR_LIME = 'lime'; public const STEP_COLOR_GREEN = 'green'; public const STEP_COLOR_CYAN = 'cyan'; @@ -317,6 +337,7 @@ public function getModelName() public const STEP_COLOR_RED = 'red'; public const STEP_COLOR_ORANGE = 'orange'; public const STEP_COLOR_YELLOW = 'yellow'; + public const STEP_COLOR_GRAY = 'gray'; public const STEP_COLORS_LIME = 'lime'; public const STEP_COLORS_GREEN = 'green'; public const STEP_COLORS_CYAN = 'cyan'; @@ -326,6 +347,7 @@ public function getModelName() public const STEP_COLORS_RED = 'red'; public const STEP_COLORS_ORANGE = 'orange'; public const STEP_COLORS_YELLOW = 'yellow'; + public const STEP_COLORS_GRAY = 'gray'; /** * Gets allowable values of the enum @@ -339,6 +361,7 @@ public function getTypeAllowableValues() self::TYPE_PROGRESS, self::TYPE_METRICS, self::TYPE_STATS, + self::TYPE_ALERT, ]; } @@ -359,6 +382,7 @@ public function getColorAllowableValues() self::COLOR_RED, self::COLOR_ORANGE, self::COLOR_YELLOW, + self::COLOR_GRAY, ]; } @@ -379,6 +403,7 @@ public function getStepColorAllowableValues() self::STEP_COLOR_RED, self::STEP_COLOR_ORANGE, self::STEP_COLOR_YELLOW, + self::STEP_COLOR_GRAY, ]; } @@ -399,6 +424,7 @@ public function getStepColorsAllowableValues() self::STEP_COLORS_RED, self::STEP_COLORS_ORANGE, self::STEP_COLORS_YELLOW, + self::STEP_COLORS_GRAY, ]; } @@ -425,8 +451,11 @@ public function __construct(array $data = null) $this->setIfExists('value', $data ?? [], null); $this->setIfExists('upperLimit', $data ?? [], null); $this->setIfExists('metrics', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('icon', $data ?? [], null); + $this->setIfExists('badge', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('color', $data ?? [], 'blue'); + $this->setIfExists('color', $data ?? [], null); $this->setIfExists('stepColor', $data ?? [], null); $this->setIfExists('stepColors', $data ?? [], null); } @@ -485,6 +514,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'metrics', number of items must be greater than or equal to 1."; } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) < 1)) { + $invalidProperties[] = "invalid value for 'message', the character length must be bigger than or equal to 1."; + } + $allowedValues = $this->getTypeAllowableValues(); if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -768,6 +801,92 @@ public function setMetrics($metrics) return $this; } + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message Alert message. Use for type=alert. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + + if ((mb_strlen($message) < 1)) { + throw new \InvalidArgumentException('invalid length for $message when calling ContentStateUpdate., must be bigger than or equal to 1.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets icon + * + * @return \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon for type=alert. + * + * @return self + */ + public function setIcon($icon) + { + if (is_null($icon)) { + throw new \InvalidArgumentException('non-nullable icon cannot be null'); + } + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets badge + * + * @return \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null + */ + public function getBadge() + { + return $this->container['badge']; + } + + /** + * Sets badge + * + * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge for type=alert. + * + * @return self + */ + public function setBadge($badge) + { + if (is_null($badge)) { + throw new \InvalidArgumentException('non-nullable badge cannot be null'); + } + $this->container['badge'] = $badge; + + return $this; + } + /** * Gets type * @@ -818,7 +937,7 @@ public function getColor() /** * Sets color * - * @param string|null $color Optional. Accent color for the Live Activity. Defaults to blue. + * @param string|null $color Optional. Accent color for progress, segmented_progress, and metrics Live Activities. * * @return self */ diff --git a/generated/Model/LiveActivityAlertBadge.php b/generated/Model/LiveActivityAlertBadge.php new file mode 100644 index 0000000..63c0737 --- /dev/null +++ b/generated/Model/LiveActivityAlertBadge.php @@ -0,0 +1,456 @@ + + */ +class LiveActivityAlertBadge implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'LiveActivityAlertBadge'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'title' => 'string', + 'color' => '\ActivitySmith\Generated\Model\LiveActivityColor' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'title' => null, + 'color' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'title' => false, + 'color' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'color' => 'color' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'color' => 'setColor' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'color' => 'getColor' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ((mb_strlen($this->container['title']) < 1)) { + $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title title + * + * @return self + */ + public function setTitle($title) + { + if (is_null($title)) { + throw new \InvalidArgumentException('non-nullable title cannot be null'); + } + + if ((mb_strlen($title) < 1)) { + throw new \InvalidArgumentException('invalid length for $title when calling LiveActivityAlertBadge., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets color + * + * @return \ActivitySmith\Generated\Model\LiveActivityColor|null + */ + public function getColor() + { + return $this->container['color']; + } + + /** + * Sets color + * + * @param \ActivitySmith\Generated\Model\LiveActivityColor|null $color Optional badge color. + * + * @return self + */ + public function setColor($color) + { + if (is_null($color)) { + throw new \InvalidArgumentException('non-nullable color cannot be null'); + } + $this->container['color'] = $color; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/generated/Model/LiveActivityAlertIcon.php b/generated/Model/LiveActivityAlertIcon.php new file mode 100644 index 0000000..0e8acfe --- /dev/null +++ b/generated/Model/LiveActivityAlertIcon.php @@ -0,0 +1,456 @@ + + */ +class LiveActivityAlertIcon implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'LiveActivityAlertIcon'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'symbol' => 'string', + 'color' => '\ActivitySmith\Generated\Model\LiveActivityColor' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'symbol' => null, + 'color' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'symbol' => false, + 'color' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'symbol' => 'symbol', + 'color' => 'color' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'symbol' => 'setSymbol', + 'color' => 'setColor' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'symbol' => 'getSymbol', + 'color' => 'getColor' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('symbol', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['symbol'] === null) { + $invalidProperties[] = "'symbol' can't be null"; + } + if ((mb_strlen($this->container['symbol']) < 1)) { + $invalidProperties[] = "invalid value for 'symbol', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets symbol + * + * @return string + */ + public function getSymbol() + { + return $this->container['symbol']; + } + + /** + * Sets symbol + * + * @param string $symbol Apple SF Symbol name. + * + * @return self + */ + public function setSymbol($symbol) + { + if (is_null($symbol)) { + throw new \InvalidArgumentException('non-nullable symbol cannot be null'); + } + + if ((mb_strlen($symbol) < 1)) { + throw new \InvalidArgumentException('invalid length for $symbol when calling LiveActivityAlertIcon., must be bigger than or equal to 1.'); + } + + $this->container['symbol'] = $symbol; + + return $this; + } + + /** + * Gets color + * + * @return \ActivitySmith\Generated\Model\LiveActivityColor|null + */ + public function getColor() + { + return $this->container['color']; + } + + /** + * Sets color + * + * @param \ActivitySmith\Generated\Model\LiveActivityColor|null $color Optional icon color. + * + * @return self + */ + public function setColor($color) + { + if (is_null($color)) { + throw new \InvalidArgumentException('non-nullable color cannot be null'); + } + $this->container['color'] = $color; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/generated/Model/LiveActivityColor.php b/generated/Model/LiveActivityColor.php new file mode 100644 index 0000000..3610f50 --- /dev/null +++ b/generated/Model/LiveActivityColor.php @@ -0,0 +1,86 @@ + 'string', 'stepColors' => 'string[]', 'metrics' => '\ActivitySmith\Generated\Model\ActivityMetric[]', + 'message' => 'string', + 'icon' => '\ActivitySmith\Generated\Model\LiveActivityAlertIcon', + 'badge' => '\ActivitySmith\Generated\Model\LiveActivityAlertBadge', 'autoDismissSeconds' => 'int', 'autoDismissMinutes' => 'int' ]; @@ -94,6 +97,9 @@ class StreamContentState implements ModelInterface, ArrayAccess, \JsonSerializab 'stepColor' => null, 'stepColors' => null, 'metrics' => null, + 'message' => null, + 'icon' => null, + 'badge' => null, 'autoDismissSeconds' => null, 'autoDismissMinutes' => null ]; @@ -116,6 +122,9 @@ class StreamContentState implements ModelInterface, ArrayAccess, \JsonSerializab 'stepColor' => false, 'stepColors' => false, 'metrics' => false, + 'message' => false, + 'icon' => false, + 'badge' => false, 'autoDismissSeconds' => false, 'autoDismissMinutes' => false ]; @@ -218,6 +227,9 @@ public function isNullableSetToNull(string $property): bool 'stepColor' => 'step_color', 'stepColors' => 'step_colors', 'metrics' => 'metrics', + 'message' => 'message', + 'icon' => 'icon', + 'badge' => 'badge', 'autoDismissSeconds' => 'auto_dismiss_seconds', 'autoDismissMinutes' => 'auto_dismiss_minutes' ]; @@ -240,6 +252,9 @@ public function isNullableSetToNull(string $property): bool 'stepColor' => 'setStepColor', 'stepColors' => 'setStepColors', 'metrics' => 'setMetrics', + 'message' => 'setMessage', + 'icon' => 'setIcon', + 'badge' => 'setBadge', 'autoDismissSeconds' => 'setAutoDismissSeconds', 'autoDismissMinutes' => 'setAutoDismissMinutes' ]; @@ -262,6 +277,9 @@ public function isNullableSetToNull(string $property): bool 'stepColor' => 'getStepColor', 'stepColors' => 'getStepColors', 'metrics' => 'getMetrics', + 'message' => 'getMessage', + 'icon' => 'getIcon', + 'badge' => 'getBadge', 'autoDismissSeconds' => 'getAutoDismissSeconds', 'autoDismissMinutes' => 'getAutoDismissMinutes' ]; @@ -311,6 +329,7 @@ public function getModelName() public const TYPE_PROGRESS = 'progress'; public const TYPE_METRICS = 'metrics'; public const TYPE_STATS = 'stats'; + public const TYPE_ALERT = 'alert'; public const COLOR_LIME = 'lime'; public const COLOR_GREEN = 'green'; public const COLOR_CYAN = 'cyan'; @@ -320,6 +339,7 @@ public function getModelName() public const COLOR_RED = 'red'; public const COLOR_ORANGE = 'orange'; public const COLOR_YELLOW = 'yellow'; + public const COLOR_GRAY = 'gray'; public const STEP_COLOR_LIME = 'lime'; public const STEP_COLOR_GREEN = 'green'; public const STEP_COLOR_CYAN = 'cyan'; @@ -329,6 +349,7 @@ public function getModelName() public const STEP_COLOR_RED = 'red'; public const STEP_COLOR_ORANGE = 'orange'; public const STEP_COLOR_YELLOW = 'yellow'; + public const STEP_COLOR_GRAY = 'gray'; public const STEP_COLORS_LIME = 'lime'; public const STEP_COLORS_GREEN = 'green'; public const STEP_COLORS_CYAN = 'cyan'; @@ -338,6 +359,7 @@ public function getModelName() public const STEP_COLORS_RED = 'red'; public const STEP_COLORS_ORANGE = 'orange'; public const STEP_COLORS_YELLOW = 'yellow'; + public const STEP_COLORS_GRAY = 'gray'; /** * Gets allowable values of the enum @@ -351,6 +373,7 @@ public function getTypeAllowableValues() self::TYPE_PROGRESS, self::TYPE_METRICS, self::TYPE_STATS, + self::TYPE_ALERT, ]; } @@ -371,6 +394,7 @@ public function getColorAllowableValues() self::COLOR_RED, self::COLOR_ORANGE, self::COLOR_YELLOW, + self::COLOR_GRAY, ]; } @@ -391,6 +415,7 @@ public function getStepColorAllowableValues() self::STEP_COLOR_RED, self::STEP_COLOR_ORANGE, self::STEP_COLOR_YELLOW, + self::STEP_COLOR_GRAY, ]; } @@ -411,6 +436,7 @@ public function getStepColorsAllowableValues() self::STEP_COLORS_RED, self::STEP_COLORS_ORANGE, self::STEP_COLORS_YELLOW, + self::STEP_COLORS_GRAY, ]; } @@ -437,10 +463,13 @@ public function __construct(array $data = null) $this->setIfExists('value', $data ?? [], null); $this->setIfExists('upperLimit', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('color', $data ?? [], 'blue'); + $this->setIfExists('color', $data ?? [], null); $this->setIfExists('stepColor', $data ?? [], null); $this->setIfExists('stepColors', $data ?? [], null); $this->setIfExists('metrics', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('icon', $data ?? [], null); + $this->setIfExists('badge', $data ?? [], null); $this->setIfExists('autoDismissSeconds', $data ?? [], null); $this->setIfExists('autoDismissMinutes', $data ?? [], null); } @@ -526,6 +555,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'metrics', number of items must be greater than or equal to 1."; } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) < 1)) { + $invalidProperties[] = "invalid value for 'message', the character length must be bigger than or equal to 1."; + } + if (!is_null($this->container['autoDismissSeconds']) && ($this->container['autoDismissSeconds'] < 0)) { $invalidProperties[] = "invalid value for 'autoDismissSeconds', must be bigger than or equal to 0."; } @@ -806,7 +839,7 @@ public function getColor() /** * Sets color * - * @param string|null $color Optional. Accent color for the Live Activity. Defaults to blue. + * @param string|null $color Optional. Accent color for progress, segmented_progress, and metrics Live Activities. * * @return self */ @@ -937,6 +970,92 @@ public function setMetrics($metrics) return $this; } + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message Required for type=alert. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + + if ((mb_strlen($message) < 1)) { + throw new \InvalidArgumentException('invalid length for $message when calling StreamContentState., must be bigger than or equal to 1.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets icon + * + * @return \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon for type=alert. + * + * @return self + */ + public function setIcon($icon) + { + if (is_null($icon)) { + throw new \InvalidArgumentException('non-nullable icon cannot be null'); + } + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets badge + * + * @return \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null + */ + public function getBadge() + { + return $this->container['badge']; + } + + /** + * Sets badge + * + * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge for type=alert. + * + * @return self + */ + public function setBadge($badge) + { + if (is_null($badge)) { + throw new \InvalidArgumentException('non-nullable badge cannot be null'); + } + $this->container['badge'] = $badge; + + return $this; + } + /** * Gets autoDismissSeconds *