U wi @ s( d Z ddlZddlZG dd deZdS )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 ZdZddddZddddZd ddZed d Zej dd Zedd Z e j dd Z edd Zej dd Zdd Zdd Z dd Zdd Zdd Zd S )!PatchRetentionRulezNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. strint)type every_secondsshard_group_duration_secondsr ZeverySecondsZshardGroupDurationSecondsexpire ' Nc C s> d| _ d| _d| _d| _|dk r&|| _|| _|dk r:|| _dS )z0PatchRetentionRule - a model defined in OpenAPI.N)_type_every_seconds_shard_group_duration_secondsZ discriminatorr r r )selfr r r r \/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/domain/patch_retention_rule.py__init__, s zPatchRetentionRule.__init__c C s | j S )z|Get the type of this PatchRetentionRule. :return: The type of this PatchRetentionRule. :rtype: str r r r r r r 9 s zPatchRetentionRule.typec C s || _ dS )zSet the type of this PatchRetentionRule. :param type: The type of this PatchRetentionRule. :type: str Nr )r r r r r r B s c C s | j S )a Get the every_seconds of this PatchRetentionRule. The number of seconds to keep data. Default duration is `2592000` (30 days). `0` represents infinite retention. :return: The every_seconds of this PatchRetentionRule. :rtype: int )r r r r r r K s z PatchRetentionRule.every_secondsc C s2 |dkrt d|dk r(|dk r(t d|| _dS )a Set the every_seconds of this PatchRetentionRule. The number of seconds to keep data. Default duration is `2592000` (30 days). `0` represents infinite retention. :param every_seconds: The every_seconds of this PatchRetentionRule. :type: int Nz5Invalid value for `every_seconds`, must not be `None`r zOInvalid value for `every_seconds`, must be a value greater than or equal to `0`) ValueErrorr )r r r r r r V s c C s | j S )a Get the shard_group_duration_seconds of this PatchRetentionRule. The [shard group duration](https://docs.influxdata.com/influxdb/latest/reference/glossary/#shard). The number of seconds that each shard group covers. #### InfluxDB Cloud - Doesn't use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). #### Related guides - InfluxDB [shards and shard groups](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/) :return: The shard_group_duration_seconds of this PatchRetentionRule. :rtype: int r r r r r r e s z/PatchRetentionRule.shard_group_duration_secondsc C s || _ dS )a Set the shard_group_duration_seconds of this PatchRetentionRule. The [shard group duration](https://docs.influxdata.com/influxdb/latest/reference/glossary/#shard). The number of seconds that each shard group covers. #### InfluxDB Cloud - Doesn't use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). #### Related guides - InfluxDB [shards and shard groups](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/) :param shard_group_duration_seconds: The shard_group_duration_seconds of this PatchRetentionRule. :type: int Nr )r r r r r r p s c C s i }| j D ]z\}}t| |}t|trBttdd |||<