U wâ’iï ã @ s( d Z ddlZddlZG dd„ deƒZdS )a 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. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech é Nc @ s e Zd ZdZdddddddœZdd d ddd dœZd-dd„Zedd„ ƒZej dd„ ƒZedd„ ƒZ e j dd„ ƒZ edd„ ƒZej dd„ ƒZedd„ ƒZej dd„ ƒZedd„ ƒZ e j dd„ ƒZ ed d!„ ƒZej d"d!„ ƒZd#d$„ Zd%d&„ Zd'd(„ Zd)d*„ Zd+d,„ ZdS ).ÚQueryz‹NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. ÚFileÚstrzdict(str, object)ÚDialectÚdatetime)ÚexternÚqueryÚtypeÚparamsÚdialectÚnowr r r r r r Nc C sz d| _ d| _d| _d| _d| _d| _d| _|dk r8|| _|| _|dk rL|| _ |dk rZ|| _ |dk rh|| _|dk rv|| _dS )z#Query - a model defined in OpenAPI.N) Ú_externÚ_queryÚ_typeÚ_paramsÚ_dialectÚ_nowZ discriminatorr r r r r r )Úselfr r r r r r © r úM/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/domain/query.pyÚ__init__2 s$ zQuery.__init__c C s | j S )zgGet the extern of this Query. :return: The extern of this Query. :rtype: File ©r ©r r r r r H s zQuery.externc C s || _ dS )zlSet the extern of this Query. :param extern: The extern of this Query. :type: File Nr )r r r r r r Q s c C s | j S )zŠGet the query of this Query. The query script to execute. :return: The query of this Query. :rtype: str )r r r r r r Z s zQuery.queryc C s |dkrt dƒ‚|| _dS )zŽSet the query of this Query. The query script to execute. :param query: The query of this Query. :type: str Nz-Invalid value for `query`, must not be `None`)Ú ValueErrorr )r r r r r r e s c C s | j S )zŽGet the type of this Query. The type of query. Must be "flux". :return: The type of this Query. :rtype: str ©r r r r r r r s z Query.typec C s || _ dS )z‘Set the type of this Query. The type of query. Must be "flux". :param type: The type of this Query. :type: str Nr )r r r r r r } s c C s | j S )aÓ Get the params of this Query. Key-value pairs passed as parameters during query execution. To use parameters in your query, pass a _`query`_ with `params` references (in dot notation)--for example: ```json query: "from(bucket: params.mybucket)\\ |> range(start: params.rangeStart) |> limit(n:1)" ``` and pass _`params`_ with the key-value pairs--for example: ```json params: { "mybucket": "environment", "rangeStart": "-30d" } ``` During query execution, InfluxDB passes _`params`_ to your script and substitutes the values. #### Limitations - If you use _`params`_, you can't use _`extern`_. :return: The params of this Query. :rtype: dict(str, object) ©r r r r r r ˆ s zQuery.paramsc C s || _ dS )aØ Set the params of this Query. Key-value pairs passed as parameters during query execution. To use parameters in your query, pass a _`query`_ with `params` references (in dot notation)--for example: ```json query: "from(bucket: params.mybucket)\\ |> range(start: params.rangeStart) |> limit(n:1)" ``` and pass _`params`_ with the key-value pairs--for example: ```json params: { "mybucket": "environment", "rangeStart": "-30d" } ``` During query execution, InfluxDB passes _`params`_ to your script and substitutes the values. #### Limitations - If you use _`params`_, you can't use _`extern`_. :param params: The params of this Query. :type: dict(str, object) Nr )r r r r r r “ s c C s | j S )zlGet the dialect of this Query. :return: The dialect of this Query. :rtype: Dialect ©r r r r r r ž s z Query.dialectc C s || _ dS )zrSet the dialect of this Query. :param dialect: The dialect of this Query. :type: Dialect Nr )r r r r r r § s c C s | j S )zÒGet the now of this Query. Specifies the time that should be reported as `now` in the query. Default is the server `now` time. :return: The now of this Query. :rtype: datetime ©r r r r r r ° s z Query.nowc C s || _ dS )zÔSet the now of this Query. Specifies the time that should be reported as `now` in the query. Default is the server `now` time. :param now: The now of this Query. :type: datetime Nr )r r r r r r » s c C sŽ i }| j ¡ D ]z\}}t| |ƒ}t|tƒrBttdd„ |ƒƒ||<