version 1.5
This commit is contained in:
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
/**
|
||||
* ApiException
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* Influx API Service
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use Psr\Http\Client\ClientExceptionInterface;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* ApiException Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ApiException extends RuntimeException
|
||||
{
|
||||
|
||||
/**
|
||||
* The HTTP body of the server response either as Json or string.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected $responseBody;
|
||||
|
||||
/**
|
||||
* The HTTP header of the server response.
|
||||
*
|
||||
* @var string[]|null
|
||||
*/
|
||||
protected $responseHeaders;
|
||||
|
||||
/**
|
||||
* The deserialized response object
|
||||
*
|
||||
* @var $responseObject;
|
||||
*/
|
||||
protected $responseObject;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param ClientExceptionInterface|null $previous The previous throwable used for the exception chaining.
|
||||
* @param string $message Error message
|
||||
* @param int $code HTTP status code
|
||||
* @param string[]|null $responseHeaders HTTP response header
|
||||
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string
|
||||
*/
|
||||
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null, $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
$this->responseHeaders = $responseHeaders;
|
||||
$this->responseBody = $responseBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the HTTP response header
|
||||
*
|
||||
* @return string[]|null HTTP response header
|
||||
*/
|
||||
public function getResponseHeaders()
|
||||
{
|
||||
return $this->responseHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the HTTP body of the server response either as Json or string
|
||||
*
|
||||
* @return mixed HTTP body of the server response either as \stdClass or string
|
||||
*/
|
||||
public function getResponseBody()
|
||||
{
|
||||
return $this->responseBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the deseralized response object (during deserialization)
|
||||
*
|
||||
* @param mixed $obj Deserialized response object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setResponseObject($obj)
|
||||
{
|
||||
$this->responseObject = $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the deseralized response object (during deserialization)
|
||||
*
|
||||
* @return mixed the deserialized response object
|
||||
*/
|
||||
public function getResponseObject()
|
||||
{
|
||||
return $this->responseObject;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
/**
|
||||
* Item for batching queue
|
||||
*/
|
||||
class BatchItem
|
||||
{
|
||||
/** @var BatchItemKey */
|
||||
public $key;
|
||||
/** @var string */
|
||||
public $data;
|
||||
|
||||
public function __construct($key, $data)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->data = $data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use InfluxDB2\Model\WritePrecision;
|
||||
|
||||
/**
|
||||
* Key for batch item
|
||||
*/
|
||||
class BatchItemKey
|
||||
{
|
||||
/** @var string */
|
||||
public $bucket;
|
||||
/** @var string */
|
||||
public $org;
|
||||
/** @var WritePrecision */
|
||||
public $precision;
|
||||
|
||||
public function __construct($bucket, $org, $precision)
|
||||
{
|
||||
$this->bucket = $bucket;
|
||||
$this->org = $org;
|
||||
$this->precision = $precision;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use Exception;
|
||||
use InfluxDB2\Model\HealthCheck;
|
||||
use InfluxDB2\Service\InvokableScriptsService;
|
||||
use InfluxDB2\Service\PingService;
|
||||
use ReflectionClass;
|
||||
use ReflectionException;
|
||||
use RuntimeException;
|
||||
|
||||
class Client
|
||||
{
|
||||
/**
|
||||
* Client version updated by: 'make release VERSION=1.5.0'
|
||||
*/
|
||||
const VERSION = '3.4.0';
|
||||
|
||||
public $options;
|
||||
public $closed = false;
|
||||
private $autoCloseable = array();
|
||||
|
||||
/**
|
||||
* Client constructor.
|
||||
*
|
||||
* Example how to create a client:
|
||||
*
|
||||
* client = new Client([
|
||||
* "url" => "http://localhost:8086",
|
||||
* "token" => "my-token",
|
||||
* "bucket" => "my-bucket",
|
||||
* "precision" => WritePrecision::NS,
|
||||
* "org" => "my-org",
|
||||
* "debug" => false,
|
||||
* "logFile" => "php://output",
|
||||
* "tags" => ['id' => '1234',
|
||||
* 'hostname' => '${env.Hostname}'],
|
||||
* "timeout" => 2,
|
||||
* "ipVersion" => 6,
|
||||
* ]);
|
||||
*
|
||||
* Client can be configured with following properties:
|
||||
*
|
||||
* - url: InfluxDB server API url (ex. http://localhost:8086).
|
||||
* - token: auth token
|
||||
* - bucket: destination bucket for writes
|
||||
* - org: organization bucket for writes
|
||||
* - precision: precision for the unix timestamps within the body line-protocol
|
||||
* - verifySSL: Turn on/off SSL certificate verification. Set to `false` to disable certificate verification.
|
||||
* - debug: enable verbose logging of http requests
|
||||
* - logFile: log output
|
||||
* - tags: default tags
|
||||
* - timeout: The number of seconds to wait while trying to connect to a server. Use 0 to wait indefinitely.
|
||||
* - proxy: Pass a string to specify an HTTP proxy, or an array to specify different proxies for different protocols.
|
||||
* - allow_redirects: Describes the redirect behavior for requests.
|
||||
* - ipVersion: Specifies which version of IP to use, supports 4 and 6 as possible values (UDP Writer).
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct(array $options)
|
||||
{
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write time series data into InfluxDB through the WriteApi.
|
||||
* $writeOptions = [
|
||||
* 'writeType' => methods of write (WriteType::SYNCHRONOUS - default, WriteType::BATCHING)
|
||||
* 'batchSize' => the number of data point to collect in batch
|
||||
* ]
|
||||
* @param array|null $writeOptions Array containing the write parameters (See above)
|
||||
* @param array|null $pointSettings Array of default tags
|
||||
* @return WriteApi
|
||||
*/
|
||||
public function createWriteApi(array $writeOptions = null, array $pointSettings = null): WriteApi
|
||||
{
|
||||
$writeApi = new WriteApi($this->options, $writeOptions, $pointSettings);
|
||||
$this->autoCloseable[] = $writeApi;
|
||||
return $writeApi;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return UdpWriter
|
||||
* @throws Exception
|
||||
*/
|
||||
public function createUdpWriter(): UdpWriter
|
||||
{
|
||||
return new UdpWriter($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Query client.
|
||||
*
|
||||
* @return QueryApi
|
||||
*/
|
||||
public function createQueryApi(): QueryApi
|
||||
{
|
||||
return new QueryApi($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an InvokableScripts API instance.
|
||||
*
|
||||
* @return InvokableScriptsApi
|
||||
*/
|
||||
public function createInvokableScriptsApi(): InvokableScriptsApi
|
||||
{
|
||||
/** @var InvokableScriptsService $service */
|
||||
$service = $this->createService(InvokableScriptsService::class);
|
||||
return new InvokableScriptsApi($this->options, $service);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the health of an instance.
|
||||
*
|
||||
* @deprecated Use `ping()` instead
|
||||
* @return HealthCheck
|
||||
*/
|
||||
public function health(): HealthCheck
|
||||
{
|
||||
return (new HealthApi($this->options))->health();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the status of InfluxDB instance and version of InfluxDB.
|
||||
*
|
||||
* @return array with response headers: 'X-Influxdb-Build', 'X-Influxdb-Version'
|
||||
*/
|
||||
public function ping(): array
|
||||
{
|
||||
$service = $this->createService(PingService::class);
|
||||
$pingWithHttpInfo = $service->getPingWithHttpInfo();
|
||||
return $pingWithHttpInfo[2];
|
||||
}
|
||||
|
||||
/**
|
||||
* Close all connections into InfluxDB
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
$this->closed = true;
|
||||
|
||||
foreach ($this->autoCloseable as $ac) {
|
||||
$ac->close();
|
||||
}
|
||||
$this->autoCloseable = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the instance of api service
|
||||
*
|
||||
* @param $serviceClass
|
||||
* @return object service instance
|
||||
*/
|
||||
public function createService($serviceClass)
|
||||
{
|
||||
try {
|
||||
$class = new ReflectionClass($serviceClass);
|
||||
$args = array(new DefaultApi($this->options));
|
||||
return $class->newInstanceArgs($args);
|
||||
} catch (ReflectionException $e) {
|
||||
throw new RuntimeException($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,429 @@
|
||||
<?php
|
||||
/**
|
||||
* Configuration
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* Influx API Service
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
/**
|
||||
* Configuration Class Doc Comment
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Configuration
|
||||
{
|
||||
private static $defaultConfiguration;
|
||||
|
||||
/**
|
||||
* Associate array to store API key(s)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $apiKeys = [];
|
||||
|
||||
/**
|
||||
* Associate array to store API prefix (e.g. Bearer)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $apiKeyPrefixes = [];
|
||||
|
||||
/**
|
||||
* Access token for OAuth
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $accessToken = '';
|
||||
|
||||
/**
|
||||
* Username for HTTP basic authentication
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $username = '';
|
||||
|
||||
/**
|
||||
* Password for HTTP basic authentication
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $password = '';
|
||||
|
||||
/**
|
||||
* The host
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $host = 'http://localhost/api/v2';
|
||||
|
||||
/**
|
||||
* User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $userAgent = 'OpenAPI-Generator/1.0.0/PHP';
|
||||
|
||||
/**
|
||||
* Debug switch (default set to false)
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $debug = false;
|
||||
|
||||
/**
|
||||
* Debug file location (log to STDOUT by default)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $debugFile = 'php://output';
|
||||
|
||||
/**
|
||||
* Debug file location (log to STDOUT by default)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $tempFolderPath;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->tempFolderPath = sys_get_temp_dir();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets API key
|
||||
*
|
||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||
* @param string $key API key or token
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setApiKey($apiKeyIdentifier, $key)
|
||||
{
|
||||
$this->apiKeys[$apiKeyIdentifier] = $key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets API key
|
||||
*
|
||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||
*
|
||||
* @return string API key or token
|
||||
*/
|
||||
public function getApiKey($apiKeyIdentifier)
|
||||
{
|
||||
return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the prefix for API key (e.g. Bearer)
|
||||
*
|
||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||
* @param string $prefix API key prefix, e.g. Bearer
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
|
||||
{
|
||||
$this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets API key prefix
|
||||
*
|
||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getApiKeyPrefix($apiKeyIdentifier)
|
||||
{
|
||||
return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the access token for OAuth
|
||||
*
|
||||
* @param string $accessToken Token for OAuth
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccessToken($accessToken)
|
||||
{
|
||||
$this->accessToken = $accessToken;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the access token for OAuth
|
||||
*
|
||||
* @return string Access token for OAuth
|
||||
*/
|
||||
public function getAccessToken()
|
||||
{
|
||||
return $this->accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the username for HTTP basic authentication
|
||||
*
|
||||
* @param string $username Username for HTTP basic authentication
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUsername($username)
|
||||
{
|
||||
$this->username = $username;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the username for HTTP basic authentication
|
||||
*
|
||||
* @return string Username for HTTP basic authentication
|
||||
*/
|
||||
public function getUsername()
|
||||
{
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the password for HTTP basic authentication
|
||||
*
|
||||
* @param string $password Password for HTTP basic authentication
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPassword($password)
|
||||
{
|
||||
$this->password = $password;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the password for HTTP basic authentication
|
||||
*
|
||||
* @return string Password for HTTP basic authentication
|
||||
*/
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the host
|
||||
*
|
||||
* @param string $host Host
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setHost($host)
|
||||
{
|
||||
$this->host = $host;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the host
|
||||
*
|
||||
* @return string Host
|
||||
*/
|
||||
public function getHost()
|
||||
{
|
||||
return $this->host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user agent of the api client
|
||||
*
|
||||
* @param string $userAgent the user agent of the api client
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return $this
|
||||
*/
|
||||
public function setUserAgent($userAgent)
|
||||
{
|
||||
if (!is_string($userAgent)) {
|
||||
throw new \InvalidArgumentException('User-agent must be a string.');
|
||||
}
|
||||
|
||||
$this->userAgent = $userAgent;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user agent of the api client
|
||||
*
|
||||
* @return string user agent
|
||||
*/
|
||||
public function getUserAgent()
|
||||
{
|
||||
return $this->userAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets debug flag
|
||||
*
|
||||
* @param bool $debug Debug flag
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDebug($debug)
|
||||
{
|
||||
$this->debug = $debug;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the debug flag
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getDebug()
|
||||
{
|
||||
return $this->debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the debug file
|
||||
*
|
||||
* @param string $debugFile Debug file
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDebugFile($debugFile)
|
||||
{
|
||||
$this->debugFile = $debugFile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the debug file
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDebugFile()
|
||||
{
|
||||
return $this->debugFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the temp folder path
|
||||
*
|
||||
* @param string $tempFolderPath Temp folder path
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTempFolderPath($tempFolderPath)
|
||||
{
|
||||
$this->tempFolderPath = $tempFolderPath;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the temp folder path
|
||||
*
|
||||
* @return string Temp folder path
|
||||
*/
|
||||
public function getTempFolderPath()
|
||||
{
|
||||
return $this->tempFolderPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default configuration instance
|
||||
*
|
||||
* @return Configuration
|
||||
*/
|
||||
public static function getDefaultConfiguration()
|
||||
{
|
||||
if (self::$defaultConfiguration === null) {
|
||||
self::$defaultConfiguration = new Configuration();
|
||||
}
|
||||
|
||||
return self::$defaultConfiguration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the detault configuration instance
|
||||
*
|
||||
* @param Configuration $config An instance of the Configuration Object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function setDefaultConfiguration(Configuration $config)
|
||||
{
|
||||
self::$defaultConfiguration = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the essential information for debugging
|
||||
*
|
||||
* @return string The report for debugging
|
||||
*/
|
||||
public static function toDebugReport()
|
||||
{
|
||||
$report = 'PHP SDK (InfluxDB2) Debug Report:' . PHP_EOL;
|
||||
$report .= ' OS: ' . php_uname() . PHP_EOL;
|
||||
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
|
||||
$report .= ' OpenAPI Spec Version: 0.1.0' . PHP_EOL;
|
||||
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
|
||||
|
||||
return $report;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get API key (with prefix if set)
|
||||
*
|
||||
* @param string $apiKeyIdentifier name of apikey
|
||||
*
|
||||
* @return string API key with the prefix
|
||||
*/
|
||||
public function getApiKeyWithPrefix($apiKeyIdentifier)
|
||||
{
|
||||
$prefix = $this->getApiKeyPrefix($apiKeyIdentifier);
|
||||
$apiKey = $this->getApiKey($apiKeyIdentifier);
|
||||
|
||||
if ($apiKey === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($prefix === null) {
|
||||
$keyWithPrefix = $apiKey;
|
||||
} else {
|
||||
$keyWithPrefix = $prefix . ' ' . $apiKey;
|
||||
}
|
||||
|
||||
return $keyWithPrefix;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use Http\Client\Common\Plugin;
|
||||
use Http\Client\Common\PluginClient;
|
||||
use Http\Client\Exception\HttpException;
|
||||
use Http\Discovery\ClassDiscovery;
|
||||
use Http\Discovery\Psr17FactoryDiscovery;
|
||||
use Http\Discovery\Psr18ClientDiscovery;
|
||||
use InfluxDB2\Internal\DebugHttpPlugin;
|
||||
use InvalidArgumentException;
|
||||
use Psr\Http\Client\ClientExceptionInterface;
|
||||
use Psr\Http\Client\ClientInterface;
|
||||
use Psr\Http\Message\RequestFactoryInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\StreamFactoryInterface;
|
||||
use Psr\Http\Message\UriFactoryInterface;
|
||||
|
||||
class DefaultApi
|
||||
{
|
||||
public $options;
|
||||
/**
|
||||
* @var ClientInterface
|
||||
*/
|
||||
public $http;
|
||||
|
||||
/**
|
||||
* @var RequestFactoryInterface
|
||||
*/
|
||||
private $requestFactory;
|
||||
|
||||
/**
|
||||
* @var StreamFactoryInterface
|
||||
*/
|
||||
private $streamFactory;
|
||||
|
||||
/**
|
||||
* @var UriFactoryInterface
|
||||
*/
|
||||
private $uriFactory;
|
||||
|
||||
/**
|
||||
* DefaultApi constructor.
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct(array $options)
|
||||
{
|
||||
$this->options = $options;
|
||||
|
||||
$guzzleHttp = "GuzzleHttp\Client";
|
||||
if ($this->options['httpClient'] ?? false) {
|
||||
$client = $this->options['httpClient'];
|
||||
} elseif (ClassDiscovery::safeClassExists($guzzleHttp)) {
|
||||
$client = new $guzzleHttp([
|
||||
'timeout' => $this->options['timeout'] ?? 10,
|
||||
'verify' => $this->options['verifySSL'] ?? true,
|
||||
'proxy' => $this->options['proxy'] ?? null
|
||||
]);
|
||||
} else {
|
||||
$client = Psr18ClientDiscovery::find();
|
||||
}
|
||||
$this->http = $this->configuredClient($client);
|
||||
|
||||
$this->requestFactory = Psr17FactoryDiscovery::findRequestFactory();
|
||||
$this->streamFactory = Psr17FactoryDiscovery::findStreamFactory();
|
||||
$this->uriFactory = Psr17FactoryDiscovery::findUriFactory();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $payload
|
||||
* @param $uriPath
|
||||
* @param $queryParams
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function post($payload, $uriPath, $queryParams): ResponseInterface
|
||||
{
|
||||
return $this->request($payload, $uriPath, $queryParams, 'POST');
|
||||
}
|
||||
|
||||
public function get($payload, $uriPath, $queryParams): ResponseInterface
|
||||
{
|
||||
return $this->request($payload, $uriPath, $queryParams, 'GET');
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure client with defaults - UserAgent, Token, Redirects...
|
||||
*
|
||||
* @param ClientInterface $client to configure
|
||||
* @return ClientInterface
|
||||
*/
|
||||
public function configuredClient(ClientInterface $client): ClientInterface
|
||||
{
|
||||
$plugins = [
|
||||
new Plugin\HeaderDefaultsPlugin([
|
||||
'User-Agent' => 'influxdb-client-php/' . Client::VERSION,
|
||||
'Authorization' => "Token {$this->options['token']}",
|
||||
]),
|
||||
];
|
||||
|
||||
$allow_redirects = $this->options['allow_redirects'] ?? true;
|
||||
if ($allow_redirects) {
|
||||
$plugins[] = new Plugin\RedirectPlugin(is_array($allow_redirects) ? $allow_redirects : []);
|
||||
}
|
||||
if ($this->options['debug'] ?? false) {
|
||||
$plugins[] = new DebugHttpPlugin($this->options);
|
||||
}
|
||||
return new PluginClient($client, $plugins);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create HTTP request.
|
||||
*
|
||||
* @param string $method The HTTP method associated with the request.
|
||||
* @param string $uriPath The URI associated with the request.
|
||||
* @param string $payload String content with which to populate the stream.
|
||||
* @param array<string, string> $headers Request headers
|
||||
* @param array<string, string> $queryParams The query string to use with the new instance.
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function createRequest(
|
||||
string $method,
|
||||
string $uriPath,
|
||||
string $payload,
|
||||
array $headers,
|
||||
array $queryParams
|
||||
): RequestInterface {
|
||||
$uri = $this->uriFactory
|
||||
->createUri($this->options['url'])
|
||||
->withPath($uriPath)
|
||||
->withQuery(http_build_query($queryParams, '', '&', PHP_QUERY_RFC3986));
|
||||
$request = $this->requestFactory->createRequest($method, $uri);
|
||||
$request = $request->withBody($this->streamFactory->createStream($payload));
|
||||
foreach ($headers as $header => $value) {
|
||||
$request = $request->withAddedHeader($header, $value);
|
||||
}
|
||||
return $request->withUri($uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a HTTP request and returns a HTTP response.
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function sendRequest(RequestInterface $request): ResponseInterface
|
||||
{
|
||||
try {
|
||||
// execute HTTP call
|
||||
$response = $this->http->sendRequest($request);
|
||||
|
||||
$statusCode = $response->getStatusCode();
|
||||
if ($statusCode < 200 || $statusCode > 299) {
|
||||
$responseBody = $response->getBody()->getContents();
|
||||
$jsonBody = json_decode($responseBody);
|
||||
throw new ApiException(
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)(%s)',
|
||||
$statusCode,
|
||||
$request->getUri(),
|
||||
$jsonBody ? ": {$jsonBody->message}" : ''
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$responseBody
|
||||
);
|
||||
}
|
||||
return $response;
|
||||
} catch (HttpException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null,
|
||||
$e
|
||||
);
|
||||
} catch (ClientExceptionInterface $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
null,
|
||||
null,
|
||||
$e
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected function check($key, $value)
|
||||
{
|
||||
if ((!isset($value) || trim($value) === '')) {
|
||||
$options = implode(', ', array_map(
|
||||
function ($v, $k) {
|
||||
if (is_array($v)) {
|
||||
return $k . '[]=' . implode('&' . $k . '[]=', $v);
|
||||
} else {
|
||||
return $k . '=' . $v;
|
||||
}
|
||||
},
|
||||
$this->options,
|
||||
array_keys($this->options)
|
||||
));
|
||||
throw new InvalidArgumentException("The '{$key}' should be defined as argument or default option: {$options}");
|
||||
}
|
||||
}
|
||||
|
||||
private function request($payload, $uriPath, $queryParams, $method): ResponseInterface
|
||||
{
|
||||
$headers = [
|
||||
'Content-Type' => 'application/json'
|
||||
];
|
||||
$request = $this->createRequest($method, $uriPath, $payload, $headers, $queryParams);
|
||||
|
||||
return $this->sendRequest($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the message with required severity.
|
||||
*
|
||||
* @param string $level LOG level
|
||||
* @param string $message Message to log
|
||||
* @param array $options Client options with logFile.
|
||||
* @return void
|
||||
*/
|
||||
public static function log(string $level, string $message, array $options): void
|
||||
{
|
||||
$logDate = date('H:i:s d-M-Y');
|
||||
file_put_contents($options["logFile"] ?? "php://output", "[$logDate]: [$level] - $message" . PHP_EOL, FILE_APPEND);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
/**
|
||||
* Class FluxColumn represents a column header specification of FluxTable.
|
||||
* @package InfluxDB2
|
||||
*/
|
||||
class FluxColumn
|
||||
{
|
||||
public $index;
|
||||
public $label;
|
||||
public $dataType;
|
||||
public $group;
|
||||
public $defaultValue;
|
||||
|
||||
/**
|
||||
* FluxColumn constructor.
|
||||
* @param $index int column number
|
||||
* @param $label string column label
|
||||
* @param $dataType string data type
|
||||
* @param $group bool is group column
|
||||
* @param $defaultValue string default empty value
|
||||
*/
|
||||
public function __construct($index = null, $label = null, $dataType = null, $group = null, $defaultValue = null)
|
||||
{
|
||||
$this->index = $index;
|
||||
$this->label = $label;
|
||||
$this->dataType = $dataType;
|
||||
$this->group = $group;
|
||||
$this->defaultValue = $defaultValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,315 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
/**
|
||||
* Class FluxCsvParser us used to construct FluxResult from CSV.
|
||||
* @package InfluxDB2
|
||||
*/
|
||||
class FluxCsvParser
|
||||
{
|
||||
private const ANNOTATION_DATATYPE = '#datatype';
|
||||
private const ANNOTATION_GROUP = '#group';
|
||||
private const ANNOTATION_DEFAULT = '#default';
|
||||
private const ANNOTATIONS = [self::ANNOTATION_DATATYPE, self::ANNOTATION_GROUP, self::ANNOTATION_DEFAULT];
|
||||
|
||||
/* @var $variable FluxTable[] */
|
||||
public $tables;
|
||||
|
||||
private $response;
|
||||
private $stream;
|
||||
private $responseMode;
|
||||
private $resource;
|
||||
|
||||
/* @var $variable int */
|
||||
private $tableIndex = 0;
|
||||
private $tableId;
|
||||
|
||||
private $startNewTable;
|
||||
|
||||
/** @var FluxTable */
|
||||
private $table;
|
||||
private $groups = [];
|
||||
|
||||
private $parsingStateError;
|
||||
|
||||
public $closed;
|
||||
|
||||
/** @var FluxColumn[] */
|
||||
private $fluxColumns;
|
||||
|
||||
/**
|
||||
* FluxCsvParser constructor.
|
||||
* @param $response mixed response to by parsed
|
||||
* @param $stream bool use streaming
|
||||
* @param $responseMode string metadata expected in response ('full', 'only_names')
|
||||
*/
|
||||
public function __construct($response, bool $stream = false, string $responseMode = "full")
|
||||
{
|
||||
$this->response = is_string($response) ? null : $response;
|
||||
$this->resource = is_string($response) ? $this->stringToStream($response) : $response->detach();
|
||||
$this->stream = $stream;
|
||||
$this->responseMode = $responseMode;
|
||||
$this->tableIndex = 0;
|
||||
if (!$stream) {
|
||||
$this->tables = [];
|
||||
}
|
||||
|
||||
$this->closed = false;
|
||||
}
|
||||
|
||||
private function stringToStream(string $string)
|
||||
{
|
||||
$stream = fopen('php://memory', 'r+');
|
||||
fwrite($stream, $string);
|
||||
rewind($stream);
|
||||
return $stream;
|
||||
}
|
||||
|
||||
public function parse()
|
||||
{
|
||||
iterator_to_array($this->each());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function each()
|
||||
{
|
||||
try {
|
||||
while (($csv = fgetcsv($this->resource)) !== false) {
|
||||
if (!isset($csv) || (count($csv) == 1 && $csv[0] == null)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//skip empty csv row
|
||||
if ($csv[1] == 'error' && $csv[2] == 'reference') {
|
||||
$this->parsingStateError = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
# Throw InfluxException with error response
|
||||
if ($this->parsingStateError) {
|
||||
$error = $csv[1];
|
||||
$referenceValue = $csv[2];
|
||||
throw new FluxQueryError(
|
||||
$error,
|
||||
!isset($referenceValue) || trim($referenceValue) === '' ? 0 : $referenceValue
|
||||
);
|
||||
}
|
||||
|
||||
$result = $this->parseLine($csv);
|
||||
|
||||
if ($result instanceof FluxRecord) {
|
||||
yield $result;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
$this->closeConnection();
|
||||
}
|
||||
}
|
||||
|
||||
private function parseLine(array $csv)
|
||||
{
|
||||
$token = $csv[0];
|
||||
# start new table
|
||||
if ((in_array($token, self::ANNOTATIONS) && !$this->startNewTable)
|
||||
|| ($this->responseMode == "only_names" && is_null($this->table))) {
|
||||
# Return already parsed DataFrame
|
||||
$this->startNewTable = true;
|
||||
$this->table = new FluxTable();
|
||||
$this->groups = [];
|
||||
|
||||
if (!$this->stream) {
|
||||
$this->tables[$this->tableIndex] = $this->table;
|
||||
}
|
||||
|
||||
$this->tableIndex += 1;
|
||||
$this->tableId = -1;
|
||||
} elseif ($this->table == null) {
|
||||
throw new FluxCsvParserException('Unable to parse CSV response. FluxTable definition was not found.');
|
||||
}
|
||||
|
||||
if (self::ANNOTATION_DATATYPE == $token) {
|
||||
$this->addDataTypes($this->table, $csv);
|
||||
} elseif (self::ANNOTATION_GROUP == $token) {
|
||||
$this->groups = $csv;
|
||||
} elseif (self::ANNOTATION_DEFAULT == $token) {
|
||||
$this->addDefaultEmptyValues($this->table, $csv);
|
||||
} else {
|
||||
return $this->parseValues($csv);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private function parseRecord(int $tableIndex, FluxTable $table, array $csv)
|
||||
{
|
||||
$record = new FluxRecord($tableIndex);
|
||||
foreach ($table->columns as $fluxColumn) {
|
||||
$columnName = $fluxColumn->label;
|
||||
$strVal = $csv[$fluxColumn->index + 1];
|
||||
$value = $this->toValue($strVal, $fluxColumn);
|
||||
$record->values[$columnName] = $value;
|
||||
$record->row[] = $value;
|
||||
}
|
||||
return $record;
|
||||
}
|
||||
|
||||
private function addDataTypes(FluxTable $table, array $data_types)
|
||||
{
|
||||
for ($i = 1; $i < sizeof($data_types); ++$i) {
|
||||
$columnDef = new FluxColumn();
|
||||
$columnDef->index = $i - 1;
|
||||
$columnDef->dataType = $data_types[$i];
|
||||
array_push($table->columns, $columnDef);
|
||||
}
|
||||
}
|
||||
|
||||
private function addGroups(FluxTable $table, $csv)
|
||||
{
|
||||
$i = 1;
|
||||
foreach ($table->columns as &$column) {
|
||||
$column->group = $csv[$i] == 'true';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
private function addDefaultEmptyValues(FluxTable $table, $defaultValues)
|
||||
{
|
||||
$i = 1;
|
||||
foreach ($table->columns as &$column) {
|
||||
$column->defaultValue = $defaultValues[$i];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
private function addColumnNamesAndTags(FluxTable $table, array $csv)
|
||||
{
|
||||
$i = 1;
|
||||
|
||||
foreach ($table->columns as $column) {
|
||||
$column->label = $csv[$i];
|
||||
$i++;
|
||||
}
|
||||
|
||||
$duplicates = array();
|
||||
foreach (array_count_values($csv) as $label => $count) {
|
||||
if ($count > 1) {
|
||||
$duplicates[] = $label;
|
||||
}
|
||||
}
|
||||
|
||||
if (count($duplicates) > 0) {
|
||||
$duplicatesStr = implode(", ", $duplicates);
|
||||
print "The response contains columns with duplicated names: {$duplicatesStr}\n";
|
||||
print "You should use the 'FluxRecord.row' to access your data instead of 'FluxRecord.values'.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function parseValues(array $csv)
|
||||
{
|
||||
# parse column names
|
||||
if ($this->startNewTable) {
|
||||
if ($this->responseMode == 'only_names' && empty($this->table->columns)) {
|
||||
$this->addDataTypes($this->table, array_fill(0, sizeof($csv), 'string'));
|
||||
$this->groups = array_fill(0, sizeof($csv), 'false');
|
||||
}
|
||||
$this->addGroups($this->table, $this->groups);
|
||||
$this->addColumnNamesAndTags($this->table, $csv);
|
||||
$this->startNewTable = false;
|
||||
return null;
|
||||
}
|
||||
|
||||
$currentId = (int)$csv[2];
|
||||
if ($this->tableId == -1) {
|
||||
$this->tableId = $currentId;
|
||||
}
|
||||
|
||||
if ($this->tableId != $currentId) {
|
||||
# create new table with previous column headers settings
|
||||
$this->fluxColumns = $this->table->columns;
|
||||
$this->table = new FluxTable();
|
||||
|
||||
foreach ($this->fluxColumns as &$column) {
|
||||
array_push($this->table->columns, $column);
|
||||
}
|
||||
|
||||
if (!$this->stream) {
|
||||
$this->tables[$this->tableIndex] = $this->table;
|
||||
}
|
||||
|
||||
$this->tableIndex += 1;
|
||||
$this->tableId = $currentId;
|
||||
}
|
||||
|
||||
$fluxRecord = $this->parseRecord($this->tableIndex - 1, $this->table, $csv);
|
||||
|
||||
if ($this->stream) {
|
||||
return $fluxRecord;
|
||||
} else {
|
||||
$fluxTable = $this->tables[$this->tableIndex - 1];
|
||||
array_push($fluxTable->records, $fluxRecord);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private function toValue($strVal, FluxColumn $column)
|
||||
{
|
||||
if ($strVal == null || $strVal == '') {
|
||||
$defaultValue = $column->defaultValue;
|
||||
if (empty($defaultValue)) {
|
||||
return null;
|
||||
}
|
||||
return $this->toValue($defaultValue, $column);
|
||||
}
|
||||
|
||||
if ('string' == $column->dataType) {
|
||||
return $strVal;
|
||||
}
|
||||
|
||||
if ('boolean' == $column->dataType) {
|
||||
return "true" == $strVal;
|
||||
}
|
||||
|
||||
if ('unsignedLong' == $column->dataType || 'long' == $column->dataType) {
|
||||
return intval($strVal);
|
||||
}
|
||||
|
||||
if ('double' == $column->dataType) {
|
||||
if ($strVal == '+Inf') {
|
||||
return INF;
|
||||
}
|
||||
if ($strVal == '-Inf') {
|
||||
return -INF;
|
||||
}
|
||||
return (double)$strVal;
|
||||
}
|
||||
|
||||
if ('base64Binary' == $column->dataType) {
|
||||
return base64_decode($strVal);
|
||||
}
|
||||
|
||||
if ('dateTime:RFC3339' == $column->dataType || 'dateTime:RFC3339Nano' == $column->dataType) {
|
||||
##todo nanoseconds precission, php datetime is only in microseconds precision
|
||||
return $strVal;
|
||||
}
|
||||
|
||||
return $strVal;
|
||||
}
|
||||
|
||||
private function closeConnection()
|
||||
{
|
||||
# Close CSV Parser
|
||||
$this->closed = true;
|
||||
if (isset($this->response)) {
|
||||
$this->response->close();
|
||||
}
|
||||
if (is_resource($this->resource)) {
|
||||
fclose($this->resource);
|
||||
}
|
||||
|
||||
unset($this->response);
|
||||
unset($this->resource);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
class FluxCsvParserException extends \RuntimeException
|
||||
{
|
||||
/**
|
||||
* FluxCsvParserException constructor.
|
||||
* @param string $string
|
||||
*/
|
||||
public function __construct(string $string)
|
||||
{
|
||||
parent::__construct($string);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class FluxQueryError extends RuntimeException
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use ArrayAccess;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* Class FluxRecord is a tuple of values. Each record in the table represents a single point in the series.
|
||||
* @see http://bit.ly/flux-spec#record
|
||||
* @package InfluxDB2
|
||||
*/
|
||||
class FluxRecord implements ArrayAccess
|
||||
{
|
||||
public $table;
|
||||
public $values;
|
||||
public $row;
|
||||
|
||||
/**
|
||||
* FluxRecord constructor.
|
||||
* @param $table int table index
|
||||
* @param $values array array with record values, key is the column name
|
||||
*/
|
||||
public function __construct($table, $values = null, $row = null)
|
||||
{
|
||||
$this->table = $table;
|
||||
$this->values = $values;
|
||||
$this->row = $row;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed record value for column named '_start'
|
||||
*/
|
||||
public function getStart()
|
||||
{
|
||||
return $this->getRecordValue('_start');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed record value for column named '_stop'
|
||||
*/
|
||||
public function getStop()
|
||||
{
|
||||
return $this->getRecordValue('_stop');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed record value for column named '_time'
|
||||
*/
|
||||
public function getTime()
|
||||
{
|
||||
return $this->getRecordValue('_time');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed record value for column named '_value'
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->getRecordValue('_value');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed record value for column named '_field'
|
||||
*/
|
||||
public function getField()
|
||||
{
|
||||
return $this->getRecordValue('_field');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed record value for column named '_measurement'
|
||||
*/
|
||||
public function getMeasurement(): string
|
||||
{
|
||||
return $this->getRecordValue('_measurement');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get record value.
|
||||
*
|
||||
* @param $column string name of column to get
|
||||
* @return mixed the value of column
|
||||
* @throws RuntimeException when the record doesn't contain required column
|
||||
*/
|
||||
private function getRecordValue(string $column)
|
||||
{
|
||||
if (array_key_exists($column, $this->values)) {
|
||||
return $this->values[$column];
|
||||
}
|
||||
|
||||
$array_keys = join(", ", array_keys($this->values));
|
||||
|
||||
throw new RuntimeException("Record doesn't contain column named '$column'. Columns: '$array_keys'.");
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->values[] = $value;
|
||||
} else {
|
||||
$this->values[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->values[$offset]);
|
||||
}
|
||||
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->values[$offset]);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->values[$offset] ?? null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
# The MIT License
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
namespace InfluxDB2;
|
||||
|
||||
/**
|
||||
* This class represents the table structure of the Flux CSV Response.
|
||||
* @link http://bit.ly/flux-spec#table
|
||||
*/
|
||||
class FluxTable
|
||||
{
|
||||
/** @var FluxColumn[] */
|
||||
public $columns;
|
||||
/** @var FluxRecord[] */
|
||||
public $records;
|
||||
|
||||
/**
|
||||
* FluxTable constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->records = [];
|
||||
$this->columns = [];
|
||||
}
|
||||
|
||||
public function getGroupKey()
|
||||
{
|
||||
return array_values(array_filter($this->columns, function ($column) {
|
||||
return $column->group;
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
* ApiException
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use \Exception;
|
||||
|
||||
/**
|
||||
* ApiException Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class HeaderSelector
|
||||
{
|
||||
|
||||
/**
|
||||
* @param string[] $accept
|
||||
* @param string[] $contentTypes
|
||||
* @return array
|
||||
*/
|
||||
public function selectHeaders($accept, $contentTypes)
|
||||
{
|
||||
$headers = [];
|
||||
|
||||
$accept = $this->selectAcceptHeader($accept);
|
||||
if ($accept !== null) {
|
||||
$headers['Accept'] = $accept;
|
||||
}
|
||||
|
||||
$headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes);
|
||||
return $headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $accept
|
||||
* @return array
|
||||
*/
|
||||
public function selectHeadersForMultipart($accept)
|
||||
{
|
||||
$headers = $this->selectHeaders($accept, []);
|
||||
|
||||
unset($headers['Content-Type']);
|
||||
return $headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the header 'Accept' based on an array of Accept provided
|
||||
*
|
||||
* @param string[] $accept Array of header
|
||||
*
|
||||
* @return string Accept (e.g. application/json)
|
||||
*/
|
||||
private function selectAcceptHeader($accept)
|
||||
{
|
||||
if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) {
|
||||
return null;
|
||||
} elseif (preg_grep("/application\/json/i", $accept)) {
|
||||
return 'application/json';
|
||||
} else {
|
||||
return implode(',', $accept);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the content type based on an array of content-type provided
|
||||
*
|
||||
* @param string[] $contentType Array fo content-type
|
||||
*
|
||||
* @return string Content-Type (e.g. application/json)
|
||||
*/
|
||||
private function selectContentTypeHeader($contentType)
|
||||
{
|
||||
if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) {
|
||||
return 'application/json';
|
||||
} elseif (preg_grep("/application\/json/i", $contentType)) {
|
||||
return 'application/json';
|
||||
} else {
|
||||
return implode(',', $contentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use Exception;
|
||||
use InfluxDB2\Model\HealthCheck;
|
||||
|
||||
class HealthApi extends DefaultApi
|
||||
{
|
||||
/**
|
||||
* HealthApi constructor.
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct(array $options)
|
||||
{
|
||||
parent::__construct($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the health of an instance.
|
||||
*
|
||||
* @return HealthCheck
|
||||
*/
|
||||
public function health(): HealthCheck
|
||||
{
|
||||
try {
|
||||
$response = $this->get('', "/health", []);
|
||||
return ObjectSerializer::deserialize($response->getBody()->getContents(), '\InfluxDB2\Model\HealthCheck');
|
||||
} catch (Exception $e) {
|
||||
return new HealthCheck([
|
||||
"name" => "influxdb",
|
||||
"message" => $e->getMessage(),
|
||||
"status" => "fail",
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2\Internal;
|
||||
|
||||
use Http\Client\Common\Plugin;
|
||||
use Http\Promise\Promise;
|
||||
use InfluxDB2\DefaultApi;
|
||||
use Psr\Http\Message\MessageInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class DebugHttpPlugin implements Plugin
|
||||
{
|
||||
private $options;
|
||||
|
||||
public function __construct(array $options)
|
||||
{
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
|
||||
{
|
||||
// -> Request
|
||||
DefaultApi::log("DEBUG", "-> "
|
||||
. $request->getMethod()
|
||||
. " "
|
||||
. $request->getUri(), $this->options);
|
||||
$this->headers($request, "->");
|
||||
|
||||
return $next($request)->then(function (ResponseInterface $response) {
|
||||
// <- Response
|
||||
DefaultApi::log("DEBUG", "<- HTTP/"
|
||||
. $response->getProtocolVersion()
|
||||
. " "
|
||||
. $response->getStatusCode()
|
||||
. " "
|
||||
. $response->getReasonPhrase(), $this->options);
|
||||
$this->headers($response, "<-");
|
||||
return $response;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Log HTTP headers.
|
||||
*
|
||||
* @param MessageInterface $message HTTP request or response.
|
||||
* @param string $prefix LOG prefix
|
||||
* @return void
|
||||
*/
|
||||
private function headers(MessageInterface $message, string $prefix): void
|
||||
{
|
||||
foreach ($message->getHeaders() as $key => $values) {
|
||||
$value = implode(', ', $values);
|
||||
if (strcasecmp($key, 'Authorization') == 0) {
|
||||
$value = '***';
|
||||
}
|
||||
DefaultApi::log("DEBUG", $prefix . " $key: " . $value, $this->options);
|
||||
}
|
||||
DefaultApi::log("DEBUG", $prefix . " Body: " . $message->getBody(), $this->options);
|
||||
$message->getBody()->rewind();
|
||||
}
|
||||
}
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB2;
|
||||
|
||||
use InfluxDB2\Model\Script;
|
||||
use InfluxDB2\Model\ScriptCreateRequest;
|
||||
use InfluxDB2\Model\ScriptInvocationParams;
|
||||
use InfluxDB2\Model\ScriptUpdateRequest;
|
||||
use InfluxDB2\Service\InvokableScriptsService;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
/**
|
||||
* Use API invokable scripts to create custom InfluxDB API endpoints that query, process, and shape data.
|
||||
*
|
||||
* API invokable scripts let you assign scripts to API endpoints and then execute them as standard REST operations
|
||||
* in InfluxDB Cloud.
|
||||
*
|
||||
* @package InfluxDB2
|
||||
*/
|
||||
class InvokableScriptsApi extends DefaultApi
|
||||
{
|
||||
private $service;
|
||||
|
||||
/**
|
||||
* InvokableScriptsApi constructor.
|
||||
*
|
||||
* @param array $options default array options
|
||||
* @param InvokableScriptsService $service HTTP API for Invokable Scripts
|
||||
*/
|
||||
public function __construct(array $options, InvokableScriptsService $service)
|
||||
{
|
||||
parent::__construct($options);
|
||||
$this->service = $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a script.
|
||||
*
|
||||
* @param ScriptCreateRequest $createRequest The script to create.
|
||||
* @return Script The created script.
|
||||
*/
|
||||
public function createScript(ScriptCreateRequest $createRequest): Script
|
||||
{
|
||||
return $this->service->postScripts($createRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a script.
|
||||
*
|
||||
* @param string $scriptId The ID of the script to update. (required)
|
||||
* @param ScriptUpdateRequest $updateRequest Script updates to apply (required)
|
||||
* @return Script The updated script.
|
||||
*/
|
||||
public function updateScript(string $scriptId, ScriptUpdateRequest $updateRequest): Script
|
||||
{
|
||||
return $this->service->patchScriptsID($scriptId, $updateRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a script.
|
||||
*
|
||||
* @param string $scriptId The ID of the script to delete. (required)
|
||||
* @return void
|
||||
*/
|
||||
public function deleteScript(string $scriptId)
|
||||
{
|
||||
$this->service->deleteScriptsID($scriptId);
|
||||
}
|
||||
|
||||
/**
|
||||
* List scripts.
|
||||
*
|
||||
* @param int|null $limit The number of scripts to return.
|
||||
* @param int|null $offset The offset for pagination.
|
||||
*
|
||||
* @return Script[]
|
||||
*/
|
||||
public function findScripts(int $limit = null, int $offset = null): array
|
||||
{
|
||||
return $this->service->getScripts($limit, $offset)->getScripts();
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoke synchronously a script and return result as a FluxTable[].
|
||||
*
|
||||
* @param string $scriptId The ID of the script to invoke. (required)
|
||||
* @param array<string,object>|null $params Represent key/value pairs parameters to be injected into script
|
||||
* @return FluxTable[]
|
||||
*/
|
||||
public function invokeScript(string $scriptId, array $params = null): ?array
|
||||
{
|
||||
$response = $this->invokeScriptRaw($scriptId, $params);
|
||||
|
||||
$parser = new FluxCsvParser($response, false, 'only_names');
|
||||
$parser->parse();
|
||||
|
||||
return $parser->tables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoke synchronously a script and return result as a stream of FluxRecord.
|
||||
*
|
||||
* @param string $scriptId The ID of the script to invoke. (required)
|
||||
* @param array<string,object>|null $params Represent key/value pairs parameters to be injected into script
|
||||
* @return FluxCsvParser generator of FluxRecords
|
||||
*/
|
||||
public function invokeScriptStream(string $scriptId, array $params = null): FluxCsvParser
|
||||
{
|
||||
$invocation_params = new ScriptInvocationParams();
|
||||
$invocation_params->setParams($params);
|
||||
|
||||
$response = $this->_invokeScript($invocation_params, $scriptId);
|
||||
|
||||
return new FluxCsvParser($response, true, 'only_names');
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoke synchronously a script and return result as a String.
|
||||
*
|
||||
* @param string $scriptId The ID of the script to invoke. (required)
|
||||
* @param array|null $params Represent key/value pairs parameters to be injected into script
|
||||
* @return string
|
||||
*/
|
||||
public function invokeScriptRaw(string $scriptId, array $params = null): ?string
|
||||
{
|
||||
$invocation_params = new ScriptInvocationParams();
|
||||
$invocation_params->setParams($params);
|
||||
|
||||
$response = $this->_invokeScript($invocation_params, $scriptId);
|
||||
|
||||
return $response->getContents();
|
||||
}
|
||||
|
||||
private function _invokeScript(ScriptInvocationParams $invocation_params, string $scriptId): StreamInterface
|
||||
{
|
||||
return $this->post($invocation_params->__toString(), "/api/v2/scripts/{$scriptId}/invoke", [])->getBody();
|
||||
}
|
||||
}
|
||||
+299
@@ -0,0 +1,299 @@
|
||||
<?php
|
||||
/**
|
||||
* ASTResponse
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* ASTResponse Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Contains the AST for the supplied Flux query
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ASTResponse implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'ASTResponse';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'ast' => '\InfluxDB2\Model\Package'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'ast' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'ast' => 'ast'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'ast' => 'setAst'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'ast' => 'getAst'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['ast'] = isset($data['ast']) ? $data['ast'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 ast
|
||||
*
|
||||
* @return \InfluxDB2\Model\Package|null
|
||||
*/
|
||||
public function getAst()
|
||||
{
|
||||
return $this->container['ast'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets ast
|
||||
*
|
||||
* @param \InfluxDB2\Model\Package|null $ast ast
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAst($ast)
|
||||
{
|
||||
$this->container['ast'] = $ast;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+331
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
/**
|
||||
* AddResourceMemberRequestBody
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AddResourceMemberRequestBody Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AddResourceMemberRequestBody implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AddResourceMemberRequestBody';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => null,
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['id'] === null) {
|
||||
$invalidProperties[] = "'id' can't be null";
|
||||
}
|
||||
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 id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string $id The ID of the user to add to the resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name The name of the user to add to the resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
/**
|
||||
* AnalyzeQueryResponse
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AnalyzeQueryResponse Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AnalyzeQueryResponse implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AnalyzeQueryResponse';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'errors' => '\InfluxDB2\Model\AnalyzeQueryResponseErrors[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'errors' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'errors' => 'errors'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'errors' => 'setErrors'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'errors' => 'getErrors'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['errors'] = isset($data['errors']) ? $data['errors'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 errors
|
||||
*
|
||||
* @return \InfluxDB2\Model\AnalyzeQueryResponseErrors[]|null
|
||||
*/
|
||||
public function getErrors()
|
||||
{
|
||||
return $this->container['errors'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets errors
|
||||
*
|
||||
* @param \InfluxDB2\Model\AnalyzeQueryResponseErrors[]|null $errors errors
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setErrors($errors)
|
||||
{
|
||||
$this->container['errors'] = $errors;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+388
@@ -0,0 +1,388 @@
|
||||
<?php
|
||||
/**
|
||||
* AnalyzeQueryResponseErrors
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AnalyzeQueryResponseErrors Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AnalyzeQueryResponseErrors implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AnalyzeQueryResponse_errors';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'line' => 'int',
|
||||
'column' => 'int',
|
||||
'character' => 'int',
|
||||
'message' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'line' => 'int32',
|
||||
'column' => 'int32',
|
||||
'character' => 'int32',
|
||||
'message' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'line' => 'line',
|
||||
'column' => 'column',
|
||||
'character' => 'character',
|
||||
'message' => 'message'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'line' => 'setLine',
|
||||
'column' => 'setColumn',
|
||||
'character' => 'setCharacter',
|
||||
'message' => 'setMessage'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'line' => 'getLine',
|
||||
'column' => 'getColumn',
|
||||
'character' => 'getCharacter',
|
||||
'message' => 'getMessage'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['line'] = isset($data['line']) ? $data['line'] : null;
|
||||
$this->container['column'] = isset($data['column']) ? $data['column'] : null;
|
||||
$this->container['character'] = isset($data['character']) ? $data['character'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 line
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getLine()
|
||||
{
|
||||
return $this->container['line'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets line
|
||||
*
|
||||
* @param int|null $line line
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLine($line)
|
||||
{
|
||||
$this->container['line'] = $line;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets column
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->container['column'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets column
|
||||
*
|
||||
* @param int|null $column column
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setColumn($column)
|
||||
{
|
||||
$this->container['column'] = $column;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets character
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getCharacter()
|
||||
{
|
||||
return $this->container['character'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets character
|
||||
*
|
||||
* @param int|null $character character
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCharacter($character)
|
||||
{
|
||||
$this->container['character'] = $character;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
*
|
||||
* @param string|null $message message
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* ArrayExpression
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* ArrayExpression Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Used to create and directly specify the elements of an array object
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ArrayExpression extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'ArrayExpression';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'elements' => '\InfluxDB2\Model\Expression[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'elements' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'elements' => 'elements'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'elements' => 'setElements'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'elements' => 'getElements'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['elements'] = isset($data['elements']) ? $data['elements'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets elements
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression[]|null
|
||||
*/
|
||||
public function getElements()
|
||||
{
|
||||
return $this->container['elements'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets elements
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression[]|null $elements Elements of the array
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setElements($elements)
|
||||
{
|
||||
$this->container['elements'] = $elements;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+562
@@ -0,0 +1,562 @@
|
||||
<?php
|
||||
/**
|
||||
* Authorization
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Authorization Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Authorization extends AuthorizationUpdateRequest
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Authorization';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'created_at' => '\DateTime',
|
||||
'updated_at' => '\DateTime',
|
||||
'org_id' => 'string',
|
||||
'permissions' => '\InfluxDB2\Model\Permission[]',
|
||||
'id' => 'string',
|
||||
'token' => 'string',
|
||||
'user_id' => 'string',
|
||||
'user' => 'string',
|
||||
'org' => 'string',
|
||||
'links' => '\InfluxDB2\Model\AuthorizationLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'created_at' => 'date-time',
|
||||
'updated_at' => 'date-time',
|
||||
'org_id' => null,
|
||||
'permissions' => null,
|
||||
'id' => null,
|
||||
'token' => null,
|
||||
'user_id' => null,
|
||||
'user' => null,
|
||||
'org' => null,
|
||||
'links' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'created_at' => 'createdAt',
|
||||
'updated_at' => 'updatedAt',
|
||||
'org_id' => 'orgID',
|
||||
'permissions' => 'permissions',
|
||||
'id' => 'id',
|
||||
'token' => 'token',
|
||||
'user_id' => 'userID',
|
||||
'user' => 'user',
|
||||
'org' => 'org',
|
||||
'links' => 'links'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'created_at' => 'setCreatedAt',
|
||||
'updated_at' => 'setUpdatedAt',
|
||||
'org_id' => 'setOrgId',
|
||||
'permissions' => 'setPermissions',
|
||||
'id' => 'setId',
|
||||
'token' => 'setToken',
|
||||
'user_id' => 'setUserId',
|
||||
'user' => 'setUser',
|
||||
'org' => 'setOrg',
|
||||
'links' => 'setLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'created_at' => 'getCreatedAt',
|
||||
'updated_at' => 'getUpdatedAt',
|
||||
'org_id' => 'getOrgId',
|
||||
'permissions' => 'getPermissions',
|
||||
'id' => 'getId',
|
||||
'token' => 'getToken',
|
||||
'user_id' => 'getUserId',
|
||||
'user' => 'getUser',
|
||||
'org' => 'getOrg',
|
||||
'links' => 'getLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null;
|
||||
$this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null;
|
||||
$this->container['org_id'] = isset($data['org_id']) ? $data['org_id'] : null;
|
||||
$this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null;
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['token'] = isset($data['token']) ? $data['token'] : null;
|
||||
$this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null;
|
||||
$this->container['user'] = isset($data['user']) ? $data['user'] : null;
|
||||
$this->container['org'] = isset($data['org']) ? $data['org'] : null;
|
||||
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 created_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getCreatedAt()
|
||||
{
|
||||
return $this->container['created_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets created_at
|
||||
*
|
||||
* @param \DateTime|null $created_at created_at
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreatedAt($created_at)
|
||||
{
|
||||
$this->container['created_at'] = $created_at;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets updated_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getUpdatedAt()
|
||||
{
|
||||
return $this->container['updated_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets updated_at
|
||||
*
|
||||
* @param \DateTime|null $updated_at updated_at
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUpdatedAt($updated_at)
|
||||
{
|
||||
$this->container['updated_at'] = $updated_at;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets org_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOrgId()
|
||||
{
|
||||
return $this->container['org_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org_id
|
||||
*
|
||||
* @param string|null $org_id The ID of the organization.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrgId($org_id)
|
||||
{
|
||||
$this->container['org_id'] = $org_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets permissions
|
||||
*
|
||||
* @return \InfluxDB2\Model\Permission[]|null
|
||||
*/
|
||||
public function getPermissions()
|
||||
{
|
||||
return $this->container['permissions'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets permissions
|
||||
*
|
||||
* @param \InfluxDB2\Model\Permission[]|null $permissions A list of permissions for an authorization. An authorization must have at least one permission.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPermissions($permissions)
|
||||
{
|
||||
$this->container['permissions'] = $permissions;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets token
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getToken()
|
||||
{
|
||||
return $this->container['token'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets token
|
||||
*
|
||||
* @param string|null $token The API token for authenticating InfluxDB API and CLI requests.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setToken($token)
|
||||
{
|
||||
$this->container['token'] = $token;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUserId()
|
||||
{
|
||||
return $this->container['user_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user_id
|
||||
*
|
||||
* @param string|null $user_id The ID of the user that created and owns the token.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUserId($user_id)
|
||||
{
|
||||
$this->container['user_id'] = $user_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->container['user'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user
|
||||
*
|
||||
* @param string|null $user The name of the user that created and owns the token.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUser($user)
|
||||
{
|
||||
$this->container['user'] = $user;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets org
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOrg()
|
||||
{
|
||||
return $this->container['org'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org
|
||||
*
|
||||
* @param string|null $org The name of the organization that the token is scoped to.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrg($org)
|
||||
{
|
||||
$this->container['org'] = $org;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets links
|
||||
*
|
||||
* @return \InfluxDB2\Model\AuthorizationLinks|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\AuthorizationLinks|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+328
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* AuthorizationLinks
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AuthorizationLinks Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AuthorizationLinks implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Authorization_links';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'self' => 'string',
|
||||
'user' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'self' => 'uri',
|
||||
'user' => 'uri'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'self' => 'self',
|
||||
'user' => 'user'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'self' => 'setSelf',
|
||||
'user' => 'setUser'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'self' => 'getSelf',
|
||||
'user' => 'getUser'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['self'] = isset($data['self']) ? $data['self'] : null;
|
||||
$this->container['user'] = isset($data['user']) ? $data['user'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 self
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSelf()
|
||||
{
|
||||
return $this->container['self'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets self
|
||||
*
|
||||
* @param string|null $self URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSelf($self)
|
||||
{
|
||||
$this->container['self'] = $self;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->container['user'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user
|
||||
*
|
||||
* @param string|null $user URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUser($user)
|
||||
{
|
||||
$this->container['user'] = $user;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+352
@@ -0,0 +1,352 @@
|
||||
<?php
|
||||
/**
|
||||
* AuthorizationPostRequest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AuthorizationPostRequest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AuthorizationPostRequest extends AuthorizationUpdateRequest
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AuthorizationPostRequest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'org_id' => 'string',
|
||||
'user_id' => 'string',
|
||||
'permissions' => '\InfluxDB2\Model\Permission[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'org_id' => null,
|
||||
'user_id' => null,
|
||||
'permissions' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'org_id' => 'orgID',
|
||||
'user_id' => 'userID',
|
||||
'permissions' => 'permissions'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'org_id' => 'setOrgId',
|
||||
'user_id' => 'setUserId',
|
||||
'permissions' => 'setPermissions'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'org_id' => 'getOrgId',
|
||||
'user_id' => 'getUserId',
|
||||
'permissions' => 'getPermissions'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['org_id'] = isset($data['org_id']) ? $data['org_id'] : null;
|
||||
$this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null;
|
||||
$this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 org_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOrgId()
|
||||
{
|
||||
return $this->container['org_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org_id
|
||||
*
|
||||
* @param string|null $org_id The ID of the organization that owns the authorization.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrgId($org_id)
|
||||
{
|
||||
$this->container['org_id'] = $org_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUserId()
|
||||
{
|
||||
return $this->container['user_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user_id
|
||||
*
|
||||
* @param string|null $user_id The ID of the user that the authorization is scoped to.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUserId($user_id)
|
||||
{
|
||||
$this->container['user_id'] = $user_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets permissions
|
||||
*
|
||||
* @return \InfluxDB2\Model\Permission[]|null
|
||||
*/
|
||||
public function getPermissions()
|
||||
{
|
||||
return $this->container['permissions'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets permissions
|
||||
*
|
||||
* @param \InfluxDB2\Model\Permission[]|null $permissions A list of permissions for an authorization. An authorization must have at least one permission.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPermissions($permissions)
|
||||
{
|
||||
$this->container['permissions'] = $permissions;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+360
@@ -0,0 +1,360 @@
|
||||
<?php
|
||||
/**
|
||||
* AuthorizationUpdateRequest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AuthorizationUpdateRequest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AuthorizationUpdateRequest implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AuthorizationUpdateRequest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'status' => 'string',
|
||||
'description' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'status' => null,
|
||||
'description' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'status' => 'status',
|
||||
'description' => 'description'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'status' => 'setStatus',
|
||||
'description' => 'setDescription'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'status' => 'getStatus',
|
||||
'description' => 'getDescription'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const STATUS_ACTIVE = 'active';
|
||||
const STATUS_INACTIVE = 'inactive';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getStatusAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::STATUS_ACTIVE,
|
||||
self::STATUS_INACTIVE,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['status'] = isset($data['status']) ? $data['status'] : 'active';
|
||||
$this->container['description'] = isset($data['description']) ? $data['description'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
$allowedValues = $this->getStatusAllowableValues();
|
||||
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'status', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 status
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
*
|
||||
* @param string|null $status Status of the token. If `inactive`, requests using the token will be rejected.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$allowedValues = $this->getStatusAllowableValues();
|
||||
if (!is_null($status) && !in_array($status, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'status', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets description
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->container['description'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets description
|
||||
*
|
||||
* @param string|null $description A description of the token.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->container['description'] = $description;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+328
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* Authorizations
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Authorizations Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Authorizations implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Authorizations';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'links' => '\InfluxDB2\Model\Links',
|
||||
'authorizations' => '\InfluxDB2\Model\Authorization[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'links' => null,
|
||||
'authorizations' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'links' => 'links',
|
||||
'authorizations' => 'authorizations'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'links' => 'setLinks',
|
||||
'authorizations' => 'setAuthorizations'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'links' => 'getLinks',
|
||||
'authorizations' => 'getAuthorizations'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
$this->container['authorizations'] = isset($data['authorizations']) ? $data['authorizations'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 links
|
||||
*
|
||||
* @return \InfluxDB2\Model\Links|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\Links|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets authorizations
|
||||
*
|
||||
* @return \InfluxDB2\Model\Authorization[]|null
|
||||
*/
|
||||
public function getAuthorizations()
|
||||
{
|
||||
return $this->container['authorizations'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets authorizations
|
||||
*
|
||||
* @param \InfluxDB2\Model\Authorization[]|null $authorizations authorizations
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAuthorizations($authorizations)
|
||||
{
|
||||
$this->container['authorizations'] = $authorizations;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,335 @@
|
||||
<?php
|
||||
/**
|
||||
* Axes
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Axes Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description The viewport for a View's visualizations
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Axes implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Axes';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'x' => '\InfluxDB2\Model\Axis',
|
||||
'y' => '\InfluxDB2\Model\Axis'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'x' => null,
|
||||
'y' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'x' => 'x',
|
||||
'y' => 'y'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'x' => 'setX',
|
||||
'y' => 'setY'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'x' => 'getX',
|
||||
'y' => 'getY'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['x'] = isset($data['x']) ? $data['x'] : null;
|
||||
$this->container['y'] = isset($data['y']) ? $data['y'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['x'] === null) {
|
||||
$invalidProperties[] = "'x' can't be null";
|
||||
}
|
||||
if ($this->container['y'] === null) {
|
||||
$invalidProperties[] = "'y' can't be null";
|
||||
}
|
||||
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 x
|
||||
*
|
||||
* @return \InfluxDB2\Model\Axis
|
||||
*/
|
||||
public function getX()
|
||||
{
|
||||
return $this->container['x'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets x
|
||||
*
|
||||
* @param \InfluxDB2\Model\Axis $x x
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setX($x)
|
||||
{
|
||||
$this->container['x'] = $x;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets y
|
||||
*
|
||||
* @return \InfluxDB2\Model\Axis
|
||||
*/
|
||||
public function getY()
|
||||
{
|
||||
return $this->container['y'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets y
|
||||
*
|
||||
* @param \InfluxDB2\Model\Axis $y y
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setY($y)
|
||||
{
|
||||
$this->container['y'] = $y;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,483 @@
|
||||
<?php
|
||||
/**
|
||||
* Axis
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Axis Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Axis used in a visualization.
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Axis implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Axis';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'bounds' => 'string[]',
|
||||
'label' => 'string',
|
||||
'prefix' => 'string',
|
||||
'suffix' => 'string',
|
||||
'base' => 'string',
|
||||
'scale' => '\InfluxDB2\Model\AxisScale'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'bounds' => null,
|
||||
'label' => null,
|
||||
'prefix' => null,
|
||||
'suffix' => null,
|
||||
'base' => null,
|
||||
'scale' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'bounds' => 'bounds',
|
||||
'label' => 'label',
|
||||
'prefix' => 'prefix',
|
||||
'suffix' => 'suffix',
|
||||
'base' => 'base',
|
||||
'scale' => 'scale'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'bounds' => 'setBounds',
|
||||
'label' => 'setLabel',
|
||||
'prefix' => 'setPrefix',
|
||||
'suffix' => 'setSuffix',
|
||||
'base' => 'setBase',
|
||||
'scale' => 'setScale'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'bounds' => 'getBounds',
|
||||
'label' => 'getLabel',
|
||||
'prefix' => 'getPrefix',
|
||||
'suffix' => 'getSuffix',
|
||||
'base' => 'getBase',
|
||||
'scale' => 'getScale'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const BASE_EMPTY = '';
|
||||
const BASE__2 = '2';
|
||||
const BASE__10 = '10';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getBaseAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::BASE_EMPTY,
|
||||
self::BASE__2,
|
||||
self::BASE__10,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['bounds'] = isset($data['bounds']) ? $data['bounds'] : null;
|
||||
$this->container['label'] = isset($data['label']) ? $data['label'] : null;
|
||||
$this->container['prefix'] = isset($data['prefix']) ? $data['prefix'] : null;
|
||||
$this->container['suffix'] = isset($data['suffix']) ? $data['suffix'] : null;
|
||||
$this->container['base'] = isset($data['base']) ? $data['base'] : null;
|
||||
$this->container['scale'] = isset($data['scale']) ? $data['scale'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
$allowedValues = $this->getBaseAllowableValues();
|
||||
if (!is_null($this->container['base']) && !in_array($this->container['base'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'base', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 bounds
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getBounds()
|
||||
{
|
||||
return $this->container['bounds'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bounds
|
||||
*
|
||||
* @param string[]|null $bounds The extents of the axis in the form [lower, upper]. Clients determine whether bounds are inclusive or exclusive of their limits.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBounds($bounds)
|
||||
{
|
||||
$this->container['bounds'] = $bounds;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets label
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->container['label'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets label
|
||||
*
|
||||
* @param string|null $label Description of the axis.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabel($label)
|
||||
{
|
||||
$this->container['label'] = $label;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets prefix
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getPrefix()
|
||||
{
|
||||
return $this->container['prefix'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets prefix
|
||||
*
|
||||
* @param string|null $prefix Label prefix for formatting axis values.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPrefix($prefix)
|
||||
{
|
||||
$this->container['prefix'] = $prefix;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets suffix
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSuffix()
|
||||
{
|
||||
return $this->container['suffix'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets suffix
|
||||
*
|
||||
* @param string|null $suffix Label suffix for formatting axis values.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSuffix($suffix)
|
||||
{
|
||||
$this->container['suffix'] = $suffix;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets base
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getBase()
|
||||
{
|
||||
return $this->container['base'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets base
|
||||
*
|
||||
* @param string|null $base Radix for formatting axis values.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBase($base)
|
||||
{
|
||||
$allowedValues = $this->getBaseAllowableValues();
|
||||
if (!is_null($base) && !in_array($base, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'base', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['base'] = $base;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets scale
|
||||
*
|
||||
* @return \InfluxDB2\Model\AxisScale|null
|
||||
*/
|
||||
public function getScale()
|
||||
{
|
||||
return $this->container['scale'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets scale
|
||||
*
|
||||
* @param \InfluxDB2\Model\AxisScale|null $scale scale
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setScale($scale)
|
||||
{
|
||||
$this->container['scale'] = $scale;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* AxisScale
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AxisScale Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Scale is the axis formatting scale. Supported: "log", "linear"
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AxisScale
|
||||
{
|
||||
/**
|
||||
* Possible values of this enum
|
||||
*/
|
||||
const LOG = 'log';
|
||||
const LINEAR = 'linear';
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getAllowableEnumValues()
|
||||
{
|
||||
return [
|
||||
self::LOG,
|
||||
self::LINEAR,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* BadStatement
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BadStatement Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description A placeholder for statements for which no correct statement nodes can be created
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BadStatement extends Statement
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BadStatement';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'text' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'text' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'text' => 'text'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'text' => 'setText'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'text' => 'getText'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['text'] = isset($data['text']) ? $data['text'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets text
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getText()
|
||||
{
|
||||
return $this->container['text'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets text
|
||||
*
|
||||
* @param string|null $text Raw source text
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setText($text)
|
||||
{
|
||||
$this->container['text'] = $text;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1252
File diff suppressed because it is too large
Load Diff
+383
@@ -0,0 +1,383 @@
|
||||
<?php
|
||||
/**
|
||||
* BinaryExpression
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BinaryExpression Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description uses binary operators to act on two operands in an expression
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BinaryExpression extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BinaryExpression';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'operator' => 'string',
|
||||
'left' => '\InfluxDB2\Model\Expression',
|
||||
'right' => '\InfluxDB2\Model\Expression'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'operator' => null,
|
||||
'left' => null,
|
||||
'right' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'operator' => 'operator',
|
||||
'left' => 'left',
|
||||
'right' => 'right'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'operator' => 'setOperator',
|
||||
'left' => 'setLeft',
|
||||
'right' => 'setRight'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'operator' => 'getOperator',
|
||||
'left' => 'getLeft',
|
||||
'right' => 'getRight'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['operator'] = isset($data['operator']) ? $data['operator'] : null;
|
||||
$this->container['left'] = isset($data['left']) ? $data['left'] : null;
|
||||
$this->container['right'] = isset($data['right']) ? $data['right'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets operator
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOperator()
|
||||
{
|
||||
return $this->container['operator'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets operator
|
||||
*
|
||||
* @param string|null $operator operator
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOperator($operator)
|
||||
{
|
||||
$this->container['operator'] = $operator;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets left
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getLeft()
|
||||
{
|
||||
return $this->container['left'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets left
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $left left
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLeft($left)
|
||||
{
|
||||
$this->container['left'] = $left;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets right
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getRight()
|
||||
{
|
||||
return $this->container['right'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets right
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $right right
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRight($right)
|
||||
{
|
||||
$this->container['right'] = $right;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* Block
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Block Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description A set of statements
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Block extends Node
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Block';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'body' => '\InfluxDB2\Model\Statement[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'body' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'body' => 'body'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'body' => 'setBody'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'body' => 'getBody'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['body'] = isset($data['body']) ? $data['body'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets body
|
||||
*
|
||||
* @return \InfluxDB2\Model\Statement[]|null
|
||||
*/
|
||||
public function getBody()
|
||||
{
|
||||
return $this->container['body'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets body
|
||||
*
|
||||
* @param \InfluxDB2\Model\Statement[]|null $body Block body
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBody($body)
|
||||
{
|
||||
$this->container['body'] = $body;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* BooleanLiteral
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BooleanLiteral Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Represents boolean values
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BooleanLiteral extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BooleanLiteral';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'value' => 'bool'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'value' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'value' => 'value'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'value' => 'setValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'value' => 'getValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['value'] = isset($data['value']) ? $data['value'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets value
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->container['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value
|
||||
*
|
||||
* @param bool|null $value value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->container['value'] = $value;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,666 @@
|
||||
<?php
|
||||
/**
|
||||
* Bucket
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Bucket Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Bucket implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Bucket';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'links' => '\InfluxDB2\Model\BucketLinks',
|
||||
'id' => 'string',
|
||||
'type' => 'string',
|
||||
'name' => 'string',
|
||||
'description' => 'string',
|
||||
'org_id' => 'string',
|
||||
'rp' => 'string',
|
||||
'schema_type' => '\InfluxDB2\Model\SchemaType',
|
||||
'created_at' => '\DateTime',
|
||||
'updated_at' => '\DateTime',
|
||||
'retention_rules' => '\InfluxDB2\Model\BucketRetentionRules[]',
|
||||
'labels' => '\InfluxDB2\Model\Label[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'links' => null,
|
||||
'id' => null,
|
||||
'type' => null,
|
||||
'name' => null,
|
||||
'description' => null,
|
||||
'org_id' => null,
|
||||
'rp' => null,
|
||||
'schema_type' => null,
|
||||
'created_at' => 'date-time',
|
||||
'updated_at' => 'date-time',
|
||||
'retention_rules' => null,
|
||||
'labels' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'links' => 'links',
|
||||
'id' => 'id',
|
||||
'type' => 'type',
|
||||
'name' => 'name',
|
||||
'description' => 'description',
|
||||
'org_id' => 'orgID',
|
||||
'rp' => 'rp',
|
||||
'schema_type' => 'schemaType',
|
||||
'created_at' => 'createdAt',
|
||||
'updated_at' => 'updatedAt',
|
||||
'retention_rules' => 'retentionRules',
|
||||
'labels' => 'labels'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'links' => 'setLinks',
|
||||
'id' => 'setId',
|
||||
'type' => 'setType',
|
||||
'name' => 'setName',
|
||||
'description' => 'setDescription',
|
||||
'org_id' => 'setOrgId',
|
||||
'rp' => 'setRp',
|
||||
'schema_type' => 'setSchemaType',
|
||||
'created_at' => 'setCreatedAt',
|
||||
'updated_at' => 'setUpdatedAt',
|
||||
'retention_rules' => 'setRetentionRules',
|
||||
'labels' => 'setLabels'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'links' => 'getLinks',
|
||||
'id' => 'getId',
|
||||
'type' => 'getType',
|
||||
'name' => 'getName',
|
||||
'description' => 'getDescription',
|
||||
'org_id' => 'getOrgId',
|
||||
'rp' => 'getRp',
|
||||
'schema_type' => 'getSchemaType',
|
||||
'created_at' => 'getCreatedAt',
|
||||
'updated_at' => 'getUpdatedAt',
|
||||
'retention_rules' => 'getRetentionRules',
|
||||
'labels' => 'getLabels'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const TYPE_USER = 'user';
|
||||
const TYPE_SYSTEM = 'system';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_USER,
|
||||
self::TYPE_SYSTEM,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : 'user';
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['description'] = isset($data['description']) ? $data['description'] : null;
|
||||
$this->container['org_id'] = isset($data['org_id']) ? $data['org_id'] : null;
|
||||
$this->container['rp'] = isset($data['rp']) ? $data['rp'] : null;
|
||||
$this->container['schema_type'] = isset($data['schema_type']) ? $data['schema_type'] : null;
|
||||
$this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null;
|
||||
$this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null;
|
||||
$this->container['retention_rules'] = isset($data['retention_rules']) ? $data['retention_rules'] : null;
|
||||
$this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['name'] === null) {
|
||||
$invalidProperties[] = "'name' can't be null";
|
||||
}
|
||||
if ($this->container['retention_rules'] === null) {
|
||||
$invalidProperties[] = "'retention_rules' can't be null";
|
||||
}
|
||||
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 links
|
||||
*
|
||||
* @return \InfluxDB2\Model\BucketLinks|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\BucketLinks|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($type) && !in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets description
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->container['description'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets description
|
||||
*
|
||||
* @param string|null $description description
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->container['description'] = $description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets org_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOrgId()
|
||||
{
|
||||
return $this->container['org_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org_id
|
||||
*
|
||||
* @param string|null $org_id org_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrgId($org_id)
|
||||
{
|
||||
$this->container['org_id'] = $org_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets rp
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getRp()
|
||||
{
|
||||
return $this->container['rp'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets rp
|
||||
*
|
||||
* @param string|null $rp rp
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRp($rp)
|
||||
{
|
||||
$this->container['rp'] = $rp;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets schema_type
|
||||
*
|
||||
* @return \InfluxDB2\Model\SchemaType|null
|
||||
*/
|
||||
public function getSchemaType()
|
||||
{
|
||||
return $this->container['schema_type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets schema_type
|
||||
*
|
||||
* @param \InfluxDB2\Model\SchemaType|null $schema_type schema_type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSchemaType($schema_type)
|
||||
{
|
||||
$this->container['schema_type'] = $schema_type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets created_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getCreatedAt()
|
||||
{
|
||||
return $this->container['created_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets created_at
|
||||
*
|
||||
* @param \DateTime|null $created_at created_at
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreatedAt($created_at)
|
||||
{
|
||||
$this->container['created_at'] = $created_at;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets updated_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getUpdatedAt()
|
||||
{
|
||||
return $this->container['updated_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets updated_at
|
||||
*
|
||||
* @param \DateTime|null $updated_at updated_at
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUpdatedAt($updated_at)
|
||||
{
|
||||
$this->container['updated_at'] = $updated_at;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets retention_rules
|
||||
*
|
||||
* @return \InfluxDB2\Model\BucketRetentionRules[]
|
||||
*/
|
||||
public function getRetentionRules()
|
||||
{
|
||||
return $this->container['retention_rules'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets retention_rules
|
||||
*
|
||||
* @param \InfluxDB2\Model\BucketRetentionRules[] $retention_rules Retention rules to expire or retain data. #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRetentionRules($retention_rules)
|
||||
{
|
||||
$this->container['retention_rules'] = $retention_rules;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets labels
|
||||
*
|
||||
* @return \InfluxDB2\Model\Label[]|null
|
||||
*/
|
||||
public function getLabels()
|
||||
{
|
||||
return $this->container['labels'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets labels
|
||||
*
|
||||
* @param \InfluxDB2\Model\Label[]|null $labels labels
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabels($labels)
|
||||
{
|
||||
$this->container['labels'] = $labels;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+448
@@ -0,0 +1,448 @@
|
||||
<?php
|
||||
/**
|
||||
* BucketLinks
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BucketLinks Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BucketLinks implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Bucket_links';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'labels' => 'string',
|
||||
'members' => 'string',
|
||||
'org' => 'string',
|
||||
'owners' => 'string',
|
||||
'self' => 'string',
|
||||
'write' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'labels' => 'uri',
|
||||
'members' => 'uri',
|
||||
'org' => 'uri',
|
||||
'owners' => 'uri',
|
||||
'self' => 'uri',
|
||||
'write' => 'uri'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'labels' => 'labels',
|
||||
'members' => 'members',
|
||||
'org' => 'org',
|
||||
'owners' => 'owners',
|
||||
'self' => 'self',
|
||||
'write' => 'write'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'labels' => 'setLabels',
|
||||
'members' => 'setMembers',
|
||||
'org' => 'setOrg',
|
||||
'owners' => 'setOwners',
|
||||
'self' => 'setSelf',
|
||||
'write' => 'setWrite'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'labels' => 'getLabels',
|
||||
'members' => 'getMembers',
|
||||
'org' => 'getOrg',
|
||||
'owners' => 'getOwners',
|
||||
'self' => 'getSelf',
|
||||
'write' => 'getWrite'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
|
||||
$this->container['members'] = isset($data['members']) ? $data['members'] : null;
|
||||
$this->container['org'] = isset($data['org']) ? $data['org'] : null;
|
||||
$this->container['owners'] = isset($data['owners']) ? $data['owners'] : null;
|
||||
$this->container['self'] = isset($data['self']) ? $data['self'] : null;
|
||||
$this->container['write'] = isset($data['write']) ? $data['write'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 labels
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLabels()
|
||||
{
|
||||
return $this->container['labels'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets labels
|
||||
*
|
||||
* @param string|null $labels URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabels($labels)
|
||||
{
|
||||
$this->container['labels'] = $labels;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets members
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getMembers()
|
||||
{
|
||||
return $this->container['members'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets members
|
||||
*
|
||||
* @param string|null $members URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMembers($members)
|
||||
{
|
||||
$this->container['members'] = $members;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets org
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOrg()
|
||||
{
|
||||
return $this->container['org'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org
|
||||
*
|
||||
* @param string|null $org URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrg($org)
|
||||
{
|
||||
$this->container['org'] = $org;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets owners
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOwners()
|
||||
{
|
||||
return $this->container['owners'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets owners
|
||||
*
|
||||
* @param string|null $owners URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOwners($owners)
|
||||
{
|
||||
$this->container['owners'] = $owners;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets self
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSelf()
|
||||
{
|
||||
return $this->container['self'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets self
|
||||
*
|
||||
* @param string|null $self URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSelf($self)
|
||||
{
|
||||
$this->container['self'] = $self;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets write
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getWrite()
|
||||
{
|
||||
return $this->container['write'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets write
|
||||
*
|
||||
* @param string|null $write URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setWrite($write)
|
||||
{
|
||||
$this->container['write'] = $write;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+496
@@ -0,0 +1,496 @@
|
||||
<?php
|
||||
/**
|
||||
* BucketMetadataManifest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BucketMetadataManifest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BucketMetadataManifest implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BucketMetadataManifest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'organization_id' => 'string',
|
||||
'organization_name' => 'string',
|
||||
'bucket_id' => 'string',
|
||||
'bucket_name' => 'string',
|
||||
'description' => 'string',
|
||||
'default_retention_policy' => 'string',
|
||||
'retention_policies' => '\InfluxDB2\Model\RetentionPolicyManifest[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'organization_id' => null,
|
||||
'organization_name' => null,
|
||||
'bucket_id' => null,
|
||||
'bucket_name' => null,
|
||||
'description' => null,
|
||||
'default_retention_policy' => null,
|
||||
'retention_policies' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'organization_id' => 'organizationID',
|
||||
'organization_name' => 'organizationName',
|
||||
'bucket_id' => 'bucketID',
|
||||
'bucket_name' => 'bucketName',
|
||||
'description' => 'description',
|
||||
'default_retention_policy' => 'defaultRetentionPolicy',
|
||||
'retention_policies' => 'retentionPolicies'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'organization_id' => 'setOrganizationId',
|
||||
'organization_name' => 'setOrganizationName',
|
||||
'bucket_id' => 'setBucketId',
|
||||
'bucket_name' => 'setBucketName',
|
||||
'description' => 'setDescription',
|
||||
'default_retention_policy' => 'setDefaultRetentionPolicy',
|
||||
'retention_policies' => 'setRetentionPolicies'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'organization_id' => 'getOrganizationId',
|
||||
'organization_name' => 'getOrganizationName',
|
||||
'bucket_id' => 'getBucketId',
|
||||
'bucket_name' => 'getBucketName',
|
||||
'description' => 'getDescription',
|
||||
'default_retention_policy' => 'getDefaultRetentionPolicy',
|
||||
'retention_policies' => 'getRetentionPolicies'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['organization_id'] = isset($data['organization_id']) ? $data['organization_id'] : null;
|
||||
$this->container['organization_name'] = isset($data['organization_name']) ? $data['organization_name'] : null;
|
||||
$this->container['bucket_id'] = isset($data['bucket_id']) ? $data['bucket_id'] : null;
|
||||
$this->container['bucket_name'] = isset($data['bucket_name']) ? $data['bucket_name'] : null;
|
||||
$this->container['description'] = isset($data['description']) ? $data['description'] : null;
|
||||
$this->container['default_retention_policy'] = isset($data['default_retention_policy']) ? $data['default_retention_policy'] : null;
|
||||
$this->container['retention_policies'] = isset($data['retention_policies']) ? $data['retention_policies'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['organization_id'] === null) {
|
||||
$invalidProperties[] = "'organization_id' can't be null";
|
||||
}
|
||||
if ($this->container['organization_name'] === null) {
|
||||
$invalidProperties[] = "'organization_name' can't be null";
|
||||
}
|
||||
if ($this->container['bucket_id'] === null) {
|
||||
$invalidProperties[] = "'bucket_id' can't be null";
|
||||
}
|
||||
if ($this->container['bucket_name'] === null) {
|
||||
$invalidProperties[] = "'bucket_name' can't be null";
|
||||
}
|
||||
if ($this->container['default_retention_policy'] === null) {
|
||||
$invalidProperties[] = "'default_retention_policy' can't be null";
|
||||
}
|
||||
if ($this->container['retention_policies'] === null) {
|
||||
$invalidProperties[] = "'retention_policies' can't be null";
|
||||
}
|
||||
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 organization_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOrganizationId()
|
||||
{
|
||||
return $this->container['organization_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets organization_id
|
||||
*
|
||||
* @param string $organization_id organization_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrganizationId($organization_id)
|
||||
{
|
||||
$this->container['organization_id'] = $organization_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets organization_name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOrganizationName()
|
||||
{
|
||||
return $this->container['organization_name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets organization_name
|
||||
*
|
||||
* @param string $organization_name organization_name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrganizationName($organization_name)
|
||||
{
|
||||
$this->container['organization_name'] = $organization_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bucket_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBucketId()
|
||||
{
|
||||
return $this->container['bucket_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bucket_id
|
||||
*
|
||||
* @param string $bucket_id bucket_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBucketId($bucket_id)
|
||||
{
|
||||
$this->container['bucket_id'] = $bucket_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bucket_name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBucketName()
|
||||
{
|
||||
return $this->container['bucket_name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bucket_name
|
||||
*
|
||||
* @param string $bucket_name bucket_name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBucketName($bucket_name)
|
||||
{
|
||||
$this->container['bucket_name'] = $bucket_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets description
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->container['description'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets description
|
||||
*
|
||||
* @param string|null $description description
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->container['description'] = $description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets default_retention_policy
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDefaultRetentionPolicy()
|
||||
{
|
||||
return $this->container['default_retention_policy'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets default_retention_policy
|
||||
*
|
||||
* @param string $default_retention_policy default_retention_policy
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefaultRetentionPolicy($default_retention_policy)
|
||||
{
|
||||
$this->container['default_retention_policy'] = $default_retention_policy;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets retention_policies
|
||||
*
|
||||
* @return \InfluxDB2\Model\RetentionPolicyManifest[]
|
||||
*/
|
||||
public function getRetentionPolicies()
|
||||
{
|
||||
return $this->container['retention_policies'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets retention_policies
|
||||
*
|
||||
* @param \InfluxDB2\Model\RetentionPolicyManifest[] $retention_policies retention_policies
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRetentionPolicies($retention_policies)
|
||||
{
|
||||
$this->container['retention_policies'] = $retention_policies;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+400
@@ -0,0 +1,400 @@
|
||||
<?php
|
||||
/**
|
||||
* BucketRetentionRules
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BucketRetentionRules Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BucketRetentionRules implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'RetentionRule';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'every_seconds' => 'int',
|
||||
'shard_group_duration_seconds' => 'int'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'every_seconds' => 'int64',
|
||||
'shard_group_duration_seconds' => 'int64'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'every_seconds' => 'everySeconds',
|
||||
'shard_group_duration_seconds' => 'shardGroupDurationSeconds'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'every_seconds' => 'setEverySeconds',
|
||||
'shard_group_duration_seconds' => 'setShardGroupDurationSeconds'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'every_seconds' => 'getEverySeconds',
|
||||
'shard_group_duration_seconds' => 'getShardGroupDurationSeconds'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const TYPE_EXPIRE = 'expire';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_EXPIRE,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['type'] = isset($data['type']) ? $data['type'] : 'expire';
|
||||
$this->container['every_seconds'] = isset($data['every_seconds']) ? $data['every_seconds'] : 2592000;
|
||||
$this->container['shard_group_duration_seconds'] = isset($data['shard_group_duration_seconds']) ? $data['shard_group_duration_seconds'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['every_seconds'] === null) {
|
||||
$invalidProperties[] = "'every_seconds' can't be null";
|
||||
}
|
||||
if (($this->container['every_seconds'] < 0)) {
|
||||
$invalidProperties[] = "invalid value for 'every_seconds', must be bigger than or equal to 0.";
|
||||
}
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($type) && !in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets every_seconds
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getEverySeconds()
|
||||
{
|
||||
return $this->container['every_seconds'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets every_seconds
|
||||
*
|
||||
* @param int $every_seconds The duration in seconds for how long data will be kept in the database. The default duration is 2592000 (30 days). 0 represents infinite retention.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setEverySeconds($every_seconds)
|
||||
{
|
||||
|
||||
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 The shard group duration. The duration or interval (in seconds) that each shard group covers. #### InfluxDB Cloud - Does not use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/v2.3/v2.3/reference/internals/shards/#shard-group-duration).
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+334
@@ -0,0 +1,334 @@
|
||||
<?php
|
||||
/**
|
||||
* BucketShardMapping
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BucketShardMapping Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BucketShardMapping implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BucketShardMapping';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'old_id' => 'int',
|
||||
'new_id' => 'int'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'old_id' => 'int64',
|
||||
'new_id' => 'int64'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'old_id' => 'oldId',
|
||||
'new_id' => 'newId'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'old_id' => 'setOldId',
|
||||
'new_id' => 'setNewId'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'old_id' => 'getOldId',
|
||||
'new_id' => 'getNewId'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['old_id'] = isset($data['old_id']) ? $data['old_id'] : null;
|
||||
$this->container['new_id'] = isset($data['new_id']) ? $data['new_id'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['old_id'] === null) {
|
||||
$invalidProperties[] = "'old_id' can't be null";
|
||||
}
|
||||
if ($this->container['new_id'] === null) {
|
||||
$invalidProperties[] = "'new_id' can't be null";
|
||||
}
|
||||
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 old_id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOldId()
|
||||
{
|
||||
return $this->container['old_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets old_id
|
||||
*
|
||||
* @param int $old_id old_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOldId($old_id)
|
||||
{
|
||||
$this->container['old_id'] = $old_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets new_id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getNewId()
|
||||
{
|
||||
return $this->container['new_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets new_id
|
||||
*
|
||||
* @param int $new_id new_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setNewId($new_id)
|
||||
{
|
||||
$this->container['new_id'] = $new_id;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* Buckets
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Buckets Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Buckets implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Buckets';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'links' => '\InfluxDB2\Model\Links',
|
||||
'buckets' => '\InfluxDB2\Model\Bucket[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'links' => null,
|
||||
'buckets' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'links' => 'links',
|
||||
'buckets' => 'buckets'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'links' => 'setLinks',
|
||||
'buckets' => 'setBuckets'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'links' => 'getLinks',
|
||||
'buckets' => 'getBuckets'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
$this->container['buckets'] = isset($data['buckets']) ? $data['buckets'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 links
|
||||
*
|
||||
* @return \InfluxDB2\Model\Links|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\Links|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets buckets
|
||||
*
|
||||
* @return \InfluxDB2\Model\Bucket[]|null
|
||||
*/
|
||||
public function getBuckets()
|
||||
{
|
||||
return $this->container['buckets'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets buckets
|
||||
*
|
||||
* @param \InfluxDB2\Model\Bucket[]|null $buckets buckets
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBuckets($buckets)
|
||||
{
|
||||
$this->container['buckets'] = $buckets;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+62
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* BuilderAggregateFunctionType
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BuilderAggregateFunctionType Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BuilderAggregateFunctionType
|
||||
{
|
||||
/**
|
||||
* Possible values of this enum
|
||||
*/
|
||||
const FILTER = 'filter';
|
||||
const GROUP = 'group';
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getAllowableEnumValues()
|
||||
{
|
||||
return [
|
||||
self::FILTER,
|
||||
self::GROUP,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+388
@@ -0,0 +1,388 @@
|
||||
<?php
|
||||
/**
|
||||
* BuilderConfig
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BuilderConfig Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BuilderConfig implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BuilderConfig';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'buckets' => 'string[]',
|
||||
'tags' => '\InfluxDB2\Model\BuilderTagsType[]',
|
||||
'functions' => '\InfluxDB2\Model\BuilderFunctionsType[]',
|
||||
'aggregate_window' => '\InfluxDB2\Model\BuilderConfigAggregateWindow'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'buckets' => null,
|
||||
'tags' => null,
|
||||
'functions' => null,
|
||||
'aggregate_window' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'buckets' => 'buckets',
|
||||
'tags' => 'tags',
|
||||
'functions' => 'functions',
|
||||
'aggregate_window' => 'aggregateWindow'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'buckets' => 'setBuckets',
|
||||
'tags' => 'setTags',
|
||||
'functions' => 'setFunctions',
|
||||
'aggregate_window' => 'setAggregateWindow'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'buckets' => 'getBuckets',
|
||||
'tags' => 'getTags',
|
||||
'functions' => 'getFunctions',
|
||||
'aggregate_window' => 'getAggregateWindow'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['buckets'] = isset($data['buckets']) ? $data['buckets'] : null;
|
||||
$this->container['tags'] = isset($data['tags']) ? $data['tags'] : null;
|
||||
$this->container['functions'] = isset($data['functions']) ? $data['functions'] : null;
|
||||
$this->container['aggregate_window'] = isset($data['aggregate_window']) ? $data['aggregate_window'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 buckets
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getBuckets()
|
||||
{
|
||||
return $this->container['buckets'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets buckets
|
||||
*
|
||||
* @param string[]|null $buckets buckets
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBuckets($buckets)
|
||||
{
|
||||
$this->container['buckets'] = $buckets;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tags
|
||||
*
|
||||
* @return \InfluxDB2\Model\BuilderTagsType[]|null
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
return $this->container['tags'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets tags
|
||||
*
|
||||
* @param \InfluxDB2\Model\BuilderTagsType[]|null $tags tags
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTags($tags)
|
||||
{
|
||||
$this->container['tags'] = $tags;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets functions
|
||||
*
|
||||
* @return \InfluxDB2\Model\BuilderFunctionsType[]|null
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return $this->container['functions'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets functions
|
||||
*
|
||||
* @param \InfluxDB2\Model\BuilderFunctionsType[]|null $functions functions
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFunctions($functions)
|
||||
{
|
||||
$this->container['functions'] = $functions;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets aggregate_window
|
||||
*
|
||||
* @return \InfluxDB2\Model\BuilderConfigAggregateWindow|null
|
||||
*/
|
||||
public function getAggregateWindow()
|
||||
{
|
||||
return $this->container['aggregate_window'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets aggregate_window
|
||||
*
|
||||
* @param \InfluxDB2\Model\BuilderConfigAggregateWindow|null $aggregate_window aggregate_window
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAggregateWindow($aggregate_window)
|
||||
{
|
||||
$this->container['aggregate_window'] = $aggregate_window;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+328
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* BuilderConfigAggregateWindow
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BuilderConfigAggregateWindow Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BuilderConfigAggregateWindow implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BuilderConfig_aggregateWindow';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'period' => 'string',
|
||||
'fill_values' => 'bool'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'period' => null,
|
||||
'fill_values' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'period' => 'period',
|
||||
'fill_values' => 'fillValues'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'period' => 'setPeriod',
|
||||
'fill_values' => 'setFillValues'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'period' => 'getPeriod',
|
||||
'fill_values' => 'getFillValues'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['period'] = isset($data['period']) ? $data['period'] : null;
|
||||
$this->container['fill_values'] = isset($data['fill_values']) ? $data['fill_values'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 period
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getPeriod()
|
||||
{
|
||||
return $this->container['period'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets period
|
||||
*
|
||||
* @param string|null $period period
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPeriod($period)
|
||||
{
|
||||
$this->container['period'] = $period;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets fill_values
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getFillValues()
|
||||
{
|
||||
return $this->container['fill_values'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets fill_values
|
||||
*
|
||||
* @param bool|null $fill_values fill_values
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFillValues($fill_values)
|
||||
{
|
||||
$this->container['fill_values'] = $fill_values;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
/**
|
||||
* BuilderFunctionsType
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BuilderFunctionsType Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BuilderFunctionsType implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BuilderFunctionsType';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+358
@@ -0,0 +1,358 @@
|
||||
<?php
|
||||
/**
|
||||
* BuilderTagsType
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BuilderTagsType Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BuilderTagsType implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BuilderTagsType';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'key' => 'string',
|
||||
'values' => 'string[]',
|
||||
'aggregate_function_type' => '\InfluxDB2\Model\BuilderAggregateFunctionType'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'key' => null,
|
||||
'values' => null,
|
||||
'aggregate_function_type' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'key' => 'key',
|
||||
'values' => 'values',
|
||||
'aggregate_function_type' => 'aggregateFunctionType'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'key' => 'setKey',
|
||||
'values' => 'setValues',
|
||||
'aggregate_function_type' => 'setAggregateFunctionType'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'key' => 'getKey',
|
||||
'values' => 'getValues',
|
||||
'aggregate_function_type' => 'getAggregateFunctionType'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['key'] = isset($data['key']) ? $data['key'] : null;
|
||||
$this->container['values'] = isset($data['values']) ? $data['values'] : null;
|
||||
$this->container['aggregate_function_type'] = isset($data['aggregate_function_type']) ? $data['aggregate_function_type'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 key
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getKey()
|
||||
{
|
||||
return $this->container['key'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets key
|
||||
*
|
||||
* @param string|null $key key
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setKey($key)
|
||||
{
|
||||
$this->container['key'] = $key;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets values
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getValues()
|
||||
{
|
||||
return $this->container['values'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets values
|
||||
*
|
||||
* @param string[]|null $values values
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValues($values)
|
||||
{
|
||||
$this->container['values'] = $values;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets aggregate_function_type
|
||||
*
|
||||
* @return \InfluxDB2\Model\BuilderAggregateFunctionType|null
|
||||
*/
|
||||
public function getAggregateFunctionType()
|
||||
{
|
||||
return $this->container['aggregate_function_type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets aggregate_function_type
|
||||
*
|
||||
* @param \InfluxDB2\Model\BuilderAggregateFunctionType|null $aggregate_function_type aggregate_function_type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAggregateFunctionType($aggregate_function_type)
|
||||
{
|
||||
$this->container['aggregate_function_type'] = $aggregate_function_type;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* BuiltinStatement
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BuiltinStatement Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Declares a builtin identifier and its type
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BuiltinStatement extends Statement
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BuiltinStatement';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'id' => '\InfluxDB2\Model\Identifier'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'id' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'id' => 'id'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'id' => 'setId'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'id' => 'getId'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return \InfluxDB2\Model\Identifier|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param \InfluxDB2\Model\Identifier|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+353
@@ -0,0 +1,353 @@
|
||||
<?php
|
||||
/**
|
||||
* CallExpression
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CallExpression Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Represents a function call
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CallExpression extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CallExpression';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'callee' => '\InfluxDB2\Model\Expression',
|
||||
'arguments' => '\InfluxDB2\Model\Expression[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'callee' => null,
|
||||
'arguments' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'callee' => 'callee',
|
||||
'arguments' => 'arguments'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'callee' => 'setCallee',
|
||||
'arguments' => 'setArguments'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'callee' => 'getCallee',
|
||||
'arguments' => 'getArguments'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['callee'] = isset($data['callee']) ? $data['callee'] : null;
|
||||
$this->container['arguments'] = isset($data['arguments']) ? $data['arguments'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets callee
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getCallee()
|
||||
{
|
||||
return $this->container['callee'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets callee
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $callee callee
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCallee($callee)
|
||||
{
|
||||
$this->container['callee'] = $callee;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets arguments
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression[]|null
|
||||
*/
|
||||
public function getArguments()
|
||||
{
|
||||
return $this->container['arguments'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets arguments
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression[]|null $arguments Function arguments
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setArguments($arguments)
|
||||
{
|
||||
$this->container['arguments'] = $arguments;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,478 @@
|
||||
<?php
|
||||
/**
|
||||
* Cell
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Cell Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Cell implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Cell';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'links' => '\InfluxDB2\Model\CellLinks',
|
||||
'x' => 'int',
|
||||
'y' => 'int',
|
||||
'w' => 'int',
|
||||
'h' => 'int',
|
||||
'view_id' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => null,
|
||||
'links' => null,
|
||||
'x' => 'int32',
|
||||
'y' => 'int32',
|
||||
'w' => 'int32',
|
||||
'h' => 'int32',
|
||||
'view_id' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'links' => 'links',
|
||||
'x' => 'x',
|
||||
'y' => 'y',
|
||||
'w' => 'w',
|
||||
'h' => 'h',
|
||||
'view_id' => 'viewID'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'links' => 'setLinks',
|
||||
'x' => 'setX',
|
||||
'y' => 'setY',
|
||||
'w' => 'setW',
|
||||
'h' => 'setH',
|
||||
'view_id' => 'setViewId'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'links' => 'getLinks',
|
||||
'x' => 'getX',
|
||||
'y' => 'getY',
|
||||
'w' => 'getW',
|
||||
'h' => 'getH',
|
||||
'view_id' => 'getViewId'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
$this->container['x'] = isset($data['x']) ? $data['x'] : null;
|
||||
$this->container['y'] = isset($data['y']) ? $data['y'] : null;
|
||||
$this->container['w'] = isset($data['w']) ? $data['w'] : null;
|
||||
$this->container['h'] = isset($data['h']) ? $data['h'] : null;
|
||||
$this->container['view_id'] = isset($data['view_id']) ? $data['view_id'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets links
|
||||
*
|
||||
* @return \InfluxDB2\Model\CellLinks|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\CellLinks|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets x
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getX()
|
||||
{
|
||||
return $this->container['x'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets x
|
||||
*
|
||||
* @param int|null $x x
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setX($x)
|
||||
{
|
||||
$this->container['x'] = $x;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets y
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getY()
|
||||
{
|
||||
return $this->container['y'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets y
|
||||
*
|
||||
* @param int|null $y y
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setY($y)
|
||||
{
|
||||
$this->container['y'] = $y;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets w
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getW()
|
||||
{
|
||||
return $this->container['w'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets w
|
||||
*
|
||||
* @param int|null $w w
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setW($w)
|
||||
{
|
||||
$this->container['w'] = $w;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets h
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getH()
|
||||
{
|
||||
return $this->container['h'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets h
|
||||
*
|
||||
* @param int|null $h h
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setH($h)
|
||||
{
|
||||
$this->container['h'] = $h;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets view_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getViewId()
|
||||
{
|
||||
return $this->container['view_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets view_id
|
||||
*
|
||||
* @param string|null $view_id The reference to a view from the views API.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setViewId($view_id)
|
||||
{
|
||||
$this->container['view_id'] = $view_id;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+328
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* CellLinks
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CellLinks Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CellLinks implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Cell_links';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'self' => 'string',
|
||||
'view' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'self' => null,
|
||||
'view' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'self' => 'self',
|
||||
'view' => 'view'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'self' => 'setSelf',
|
||||
'view' => 'setView'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'self' => 'getSelf',
|
||||
'view' => 'getView'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['self'] = isset($data['self']) ? $data['self'] : null;
|
||||
$this->container['view'] = isset($data['view']) ? $data['view'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 self
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSelf()
|
||||
{
|
||||
return $this->container['self'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets self
|
||||
*
|
||||
* @param string|null $self self
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSelf($self)
|
||||
{
|
||||
$this->container['self'] = $self;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets view
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getView()
|
||||
{
|
||||
return $this->container['view'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets view
|
||||
*
|
||||
* @param string|null $view view
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setView($view)
|
||||
{
|
||||
$this->container['view'] = $view;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+388
@@ -0,0 +1,388 @@
|
||||
<?php
|
||||
/**
|
||||
* CellUpdate
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CellUpdate Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CellUpdate implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CellUpdate';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'x' => 'int',
|
||||
'y' => 'int',
|
||||
'w' => 'int',
|
||||
'h' => 'int'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'x' => 'int32',
|
||||
'y' => 'int32',
|
||||
'w' => 'int32',
|
||||
'h' => 'int32'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'x' => 'x',
|
||||
'y' => 'y',
|
||||
'w' => 'w',
|
||||
'h' => 'h'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'x' => 'setX',
|
||||
'y' => 'setY',
|
||||
'w' => 'setW',
|
||||
'h' => 'setH'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'x' => 'getX',
|
||||
'y' => 'getY',
|
||||
'w' => 'getW',
|
||||
'h' => 'getH'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['x'] = isset($data['x']) ? $data['x'] : null;
|
||||
$this->container['y'] = isset($data['y']) ? $data['y'] : null;
|
||||
$this->container['w'] = isset($data['w']) ? $data['w'] : null;
|
||||
$this->container['h'] = isset($data['h']) ? $data['h'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 x
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getX()
|
||||
{
|
||||
return $this->container['x'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets x
|
||||
*
|
||||
* @param int|null $x x
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setX($x)
|
||||
{
|
||||
$this->container['x'] = $x;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets y
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getY()
|
||||
{
|
||||
return $this->container['y'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets y
|
||||
*
|
||||
* @param int|null $y y
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setY($y)
|
||||
{
|
||||
$this->container['y'] = $y;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets w
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getW()
|
||||
{
|
||||
return $this->container['w'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets w
|
||||
*
|
||||
* @param int|null $w w
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setW($w)
|
||||
{
|
||||
$this->container['w'] = $w;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets h
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getH()
|
||||
{
|
||||
return $this->container['h'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets h
|
||||
*
|
||||
* @param int|null $h h
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setH($h)
|
||||
{
|
||||
$this->container['h'] = $h;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+322
@@ -0,0 +1,322 @@
|
||||
<?php
|
||||
/**
|
||||
* CellWithViewProperties
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CellWithViewProperties Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CellWithViewProperties extends Cell
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CellWithViewProperties';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string',
|
||||
'properties' => '\InfluxDB2\Model\ViewProperties'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null,
|
||||
'properties' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name',
|
||||
'properties' => 'properties'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName',
|
||||
'properties' => 'setProperties'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName',
|
||||
'properties' => 'getProperties'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['properties'] = isset($data['properties']) ? $data['properties'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets properties
|
||||
*
|
||||
* @return \InfluxDB2\Model\ViewProperties|null
|
||||
*/
|
||||
public function getProperties()
|
||||
{
|
||||
return $this->container['properties'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets properties
|
||||
*
|
||||
* @param \InfluxDB2\Model\ViewProperties|null $properties properties
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setProperties($properties)
|
||||
{
|
||||
$this->container['properties'] = $properties;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,271 @@
|
||||
<?php
|
||||
/**
|
||||
* Check
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Check Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Check extends CheckDiscriminator
|
||||
{
|
||||
const DISCRIMINATOR = 'type';
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Check';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
|
||||
// Initialize discriminator property with the model name.
|
||||
$discriminator = array_search('type', self::$attributeMap, true);
|
||||
$this->container[$discriminator] = static::$openAPIModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+761
@@ -0,0 +1,761 @@
|
||||
<?php
|
||||
/**
|
||||
* CheckBase
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CheckBase Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CheckBase implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CheckBase';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'name' => 'string',
|
||||
'org_id' => 'string',
|
||||
'task_id' => 'string',
|
||||
'owner_id' => 'string',
|
||||
'created_at' => '\DateTime',
|
||||
'updated_at' => '\DateTime',
|
||||
'query' => '\InfluxDB2\Model\DashboardQuery',
|
||||
'status' => '\InfluxDB2\Model\TaskStatusType',
|
||||
'description' => 'string',
|
||||
'latest_completed' => '\DateTime',
|
||||
'last_run_status' => 'string',
|
||||
'last_run_error' => 'string',
|
||||
'labels' => '\InfluxDB2\Model\Label[]',
|
||||
'links' => '\InfluxDB2\Model\CheckBaseLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => null,
|
||||
'name' => null,
|
||||
'org_id' => null,
|
||||
'task_id' => null,
|
||||
'owner_id' => null,
|
||||
'created_at' => 'date-time',
|
||||
'updated_at' => 'date-time',
|
||||
'query' => null,
|
||||
'status' => null,
|
||||
'description' => null,
|
||||
'latest_completed' => 'date-time',
|
||||
'last_run_status' => null,
|
||||
'last_run_error' => null,
|
||||
'labels' => null,
|
||||
'links' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'name' => 'name',
|
||||
'org_id' => 'orgID',
|
||||
'task_id' => 'taskID',
|
||||
'owner_id' => 'ownerID',
|
||||
'created_at' => 'createdAt',
|
||||
'updated_at' => 'updatedAt',
|
||||
'query' => 'query',
|
||||
'status' => 'status',
|
||||
'description' => 'description',
|
||||
'latest_completed' => 'latestCompleted',
|
||||
'last_run_status' => 'lastRunStatus',
|
||||
'last_run_error' => 'lastRunError',
|
||||
'labels' => 'labels',
|
||||
'links' => 'links'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'name' => 'setName',
|
||||
'org_id' => 'setOrgId',
|
||||
'task_id' => 'setTaskId',
|
||||
'owner_id' => 'setOwnerId',
|
||||
'created_at' => 'setCreatedAt',
|
||||
'updated_at' => 'setUpdatedAt',
|
||||
'query' => 'setQuery',
|
||||
'status' => 'setStatus',
|
||||
'description' => 'setDescription',
|
||||
'latest_completed' => 'setLatestCompleted',
|
||||
'last_run_status' => 'setLastRunStatus',
|
||||
'last_run_error' => 'setLastRunError',
|
||||
'labels' => 'setLabels',
|
||||
'links' => 'setLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'name' => 'getName',
|
||||
'org_id' => 'getOrgId',
|
||||
'task_id' => 'getTaskId',
|
||||
'owner_id' => 'getOwnerId',
|
||||
'created_at' => 'getCreatedAt',
|
||||
'updated_at' => 'getUpdatedAt',
|
||||
'query' => 'getQuery',
|
||||
'status' => 'getStatus',
|
||||
'description' => 'getDescription',
|
||||
'latest_completed' => 'getLatestCompleted',
|
||||
'last_run_status' => 'getLastRunStatus',
|
||||
'last_run_error' => 'getLastRunError',
|
||||
'labels' => 'getLabels',
|
||||
'links' => 'getLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const LAST_RUN_STATUS_FAILED = 'failed';
|
||||
const LAST_RUN_STATUS_SUCCESS = 'success';
|
||||
const LAST_RUN_STATUS_CANCELED = 'canceled';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getLastRunStatusAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::LAST_RUN_STATUS_FAILED,
|
||||
self::LAST_RUN_STATUS_SUCCESS,
|
||||
self::LAST_RUN_STATUS_CANCELED,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['org_id'] = isset($data['org_id']) ? $data['org_id'] : null;
|
||||
$this->container['task_id'] = isset($data['task_id']) ? $data['task_id'] : null;
|
||||
$this->container['owner_id'] = isset($data['owner_id']) ? $data['owner_id'] : null;
|
||||
$this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null;
|
||||
$this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null;
|
||||
$this->container['query'] = isset($data['query']) ? $data['query'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
$this->container['description'] = isset($data['description']) ? $data['description'] : null;
|
||||
$this->container['latest_completed'] = isset($data['latest_completed']) ? $data['latest_completed'] : null;
|
||||
$this->container['last_run_status'] = isset($data['last_run_status']) ? $data['last_run_status'] : null;
|
||||
$this->container['last_run_error'] = isset($data['last_run_error']) ? $data['last_run_error'] : null;
|
||||
$this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
|
||||
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['name'] === null) {
|
||||
$invalidProperties[] = "'name' can't be null";
|
||||
}
|
||||
if ($this->container['org_id'] === null) {
|
||||
$invalidProperties[] = "'org_id' can't be null";
|
||||
}
|
||||
if ($this->container['query'] === null) {
|
||||
$invalidProperties[] = "'query' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getLastRunStatusAllowableValues();
|
||||
if (!is_null($this->container['last_run_status']) && !in_array($this->container['last_run_status'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'last_run_status', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets org_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOrgId()
|
||||
{
|
||||
return $this->container['org_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org_id
|
||||
*
|
||||
* @param string $org_id The ID of the organization that owns this check.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrgId($org_id)
|
||||
{
|
||||
$this->container['org_id'] = $org_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets task_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTaskId()
|
||||
{
|
||||
return $this->container['task_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets task_id
|
||||
*
|
||||
* @param string|null $task_id The ID of the task associated with this check.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTaskId($task_id)
|
||||
{
|
||||
$this->container['task_id'] = $task_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets owner_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOwnerId()
|
||||
{
|
||||
return $this->container['owner_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets owner_id
|
||||
*
|
||||
* @param string|null $owner_id The ID of creator used to create this check.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOwnerId($owner_id)
|
||||
{
|
||||
$this->container['owner_id'] = $owner_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets created_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getCreatedAt()
|
||||
{
|
||||
return $this->container['created_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets created_at
|
||||
*
|
||||
* @param \DateTime|null $created_at created_at
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreatedAt($created_at)
|
||||
{
|
||||
$this->container['created_at'] = $created_at;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets updated_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getUpdatedAt()
|
||||
{
|
||||
return $this->container['updated_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets updated_at
|
||||
*
|
||||
* @param \DateTime|null $updated_at updated_at
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUpdatedAt($updated_at)
|
||||
{
|
||||
$this->container['updated_at'] = $updated_at;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets query
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardQuery
|
||||
*/
|
||||
public function getQuery()
|
||||
{
|
||||
return $this->container['query'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets query
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardQuery $query query
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQuery($query)
|
||||
{
|
||||
$this->container['query'] = $query;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
*
|
||||
* @return \InfluxDB2\Model\TaskStatusType|null
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
*
|
||||
* @param \InfluxDB2\Model\TaskStatusType|null $status status
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets description
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->container['description'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets description
|
||||
*
|
||||
* @param string|null $description An optional description of the check.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->container['description'] = $description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets latest_completed
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getLatestCompleted()
|
||||
{
|
||||
return $this->container['latest_completed'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets latest_completed
|
||||
*
|
||||
* @param \DateTime|null $latest_completed A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLatestCompleted($latest_completed)
|
||||
{
|
||||
$this->container['latest_completed'] = $latest_completed;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets last_run_status
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLastRunStatus()
|
||||
{
|
||||
return $this->container['last_run_status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last_run_status
|
||||
*
|
||||
* @param string|null $last_run_status last_run_status
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLastRunStatus($last_run_status)
|
||||
{
|
||||
$allowedValues = $this->getLastRunStatusAllowableValues();
|
||||
if (!is_null($last_run_status) && !in_array($last_run_status, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'last_run_status', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['last_run_status'] = $last_run_status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets last_run_error
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLastRunError()
|
||||
{
|
||||
return $this->container['last_run_error'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets last_run_error
|
||||
*
|
||||
* @param string|null $last_run_error last_run_error
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLastRunError($last_run_error)
|
||||
{
|
||||
$this->container['last_run_error'] = $last_run_error;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets labels
|
||||
*
|
||||
* @return \InfluxDB2\Model\Label[]|null
|
||||
*/
|
||||
public function getLabels()
|
||||
{
|
||||
return $this->container['labels'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets labels
|
||||
*
|
||||
* @param \InfluxDB2\Model\Label[]|null $labels labels
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabels($labels)
|
||||
{
|
||||
$this->container['labels'] = $labels;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets links
|
||||
*
|
||||
* @return \InfluxDB2\Model\CheckBaseLinks|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\CheckBaseLinks|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+418
@@ -0,0 +1,418 @@
|
||||
<?php
|
||||
/**
|
||||
* CheckBaseLinks
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CheckBaseLinks Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CheckBaseLinks implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CheckBase_links';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'self' => 'string',
|
||||
'labels' => 'string',
|
||||
'members' => 'string',
|
||||
'owners' => 'string',
|
||||
'query' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'self' => 'uri',
|
||||
'labels' => 'uri',
|
||||
'members' => 'uri',
|
||||
'owners' => 'uri',
|
||||
'query' => 'uri'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'self' => 'self',
|
||||
'labels' => 'labels',
|
||||
'members' => 'members',
|
||||
'owners' => 'owners',
|
||||
'query' => 'query'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'self' => 'setSelf',
|
||||
'labels' => 'setLabels',
|
||||
'members' => 'setMembers',
|
||||
'owners' => 'setOwners',
|
||||
'query' => 'setQuery'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'self' => 'getSelf',
|
||||
'labels' => 'getLabels',
|
||||
'members' => 'getMembers',
|
||||
'owners' => 'getOwners',
|
||||
'query' => 'getQuery'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['self'] = isset($data['self']) ? $data['self'] : null;
|
||||
$this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
|
||||
$this->container['members'] = isset($data['members']) ? $data['members'] : null;
|
||||
$this->container['owners'] = isset($data['owners']) ? $data['owners'] : null;
|
||||
$this->container['query'] = isset($data['query']) ? $data['query'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 self
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSelf()
|
||||
{
|
||||
return $this->container['self'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets self
|
||||
*
|
||||
* @param string|null $self URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSelf($self)
|
||||
{
|
||||
$this->container['self'] = $self;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets labels
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLabels()
|
||||
{
|
||||
return $this->container['labels'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets labels
|
||||
*
|
||||
* @param string|null $labels URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabels($labels)
|
||||
{
|
||||
$this->container['labels'] = $labels;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets members
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getMembers()
|
||||
{
|
||||
return $this->container['members'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets members
|
||||
*
|
||||
* @param string|null $members URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMembers($members)
|
||||
{
|
||||
$this->container['members'] = $members;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets owners
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOwners()
|
||||
{
|
||||
return $this->container['owners'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets owners
|
||||
*
|
||||
* @param string|null $owners URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOwners($owners)
|
||||
{
|
||||
$this->container['owners'] = $owners;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets query
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getQuery()
|
||||
{
|
||||
return $this->container['query'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets query
|
||||
*
|
||||
* @param string|null $query URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQuery($query)
|
||||
{
|
||||
$this->container['query'] = $query;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+271
@@ -0,0 +1,271 @@
|
||||
<?php
|
||||
/**
|
||||
* CheckDiscriminator
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CheckDiscriminator Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CheckDiscriminator extends CheckBase
|
||||
{
|
||||
const DISCRIMINATOR = 'type';
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CheckDiscriminator';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
|
||||
// Initialize discriminator property with the model name.
|
||||
$discriminator = array_search('type', self::$attributeMap, true);
|
||||
$this->container[$discriminator] = static::$openAPIModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+390
@@ -0,0 +1,390 @@
|
||||
<?php
|
||||
/**
|
||||
* CheckPatch
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CheckPatch Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CheckPatch implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CheckPatch';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string',
|
||||
'description' => 'string',
|
||||
'status' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null,
|
||||
'description' => null,
|
||||
'status' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name',
|
||||
'description' => 'description',
|
||||
'status' => 'status'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName',
|
||||
'description' => 'setDescription',
|
||||
'status' => 'setStatus'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName',
|
||||
'description' => 'getDescription',
|
||||
'status' => 'getStatus'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const STATUS_ACTIVE = 'active';
|
||||
const STATUS_INACTIVE = 'inactive';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getStatusAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::STATUS_ACTIVE,
|
||||
self::STATUS_INACTIVE,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['description'] = isset($data['description']) ? $data['description'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
$allowedValues = $this->getStatusAllowableValues();
|
||||
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'status', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets description
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->container['description'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets description
|
||||
*
|
||||
* @param string|null $description description
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->container['description'] = $description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
*
|
||||
* @param string|null $status status
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$allowedValues = $this->getStatusAllowableValues();
|
||||
if (!is_null($status) && !in_array($status, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'status', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['status'] = $status;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* CheckStatusLevel
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CheckStatusLevel Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description The state to record if check matches a criteria.
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CheckStatusLevel
|
||||
{
|
||||
/**
|
||||
* Possible values of this enum
|
||||
*/
|
||||
const UNKNOWN = 'UNKNOWN';
|
||||
const OK = 'OK';
|
||||
const INFO = 'INFO';
|
||||
const CRIT = 'CRIT';
|
||||
const WARN = 'WARN';
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getAllowableEnumValues()
|
||||
{
|
||||
return [
|
||||
self::UNKNOWN,
|
||||
self::OK,
|
||||
self::INFO,
|
||||
self::CRIT,
|
||||
self::WARN,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+667
@@ -0,0 +1,667 @@
|
||||
<?php
|
||||
/**
|
||||
* CheckViewProperties
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CheckViewProperties Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CheckViewProperties extends ViewProperties
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CheckViewProperties';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'adaptive_zoom_hide' => 'bool',
|
||||
'type' => 'string',
|
||||
'shape' => 'string',
|
||||
'check_id' => 'string',
|
||||
'check' => '\InfluxDB2\Model\Check',
|
||||
'queries' => '\InfluxDB2\Model\DashboardQuery[]',
|
||||
'colors' => '\InfluxDB2\Model\DashboardColor[]',
|
||||
'legend_colorize_rows' => 'bool',
|
||||
'legend_hide' => 'bool',
|
||||
'legend_opacity' => 'float',
|
||||
'legend_orientation_threshold' => 'int'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'adaptive_zoom_hide' => null,
|
||||
'type' => null,
|
||||
'shape' => null,
|
||||
'check_id' => null,
|
||||
'check' => null,
|
||||
'queries' => null,
|
||||
'colors' => null,
|
||||
'legend_colorize_rows' => null,
|
||||
'legend_hide' => null,
|
||||
'legend_opacity' => 'float',
|
||||
'legend_orientation_threshold' => 'int32'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'adaptive_zoom_hide' => 'adaptiveZoomHide',
|
||||
'type' => 'type',
|
||||
'shape' => 'shape',
|
||||
'check_id' => 'checkID',
|
||||
'check' => 'check',
|
||||
'queries' => 'queries',
|
||||
'colors' => 'colors',
|
||||
'legend_colorize_rows' => 'legendColorizeRows',
|
||||
'legend_hide' => 'legendHide',
|
||||
'legend_opacity' => 'legendOpacity',
|
||||
'legend_orientation_threshold' => 'legendOrientationThreshold'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'adaptive_zoom_hide' => 'setAdaptiveZoomHide',
|
||||
'type' => 'setType',
|
||||
'shape' => 'setShape',
|
||||
'check_id' => 'setCheckId',
|
||||
'check' => 'setCheck',
|
||||
'queries' => 'setQueries',
|
||||
'colors' => 'setColors',
|
||||
'legend_colorize_rows' => 'setLegendColorizeRows',
|
||||
'legend_hide' => 'setLegendHide',
|
||||
'legend_opacity' => 'setLegendOpacity',
|
||||
'legend_orientation_threshold' => 'setLegendOrientationThreshold'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'adaptive_zoom_hide' => 'getAdaptiveZoomHide',
|
||||
'type' => 'getType',
|
||||
'shape' => 'getShape',
|
||||
'check_id' => 'getCheckId',
|
||||
'check' => 'getCheck',
|
||||
'queries' => 'getQueries',
|
||||
'colors' => 'getColors',
|
||||
'legend_colorize_rows' => 'getLegendColorizeRows',
|
||||
'legend_hide' => 'getLegendHide',
|
||||
'legend_opacity' => 'getLegendOpacity',
|
||||
'legend_orientation_threshold' => 'getLegendOrientationThreshold'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const TYPE_CHECK = 'check';
|
||||
const SHAPE_CHRONOGRAF_V2 = 'chronograf-v2';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_CHECK,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getShapeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::SHAPE_CHRONOGRAF_V2,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['adaptive_zoom_hide'] = isset($data['adaptive_zoom_hide']) ? $data['adaptive_zoom_hide'] : null;
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : TYPE_CHECK;
|
||||
$this->container['shape'] = isset($data['shape']) ? $data['shape'] : SHAPE_CHRONOGRAF_V2;
|
||||
$this->container['check_id'] = isset($data['check_id']) ? $data['check_id'] : null;
|
||||
$this->container['check'] = isset($data['check']) ? $data['check'] : null;
|
||||
$this->container['queries'] = isset($data['queries']) ? $data['queries'] : null;
|
||||
$this->container['colors'] = isset($data['colors']) ? $data['colors'] : null;
|
||||
$this->container['legend_colorize_rows'] = isset($data['legend_colorize_rows']) ? $data['legend_colorize_rows'] : null;
|
||||
$this->container['legend_hide'] = isset($data['legend_hide']) ? $data['legend_hide'] : null;
|
||||
$this->container['legend_opacity'] = isset($data['legend_opacity']) ? $data['legend_opacity'] : null;
|
||||
$this->container['legend_orientation_threshold'] = isset($data['legend_orientation_threshold']) ? $data['legend_orientation_threshold'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
if ($this->container['type'] === null) {
|
||||
$invalidProperties[] = "'type' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['shape'] === null) {
|
||||
$invalidProperties[] = "'shape' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getShapeAllowableValues();
|
||||
if (!is_null($this->container['shape']) && !in_array($this->container['shape'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'shape', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['check_id'] === null) {
|
||||
$invalidProperties[] = "'check_id' can't be null";
|
||||
}
|
||||
if ($this->container['queries'] === null) {
|
||||
$invalidProperties[] = "'queries' can't be null";
|
||||
}
|
||||
if ($this->container['colors'] === null) {
|
||||
$invalidProperties[] = "'colors' can't be null";
|
||||
}
|
||||
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 adaptive_zoom_hide
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getAdaptiveZoomHide()
|
||||
{
|
||||
return $this->container['adaptive_zoom_hide'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets adaptive_zoom_hide
|
||||
*
|
||||
* @param bool|null $adaptive_zoom_hide adaptive_zoom_hide
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAdaptiveZoomHide($adaptive_zoom_hide)
|
||||
{
|
||||
$this->container['adaptive_zoom_hide'] = $adaptive_zoom_hide;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets shape
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getShape()
|
||||
{
|
||||
return $this->container['shape'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets shape
|
||||
*
|
||||
* @param string $shape shape
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setShape($shape)
|
||||
{
|
||||
$allowedValues = $this->getShapeAllowableValues();
|
||||
if (!in_array($shape, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'shape', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['shape'] = $shape;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets check_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCheckId()
|
||||
{
|
||||
return $this->container['check_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets check_id
|
||||
*
|
||||
* @param string $check_id check_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCheckId($check_id)
|
||||
{
|
||||
$this->container['check_id'] = $check_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets check
|
||||
*
|
||||
* @return \InfluxDB2\Model\Check|null
|
||||
*/
|
||||
public function getCheck()
|
||||
{
|
||||
return $this->container['check'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets check
|
||||
*
|
||||
* @param \InfluxDB2\Model\Check|null $check check
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCheck($check)
|
||||
{
|
||||
$this->container['check'] = $check;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets queries
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardQuery[]
|
||||
*/
|
||||
public function getQueries()
|
||||
{
|
||||
return $this->container['queries'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets queries
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardQuery[] $queries queries
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQueries($queries)
|
||||
{
|
||||
$this->container['queries'] = $queries;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets colors
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardColor[]
|
||||
*/
|
||||
public function getColors()
|
||||
{
|
||||
return $this->container['colors'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets colors
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardColor[] $colors Colors define color encoding of data into a visualization
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setColors($colors)
|
||||
{
|
||||
$this->container['colors'] = $colors;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets legend_colorize_rows
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getLegendColorizeRows()
|
||||
{
|
||||
return $this->container['legend_colorize_rows'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets legend_colorize_rows
|
||||
*
|
||||
* @param bool|null $legend_colorize_rows legend_colorize_rows
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLegendColorizeRows($legend_colorize_rows)
|
||||
{
|
||||
$this->container['legend_colorize_rows'] = $legend_colorize_rows;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets legend_hide
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getLegendHide()
|
||||
{
|
||||
return $this->container['legend_hide'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets legend_hide
|
||||
*
|
||||
* @param bool|null $legend_hide legend_hide
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLegendHide($legend_hide)
|
||||
{
|
||||
$this->container['legend_hide'] = $legend_hide;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets legend_opacity
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getLegendOpacity()
|
||||
{
|
||||
return $this->container['legend_opacity'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets legend_opacity
|
||||
*
|
||||
* @param float|null $legend_opacity legend_opacity
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLegendOpacity($legend_opacity)
|
||||
{
|
||||
$this->container['legend_opacity'] = $legend_opacity;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets legend_orientation_threshold
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getLegendOrientationThreshold()
|
||||
{
|
||||
return $this->container['legend_orientation_threshold'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets legend_orientation_threshold
|
||||
*
|
||||
* @param int|null $legend_orientation_threshold legend_orientation_threshold
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLegendOrientationThreshold($legend_orientation_threshold)
|
||||
{
|
||||
$this->container['legend_orientation_threshold'] = $legend_orientation_threshold;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* Checks
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Checks Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Checks implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Checks';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'checks' => '\InfluxDB2\Model\Check[]',
|
||||
'links' => '\InfluxDB2\Model\Links'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'checks' => null,
|
||||
'links' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'checks' => 'checks',
|
||||
'links' => 'links'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'checks' => 'setChecks',
|
||||
'links' => 'setLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'checks' => 'getChecks',
|
||||
'links' => 'getLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['checks'] = isset($data['checks']) ? $data['checks'] : null;
|
||||
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 checks
|
||||
*
|
||||
* @return \InfluxDB2\Model\Check[]|null
|
||||
*/
|
||||
public function getChecks()
|
||||
{
|
||||
return $this->container['checks'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets checks
|
||||
*
|
||||
* @param \InfluxDB2\Model\Check[]|null $checks checks
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setChecks($checks)
|
||||
{
|
||||
$this->container['checks'] = $checks;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets links
|
||||
*
|
||||
* @return \InfluxDB2\Model\Links|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\Links|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+383
@@ -0,0 +1,383 @@
|
||||
<?php
|
||||
/**
|
||||
* ConditionalExpression
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* ConditionalExpression Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ConditionalExpression extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'ConditionalExpression';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'test' => '\InfluxDB2\Model\Expression',
|
||||
'alternate' => '\InfluxDB2\Model\Expression',
|
||||
'consequent' => '\InfluxDB2\Model\Expression'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'test' => null,
|
||||
'alternate' => null,
|
||||
'consequent' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'test' => 'test',
|
||||
'alternate' => 'alternate',
|
||||
'consequent' => 'consequent'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'test' => 'setTest',
|
||||
'alternate' => 'setAlternate',
|
||||
'consequent' => 'setConsequent'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'test' => 'getTest',
|
||||
'alternate' => 'getAlternate',
|
||||
'consequent' => 'getConsequent'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['test'] = isset($data['test']) ? $data['test'] : null;
|
||||
$this->container['alternate'] = isset($data['alternate']) ? $data['alternate'] : null;
|
||||
$this->container['consequent'] = isset($data['consequent']) ? $data['consequent'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets test
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getTest()
|
||||
{
|
||||
return $this->container['test'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets test
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $test test
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTest($test)
|
||||
{
|
||||
$this->container['test'] = $test;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets alternate
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getAlternate()
|
||||
{
|
||||
return $this->container['alternate'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets alternate
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $alternate alternate
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAlternate($alternate)
|
||||
{
|
||||
$this->container['alternate'] = $alternate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets consequent
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getConsequent()
|
||||
{
|
||||
return $this->container['consequent'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets consequent
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $consequent consequent
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConsequent($consequent)
|
||||
{
|
||||
$this->container['consequent'] = $consequent;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
/**
|
||||
* Config
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Config Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Config implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Config';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'config' => 'map[string,object]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'config' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'config' => 'config'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'config' => 'setConfig'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'config' => 'getConfig'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['config'] = isset($data['config']) ? $data['config'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 config
|
||||
*
|
||||
* @return map[string,object]|null
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
return $this->container['config'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets config
|
||||
*
|
||||
* @param map[string,object]|null $config config
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConfig($config)
|
||||
{
|
||||
$this->container['config'] = $config;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+352
@@ -0,0 +1,352 @@
|
||||
<?php
|
||||
/**
|
||||
* ConstantVariableProperties
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* ConstantVariableProperties Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ConstantVariableProperties extends VariableProperties
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'ConstantVariableProperties';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'values' => 'string[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'values' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'values' => 'values'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'values' => 'setValues'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'values' => 'getValues'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const TYPE_CONSTANT = 'constant';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_CONSTANT,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['values'] = isset($data['values']) ? $data['values'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($type) && !in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets values
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getValues()
|
||||
{
|
||||
return $this->container['values'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets values
|
||||
*
|
||||
* @param string[]|null $values values
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValues($values)
|
||||
{
|
||||
$this->container['values'] = $values;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+448
@@ -0,0 +1,448 @@
|
||||
<?php
|
||||
/**
|
||||
* CreateCell
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CreateCell Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CreateCell implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CreateCell';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string',
|
||||
'x' => 'int',
|
||||
'y' => 'int',
|
||||
'w' => 'int',
|
||||
'h' => 'int',
|
||||
'using_view' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null,
|
||||
'x' => 'int32',
|
||||
'y' => 'int32',
|
||||
'w' => 'int32',
|
||||
'h' => 'int32',
|
||||
'using_view' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name',
|
||||
'x' => 'x',
|
||||
'y' => 'y',
|
||||
'w' => 'w',
|
||||
'h' => 'h',
|
||||
'using_view' => 'usingView'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName',
|
||||
'x' => 'setX',
|
||||
'y' => 'setY',
|
||||
'w' => 'setW',
|
||||
'h' => 'setH',
|
||||
'using_view' => 'setUsingView'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName',
|
||||
'x' => 'getX',
|
||||
'y' => 'getY',
|
||||
'w' => 'getW',
|
||||
'h' => 'getH',
|
||||
'using_view' => 'getUsingView'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['x'] = isset($data['x']) ? $data['x'] : null;
|
||||
$this->container['y'] = isset($data['y']) ? $data['y'] : null;
|
||||
$this->container['w'] = isset($data['w']) ? $data['w'] : null;
|
||||
$this->container['h'] = isset($data['h']) ? $data['h'] : null;
|
||||
$this->container['using_view'] = isset($data['using_view']) ? $data['using_view'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets x
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getX()
|
||||
{
|
||||
return $this->container['x'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets x
|
||||
*
|
||||
* @param int|null $x x
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setX($x)
|
||||
{
|
||||
$this->container['x'] = $x;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets y
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getY()
|
||||
{
|
||||
return $this->container['y'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets y
|
||||
*
|
||||
* @param int|null $y y
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setY($y)
|
||||
{
|
||||
$this->container['y'] = $y;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets w
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getW()
|
||||
{
|
||||
return $this->container['w'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets w
|
||||
*
|
||||
* @param int|null $w w
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setW($w)
|
||||
{
|
||||
$this->container['w'] = $w;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets h
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getH()
|
||||
{
|
||||
return $this->container['h'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets h
|
||||
*
|
||||
* @param int|null $h h
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setH($h)
|
||||
{
|
||||
$this->container['h'] = $h;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets using_view
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUsingView()
|
||||
{
|
||||
return $this->container['using_view'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets using_view
|
||||
*
|
||||
* @param string|null $using_view Makes a copy of the provided view.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUsingView($using_view)
|
||||
{
|
||||
$this->container['using_view'] = $using_view;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+364
@@ -0,0 +1,364 @@
|
||||
<?php
|
||||
/**
|
||||
* CreateDashboardRequest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CreateDashboardRequest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CreateDashboardRequest implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CreateDashboardRequest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'org_id' => 'string',
|
||||
'name' => 'string',
|
||||
'description' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'org_id' => null,
|
||||
'name' => null,
|
||||
'description' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'org_id' => 'orgID',
|
||||
'name' => 'name',
|
||||
'description' => 'description'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'org_id' => 'setOrgId',
|
||||
'name' => 'setName',
|
||||
'description' => 'setDescription'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'org_id' => 'getOrgId',
|
||||
'name' => 'getName',
|
||||
'description' => 'getDescription'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['org_id'] = isset($data['org_id']) ? $data['org_id'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['description'] = isset($data['description']) ? $data['description'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['org_id'] === null) {
|
||||
$invalidProperties[] = "'org_id' can't be null";
|
||||
}
|
||||
if ($this->container['name'] === null) {
|
||||
$invalidProperties[] = "'name' can't be null";
|
||||
}
|
||||
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 org_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOrgId()
|
||||
{
|
||||
return $this->container['org_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org_id
|
||||
*
|
||||
* @param string $org_id The ID of the organization that owns the dashboard.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrgId($org_id)
|
||||
{
|
||||
$this->container['org_id'] = $org_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string $name The user-facing name of the dashboard.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets description
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->container['description'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets description
|
||||
*
|
||||
* @param string|null $description The user-facing description of the dashboard.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->container['description'] = $description;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+325
@@ -0,0 +1,325 @@
|
||||
<?php
|
||||
/**
|
||||
* CustomCheck
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CustomCheck Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CustomCheck extends Check
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CustomCheck';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const TYPE_CUSTOM = 'custom';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_CUSTOM,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : "custom";
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
if ($this->container['type'] === null) {
|
||||
$invalidProperties[] = "'type' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,526 @@
|
||||
<?php
|
||||
/**
|
||||
* DBRP
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DBRP Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DBRP implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DBRP';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'org_id' => 'string',
|
||||
'bucket_id' => 'string',
|
||||
'database' => 'string',
|
||||
'retention_policy' => 'string',
|
||||
'default' => 'bool',
|
||||
'virtual' => 'bool',
|
||||
'links' => '\InfluxDB2\Model\Links'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => null,
|
||||
'org_id' => null,
|
||||
'bucket_id' => null,
|
||||
'database' => null,
|
||||
'retention_policy' => null,
|
||||
'default' => null,
|
||||
'virtual' => null,
|
||||
'links' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'org_id' => 'orgID',
|
||||
'bucket_id' => 'bucketID',
|
||||
'database' => 'database',
|
||||
'retention_policy' => 'retention_policy',
|
||||
'default' => 'default',
|
||||
'virtual' => 'virtual',
|
||||
'links' => 'links'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'org_id' => 'setOrgId',
|
||||
'bucket_id' => 'setBucketId',
|
||||
'database' => 'setDatabase',
|
||||
'retention_policy' => 'setRetentionPolicy',
|
||||
'default' => 'setDefault',
|
||||
'virtual' => 'setVirtual',
|
||||
'links' => 'setLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'org_id' => 'getOrgId',
|
||||
'bucket_id' => 'getBucketId',
|
||||
'database' => 'getDatabase',
|
||||
'retention_policy' => 'getRetentionPolicy',
|
||||
'default' => 'getDefault',
|
||||
'virtual' => 'getVirtual',
|
||||
'links' => 'getLinks'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['org_id'] = isset($data['org_id']) ? $data['org_id'] : null;
|
||||
$this->container['bucket_id'] = isset($data['bucket_id']) ? $data['bucket_id'] : null;
|
||||
$this->container['database'] = isset($data['database']) ? $data['database'] : null;
|
||||
$this->container['retention_policy'] = isset($data['retention_policy']) ? $data['retention_policy'] : null;
|
||||
$this->container['default'] = isset($data['default']) ? $data['default'] : null;
|
||||
$this->container['virtual'] = isset($data['virtual']) ? $data['virtual'] : null;
|
||||
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['id'] === null) {
|
||||
$invalidProperties[] = "'id' can't be null";
|
||||
}
|
||||
if ($this->container['org_id'] === null) {
|
||||
$invalidProperties[] = "'org_id' can't be null";
|
||||
}
|
||||
if ($this->container['bucket_id'] === null) {
|
||||
$invalidProperties[] = "'bucket_id' can't be null";
|
||||
}
|
||||
if ($this->container['database'] === null) {
|
||||
$invalidProperties[] = "'database' can't be null";
|
||||
}
|
||||
if ($this->container['retention_policy'] === null) {
|
||||
$invalidProperties[] = "'retention_policy' can't be null";
|
||||
}
|
||||
if ($this->container['default'] === null) {
|
||||
$invalidProperties[] = "'default' can't be null";
|
||||
}
|
||||
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 id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string $id The ID of the DBRP mapping.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets org_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOrgId()
|
||||
{
|
||||
return $this->container['org_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org_id
|
||||
*
|
||||
* @param string $org_id The ID of the organization.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrgId($org_id)
|
||||
{
|
||||
$this->container['org_id'] = $org_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bucket_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBucketId()
|
||||
{
|
||||
return $this->container['bucket_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bucket_id
|
||||
*
|
||||
* @param string $bucket_id The ID of the bucket used as the target for the translation.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBucketId($bucket_id)
|
||||
{
|
||||
$this->container['bucket_id'] = $bucket_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets database
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDatabase()
|
||||
{
|
||||
return $this->container['database'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets database
|
||||
*
|
||||
* @param string $database InfluxDB v1 database
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDatabase($database)
|
||||
{
|
||||
$this->container['database'] = $database;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets retention_policy
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRetentionPolicy()
|
||||
{
|
||||
return $this->container['retention_policy'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets retention_policy
|
||||
*
|
||||
* @param string $retention_policy InfluxDB v1 retention policy
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRetentionPolicy($retention_policy)
|
||||
{
|
||||
$this->container['retention_policy'] = $retention_policy;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets default
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getDefault()
|
||||
{
|
||||
return $this->container['default'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets default
|
||||
*
|
||||
* @param bool $default Mapping represents the default retention policy for the database specified.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefault($default)
|
||||
{
|
||||
$this->container['default'] = $default;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets virtual
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getVirtual()
|
||||
{
|
||||
return $this->container['virtual'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets virtual
|
||||
*
|
||||
* @param bool|null $virtual Indicates an autogenerated, virtual mapping based on the bucket name. Currently only available in OSS.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setVirtual($virtual)
|
||||
{
|
||||
$this->container['virtual'] = $virtual;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets links
|
||||
*
|
||||
* @return \InfluxDB2\Model\Links|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\Links|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+457
@@ -0,0 +1,457 @@
|
||||
<?php
|
||||
/**
|
||||
* DBRPCreate
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DBRPCreate Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DBRPCreate implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DBRPCreate';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'org_id' => 'string',
|
||||
'org' => 'string',
|
||||
'bucket_id' => 'string',
|
||||
'database' => 'string',
|
||||
'retention_policy' => 'string',
|
||||
'default' => 'bool'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'org_id' => null,
|
||||
'org' => null,
|
||||
'bucket_id' => null,
|
||||
'database' => null,
|
||||
'retention_policy' => null,
|
||||
'default' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'org_id' => 'orgID',
|
||||
'org' => 'org',
|
||||
'bucket_id' => 'bucketID',
|
||||
'database' => 'database',
|
||||
'retention_policy' => 'retention_policy',
|
||||
'default' => 'default'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'org_id' => 'setOrgId',
|
||||
'org' => 'setOrg',
|
||||
'bucket_id' => 'setBucketId',
|
||||
'database' => 'setDatabase',
|
||||
'retention_policy' => 'setRetentionPolicy',
|
||||
'default' => 'setDefault'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'org_id' => 'getOrgId',
|
||||
'org' => 'getOrg',
|
||||
'bucket_id' => 'getBucketId',
|
||||
'database' => 'getDatabase',
|
||||
'retention_policy' => 'getRetentionPolicy',
|
||||
'default' => 'getDefault'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['org_id'] = isset($data['org_id']) ? $data['org_id'] : null;
|
||||
$this->container['org'] = isset($data['org']) ? $data['org'] : null;
|
||||
$this->container['bucket_id'] = isset($data['bucket_id']) ? $data['bucket_id'] : null;
|
||||
$this->container['database'] = isset($data['database']) ? $data['database'] : null;
|
||||
$this->container['retention_policy'] = isset($data['retention_policy']) ? $data['retention_policy'] : null;
|
||||
$this->container['default'] = isset($data['default']) ? $data['default'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['bucket_id'] === null) {
|
||||
$invalidProperties[] = "'bucket_id' can't be null";
|
||||
}
|
||||
if ($this->container['database'] === null) {
|
||||
$invalidProperties[] = "'database' can't be null";
|
||||
}
|
||||
if ($this->container['retention_policy'] === null) {
|
||||
$invalidProperties[] = "'retention_policy' can't be null";
|
||||
}
|
||||
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 org_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOrgId()
|
||||
{
|
||||
return $this->container['org_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org_id
|
||||
*
|
||||
* @param string|null $org_id The ID of the organization.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrgId($org_id)
|
||||
{
|
||||
$this->container['org_id'] = $org_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets org
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOrg()
|
||||
{
|
||||
return $this->container['org'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org
|
||||
*
|
||||
* @param string|null $org The name of the organization that owns this mapping.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrg($org)
|
||||
{
|
||||
$this->container['org'] = $org;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bucket_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBucketId()
|
||||
{
|
||||
return $this->container['bucket_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bucket_id
|
||||
*
|
||||
* @param string $bucket_id The ID of the bucket used as the target for the translation.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBucketId($bucket_id)
|
||||
{
|
||||
$this->container['bucket_id'] = $bucket_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets database
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDatabase()
|
||||
{
|
||||
return $this->container['database'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets database
|
||||
*
|
||||
* @param string $database InfluxDB v1 database
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDatabase($database)
|
||||
{
|
||||
$this->container['database'] = $database;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets retention_policy
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRetentionPolicy()
|
||||
{
|
||||
return $this->container['retention_policy'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets retention_policy
|
||||
*
|
||||
* @param string $retention_policy InfluxDB v1 retention policy
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRetentionPolicy($retention_policy)
|
||||
{
|
||||
$this->container['retention_policy'] = $retention_policy;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets default
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getDefault()
|
||||
{
|
||||
return $this->container['default'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets default
|
||||
*
|
||||
* @param bool|null $default Mapping represents the default retention policy for the database specified.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefault($default)
|
||||
{
|
||||
$this->container['default'] = $default;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
/**
|
||||
* DBRPGet
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DBRPGet Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DBRPGet implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DBRPGet';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'content' => '\InfluxDB2\Model\DBRP'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'content' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'content' => 'content'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'content' => 'setContent'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'content' => 'getContent'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['content'] = isset($data['content']) ? $data['content'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 content
|
||||
*
|
||||
* @return \InfluxDB2\Model\DBRP|null
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
return $this->container['content'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets content
|
||||
*
|
||||
* @param \InfluxDB2\Model\DBRP|null $content content
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setContent($content)
|
||||
{
|
||||
$this->container['content'] = $content;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+328
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* DBRPUpdate
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DBRPUpdate Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DBRPUpdate implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DBRPUpdate';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'retention_policy' => 'string',
|
||||
'default' => 'bool'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'retention_policy' => null,
|
||||
'default' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'retention_policy' => 'retention_policy',
|
||||
'default' => 'default'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'retention_policy' => 'setRetentionPolicy',
|
||||
'default' => 'setDefault'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'retention_policy' => 'getRetentionPolicy',
|
||||
'default' => 'getDefault'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['retention_policy'] = isset($data['retention_policy']) ? $data['retention_policy'] : null;
|
||||
$this->container['default'] = isset($data['default']) ? $data['default'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 retention_policy
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getRetentionPolicy()
|
||||
{
|
||||
return $this->container['retention_policy'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets retention_policy
|
||||
*
|
||||
* @param string|null $retention_policy InfluxDB v1 retention policy
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRetentionPolicy($retention_policy)
|
||||
{
|
||||
$this->container['retention_policy'] = $retention_policy;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets default
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getDefault()
|
||||
{
|
||||
return $this->container['default'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets default
|
||||
*
|
||||
* @param bool|null $default default
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefault($default)
|
||||
{
|
||||
$this->container['default'] = $default;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
/**
|
||||
* DBRPs
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DBRPs Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DBRPs implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DBRPs';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'content' => '\InfluxDB2\Model\DBRP[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'content' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'content' => 'content'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'content' => 'setContent'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'content' => 'getContent'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['content'] = isset($data['content']) ? $data['content'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 content
|
||||
*
|
||||
* @return \InfluxDB2\Model\DBRP[]|null
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
return $this->container['content'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets content
|
||||
*
|
||||
* @param \InfluxDB2\Model\DBRP[]|null $content content
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setContent($content)
|
||||
{
|
||||
$this->container['content'] = $content;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+412
@@ -0,0 +1,412 @@
|
||||
<?php
|
||||
/**
|
||||
* Dashboard
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Dashboard Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Dashboard extends CreateDashboardRequest
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Dashboard';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'links' => '\InfluxDB2\Model\DashboardWithViewPropertiesLinks',
|
||||
'id' => 'string',
|
||||
'meta' => '\InfluxDB2\Model\DashboardWithViewPropertiesMeta',
|
||||
'cells' => '\InfluxDB2\Model\Cell[]',
|
||||
'labels' => '\InfluxDB2\Model\Label[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'links' => null,
|
||||
'id' => null,
|
||||
'meta' => null,
|
||||
'cells' => null,
|
||||
'labels' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'links' => 'links',
|
||||
'id' => 'id',
|
||||
'meta' => 'meta',
|
||||
'cells' => 'cells',
|
||||
'labels' => 'labels'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'links' => 'setLinks',
|
||||
'id' => 'setId',
|
||||
'meta' => 'setMeta',
|
||||
'cells' => 'setCells',
|
||||
'labels' => 'setLabels'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'links' => 'getLinks',
|
||||
'id' => 'getId',
|
||||
'meta' => 'getMeta',
|
||||
'cells' => 'getCells',
|
||||
'labels' => 'getLabels'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['meta'] = isset($data['meta']) ? $data['meta'] : null;
|
||||
$this->container['cells'] = isset($data['cells']) ? $data['cells'] : null;
|
||||
$this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 links
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardWithViewPropertiesLinks|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardWithViewPropertiesLinks|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets meta
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardWithViewPropertiesMeta|null
|
||||
*/
|
||||
public function getMeta()
|
||||
{
|
||||
return $this->container['meta'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets meta
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardWithViewPropertiesMeta|null $meta meta
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMeta($meta)
|
||||
{
|
||||
$this->container['meta'] = $meta;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets cells
|
||||
*
|
||||
* @return \InfluxDB2\Model\Cell[]|null
|
||||
*/
|
||||
public function getCells()
|
||||
{
|
||||
return $this->container['cells'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cells
|
||||
*
|
||||
* @param \InfluxDB2\Model\Cell[]|null $cells cells
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCells($cells)
|
||||
{
|
||||
$this->container['cells'] = $cells;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets labels
|
||||
*
|
||||
* @return \InfluxDB2\Model\Label[]|null
|
||||
*/
|
||||
public function getLabels()
|
||||
{
|
||||
return $this->container['labels'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets labels
|
||||
*
|
||||
* @param \InfluxDB2\Model\Label[]|null $labels labels
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabels($labels)
|
||||
{
|
||||
$this->container['labels'] = $labels;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+489
@@ -0,0 +1,489 @@
|
||||
<?php
|
||||
/**
|
||||
* DashboardColor
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DashboardColor Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Defines an encoding of data value into color space.
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DashboardColor implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DashboardColor';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'type' => 'string',
|
||||
'hex' => 'string',
|
||||
'name' => 'string',
|
||||
'value' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => null,
|
||||
'type' => null,
|
||||
'hex' => null,
|
||||
'name' => null,
|
||||
'value' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'type' => 'type',
|
||||
'hex' => 'hex',
|
||||
'name' => 'name',
|
||||
'value' => 'value'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'type' => 'setType',
|
||||
'hex' => 'setHex',
|
||||
'name' => 'setName',
|
||||
'value' => 'setValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'type' => 'getType',
|
||||
'hex' => 'getHex',
|
||||
'name' => 'getName',
|
||||
'value' => 'getValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const TYPE_MIN = 'min';
|
||||
const TYPE_MAX = 'max';
|
||||
const TYPE_THRESHOLD = 'threshold';
|
||||
const TYPE_SCALE = 'scale';
|
||||
const TYPE_TEXT = 'text';
|
||||
const TYPE_BACKGROUND = 'background';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_MIN,
|
||||
self::TYPE_MAX,
|
||||
self::TYPE_THRESHOLD,
|
||||
self::TYPE_SCALE,
|
||||
self::TYPE_TEXT,
|
||||
self::TYPE_BACKGROUND,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['hex'] = isset($data['hex']) ? $data['hex'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['value'] = isset($data['value']) ? $data['value'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['id'] === null) {
|
||||
$invalidProperties[] = "'id' can't be null";
|
||||
}
|
||||
if ($this->container['type'] === null) {
|
||||
$invalidProperties[] = "'type' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['hex'] === null) {
|
||||
$invalidProperties[] = "'hex' can't be null";
|
||||
}
|
||||
if ((mb_strlen($this->container['hex']) > 7)) {
|
||||
$invalidProperties[] = "invalid value for 'hex', the character length must be smaller than or equal to 7.";
|
||||
}
|
||||
|
||||
if ((mb_strlen($this->container['hex']) < 7)) {
|
||||
$invalidProperties[] = "invalid value for 'hex', the character length must be bigger than or equal to 7.";
|
||||
}
|
||||
|
||||
if ($this->container['name'] === null) {
|
||||
$invalidProperties[] = "'name' can't be null";
|
||||
}
|
||||
if ($this->container['value'] === null) {
|
||||
$invalidProperties[] = "'value' can't be null";
|
||||
}
|
||||
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 id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string $id The unique ID of the view color.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string $type Type is how the color is used.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets hex
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHex()
|
||||
{
|
||||
return $this->container['hex'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets hex
|
||||
*
|
||||
* @param string $hex The hex number of the color
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setHex($hex)
|
||||
{
|
||||
if ((mb_strlen($hex) > 7)) {
|
||||
throw new \InvalidArgumentException('invalid length for $hex when calling DashboardColor., must be smaller than or equal to 7.');
|
||||
}
|
||||
if ((mb_strlen($hex) < 7)) {
|
||||
throw new \InvalidArgumentException('invalid length for $hex when calling DashboardColor., must be bigger than or equal to 7.');
|
||||
}
|
||||
|
||||
$this->container['hex'] = $hex;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string $name The user-facing name of the hex color.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets value
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->container['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value
|
||||
*
|
||||
* @param float $value The data value mapped to this color.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->container['value'] = $value;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+388
@@ -0,0 +1,388 @@
|
||||
<?php
|
||||
/**
|
||||
* DashboardQuery
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DashboardQuery Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DashboardQuery implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DashboardQuery';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'text' => 'string',
|
||||
'edit_mode' => '\InfluxDB2\Model\QueryEditMode',
|
||||
'name' => 'string',
|
||||
'builder_config' => '\InfluxDB2\Model\BuilderConfig'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'text' => null,
|
||||
'edit_mode' => null,
|
||||
'name' => null,
|
||||
'builder_config' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'text' => 'text',
|
||||
'edit_mode' => 'editMode',
|
||||
'name' => 'name',
|
||||
'builder_config' => 'builderConfig'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'text' => 'setText',
|
||||
'edit_mode' => 'setEditMode',
|
||||
'name' => 'setName',
|
||||
'builder_config' => 'setBuilderConfig'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'text' => 'getText',
|
||||
'edit_mode' => 'getEditMode',
|
||||
'name' => 'getName',
|
||||
'builder_config' => 'getBuilderConfig'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['text'] = isset($data['text']) ? $data['text'] : null;
|
||||
$this->container['edit_mode'] = isset($data['edit_mode']) ? $data['edit_mode'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['builder_config'] = isset($data['builder_config']) ? $data['builder_config'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 text
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getText()
|
||||
{
|
||||
return $this->container['text'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets text
|
||||
*
|
||||
* @param string|null $text The text of the Flux query.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setText($text)
|
||||
{
|
||||
$this->container['text'] = $text;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets edit_mode
|
||||
*
|
||||
* @return \InfluxDB2\Model\QueryEditMode|null
|
||||
*/
|
||||
public function getEditMode()
|
||||
{
|
||||
return $this->container['edit_mode'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets edit_mode
|
||||
*
|
||||
* @param \InfluxDB2\Model\QueryEditMode|null $edit_mode edit_mode
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setEditMode($edit_mode)
|
||||
{
|
||||
$this->container['edit_mode'] = $edit_mode;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets builder_config
|
||||
*
|
||||
* @return \InfluxDB2\Model\BuilderConfig|null
|
||||
*/
|
||||
public function getBuilderConfig()
|
||||
{
|
||||
return $this->container['builder_config'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets builder_config
|
||||
*
|
||||
* @param \InfluxDB2\Model\BuilderConfig|null $builder_config builder_config
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBuilderConfig($builder_config)
|
||||
{
|
||||
$this->container['builder_config'] = $builder_config;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+412
@@ -0,0 +1,412 @@
|
||||
<?php
|
||||
/**
|
||||
* DashboardWithViewProperties
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DashboardWithViewProperties Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DashboardWithViewProperties extends CreateDashboardRequest
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DashboardWithViewProperties';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'links' => '\InfluxDB2\Model\DashboardWithViewPropertiesLinks',
|
||||
'id' => 'string',
|
||||
'meta' => '\InfluxDB2\Model\DashboardWithViewPropertiesMeta',
|
||||
'cells' => '\InfluxDB2\Model\CellWithViewProperties[]',
|
||||
'labels' => '\InfluxDB2\Model\Label[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'links' => null,
|
||||
'id' => null,
|
||||
'meta' => null,
|
||||
'cells' => null,
|
||||
'labels' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'links' => 'links',
|
||||
'id' => 'id',
|
||||
'meta' => 'meta',
|
||||
'cells' => 'cells',
|
||||
'labels' => 'labels'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'links' => 'setLinks',
|
||||
'id' => 'setId',
|
||||
'meta' => 'setMeta',
|
||||
'cells' => 'setCells',
|
||||
'labels' => 'setLabels'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'links' => 'getLinks',
|
||||
'id' => 'getId',
|
||||
'meta' => 'getMeta',
|
||||
'cells' => 'getCells',
|
||||
'labels' => 'getLabels'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['meta'] = isset($data['meta']) ? $data['meta'] : null;
|
||||
$this->container['cells'] = isset($data['cells']) ? $data['cells'] : null;
|
||||
$this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 links
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardWithViewPropertiesLinks|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardWithViewPropertiesLinks|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets meta
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardWithViewPropertiesMeta|null
|
||||
*/
|
||||
public function getMeta()
|
||||
{
|
||||
return $this->container['meta'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets meta
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardWithViewPropertiesMeta|null $meta meta
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMeta($meta)
|
||||
{
|
||||
$this->container['meta'] = $meta;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets cells
|
||||
*
|
||||
* @return \InfluxDB2\Model\CellWithViewProperties[]|null
|
||||
*/
|
||||
public function getCells()
|
||||
{
|
||||
return $this->container['cells'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cells
|
||||
*
|
||||
* @param \InfluxDB2\Model\CellWithViewProperties[]|null $cells cells
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCells($cells)
|
||||
{
|
||||
$this->container['cells'] = $cells;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets labels
|
||||
*
|
||||
* @return \InfluxDB2\Model\Label[]|null
|
||||
*/
|
||||
public function getLabels()
|
||||
{
|
||||
return $this->container['labels'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets labels
|
||||
*
|
||||
* @param \InfluxDB2\Model\Label[]|null $labels labels
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabels($labels)
|
||||
{
|
||||
$this->container['labels'] = $labels;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+448
@@ -0,0 +1,448 @@
|
||||
<?php
|
||||
/**
|
||||
* DashboardWithViewPropertiesLinks
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DashboardWithViewPropertiesLinks Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DashboardWithViewPropertiesLinks implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DashboardWithViewProperties_links';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'self' => 'string',
|
||||
'cells' => 'string',
|
||||
'members' => 'string',
|
||||
'owners' => 'string',
|
||||
'labels' => 'string',
|
||||
'org' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'self' => 'uri',
|
||||
'cells' => 'uri',
|
||||
'members' => 'uri',
|
||||
'owners' => 'uri',
|
||||
'labels' => 'uri',
|
||||
'org' => 'uri'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'self' => 'self',
|
||||
'cells' => 'cells',
|
||||
'members' => 'members',
|
||||
'owners' => 'owners',
|
||||
'labels' => 'labels',
|
||||
'org' => 'org'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'self' => 'setSelf',
|
||||
'cells' => 'setCells',
|
||||
'members' => 'setMembers',
|
||||
'owners' => 'setOwners',
|
||||
'labels' => 'setLabels',
|
||||
'org' => 'setOrg'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'self' => 'getSelf',
|
||||
'cells' => 'getCells',
|
||||
'members' => 'getMembers',
|
||||
'owners' => 'getOwners',
|
||||
'labels' => 'getLabels',
|
||||
'org' => 'getOrg'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['self'] = isset($data['self']) ? $data['self'] : null;
|
||||
$this->container['cells'] = isset($data['cells']) ? $data['cells'] : null;
|
||||
$this->container['members'] = isset($data['members']) ? $data['members'] : null;
|
||||
$this->container['owners'] = isset($data['owners']) ? $data['owners'] : null;
|
||||
$this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
|
||||
$this->container['org'] = isset($data['org']) ? $data['org'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 self
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSelf()
|
||||
{
|
||||
return $this->container['self'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets self
|
||||
*
|
||||
* @param string|null $self URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSelf($self)
|
||||
{
|
||||
$this->container['self'] = $self;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets cells
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getCells()
|
||||
{
|
||||
return $this->container['cells'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets cells
|
||||
*
|
||||
* @param string|null $cells URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCells($cells)
|
||||
{
|
||||
$this->container['cells'] = $cells;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets members
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getMembers()
|
||||
{
|
||||
return $this->container['members'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets members
|
||||
*
|
||||
* @param string|null $members URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMembers($members)
|
||||
{
|
||||
$this->container['members'] = $members;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets owners
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOwners()
|
||||
{
|
||||
return $this->container['owners'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets owners
|
||||
*
|
||||
* @param string|null $owners URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOwners($owners)
|
||||
{
|
||||
$this->container['owners'] = $owners;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets labels
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLabels()
|
||||
{
|
||||
return $this->container['labels'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets labels
|
||||
*
|
||||
* @param string|null $labels URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLabels($labels)
|
||||
{
|
||||
$this->container['labels'] = $labels;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets org
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOrg()
|
||||
{
|
||||
return $this->container['org'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets org
|
||||
*
|
||||
* @param string|null $org URI of resource.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrg($org)
|
||||
{
|
||||
$this->container['org'] = $org;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+328
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* DashboardWithViewPropertiesMeta
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DashboardWithViewPropertiesMeta Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DashboardWithViewPropertiesMeta implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DashboardWithViewProperties_meta';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'created_at' => '\DateTime',
|
||||
'updated_at' => '\DateTime'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'created_at' => 'date-time',
|
||||
'updated_at' => 'date-time'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'created_at' => 'createdAt',
|
||||
'updated_at' => 'updatedAt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'created_at' => 'setCreatedAt',
|
||||
'updated_at' => 'setUpdatedAt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'created_at' => 'getCreatedAt',
|
||||
'updated_at' => 'getUpdatedAt'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null;
|
||||
$this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 created_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getCreatedAt()
|
||||
{
|
||||
return $this->container['created_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets created_at
|
||||
*
|
||||
* @param \DateTime|null $created_at created_at
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreatedAt($created_at)
|
||||
{
|
||||
$this->container['created_at'] = $created_at;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets updated_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getUpdatedAt()
|
||||
{
|
||||
return $this->container['updated_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets updated_at
|
||||
*
|
||||
* @param \DateTime|null $updated_at updated_at
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUpdatedAt($updated_at)
|
||||
{
|
||||
$this->container['updated_at'] = $updated_at;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+328
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* Dashboards
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Dashboards Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Dashboards implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Dashboards';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'links' => '\InfluxDB2\Model\Links',
|
||||
'dashboards' => '\InfluxDB2\Model\Dashboard[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'links' => null,
|
||||
'dashboards' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'links' => 'links',
|
||||
'dashboards' => 'dashboards'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'links' => 'setLinks',
|
||||
'dashboards' => 'setDashboards'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'links' => 'getLinks',
|
||||
'dashboards' => 'getDashboards'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['links'] = isset($data['links']) ? $data['links'] : null;
|
||||
$this->container['dashboards'] = isset($data['dashboards']) ? $data['dashboards'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 links
|
||||
*
|
||||
* @return \InfluxDB2\Model\Links|null
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->container['links'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets links
|
||||
*
|
||||
* @param \InfluxDB2\Model\Links|null $links links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->container['links'] = $links;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets dashboards
|
||||
*
|
||||
* @return \InfluxDB2\Model\Dashboard[]|null
|
||||
*/
|
||||
public function getDashboards()
|
||||
{
|
||||
return $this->container['dashboards'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets dashboards
|
||||
*
|
||||
* @param \InfluxDB2\Model\Dashboard[]|null $dashboards dashboards
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDashboards($dashboards)
|
||||
{
|
||||
$this->container['dashboards'] = $dashboards;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* DateTimeLiteral
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DateTimeLiteral Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Represents an instant in time with nanosecond precision in [RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339nano-timestamp).
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DateTimeLiteral extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DateTimeLiteral';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'value' => '\DateTime'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'value' => 'date-time'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'value' => 'value'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'value' => 'setValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'value' => 'getValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['value'] = isset($data['value']) ? $data['value'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets value
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->container['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value
|
||||
*
|
||||
* @param \DateTime|null $value value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->container['value'] = $value;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+565
@@ -0,0 +1,565 @@
|
||||
<?php
|
||||
/**
|
||||
* DeadmanCheck
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DeadmanCheck Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DeadmanCheck extends Check
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DeadmanCheck';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'time_since' => 'string',
|
||||
'stale_time' => 'string',
|
||||
'report_zero' => 'bool',
|
||||
'level' => '\InfluxDB2\Model\CheckStatusLevel',
|
||||
'every' => 'string',
|
||||
'offset' => 'string',
|
||||
'tags' => '\InfluxDB2\Model\ThresholdCheckTags[]',
|
||||
'status_message_template' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'time_since' => null,
|
||||
'stale_time' => null,
|
||||
'report_zero' => null,
|
||||
'level' => null,
|
||||
'every' => null,
|
||||
'offset' => null,
|
||||
'tags' => null,
|
||||
'status_message_template' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'time_since' => 'timeSince',
|
||||
'stale_time' => 'staleTime',
|
||||
'report_zero' => 'reportZero',
|
||||
'level' => 'level',
|
||||
'every' => 'every',
|
||||
'offset' => 'offset',
|
||||
'tags' => 'tags',
|
||||
'status_message_template' => 'statusMessageTemplate'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'time_since' => 'setTimeSince',
|
||||
'stale_time' => 'setStaleTime',
|
||||
'report_zero' => 'setReportZero',
|
||||
'level' => 'setLevel',
|
||||
'every' => 'setEvery',
|
||||
'offset' => 'setOffset',
|
||||
'tags' => 'setTags',
|
||||
'status_message_template' => 'setStatusMessageTemplate'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'time_since' => 'getTimeSince',
|
||||
'stale_time' => 'getStaleTime',
|
||||
'report_zero' => 'getReportZero',
|
||||
'level' => 'getLevel',
|
||||
'every' => 'getEvery',
|
||||
'offset' => 'getOffset',
|
||||
'tags' => 'getTags',
|
||||
'status_message_template' => 'getStatusMessageTemplate'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const TYPE_DEADMAN = 'deadman';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_DEADMAN,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : "deadman";
|
||||
$this->container['time_since'] = isset($data['time_since']) ? $data['time_since'] : null;
|
||||
$this->container['stale_time'] = isset($data['stale_time']) ? $data['stale_time'] : null;
|
||||
$this->container['report_zero'] = isset($data['report_zero']) ? $data['report_zero'] : null;
|
||||
$this->container['level'] = isset($data['level']) ? $data['level'] : null;
|
||||
$this->container['every'] = isset($data['every']) ? $data['every'] : null;
|
||||
$this->container['offset'] = isset($data['offset']) ? $data['offset'] : null;
|
||||
$this->container['tags'] = isset($data['tags']) ? $data['tags'] : null;
|
||||
$this->container['status_message_template'] = isset($data['status_message_template']) ? $data['status_message_template'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
if ($this->container['type'] === null) {
|
||||
$invalidProperties[] = "'type' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets time_since
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTimeSince()
|
||||
{
|
||||
return $this->container['time_since'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets time_since
|
||||
*
|
||||
* @param string|null $time_since String duration before deadman triggers.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTimeSince($time_since)
|
||||
{
|
||||
$this->container['time_since'] = $time_since;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets stale_time
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStaleTime()
|
||||
{
|
||||
return $this->container['stale_time'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets stale_time
|
||||
*
|
||||
* @param string|null $stale_time String duration for time that a series is considered stale and should not trigger deadman.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStaleTime($stale_time)
|
||||
{
|
||||
$this->container['stale_time'] = $stale_time;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets report_zero
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getReportZero()
|
||||
{
|
||||
return $this->container['report_zero'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets report_zero
|
||||
*
|
||||
* @param bool|null $report_zero If only zero values reported since time, trigger an alert
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setReportZero($report_zero)
|
||||
{
|
||||
$this->container['report_zero'] = $report_zero;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets level
|
||||
*
|
||||
* @return \InfluxDB2\Model\CheckStatusLevel|null
|
||||
*/
|
||||
public function getLevel()
|
||||
{
|
||||
return $this->container['level'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets level
|
||||
*
|
||||
* @param \InfluxDB2\Model\CheckStatusLevel|null $level level
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLevel($level)
|
||||
{
|
||||
$this->container['level'] = $level;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets every
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEvery()
|
||||
{
|
||||
return $this->container['every'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets every
|
||||
*
|
||||
* @param string|null $every Check repetition interval.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setEvery($every)
|
||||
{
|
||||
$this->container['every'] = $every;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOffset()
|
||||
{
|
||||
return $this->container['offset'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets offset
|
||||
*
|
||||
* @param string|null $offset Duration to delay after the schedule, before executing check.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOffset($offset)
|
||||
{
|
||||
$this->container['offset'] = $offset;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tags
|
||||
*
|
||||
* @return \InfluxDB2\Model\ThresholdCheckTags[]|null
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
return $this->container['tags'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets tags
|
||||
*
|
||||
* @param \InfluxDB2\Model\ThresholdCheckTags[]|null $tags List of tags to write to each status.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTags($tags)
|
||||
{
|
||||
$this->container['tags'] = $tags;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status_message_template
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStatusMessageTemplate()
|
||||
{
|
||||
return $this->container['status_message_template'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status_message_template
|
||||
*
|
||||
* @param string|null $status_message_template The template used to generate and write a status message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatusMessageTemplate($status_message_template)
|
||||
{
|
||||
$this->container['status_message_template'] = $status_message_template;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+329
@@ -0,0 +1,329 @@
|
||||
<?php
|
||||
/**
|
||||
* DecimalPlaces
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DecimalPlaces Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Indicates whether decimal places should be enforced, and how many digits it should show.
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DecimalPlaces implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DecimalPlaces';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'is_enforced' => 'bool',
|
||||
'digits' => 'int'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'is_enforced' => null,
|
||||
'digits' => 'int32'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'is_enforced' => 'isEnforced',
|
||||
'digits' => 'digits'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'is_enforced' => 'setIsEnforced',
|
||||
'digits' => 'setDigits'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'is_enforced' => 'getIsEnforced',
|
||||
'digits' => 'getDigits'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['is_enforced'] = isset($data['is_enforced']) ? $data['is_enforced'] : null;
|
||||
$this->container['digits'] = isset($data['digits']) ? $data['digits'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 is_enforced
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getIsEnforced()
|
||||
{
|
||||
return $this->container['is_enforced'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets is_enforced
|
||||
*
|
||||
* @param bool|null $is_enforced Indicates whether decimal point setting should be enforced
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setIsEnforced($is_enforced)
|
||||
{
|
||||
$this->container['is_enforced'] = $is_enforced;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets digits
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getDigits()
|
||||
{
|
||||
return $this->container['digits'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets digits
|
||||
*
|
||||
* @param int|null $digits The number of digits after decimal to display
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDigits($digits)
|
||||
{
|
||||
$this->container['digits'] = $digits;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+365
@@ -0,0 +1,365 @@
|
||||
<?php
|
||||
/**
|
||||
* DeletePredicateRequest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DeletePredicateRequest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description The delete predicate request.
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DeletePredicateRequest implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DeletePredicateRequest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'start' => '\DateTime',
|
||||
'stop' => '\DateTime',
|
||||
'predicate' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'start' => 'date-time',
|
||||
'stop' => 'date-time',
|
||||
'predicate' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'start' => 'start',
|
||||
'stop' => 'stop',
|
||||
'predicate' => 'predicate'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'start' => 'setStart',
|
||||
'stop' => 'setStop',
|
||||
'predicate' => 'setPredicate'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'start' => 'getStart',
|
||||
'stop' => 'getStop',
|
||||
'predicate' => 'getPredicate'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['start'] = isset($data['start']) ? $data['start'] : null;
|
||||
$this->container['stop'] = isset($data['stop']) ? $data['stop'] : null;
|
||||
$this->container['predicate'] = isset($data['predicate']) ? $data['predicate'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['start'] === null) {
|
||||
$invalidProperties[] = "'start' can't be null";
|
||||
}
|
||||
if ($this->container['stop'] === null) {
|
||||
$invalidProperties[] = "'stop' can't be null";
|
||||
}
|
||||
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 start
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getStart()
|
||||
{
|
||||
return $this->container['start'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets start
|
||||
*
|
||||
* @param \DateTime $start A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)). The earliest time to delete from.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStart($start)
|
||||
{
|
||||
$this->container['start'] = $start;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets stop
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getStop()
|
||||
{
|
||||
return $this->container['stop'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets stop
|
||||
*
|
||||
* @param \DateTime $stop A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)). The latest time to delete from.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStop($stop)
|
||||
{
|
||||
$this->container['stop'] = $stop;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets predicate
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getPredicate()
|
||||
{
|
||||
return $this->container['predicate'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets predicate
|
||||
*
|
||||
* @param string|null $predicate An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/).
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPredicate($predicate)
|
||||
{
|
||||
$this->container['predicate'] = $predicate;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,507 @@
|
||||
<?php
|
||||
/**
|
||||
* Dialect
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Dialect Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Options for tabular data output. Default output is [annotated CSV](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/annotated-csv/#csv-response-format) with headers. For more information about tabular data **dialect**, see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions).
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Dialect implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Dialect';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'header' => 'bool',
|
||||
'delimiter' => 'string',
|
||||
'annotations' => 'string[]',
|
||||
'comment_prefix' => 'string',
|
||||
'date_time_format' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'header' => null,
|
||||
'delimiter' => null,
|
||||
'annotations' => null,
|
||||
'comment_prefix' => null,
|
||||
'date_time_format' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'header' => 'header',
|
||||
'delimiter' => 'delimiter',
|
||||
'annotations' => 'annotations',
|
||||
'comment_prefix' => 'commentPrefix',
|
||||
'date_time_format' => 'dateTimeFormat'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'header' => 'setHeader',
|
||||
'delimiter' => 'setDelimiter',
|
||||
'annotations' => 'setAnnotations',
|
||||
'comment_prefix' => 'setCommentPrefix',
|
||||
'date_time_format' => 'setDateTimeFormat'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'header' => 'getHeader',
|
||||
'delimiter' => 'getDelimiter',
|
||||
'annotations' => 'getAnnotations',
|
||||
'comment_prefix' => 'getCommentPrefix',
|
||||
'date_time_format' => 'getDateTimeFormat'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const ANNOTATIONS_GROUP = 'group';
|
||||
const ANNOTATIONS_DATATYPE = 'datatype';
|
||||
const ANNOTATIONS__DEFAULT = 'default';
|
||||
const DATE_TIME_FORMAT_RFC3339 = 'RFC3339';
|
||||
const DATE_TIME_FORMAT_RFC3339_NANO = 'RFC3339Nano';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAnnotationsAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::ANNOTATIONS_GROUP,
|
||||
self::ANNOTATIONS_DATATYPE,
|
||||
self::ANNOTATIONS__DEFAULT,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getDateTimeFormatAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::DATE_TIME_FORMAT_RFC3339,
|
||||
self::DATE_TIME_FORMAT_RFC3339_NANO,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['header'] = isset($data['header']) ? $data['header'] : true;
|
||||
$this->container['delimiter'] = isset($data['delimiter']) ? $data['delimiter'] : ',';
|
||||
$this->container['annotations'] = isset($data['annotations']) ? $data['annotations'] : null;
|
||||
$this->container['comment_prefix'] = isset($data['comment_prefix']) ? $data['comment_prefix'] : '#';
|
||||
$this->container['date_time_format'] = isset($data['date_time_format']) ? $data['date_time_format'] : 'RFC3339';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if (!is_null($this->container['delimiter']) && (mb_strlen($this->container['delimiter']) > 1)) {
|
||||
$invalidProperties[] = "invalid value for 'delimiter', the character length must be smaller than or equal to 1.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['delimiter']) && (mb_strlen($this->container['delimiter']) < 1)) {
|
||||
$invalidProperties[] = "invalid value for 'delimiter', the character length must be bigger than or equal to 1.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['comment_prefix']) && (mb_strlen($this->container['comment_prefix']) > 1)) {
|
||||
$invalidProperties[] = "invalid value for 'comment_prefix', the character length must be smaller than or equal to 1.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['comment_prefix']) && (mb_strlen($this->container['comment_prefix']) < 0)) {
|
||||
$invalidProperties[] = "invalid value for 'comment_prefix', the character length must be bigger than or equal to 0.";
|
||||
}
|
||||
|
||||
$allowedValues = $this->getDateTimeFormatAllowableValues();
|
||||
if (!is_null($this->container['date_time_format']) && !in_array($this->container['date_time_format'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'date_time_format', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 header
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getHeader()
|
||||
{
|
||||
return $this->container['header'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets header
|
||||
*
|
||||
* @param bool|null $header If true, the results contain a header row.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setHeader($header)
|
||||
{
|
||||
$this->container['header'] = $header;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets delimiter
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDelimiter()
|
||||
{
|
||||
return $this->container['delimiter'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets delimiter
|
||||
*
|
||||
* @param string|null $delimiter The separator used between cells. Default is a comma (`,`).
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDelimiter($delimiter)
|
||||
{
|
||||
if (!is_null($delimiter) && (mb_strlen($delimiter) > 1)) {
|
||||
throw new \InvalidArgumentException('invalid length for $delimiter when calling Dialect., must be smaller than or equal to 1.');
|
||||
}
|
||||
if (!is_null($delimiter) && (mb_strlen($delimiter) < 1)) {
|
||||
throw new \InvalidArgumentException('invalid length for $delimiter when calling Dialect., must be bigger than or equal to 1.');
|
||||
}
|
||||
|
||||
$this->container['delimiter'] = $delimiter;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets annotations
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getAnnotations()
|
||||
{
|
||||
return $this->container['annotations'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets annotations
|
||||
*
|
||||
* @param string[]|null $annotations Annotation rows to include in the results. An _annotation_ is metadata associated with an object (column) in the data model. #### Related guides - See [Annotated CSV annotations](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/annotated-csv/#annotations) for examples and more information. For more information about **annotations** in tabular data, see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns).
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAnnotations($annotations)
|
||||
{
|
||||
$allowedValues = $this->getAnnotationsAllowableValues();
|
||||
if (!is_null($annotations) && array_diff($annotations, $allowedValues)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'annotations', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['annotations'] = $annotations;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets comment_prefix
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getCommentPrefix()
|
||||
{
|
||||
return $this->container['comment_prefix'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets comment_prefix
|
||||
*
|
||||
* @param string|null $comment_prefix The character prefixed to comment strings. Default is a number sign (`#`).
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCommentPrefix($comment_prefix)
|
||||
{
|
||||
if (!is_null($comment_prefix) && (mb_strlen($comment_prefix) > 1)) {
|
||||
throw new \InvalidArgumentException('invalid length for $comment_prefix when calling Dialect., must be smaller than or equal to 1.');
|
||||
}
|
||||
if (!is_null($comment_prefix) && (mb_strlen($comment_prefix) < 0)) {
|
||||
throw new \InvalidArgumentException('invalid length for $comment_prefix when calling Dialect., must be bigger than or equal to 0.');
|
||||
}
|
||||
|
||||
$this->container['comment_prefix'] = $comment_prefix;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets date_time_format
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDateTimeFormat()
|
||||
{
|
||||
return $this->container['date_time_format'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets date_time_format
|
||||
*
|
||||
* @param string|null $date_time_format The format for timestamps in results. Default is [`RFC3339` date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp). To include nanoseconds in timestamps, use `RFC3339Nano`. #### Example formatted date/time values | Format | Value | |:------------|:----------------------------| | `RFC3339` | `"2006-01-02T15:04:05Z07:00"` | | `RFC3339Nano` | `"2006-01-02T15:04:05.999999999Z07:00"` |
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDateTimeFormat($date_time_format)
|
||||
{
|
||||
$allowedValues = $this->getDateTimeFormatAllowableValues();
|
||||
if (!is_null($date_time_format) && !in_array($date_time_format, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'date_time_format', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['date_time_format'] = $date_time_format;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* DictExpression
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DictExpression Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Used to create and directly specify the elements of a dictionary
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DictExpression extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DictExpression';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'elements' => '\InfluxDB2\Model\DictItem[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'elements' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'elements' => 'elements'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'elements' => 'setElements'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'elements' => 'getElements'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['elements'] = isset($data['elements']) ? $data['elements'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets elements
|
||||
*
|
||||
* @return \InfluxDB2\Model\DictItem[]|null
|
||||
*/
|
||||
public function getElements()
|
||||
{
|
||||
return $this->container['elements'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets elements
|
||||
*
|
||||
* @param \InfluxDB2\Model\DictItem[]|null $elements Elements of the dictionary
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setElements($elements)
|
||||
{
|
||||
$this->container['elements'] = $elements;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
<?php
|
||||
/**
|
||||
* DictItem
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DictItem Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description A key-value pair in a dictionary.
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DictItem implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DictItem';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'key' => '\InfluxDB2\Model\Expression',
|
||||
'val' => '\InfluxDB2\Model\Expression'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'key' => null,
|
||||
'val' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'key' => 'key',
|
||||
'val' => 'val'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'key' => 'setKey',
|
||||
'val' => 'setVal'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'key' => 'getKey',
|
||||
'val' => 'getVal'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['key'] = isset($data['key']) ? $data['key'] : null;
|
||||
$this->container['val'] = isset($data['val']) ? $data['val'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets key
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getKey()
|
||||
{
|
||||
return $this->container['key'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets key
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $key key
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setKey($key)
|
||||
{
|
||||
$this->container['key'] = $key;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets val
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getVal()
|
||||
{
|
||||
return $this->container['val'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets val
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $val val
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setVal($val)
|
||||
{
|
||||
$this->container['val'] = $val;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
<?php
|
||||
/**
|
||||
* Duration
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Duration Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description A pair consisting of length of time and the unit of time measured. It is the atomic unit from which all duration literals are composed.
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Duration implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Duration';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'magnitude' => 'int',
|
||||
'unit' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'magnitude' => 'int32',
|
||||
'unit' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'magnitude' => 'magnitude',
|
||||
'unit' => 'unit'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'magnitude' => 'setMagnitude',
|
||||
'unit' => 'setUnit'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'magnitude' => 'getMagnitude',
|
||||
'unit' => 'getUnit'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['magnitude'] = isset($data['magnitude']) ? $data['magnitude'] : null;
|
||||
$this->container['unit'] = isset($data['unit']) ? $data['unit'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets magnitude
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getMagnitude()
|
||||
{
|
||||
return $this->container['magnitude'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets magnitude
|
||||
*
|
||||
* @param int|null $magnitude magnitude
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMagnitude($magnitude)
|
||||
{
|
||||
$this->container['magnitude'] = $magnitude;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets unit
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUnit()
|
||||
{
|
||||
return $this->container['unit'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets unit
|
||||
*
|
||||
* @param string|null $unit unit
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUnit($unit)
|
||||
{
|
||||
$this->container['unit'] = $unit;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* DurationLiteral
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DurationLiteral Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Represents the elapsed time between two instants as an int64 nanosecond count with syntax of golang's time.Duration
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DurationLiteral extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DurationLiteral';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'values' => '\InfluxDB2\Model\Duration[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'values' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'values' => 'values'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'values' => 'setValues'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'values' => 'getValues'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['values'] = isset($data['values']) ? $data['values'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets values
|
||||
*
|
||||
* @return \InfluxDB2\Model\Duration[]|null
|
||||
*/
|
||||
public function getValues()
|
||||
{
|
||||
return $this->container['values'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets values
|
||||
*
|
||||
* @param \InfluxDB2\Model\Duration[]|null $values Duration values
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValues($values)
|
||||
{
|
||||
$this->container['values'] = $values;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,445 @@
|
||||
<?php
|
||||
/**
|
||||
* Error
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Error Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Error implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Error';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'code' => 'string',
|
||||
'message' => 'string',
|
||||
'op' => 'string',
|
||||
'err' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'code' => null,
|
||||
'message' => null,
|
||||
'op' => null,
|
||||
'err' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'code' => 'code',
|
||||
'message' => 'message',
|
||||
'op' => 'op',
|
||||
'err' => 'err'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'code' => 'setCode',
|
||||
'message' => 'setMessage',
|
||||
'op' => 'setOp',
|
||||
'err' => 'setErr'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'code' => 'getCode',
|
||||
'message' => 'getMessage',
|
||||
'op' => 'getOp',
|
||||
'err' => 'getErr'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const CODE_INTERNAL_ERROR = 'internal error';
|
||||
const CODE_NOT_FOUND = 'not found';
|
||||
const CODE_CONFLICT = 'conflict';
|
||||
const CODE_INVALID = 'invalid';
|
||||
const CODE_UNPROCESSABLE_ENTITY = 'unprocessable entity';
|
||||
const CODE_EMPTY_VALUE = 'empty value';
|
||||
const CODE_UNAVAILABLE = 'unavailable';
|
||||
const CODE_FORBIDDEN = 'forbidden';
|
||||
const CODE_TOO_MANY_REQUESTS = 'too many requests';
|
||||
const CODE_UNAUTHORIZED = 'unauthorized';
|
||||
const CODE_METHOD_NOT_ALLOWED = 'method not allowed';
|
||||
const CODE_REQUEST_TOO_LARGE = 'request too large';
|
||||
const CODE_UNSUPPORTED_MEDIA_TYPE = 'unsupported media type';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getCodeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::CODE_INTERNAL_ERROR,
|
||||
self::CODE_NOT_FOUND,
|
||||
self::CODE_CONFLICT,
|
||||
self::CODE_INVALID,
|
||||
self::CODE_UNPROCESSABLE_ENTITY,
|
||||
self::CODE_EMPTY_VALUE,
|
||||
self::CODE_UNAVAILABLE,
|
||||
self::CODE_FORBIDDEN,
|
||||
self::CODE_TOO_MANY_REQUESTS,
|
||||
self::CODE_UNAUTHORIZED,
|
||||
self::CODE_METHOD_NOT_ALLOWED,
|
||||
self::CODE_REQUEST_TOO_LARGE,
|
||||
self::CODE_UNSUPPORTED_MEDIA_TYPE,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
$this->container['op'] = isset($data['op']) ? $data['op'] : null;
|
||||
$this->container['err'] = isset($data['err']) ? $data['err'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['code'] === null) {
|
||||
$invalidProperties[] = "'code' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getCodeAllowableValues();
|
||||
if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'code', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets code
|
||||
*
|
||||
* @param string $code code is the machine-readable error code.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$allowedValues = $this->getCodeAllowableValues();
|
||||
if (!in_array($code, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'code', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->container['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets message
|
||||
*
|
||||
* @param string|null $message Human-readable message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->container['message'] = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets op
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getOp()
|
||||
{
|
||||
return $this->container['op'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets op
|
||||
*
|
||||
* @param string|null $op Describes the logical code operation when the error occurred. Useful for debugging.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOp($op)
|
||||
{
|
||||
$this->container['op'] = $op;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets err
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getErr()
|
||||
{
|
||||
return $this->container['err'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets err
|
||||
*
|
||||
* @param string|null $err Stack of errors that occurred during processing of the request. Useful for debugging.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setErr($err)
|
||||
{
|
||||
$this->container['err'] = $err;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+267
@@ -0,0 +1,267 @@
|
||||
<?php
|
||||
/**
|
||||
* Expression
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Expression Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Expression extends Node
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Expression';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* ExpressionStatement
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* ExpressionStatement Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description May consist of an expression that doesn't return a value and is executed solely for its side-effects
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ExpressionStatement extends Statement
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'ExpressionStatement';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'expression' => '\InfluxDB2\Model\Expression'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'expression' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'expression' => 'expression'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'expression' => 'setExpression'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'expression' => 'getExpression'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['expression'] = isset($data['expression']) ? $data['expression'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets expression
|
||||
*
|
||||
* @return \InfluxDB2\Model\Expression|null
|
||||
*/
|
||||
public function getExpression()
|
||||
{
|
||||
return $this->container['expression'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets expression
|
||||
*
|
||||
* @param \InfluxDB2\Model\Expression|null $expression expression
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setExpression($expression)
|
||||
{
|
||||
$this->container['expression'] = $expression;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,428 @@
|
||||
<?php
|
||||
/**
|
||||
* Field
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Field Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Field implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Field';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'value' => 'string',
|
||||
'type' => 'string',
|
||||
'alias' => 'string',
|
||||
'args' => '\InfluxDB2\Model\Field[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'value' => null,
|
||||
'type' => null,
|
||||
'alias' => null,
|
||||
'args' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'value' => 'value',
|
||||
'type' => 'type',
|
||||
'alias' => 'alias',
|
||||
'args' => 'args'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'value' => 'setValue',
|
||||
'type' => 'setType',
|
||||
'alias' => 'setAlias',
|
||||
'args' => 'setArgs'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'value' => 'getValue',
|
||||
'type' => 'getType',
|
||||
'alias' => 'getAlias',
|
||||
'args' => 'getArgs'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
const TYPE_FUNC = 'func';
|
||||
const TYPE_FIELD = 'field';
|
||||
const TYPE_INTEGER = 'integer';
|
||||
const TYPE_NUMBER = 'number';
|
||||
const TYPE_REGEX = 'regex';
|
||||
const TYPE_WILDCARD = 'wildcard';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_FUNC,
|
||||
self::TYPE_FIELD,
|
||||
self::TYPE_INTEGER,
|
||||
self::TYPE_NUMBER,
|
||||
self::TYPE_REGEX,
|
||||
self::TYPE_WILDCARD,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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->container['value'] = isset($data['value']) ? $data['value'] : null;
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['alias'] = isset($data['alias']) ? $data['alias'] : null;
|
||||
$this->container['args'] = isset($data['args']) ? $data['args'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 value
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->container['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value
|
||||
*
|
||||
* @param string|null $value value is the value of the field. Meaning of the value is implied by the `type` key
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->container['value'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type `type` describes the field type. `func` is a function. `field` is a field reference.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($type) && !in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets alias
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getAlias()
|
||||
{
|
||||
return $this->container['alias'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets alias
|
||||
*
|
||||
* @param string|null $alias Alias overrides the field name in the returned response. Applies only if type is `func`
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAlias($alias)
|
||||
{
|
||||
$this->container['alias'] = $alias;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets args
|
||||
*
|
||||
* @return \InfluxDB2\Model\Field[]|null
|
||||
*/
|
||||
public function getArgs()
|
||||
{
|
||||
return $this->container['args'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets args
|
||||
*
|
||||
* @param \InfluxDB2\Model\Field[]|null $args Args are the arguments to the function
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setArgs($args)
|
||||
{
|
||||
$this->container['args'] = $args;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
<?php
|
||||
/**
|
||||
* File
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* File Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Represents a source from a single file
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class File implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'File';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'name' => 'string',
|
||||
'package' => '\InfluxDB2\Model\PackageClause',
|
||||
'imports' => '\InfluxDB2\Model\ImportDeclaration[]',
|
||||
'body' => '\InfluxDB2\Model\Statement[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'name' => null,
|
||||
'package' => null,
|
||||
'imports' => null,
|
||||
'body' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'name' => 'name',
|
||||
'package' => 'package',
|
||||
'imports' => 'imports',
|
||||
'body' => 'body'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'name' => 'setName',
|
||||
'package' => 'setPackage',
|
||||
'imports' => 'setImports',
|
||||
'body' => 'setBody'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'name' => 'getName',
|
||||
'package' => 'getPackage',
|
||||
'imports' => 'getImports',
|
||||
'body' => 'getBody'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['package'] = isset($data['package']) ? $data['package'] : null;
|
||||
$this->container['imports'] = isset($data['imports']) ? $data['imports'] : null;
|
||||
$this->container['body'] = isset($data['body']) ? $data['body'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name The name of the file.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets package
|
||||
*
|
||||
* @return \InfluxDB2\Model\PackageClause|null
|
||||
*/
|
||||
public function getPackage()
|
||||
{
|
||||
return $this->container['package'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets package
|
||||
*
|
||||
* @param \InfluxDB2\Model\PackageClause|null $package package
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPackage($package)
|
||||
{
|
||||
$this->container['package'] = $package;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets imports
|
||||
*
|
||||
* @return \InfluxDB2\Model\ImportDeclaration[]|null
|
||||
*/
|
||||
public function getImports()
|
||||
{
|
||||
return $this->container['imports'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets imports
|
||||
*
|
||||
* @param \InfluxDB2\Model\ImportDeclaration[]|null $imports A list of package imports
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setImports($imports)
|
||||
{
|
||||
$this->container['imports'] = $imports;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets body
|
||||
*
|
||||
* @return \InfluxDB2\Model\Statement[]|null
|
||||
*/
|
||||
public function getBody()
|
||||
{
|
||||
return $this->container['body'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets body
|
||||
*
|
||||
* @param \InfluxDB2\Model\Statement[]|null $body List of Flux statements
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBody($body)
|
||||
{
|
||||
$this->container['body'] = $body;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/**
|
||||
* FloatLiteral
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* FloatLiteral Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Represents floating point numbers according to the double representations defined by the IEEE-754-1985
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class FloatLiteral extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'FloatLiteral';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'value' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'value' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'value' => 'value'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'value' => 'setValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'value' => 'getValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['value'] = isset($data['value']) ? $data['value'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets value
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->container['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value
|
||||
*
|
||||
* @param float|null $value value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->container['value'] = $value;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+299
@@ -0,0 +1,299 @@
|
||||
<?php
|
||||
/**
|
||||
* FluxResponse
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* FluxResponse Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Rendered flux that backs the check or notification.
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class FluxResponse implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'FluxResponse';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'flux' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'flux' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'flux' => 'flux'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'flux' => 'setFlux'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'flux' => 'getFlux'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['flux'] = isset($data['flux']) ? $data['flux'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 flux
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFlux()
|
||||
{
|
||||
return $this->container['flux'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets flux
|
||||
*
|
||||
* @param string|null $flux flux
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFlux($flux)
|
||||
{
|
||||
$this->container['flux'] = $flux;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+328
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* FluxSuggestion
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* FluxSuggestion Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class FluxSuggestion implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'FluxSuggestion';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string',
|
||||
'params' => 'map[string,string]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null,
|
||||
'params' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name',
|
||||
'params' => 'params'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName',
|
||||
'params' => 'setParams'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName',
|
||||
'params' => 'getParams'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['params'] = isset($data['params']) ? $data['params'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets params
|
||||
*
|
||||
* @return map[string,string]|null
|
||||
*/
|
||||
public function getParams()
|
||||
{
|
||||
return $this->container['params'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets params
|
||||
*
|
||||
* @param map[string,string]|null $params params
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setParams($params)
|
||||
{
|
||||
$this->container['params'] = $params;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
/**
|
||||
* FluxSuggestions
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* FluxSuggestions Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class FluxSuggestions implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'FluxSuggestions';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'funcs' => '\InfluxDB2\Model\FluxSuggestion[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'funcs' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'funcs' => 'funcs'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'funcs' => 'setFuncs'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'funcs' => 'getFuncs'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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->container['funcs'] = isset($data['funcs']) ? $data['funcs'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
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 funcs
|
||||
*
|
||||
* @return \InfluxDB2\Model\FluxSuggestion[]|null
|
||||
*/
|
||||
public function getFuncs()
|
||||
{
|
||||
return $this->container['funcs'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets funcs
|
||||
*
|
||||
* @param \InfluxDB2\Model\FluxSuggestion[]|null $funcs funcs
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFuncs($funcs)
|
||||
{
|
||||
$this->container['funcs'] = $funcs;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+353
@@ -0,0 +1,353 @@
|
||||
<?php
|
||||
/**
|
||||
* FunctionExpression
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* FunctionExpression Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Function expression
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class FunctionExpression extends Expression
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'FunctionExpression';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'params' => '\InfluxDB2\Model\Property[]',
|
||||
'body' => '\InfluxDB2\Model\Node'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'params' => null,
|
||||
'body' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'params' => 'params',
|
||||
'body' => 'body'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'params' => 'setParams',
|
||||
'body' => 'setBody'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'params' => 'getParams',
|
||||
'body' => 'getBody'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['params'] = isset($data['params']) ? $data['params'] : null;
|
||||
$this->container['body'] = isset($data['body']) ? $data['body'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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 type
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string|null $type Type of AST node
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets params
|
||||
*
|
||||
* @return \InfluxDB2\Model\Property[]|null
|
||||
*/
|
||||
public function getParams()
|
||||
{
|
||||
return $this->container['params'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets params
|
||||
*
|
||||
* @param \InfluxDB2\Model\Property[]|null $params Function parameters
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setParams($params)
|
||||
{
|
||||
$this->container['params'] = $params;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets body
|
||||
*
|
||||
* @return \InfluxDB2\Model\Node|null
|
||||
*/
|
||||
public function getBody()
|
||||
{
|
||||
return $this->container['body'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets body
|
||||
*
|
||||
* @param \InfluxDB2\Model\Node|null $body body
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBody($body)
|
||||
{
|
||||
$this->container['body'] = $body;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+685
@@ -0,0 +1,685 @@
|
||||
<?php
|
||||
/**
|
||||
* GaugeViewProperties
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* GaugeViewProperties Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class GaugeViewProperties extends ViewProperties
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'GaugeViewProperties';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'queries' => '\InfluxDB2\Model\DashboardQuery[]',
|
||||
'colors' => '\InfluxDB2\Model\DashboardColor[]',
|
||||
'shape' => 'string',
|
||||
'note' => 'string',
|
||||
'show_note_when_empty' => 'bool',
|
||||
'prefix' => 'string',
|
||||
'tick_prefix' => 'string',
|
||||
'suffix' => 'string',
|
||||
'tick_suffix' => 'string',
|
||||
'decimal_places' => '\InfluxDB2\Model\DecimalPlaces'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'queries' => null,
|
||||
'colors' => null,
|
||||
'shape' => null,
|
||||
'note' => null,
|
||||
'show_note_when_empty' => null,
|
||||
'prefix' => null,
|
||||
'tick_prefix' => null,
|
||||
'suffix' => null,
|
||||
'tick_suffix' => null,
|
||||
'decimal_places' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'queries' => 'queries',
|
||||
'colors' => 'colors',
|
||||
'shape' => 'shape',
|
||||
'note' => 'note',
|
||||
'show_note_when_empty' => 'showNoteWhenEmpty',
|
||||
'prefix' => 'prefix',
|
||||
'tick_prefix' => 'tickPrefix',
|
||||
'suffix' => 'suffix',
|
||||
'tick_suffix' => 'tickSuffix',
|
||||
'decimal_places' => 'decimalPlaces'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'queries' => 'setQueries',
|
||||
'colors' => 'setColors',
|
||||
'shape' => 'setShape',
|
||||
'note' => 'setNote',
|
||||
'show_note_when_empty' => 'setShowNoteWhenEmpty',
|
||||
'prefix' => 'setPrefix',
|
||||
'tick_prefix' => 'setTickPrefix',
|
||||
'suffix' => 'setSuffix',
|
||||
'tick_suffix' => 'setTickSuffix',
|
||||
'decimal_places' => 'setDecimalPlaces'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'queries' => 'getQueries',
|
||||
'colors' => 'getColors',
|
||||
'shape' => 'getShape',
|
||||
'note' => 'getNote',
|
||||
'show_note_when_empty' => 'getShowNoteWhenEmpty',
|
||||
'prefix' => 'getPrefix',
|
||||
'tick_prefix' => 'getTickPrefix',
|
||||
'suffix' => 'getSuffix',
|
||||
'tick_suffix' => 'getTickSuffix',
|
||||
'decimal_places' => 'getDecimalPlaces'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const TYPE_GAUGE = 'gauge';
|
||||
const SHAPE_CHRONOGRAF_V2 = 'chronograf-v2';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_GAUGE,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getShapeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::SHAPE_CHRONOGRAF_V2,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : TYPE_GAUGE;
|
||||
$this->container['queries'] = isset($data['queries']) ? $data['queries'] : null;
|
||||
$this->container['colors'] = isset($data['colors']) ? $data['colors'] : null;
|
||||
$this->container['shape'] = isset($data['shape']) ? $data['shape'] : SHAPE_CHRONOGRAF_V2;
|
||||
$this->container['note'] = isset($data['note']) ? $data['note'] : null;
|
||||
$this->container['show_note_when_empty'] = isset($data['show_note_when_empty']) ? $data['show_note_when_empty'] : null;
|
||||
$this->container['prefix'] = isset($data['prefix']) ? $data['prefix'] : null;
|
||||
$this->container['tick_prefix'] = isset($data['tick_prefix']) ? $data['tick_prefix'] : null;
|
||||
$this->container['suffix'] = isset($data['suffix']) ? $data['suffix'] : null;
|
||||
$this->container['tick_suffix'] = isset($data['tick_suffix']) ? $data['tick_suffix'] : null;
|
||||
$this->container['decimal_places'] = isset($data['decimal_places']) ? $data['decimal_places'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
if ($this->container['type'] === null) {
|
||||
$invalidProperties[] = "'type' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['queries'] === null) {
|
||||
$invalidProperties[] = "'queries' can't be null";
|
||||
}
|
||||
if ($this->container['colors'] === null) {
|
||||
$invalidProperties[] = "'colors' can't be null";
|
||||
}
|
||||
if ($this->container['shape'] === null) {
|
||||
$invalidProperties[] = "'shape' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getShapeAllowableValues();
|
||||
if (!is_null($this->container['shape']) && !in_array($this->container['shape'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'shape', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['note'] === null) {
|
||||
$invalidProperties[] = "'note' can't be null";
|
||||
}
|
||||
if ($this->container['show_note_when_empty'] === null) {
|
||||
$invalidProperties[] = "'show_note_when_empty' can't be null";
|
||||
}
|
||||
if ($this->container['prefix'] === null) {
|
||||
$invalidProperties[] = "'prefix' can't be null";
|
||||
}
|
||||
if ($this->container['tick_prefix'] === null) {
|
||||
$invalidProperties[] = "'tick_prefix' can't be null";
|
||||
}
|
||||
if ($this->container['suffix'] === null) {
|
||||
$invalidProperties[] = "'suffix' can't be null";
|
||||
}
|
||||
if ($this->container['tick_suffix'] === null) {
|
||||
$invalidProperties[] = "'tick_suffix' can't be null";
|
||||
}
|
||||
if ($this->container['decimal_places'] === null) {
|
||||
$invalidProperties[] = "'decimal_places' can't be null";
|
||||
}
|
||||
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 type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets queries
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardQuery[]
|
||||
*/
|
||||
public function getQueries()
|
||||
{
|
||||
return $this->container['queries'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets queries
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardQuery[] $queries queries
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQueries($queries)
|
||||
{
|
||||
$this->container['queries'] = $queries;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets colors
|
||||
*
|
||||
* @return \InfluxDB2\Model\DashboardColor[]
|
||||
*/
|
||||
public function getColors()
|
||||
{
|
||||
return $this->container['colors'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets colors
|
||||
*
|
||||
* @param \InfluxDB2\Model\DashboardColor[] $colors Colors define color encoding of data into a visualization
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setColors($colors)
|
||||
{
|
||||
$this->container['colors'] = $colors;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets shape
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getShape()
|
||||
{
|
||||
return $this->container['shape'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets shape
|
||||
*
|
||||
* @param string $shape shape
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setShape($shape)
|
||||
{
|
||||
$allowedValues = $this->getShapeAllowableValues();
|
||||
if (!in_array($shape, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'shape', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['shape'] = $shape;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets note
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNote()
|
||||
{
|
||||
return $this->container['note'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets note
|
||||
*
|
||||
* @param string $note note
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setNote($note)
|
||||
{
|
||||
$this->container['note'] = $note;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets show_note_when_empty
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getShowNoteWhenEmpty()
|
||||
{
|
||||
return $this->container['show_note_when_empty'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets show_note_when_empty
|
||||
*
|
||||
* @param bool $show_note_when_empty If true, will display note when empty
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setShowNoteWhenEmpty($show_note_when_empty)
|
||||
{
|
||||
$this->container['show_note_when_empty'] = $show_note_when_empty;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets prefix
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPrefix()
|
||||
{
|
||||
return $this->container['prefix'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets prefix
|
||||
*
|
||||
* @param string $prefix prefix
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPrefix($prefix)
|
||||
{
|
||||
$this->container['prefix'] = $prefix;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tick_prefix
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTickPrefix()
|
||||
{
|
||||
return $this->container['tick_prefix'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets tick_prefix
|
||||
*
|
||||
* @param string $tick_prefix tick_prefix
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTickPrefix($tick_prefix)
|
||||
{
|
||||
$this->container['tick_prefix'] = $tick_prefix;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets suffix
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSuffix()
|
||||
{
|
||||
return $this->container['suffix'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets suffix
|
||||
*
|
||||
* @param string $suffix suffix
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSuffix($suffix)
|
||||
{
|
||||
$this->container['suffix'] = $suffix;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tick_suffix
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTickSuffix()
|
||||
{
|
||||
return $this->container['tick_suffix'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets tick_suffix
|
||||
*
|
||||
* @param string $tick_suffix tick_suffix
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTickSuffix($tick_suffix)
|
||||
{
|
||||
$this->container['tick_suffix'] = $tick_suffix;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets decimal_places
|
||||
*
|
||||
* @return \InfluxDB2\Model\DecimalPlaces
|
||||
*/
|
||||
public function getDecimalPlaces()
|
||||
{
|
||||
return $this->container['decimal_places'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets decimal_places
|
||||
*
|
||||
* @param \InfluxDB2\Model\DecimalPlaces $decimal_places decimal_places
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDecimalPlaces($decimal_places)
|
||||
{
|
||||
$this->container['decimal_places'] = $decimal_places;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+358
@@ -0,0 +1,358 @@
|
||||
<?php
|
||||
/**
|
||||
* GreaterThreshold
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* GreaterThreshold Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class GreaterThreshold extends Threshold
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'GreaterThreshold';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'type' => 'string',
|
||||
'value' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'type' => null,
|
||||
'value' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'type' => 'type',
|
||||
'value' => 'value'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'type' => 'setType',
|
||||
'value' => 'setValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'type' => 'getType',
|
||||
'value' => 'getValue'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const TYPE_GREATER = 'greater';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getTypeAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::TYPE_GREATER,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : "greater";
|
||||
$this->container['value'] = isset($data['value']) ? $data['value'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
if ($this->container['type'] === null) {
|
||||
$invalidProperties[] = "'type' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['value'] === null) {
|
||||
$invalidProperties[] = "'value' can't be null";
|
||||
}
|
||||
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 type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->container['type'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$allowedValues = $this->getTypeAllowableValues();
|
||||
if (!in_array($type, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'type', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['type'] = $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets value
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->container['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value
|
||||
*
|
||||
* @param float $value value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->container['value'] = $value;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+579
@@ -0,0 +1,579 @@
|
||||
<?php
|
||||
/**
|
||||
* HTTPNotificationEndpoint
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* HTTPNotificationEndpoint Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class HTTPNotificationEndpoint extends NotificationEndpoint
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'HTTPNotificationEndpoint';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'url' => 'string',
|
||||
'username' => 'string',
|
||||
'password' => 'string',
|
||||
'token' => 'string',
|
||||
'method' => 'string',
|
||||
'auth_method' => 'string',
|
||||
'content_template' => 'string',
|
||||
'headers' => 'map[string,string]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'url' => null,
|
||||
'username' => null,
|
||||
'password' => null,
|
||||
'token' => null,
|
||||
'method' => null,
|
||||
'auth_method' => null,
|
||||
'content_template' => null,
|
||||
'headers' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'url' => 'url',
|
||||
'username' => 'username',
|
||||
'password' => 'password',
|
||||
'token' => 'token',
|
||||
'method' => 'method',
|
||||
'auth_method' => 'authMethod',
|
||||
'content_template' => 'contentTemplate',
|
||||
'headers' => 'headers'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'url' => 'setUrl',
|
||||
'username' => 'setUsername',
|
||||
'password' => 'setPassword',
|
||||
'token' => 'setToken',
|
||||
'method' => 'setMethod',
|
||||
'auth_method' => 'setAuthMethod',
|
||||
'content_template' => 'setContentTemplate',
|
||||
'headers' => 'setHeaders'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'url' => 'getUrl',
|
||||
'username' => 'getUsername',
|
||||
'password' => 'getPassword',
|
||||
'token' => 'getToken',
|
||||
'method' => 'getMethod',
|
||||
'auth_method' => 'getAuthMethod',
|
||||
'content_template' => 'getContentTemplate',
|
||||
'headers' => 'getHeaders'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const METHOD_POST = 'POST';
|
||||
const METHOD_GET = 'GET';
|
||||
const METHOD_PUT = 'PUT';
|
||||
const AUTH_METHOD_NONE = 'none';
|
||||
const AUTH_METHOD_BASIC = 'basic';
|
||||
const AUTH_METHOD_BEARER = 'bearer';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getMethodAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::METHOD_POST,
|
||||
self::METHOD_GET,
|
||||
self::METHOD_PUT,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAuthMethodAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::AUTH_METHOD_NONE,
|
||||
self::AUTH_METHOD_BASIC,
|
||||
self::AUTH_METHOD_BEARER,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['url'] = isset($data['url']) ? $data['url'] : null;
|
||||
$this->container['username'] = isset($data['username']) ? $data['username'] : null;
|
||||
$this->container['password'] = isset($data['password']) ? $data['password'] : null;
|
||||
$this->container['token'] = isset($data['token']) ? $data['token'] : null;
|
||||
$this->container['method'] = isset($data['method']) ? $data['method'] : null;
|
||||
$this->container['auth_method'] = isset($data['auth_method']) ? $data['auth_method'] : null;
|
||||
$this->container['content_template'] = isset($data['content_template']) ? $data['content_template'] : null;
|
||||
$this->container['headers'] = isset($data['headers']) ? $data['headers'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
if ($this->container['url'] === null) {
|
||||
$invalidProperties[] = "'url' can't be null";
|
||||
}
|
||||
if ($this->container['method'] === null) {
|
||||
$invalidProperties[] = "'method' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getMethodAllowableValues();
|
||||
if (!is_null($this->container['method']) && !in_array($this->container['method'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'method', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->container['auth_method'] === null) {
|
||||
$invalidProperties[] = "'auth_method' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getAuthMethodAllowableValues();
|
||||
if (!is_null($this->container['auth_method']) && !in_array($this->container['auth_method'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'auth_method', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
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 url
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->container['url'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets url
|
||||
*
|
||||
* @param string $url url
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->container['url'] = $url;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets username
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUsername()
|
||||
{
|
||||
return $this->container['username'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets username
|
||||
*
|
||||
* @param string|null $username username
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUsername($username)
|
||||
{
|
||||
$this->container['username'] = $username;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets password
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->container['password'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets password
|
||||
*
|
||||
* @param string|null $password password
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPassword($password)
|
||||
{
|
||||
$this->container['password'] = $password;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets token
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getToken()
|
||||
{
|
||||
return $this->container['token'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets token
|
||||
*
|
||||
* @param string|null $token token
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setToken($token)
|
||||
{
|
||||
$this->container['token'] = $token;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethod()
|
||||
{
|
||||
return $this->container['method'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets method
|
||||
*
|
||||
* @param string $method method
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMethod($method)
|
||||
{
|
||||
$allowedValues = $this->getMethodAllowableValues();
|
||||
if (!in_array($method, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'method', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['method'] = $method;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets auth_method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAuthMethod()
|
||||
{
|
||||
return $this->container['auth_method'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets auth_method
|
||||
*
|
||||
* @param string $auth_method auth_method
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAuthMethod($auth_method)
|
||||
{
|
||||
$allowedValues = $this->getAuthMethodAllowableValues();
|
||||
if (!in_array($auth_method, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'auth_method', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['auth_method'] = $auth_method;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets content_template
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getContentTemplate()
|
||||
{
|
||||
return $this->container['content_template'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets content_template
|
||||
*
|
||||
* @param string|null $content_template content_template
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setContentTemplate($content_template)
|
||||
{
|
||||
$this->container['content_template'] = $content_template;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets headers
|
||||
*
|
||||
* @return map[string,string]|null
|
||||
*/
|
||||
public function getHeaders()
|
||||
{
|
||||
return $this->container['headers'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets headers
|
||||
*
|
||||
* @param map[string,string]|null $headers Customized headers.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setHeaders($headers)
|
||||
{
|
||||
$this->container['headers'] = $headers;
|
||||
|
||||
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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+267
@@ -0,0 +1,267 @@
|
||||
<?php
|
||||
/**
|
||||
* HTTPNotificationRule
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* InfluxDB OSS API Service
|
||||
*
|
||||
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
*
|
||||
* OpenAPI spec version: 2.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.3.4
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace InfluxDB2\Model;
|
||||
use \InfluxDB2\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* HTTPNotificationRule Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package InfluxDB2
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class HTTPNotificationRule extends HTTPNotificationRuleBase
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'HTTPNotificationRule';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user