U vi @ 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 )!BucketRetentionRuleszNOTE: 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 )z2BucketRetentionRules - 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/bucket_retention_rules.py__init__, s zBucketRetentionRules.__init__c C s | j S )zGet the type of this BucketRetentionRules. :return: The type of this BucketRetentionRules. :rtype: str r r r r r r 9 s zBucketRetentionRules.typec C s || _ dS )zSet the type of this BucketRetentionRules. :param type: The type of this BucketRetentionRules. :type: str Nr )r r r r r r B s c C s | j S )a/ Get the every_seconds of this BucketRetentionRules. 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: The every_seconds of this BucketRetentionRules. :rtype: int )r r r r r r K s z"BucketRetentionRules.every_secondsc C s2 |dkrt d|dk r(|dk r(t d|| _dS )a; Set the every_seconds of this BucketRetentionRules. 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. :param every_seconds: The every_seconds of this BucketRetentionRules. :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 BucketRetentionRules. 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/latest/reference/internals/shards/#shard-group-duration). :return: The shard_group_duration_seconds of this BucketRetentionRules. :rtype: int r r r r r r e s z1BucketRetentionRules.shard_group_duration_secondsc C s || _ dS )a! Set the shard_group_duration_seconds of this BucketRetentionRules. 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/latest/reference/internals/shards/#shard-group-duration). :param shard_group_duration_seconds: The shard_group_duration_seconds of this BucketRetentionRules. :type: int Nr )r r r r r r p s c C s i }| j D ]z\}}t| |}t|trBttdd |||<