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.1.0/PHP';
protected $userAgent = 'OpenAPI-Generator/1.2.0/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.1.0' . PHP_EOL;
$report .= ' SDK Package Version: 1.2.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
38 changes: 19 additions & 19 deletions generated/Model/MetricValueUpdateResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MetricValueUpdateResponse implements ModelInterface, ArrayAccess, \JsonSer
* @var string[]
*/
protected static $openAPITypes = [
'metric' => '\ActivitySmith\Generated\Model\WidgetMetric'
'success' => 'bool'
];

/**
Expand All @@ -68,7 +68,7 @@ class MetricValueUpdateResponse implements ModelInterface, ArrayAccess, \JsonSer
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'metric' => null
'success' => null
];

/**
Expand All @@ -77,7 +77,7 @@ class MetricValueUpdateResponse implements ModelInterface, ArrayAccess, \JsonSer
* @var boolean[]
*/
protected static array $openAPINullables = [
'metric' => false
'success' => false
];

/**
Expand Down Expand Up @@ -166,7 +166,7 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $attributeMap = [
'metric' => 'metric'
'success' => 'success'
];

/**
Expand All @@ -175,7 +175,7 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $setters = [
'metric' => 'setMetric'
'success' => 'setSuccess'
];

/**
Expand All @@ -184,7 +184,7 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $getters = [
'metric' => 'getMetric'
'success' => 'getSuccess'
];

/**
Expand Down Expand Up @@ -244,7 +244,7 @@ public function getModelName()
*/
public function __construct(array $data = null)
{
$this->setIfExists('metric', $data ?? [], null);
$this->setIfExists('success', $data ?? [], null);
}

/**
Expand Down Expand Up @@ -274,8 +274,8 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if ($this->container['metric'] === null) {
$invalidProperties[] = "'metric' can't be null";
if ($this->container['success'] === null) {
$invalidProperties[] = "'success' can't be null";
}
return $invalidProperties;
}
Expand All @@ -293,28 +293,28 @@ public function valid()


/**
* Gets metric
* Gets success
*
* @return \ActivitySmith\Generated\Model\WidgetMetric
* @return bool
*/
public function getMetric()
public function getSuccess()
{
return $this->container['metric'];
return $this->container['success'];
}

/**
* Sets metric
* Sets success
*
* @param \ActivitySmith\Generated\Model\WidgetMetric $metric metric
* @param bool $success success
*
* @return self
*/
public function setMetric($metric)
public function setSuccess($success)
{
if (is_null($metric)) {
throw new \InvalidArgumentException('non-nullable metric cannot be null');
if (is_null($success)) {
throw new \InvalidArgumentException('non-nullable success cannot be null');
}
$this->container['metric'] = $metric;
$this->container['success'] = $success;

return $this;
}
Expand Down
62 changes: 17 additions & 45 deletions generated/Model/WidgetMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class WidgetMetric implements ModelInterface, ArrayAccess, \JsonSerializable
'unit' => 'string',
'unitSpacing' => '\ActivitySmith\Generated\Model\MetricUnitSpacing',
'format' => '\ActivitySmith\Generated\Model\MetricFormat',
'latestValue' => '\ActivitySmith\Generated\Model\WidgetMetricLatestValue',
'latestValue' => 'float',
'latestValueAt' => '\DateTime',
'createdAt' => '\DateTime',
'updatedAt' => '\DateTime'
Expand Down Expand Up @@ -101,12 +101,12 @@ class WidgetMetric implements ModelInterface, ArrayAccess, \JsonSerializable
'publicId' => false,
'key' => false,
'label' => false,
'currencyCode' => true,
'unit' => true,
'currencyCode' => false,
'unit' => false,
'unitSpacing' => false,
'format' => false,
'latestValue' => true,
'latestValueAt' => true,
'latestValue' => false,
'latestValueAt' => false,
'createdAt' => false,
'updatedAt' => false
];
Expand Down Expand Up @@ -547,22 +547,15 @@ public function getCurrencyCode()
public function setCurrencyCode($currencyCode)
{
if (is_null($currencyCode)) {
array_push($this->openAPINullablesSetToNull, 'currencyCode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('currencyCode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($currencyCode) && (mb_strlen($currencyCode) > 3)) {
throw new \InvalidArgumentException('non-nullable currencyCode cannot be null');
}
if ((mb_strlen($currencyCode) > 3)) {
throw new \InvalidArgumentException('invalid length for $currencyCode when calling WidgetMetric., must be smaller than or equal to 3.');
}
if (!is_null($currencyCode) && (mb_strlen($currencyCode) < 3)) {
if ((mb_strlen($currencyCode) < 3)) {
throw new \InvalidArgumentException('invalid length for $currencyCode when calling WidgetMetric., must be bigger than or equal to 3.');
}
if (!is_null($currencyCode) && (!preg_match("/^[A-Z]{3}$/", ObjectSerializer::toString($currencyCode)))) {
if ((!preg_match("/^[A-Z]{3}$/", ObjectSerializer::toString($currencyCode)))) {
throw new \InvalidArgumentException("invalid value for \$currencyCode when calling WidgetMetric., must conform to the pattern /^[A-Z]{3}$/.");
}

Expand Down Expand Up @@ -591,16 +584,9 @@ public function getUnit()
public function setUnit($unit)
{
if (is_null($unit)) {
array_push($this->openAPINullablesSetToNull, 'unit');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('unit', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($unit) && (mb_strlen($unit) > 16)) {
throw new \InvalidArgumentException('non-nullable unit cannot be null');
}
if ((mb_strlen($unit) > 16)) {
throw new \InvalidArgumentException('invalid length for $unit when calling WidgetMetric., must be smaller than or equal to 16.');
}

Expand Down Expand Up @@ -666,7 +652,7 @@ public function setFormat($format)
/**
* Gets latestValue
*
* @return \ActivitySmith\Generated\Model\WidgetMetricLatestValue
* @return float
*/
public function getLatestValue()
{
Expand All @@ -676,21 +662,14 @@ public function getLatestValue()
/**
* Sets latestValue
*
* @param \ActivitySmith\Generated\Model\WidgetMetricLatestValue $latestValue latestValue
* @param float $latestValue Latest metric value. Numeric formats return a number. String metrics return text.
*
* @return self
*/
public function setLatestValue($latestValue)
{
if (is_null($latestValue)) {
array_push($this->openAPINullablesSetToNull, 'latestValue');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('latestValue', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable latestValue cannot be null');
}
$this->container['latestValue'] = $latestValue;

Expand All @@ -717,14 +696,7 @@ public function getLatestValueAt()
public function setLatestValueAt($latestValueAt)
{
if (is_null($latestValueAt)) {
array_push($this->openAPINullablesSetToNull, 'latestValueAt');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('latestValueAt', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
throw new \InvalidArgumentException('non-nullable latestValueAt cannot be null');
}
$this->container['latestValueAt'] = $latestValueAt;

Expand Down
Loading