Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: updated Swagger API to latest version #71

Merged
merged 2 commits into from
Mar 18, 2021
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### Features
1. [#68](https://github.com/influxdata/influxdb-client-php/pull/68): Moved classes to their own file

### API
1. [#71](https://github.com/influxdata/influxdb-client-php/pull/71): Updated swagger to the latest version

## 1.11.0 [2021-03-05]

### Features
Expand Down
62 changes: 46 additions & 16 deletions src/InfluxDB2/Model/BucketRetentionRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.1.0
*
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.3.4
*/
Expand All @@ -29,8 +29,8 @@

namespace InfluxDB2\Model;

use \ArrayAccess;
use \InfluxDB2\ObjectSerializer;
use ArrayAccess;
use InfluxDB2\ObjectSerializer;

/**
* BucketRetentionRules Class Doc Comment
Expand Down Expand Up @@ -58,7 +58,8 @@ class BucketRetentionRules implements ModelInterface, ArrayAccess
*/
protected static $openAPITypes = [
'type' => 'string',
'every_seconds' => 'int'
'every_seconds' => 'int',
'shard_group_duration_seconds' => 'int'
];

/**
Expand All @@ -68,7 +69,8 @@ class BucketRetentionRules implements ModelInterface, ArrayAccess
*/
protected static $openAPIFormats = [
'type' => null,
'every_seconds' => 'int32'
'every_seconds' => 'int32',
'shard_group_duration_seconds' => 'int64'
];

/**
Expand Down Expand Up @@ -99,7 +101,8 @@ public static function openAPIFormats()
*/
protected static $attributeMap = [
'type' => 'type',
'every_seconds' => 'everySeconds'
'every_seconds' => 'everySeconds',
'shard_group_duration_seconds' => 'shardGroupDurationSeconds'
];

/**
Expand All @@ -109,7 +112,8 @@ public static function openAPIFormats()
*/
protected static $setters = [
'type' => 'setType',
'every_seconds' => 'setEverySeconds'
'every_seconds' => 'setEverySeconds',
'shard_group_duration_seconds' => 'setShardGroupDurationSeconds'
];

/**
Expand All @@ -119,7 +123,8 @@ public static function openAPIFormats()
*/
protected static $getters = [
'type' => 'getType',
'every_seconds' => 'getEverySeconds'
'every_seconds' => 'getEverySeconds',
'shard_group_duration_seconds' => 'getShardGroupDurationSeconds'
];

/**
Expand Down Expand Up @@ -164,9 +169,9 @@ public function getModelName()
}

const TYPE_EXPIRE = 'expire';





/**
* Gets allowable values of the enum
*
Expand All @@ -178,7 +183,7 @@ public function getTypeAllowableValues()
self::TYPE_EXPIRE,
];
}


/**
* Associative array for storing property values
Expand All @@ -197,6 +202,7 @@ public function __construct(array $data = null)
{
$this->container['type'] = isset($data['type']) ? $data['type'] : 'expire';
$this->container['every_seconds'] = isset($data['every_seconds']) ? $data['every_seconds'] : null;
$this->container['shard_group_duration_seconds'] = isset($data['shard_group_duration_seconds']) ? $data['shard_group_duration_seconds'] : null;
}

/**
Expand All @@ -222,8 +228,8 @@ public function listInvalidProperties()
if ($this->container['every_seconds'] === null) {
$invalidProperties[] = "'every_seconds' can't be null";
}
if (($this->container['every_seconds'] < 1)) {
$invalidProperties[] = "invalid value for 'every_seconds', must be bigger than or equal to 1.";
if (($this->container['every_seconds'] < 0)) {
$invalidProperties[] = "invalid value for 'every_seconds', must be bigger than or equal to 0.";
}

return $invalidProperties;
Expand Down Expand Up @@ -287,21 +293,45 @@ public function getEverySeconds()
/**
* Sets every_seconds
*
* @param int $every_seconds Duration in seconds for how long data will be kept in the database.
* @param int $every_seconds Duration in seconds for how long data will be kept in the database. 0 means infinite.
*
* @return $this
*/
public function setEverySeconds($every_seconds)
{

if (($every_seconds < 1)) {
throw new \InvalidArgumentException('invalid value for $every_seconds when calling BucketRetentionRules., must be bigger than or equal to 1.');
if (($every_seconds < 0)) {
throw new \InvalidArgumentException('invalid value for $every_seconds when calling BucketRetentionRules., must be bigger than or equal to 0.');
}

$this->container['every_seconds'] = $every_seconds;

return $this;
}

/**
* Gets shard_group_duration_seconds
*
* @return int|null
*/
public function getShardGroupDurationSeconds()
{
return $this->container['shard_group_duration_seconds'];
}

/**
* Sets shard_group_duration_seconds
*
* @param int|null $shard_group_duration_seconds Shard duration measured in seconds.
*
* @return $this
*/
public function setShardGroupDurationSeconds($shard_group_duration_seconds)
{
$this->container['shard_group_duration_seconds'] = $shard_group_duration_seconds;

return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
Expand Down
18 changes: 9 additions & 9 deletions src/InfluxDB2/Model/DateTimeLiteral.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.1.0
*
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.3.4
*/
Expand All @@ -29,8 +29,8 @@

namespace InfluxDB2\Model;

use \ArrayAccess;
use \InfluxDB2\ObjectSerializer;
use ArrayAccess;
use InfluxDB2\ObjectSerializer;

/**
* DateTimeLiteral Class Doc Comment
Expand Down Expand Up @@ -59,7 +59,7 @@ class DateTimeLiteral implements ModelInterface, ArrayAccess
*/
protected static $openAPITypes = [
'type' => 'string',
'value' => 'string'
'value' => '\DateTime'
];

/**
Expand All @@ -69,7 +69,7 @@ class DateTimeLiteral implements ModelInterface, ArrayAccess
*/
protected static $openAPIFormats = [
'type' => null,
'value' => null
'value' => 'date-time'
];

/**
Expand Down Expand Up @@ -164,9 +164,9 @@ public function getModelName()
return self::$openAPIModelName;
}







/**
* Associative array for storing property values
Expand Down Expand Up @@ -238,7 +238,7 @@ public function setType($type)
/**
* Gets value
*
* @return string|null
* @return \DateTime|null
*/
public function getValue()
{
Expand All @@ -248,7 +248,7 @@ public function getValue()
/**
* Sets value
*
* @param string|null $value value
* @param \DateTime|null $value value
*
* @return $this
*/
Expand Down