U wiD@s(dZddlZddlZGdddeZdS)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@seZdZdZddddddddddddddddddddZdd d d d d ddddddddddddddZdaddZeddZej d dZed!d"Z e j d#d"Z ed$d%Z e j d&d%Z ed'd(Z e j d)d(Z ed*d+Z e j d,d+Z ed-d.Zej d/d.Zed0d1Zej d2d1Zed3d4Zej d5d4Zed6d7Zej d8d7Zed9d:Zej d;d:Zedd=Zed?d@Zej dAd@ZedBdCZej dDdCZedEdFZej dGdFZedHdIZej dJdIZedKdLZej dMdLZedNdOZej dPdOZedQdRZej dSdRZedTdUZej dVdUZdWdXZdYdZZd[d\Zd]d^Zd_d`Z dS)bTaskzNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. strZTaskStatusTypez list[Label]datetimeZ TaskLinks)idorg_idorgnameowner_id descriptionstatuslabelsauthorization_idfluxeverycronoffsetlatest_completedlast_run_statuslast_run_error created_at updated_atlinksrZorgIDrrZownerIDr r r ZauthorizationIDrrrrZlatestCompletedZ lastRunStatusZ lastRunErrorZ createdAtZ updatedAtrNcCsvd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_d|_d|_d|_d|_d|_||_||_|dk r||_||_|dk r||_|dk r||_|dk r||_|dk r||_| dk r| |_| |_| dk r| |_| dk r| |_| dk r| |_ |dk r"||_!|dk r2||_"|dk rB||_#|dk rR||_$|dk rb||_%|dk rr||_&dS)z"Task - a model defined in OpenAPI.N)'_id_org_id_org_name _owner_id _description_status_labels_authorization_id_flux_every_cron_offset_latest_completed_last_run_status_last_run_error _created_at _updated_at_linksZ discriminatorrrrrr r r r r rrrrrrrrrr)selfrrrrr r r r r rrrrrrrrrrr,L/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/domain/task.py__init__Lsl        z Task.__init__cCs|jS)z\Get the id of this Task. :return: The id of this Task. :rtype: str )rr+r,r,r-rszTask.idcCs|dkrtd||_dS)z]Set the id of this Task. :param id: The id of this Task. :type: str Nz*Invalid value for `id`, must not be `None`) ValueErrorr)r+rr,r,r-rscCs|jS)aGet the org_id of this Task. An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Specifies the organization that owns the task. :return: The org_id of this Task. :rtype: str )rr/r,r,r-rs z Task.org_idcCs|dkrtd||_dS)aSet the org_id of this Task. An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Specifies the organization that owns the task. :param org_id: The org_id of this Task. :type: str Nz.Invalid value for `org_id`, must not be `None`)r0r)r+rr,r,r-rs cCs|jS)zGet the org of this Task. An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Specifies the organization that owns the task. :return: The org of this Task. :rtype: str rr/r,r,r-rs zTask.orgcCs ||_dS)zSet the org of this Task. An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Specifies the organization that owns the task. :param org: The org of this Task. :type: str Nr1)r+rr,r,r-rs cCs|jS)zGet the name of this Task. The name of the task. :return: The name of this Task. :rtype: str )rr/r,r,r-rs z Task.namecCs|dkrtd||_dS)zSet the name of this Task. The name of the task. :param name: The name of this Task. :type: str Nz,Invalid value for `name`, must not be `None`)r0r)r+rr,r,r-rs cCs|jS)aLGet the owner_id of this Task. A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Specifies the owner of the task. To find a user ID, you can use the [`GET /api/v2/users` endpoint](#operation/GetUsers) to list users. :return: The owner_id of this Task. :rtype: str rr/r,r,r-r s z Task.owner_idcCs ||_dS)aSSet the owner_id of this Task. A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Specifies the owner of the task. To find a user ID, you can use the [`GET /api/v2/users` endpoint](#operation/GetUsers) to list users. :param owner_id: The owner_id of this Task. :type: str Nr2)r+r r,r,r-r s cCs|jS)zGet the description of this Task. A description of the task. :return: The description of this Task. :rtype: str rr/r,r,r-r s zTask.descriptioncCs ||_dS)zSet the description of this Task. A description of the task. :param description: The description of this Task. :type: str Nr3)r+r r,r,r-r s cCs|jS)zoGet the status of this Task. :return: The status of this Task. :rtype: TaskStatusType rr/r,r,r-r sz Task.statuscCs ||_dS)ztSet the status of this Task. :param status: The status of this Task. :type: TaskStatusType Nr4)r+r r,r,r-r scCs|jS)zlGet the labels of this Task. :return: The labels of this Task. :rtype: list[Label] rr/r,r,r-r sz Task.labelscCs ||_dS)zqSet the labels of this Task. :param labels: The labels of this Task. :type: list[Label] Nr5)r+r r,r,r-r 'scCs|jS)amGet the authorization_id of this Task. An authorization ID. Specifies the authorization used when the task communicates with the query engine. To find an authorization ID, use the [`GET /api/v2/authorizations` endpoint](#operation/GetAuthorizations) to list authorizations. :return: The authorization_id of this Task. :rtype: str r r/r,r,r-r 0s zTask.authorization_idcCs ||_dS)a|Set the authorization_id of this Task. An authorization ID. Specifies the authorization used when the task communicates with the query engine. To find an authorization ID, use the [`GET /api/v2/authorizations` endpoint](#operation/GetAuthorizations) to list authorizations. :param authorization_id: The authorization_id of this Task. :type: str Nr6)r+r r,r,r-r ;s cCs|jS)zGet the flux of this Task. The Flux script that the task executes. :return: The flux of this Task. :rtype: str )r!r/r,r,r-rFs z Task.fluxcCs|dkrtd||_dS)zSet the flux of this Task. The Flux script that the task executes. :param flux: The flux of this Task. :type: str Nz,Invalid value for `flux`, must not be `None`)r0r!)r+rr,r,r-rQs cCs|jS)aKGet the every of this Task. The interval ([duration literal](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) at which the task runs. `every` also determines when the task first runs, depending on the specified time. :return: The every of this Task. :rtype: str r"r/r,r,r-r^s z Task.everycCs ||_dS)aOSet the every of this Task. The interval ([duration literal](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) at which the task runs. `every` also determines when the task first runs, depending on the specified time. :param every: The every of this Task. :type: str Nr7)r+rr,r,r-ris cCs|jS)aGet the cron of this Task. A [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB uses the system time when evaluating Cron expressions. :return: The cron of this Task. :rtype: str r#r/r,r,r-rts z Task.croncCs ||_dS)aSet the cron of this Task. A [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB uses the system time when evaluating Cron expressions. :param cron: The cron of this Task. :type: str Nr8)r+rr,r,r-rs cCs|jS)a'Get the offset of this Task. A [duration](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals) to delay execution of the task after the scheduled time has elapsed. `0` removes the offset. :return: The offset of this Task. :rtype: str r$r/r,r,r-rs z Task.offsetcCs ||_dS)a,Set the offset of this Task. A [duration](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals) to delay execution of the task after the scheduled time has elapsed. `0` removes the offset. :param offset: The offset of this Task. :type: str Nr9)r+rr,r,r-rs cCs|jS)a-Get the latest_completed of this Task. A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. :return: The latest_completed of this Task. :rtype: datetime r%r/r,r,r-rs zTask.latest_completedcCs ||_dS)a<Set the latest_completed of this Task. A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. :param latest_completed: The latest_completed of this Task. :type: datetime Nr:)r+rr,r,r-rs cCs|jS)zvGet the last_run_status of this Task. :return: The last_run_status of this Task. :rtype: str r&r/r,r,r-rszTask.last_run_statuscCs ||_dS)zSet the last_run_status of this Task. :param last_run_status: The last_run_status of this Task. :type: str Nr;)r+rr,r,r-rscCs|jS)ztGet the last_run_error of this Task. :return: The last_run_error of this Task. :rtype: str r'r/r,r,r-rszTask.last_run_errorcCs ||_dS)zSet the last_run_error of this Task. :param last_run_error: The last_run_error of this Task. :type: str Nr<)r+rr,r,r-rscCs|jS)zqGet the created_at of this Task. :return: The created_at of this Task. :rtype: datetime r(r/r,r,r-rszTask.created_atcCs ||_dS)zzSet the created_at of this Task. :param created_at: The created_at of this Task. :type: datetime Nr=)r+rr,r,r-rscCs|jS)zqGet the updated_at of this Task. :return: The updated_at of this Task. :rtype: datetime r)r/r,r,r-rszTask.updated_atcCs ||_dS)zzSet the updated_at of this Task. :param updated_at: The updated_at of this Task. :type: datetime Nr>)r+rr,r,r-rscCs|jS)zhGet the links of this Task. :return: The links of this Task. :rtype: TaskLinks r*r/r,r,r-rsz Task.linkscCs ||_dS)zlSet the links of this Task. :param links: The links of this Task. :type: TaskLinks Nr?)r+rr,r,r-rscCsi}|jD]z\}}t||}t|trBttdd|||<qt|drZ|||<qt|trttdd|||<q|||<q|S)z&Return the model properties as a dict.cSst|dr|S|S)Nto_dicthasattrr@)xr,r,r-zTask.to_dict..r@cSs&t|ddr"|d|dfS|S)Nr@rrA)itemr,r,r-rDs ) openapi_typesitemsgetattr isinstancelistmaprBr@dict)r+resultattr_valuer,r,r-r@s"       z Task.to_dictcCst|S)z.Return the string representation of the model.)pprintpformatr@r/r,r,r-to_str(sz Task.to_strcCs|S)zFor `print` and `pprint`.)rUr/r,r,r-__repr__,sz Task.__repr__cCst|tsdS|j|jkS)z&Return true if both objects are equal.F)rKr__dict__r+otherr,r,r-__eq__0s z Task.__eq__cCs ||k S)z*Return true if both objects are not equal.r,rXr,r,r-__ne__7sz Task.__ne__)NNNNNNNNNNNNNNNNNNN)!__name__ __module__ __qualname____doc__rHZ attribute_mapr.propertyrsetterrrrr r r r r rrrrrrrrrrr@rUrVrZr[r,r,r,r-rs :                                      r)r_rSreobjectrr,r,r,r-s