Skip to content
Closed
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
4 changes: 2 additions & 2 deletions generated/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions generated/Model/ActivityMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -273,6 +274,7 @@ public function getColorAllowableValues()
self::COLOR_RED,
self::COLOR_ORANGE,
self::COLOR_YELLOW,
self::COLOR_GRAY,
];
}

Expand Down
125 changes: 122 additions & 3 deletions generated/Model/ContentStateEnd.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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';
Expand All @@ -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';
Expand All @@ -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';
Expand All @@ -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
Expand All @@ -345,6 +367,7 @@ public function getTypeAllowableValues()
self::TYPE_PROGRESS,
self::TYPE_METRICS,
self::TYPE_STATS,
self::TYPE_ALERT,
];
}

Expand All @@ -365,6 +388,7 @@ public function getColorAllowableValues()
self::COLOR_RED,
self::COLOR_ORANGE,
self::COLOR_YELLOW,
self::COLOR_GRAY,
];
}

Expand All @@ -385,6 +409,7 @@ public function getStepColorAllowableValues()
self::STEP_COLOR_RED,
self::STEP_COLOR_ORANGE,
self::STEP_COLOR_YELLOW,
self::STEP_COLOR_GRAY,
];
}

Expand All @@ -405,6 +430,7 @@ public function getStepColorsAllowableValues()
self::STEP_COLORS_RED,
self::STEP_COLORS_ORANGE,
self::STEP_COLORS_YELLOW,
self::STEP_COLORS_GRAY,
];
}

Expand All @@ -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);
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*/
Expand Down
Loading