U wit@s8dZddlmZddlZddlmZGdddeZdS)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 )absolute_importN) _BaseServicecsbeZdZdZdUfdd ZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z d=d>Z!d?d@Z"dAdBZ#dCdDZ$dEdFZ%dGdHZ&dIdJZ'dKdLZ(dMdNZ)dOdPZ*dQdRZ+dSdTZ,Z-S)V ChecksServicezNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncst|dS)z/ChecksService - a operation defined in OpenAPI.N)super__init__)self api_client __class__W/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/checks_service.pyrszChecksService.__init__cKs6d|d<|dr |j|f|S|j|f|}|SdS)aAdd new check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_check(post_check, async_req=True) >>> result = thread.get() :param async_req bool :param PostCheck post_check: Check to create (required) :return: Check If the method is called asynchronously, returns the request thread. T_return_http_data_only async_reqN)getcreate_check_with_http_info)r post_checkkwargsdatar r r create_check s  zChecksService.create_checkcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aAdd new check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_check_with_http_info(post_check, async_req=True) >>> result = thread.get() :param async_req bool :param PostCheck post_check: Check to create (required) :return: Check If the method is called asynchronously, returns the request thread. /api/v2/checksPOSTCheckrr _preload_contentT_request_timeout urlopen_kwN bodyZ post_paramsfilesZ response_typeZ auth_settingsrr rrZcollection_formatsr_create_check_preparercall_apirrrrlocal_var_params path_params query_params header_params body_paramsr r r r5s(   z)ChecksService.create_check_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) a,Add new check. This method makes an asynchronous HTTP request. :param async_req bool :param PostCheck post_check: Check to create (required) :return: Check If the method is called asynchronously, returns the request thread. rrrrr rTrrNrrr!r r r create_check_asyncWs(   z ChecksService.create_check_asyncc Kst}dg}|d||d|ks.|ddkr6tdi}g}i}d}d|krV|d}|jdg|d<|jdg|d<|||||fS)NrrzGMissing the required parameter `post_check` when calling `create_check`application/jsonAccept Content-Typelocals_check_operation_params ValueErrorrselect_header_acceptZselect_header_content_type) rrrr" all_paramsr#r$r%r&r r r rvs( z#ChecksService._create_check_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aDelete a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_checks_id(check_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. Tr rN)rdelete_checks_id_with_http_inforcheck_idrrr r r delete_checks_ids  zChecksService.delete_checks_idcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) a%Delete a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_checks_id_with_http_info(check_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. /api/v2/checks/{checkID}DELETENrr rTrrr_delete_checks_id_preparerr rrr3rr"r#r$r%r&r r r r1s(   z-ChecksService.delete_checks_id_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) a^Delete a check. This method makes an asynchronous HTTP request. :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. r5r6Nrr rTrrrr7r9r r r delete_checks_id_asyncs(   z$ChecksService.delete_checks_id_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nr3zap_trace_spanr4zIMissing the required parameter `check_id` when calling `delete_checks_id`checkIDZap-Trace-Spanr(r)r,r-r.rr/ rr3rr"r0r#r$r%r&r r r r8s&   z'ChecksService._delete_checks_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)a|Delete label from a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_checks_id_labels_id(check_id, label_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str label_id: The ID of the label to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. Tr rN)r)delete_checks_id_labels_id_with_http_info)rr3label_idrrr r r delete_checks_id_labels_ids  z(ChecksService.delete_checks_id_labels_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aDelete label from a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_checks_id_labels_id_with_http_info(check_id, label_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str label_id: The ID of the label to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. )/api/v2/checks/{checkID}/labels/{labelID}r6Nrr rTrrr#_delete_checks_id_labels_id_preparerr r rr3rArr"r#r$r%r&r r r r@s(   z7ChecksService.delete_checks_id_labels_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aDelete label from a check. This method makes an asynchronous HTTP request. :param async_req bool :param str check_id: The check ID. (required) :param str label_id: The ID of the label to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. rCr6Nrr rTrrrrDrFr r r delete_checks_id_labels_id_asyncBs(   z.ChecksService.delete_checks_id_labels_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<d|kr|d|d<g}i}d|kr|d|d <d} |jd g|d <||||| fS) Nr3rAr;rBzSMissing the required parameter `check_id` when calling `delete_checks_id_labels_id`zSMissing the required parameter `label_id` when calling `delete_checks_id_labels_id`r<ZlabelIDr=r(r)r>) rr3rArr"r0r#r$r%r&r r r rEcs2      z1ChecksService._delete_checks_id_labels_id_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)ajList all checks. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_checks(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: Only show checks that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). :param int limit: Limits the number of records returned. Default is `20`. :return: Checks If the method is called asynchronously, returns the request thread. Tr rN)rget_checks_with_http_info)rorg_idrrr r r get_checkss  zChecksService.get_checkscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) ayList all checks. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_checks_with_http_info(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: Only show checks that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). :param int limit: Limits the number of records returned. Default is `20`. :return: Checks If the method is called asynchronously, returns the request thread. rGETChecksrr rTrrNr_get_checks_preparerr rrrIrr"r#r$r%r&r r r rHs(   z'ChecksService.get_checks_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aList all checks. This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: Only show checks that belong to a specific organization ID. (required) :param str zap_trace_span: OpenTracing span context :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). :param int limit: Limits the number of records returned. Default is `20`. :return: Checks If the method is called asynchronously, returns the request thread. rrKrLrr rTrrNrrMrOr r r get_checks_asyncs(   zChecksService.get_checks_asyncc Ks"t}ddddg}|d||d|ks4|ddkr>> thread = api.get_checks_id(check_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. Tr rN)rget_checks_id_with_http_infor2r r r get_checks_ids  zChecksService.get_checks_idcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a%Retrieve a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_checks_id_with_http_info(check_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. r5rKrrr rTrrNr_get_checks_id_preparerr rr9r r r rVs(   z*ChecksService.get_checks_id_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aaRetrieve a check. This method makes an asynchronous HTTP request. :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. r5rKrrr rTrrNrrXr9r r r get_checks_id_asyncAs(   z!ChecksService.get_checks_id_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nr3r;rWzFMissing the required parameter `check_id` when calling `get_checks_id`r<r=r(r)r>r?r r r rYas&   z$ChecksService._get_checks_id_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)a1List all labels for a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_checks_id_labels(check_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: LabelsResponse If the method is called asynchronously, returns the request thread. Tr rN)r#get_checks_id_labels_with_http_infor2r r r get_checks_id_labels|s  z"ChecksService.get_checks_id_labelscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a@List all labels for a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_checks_id_labels_with_http_info(check_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: LabelsResponse If the method is called asynchronously, returns the request thread. /api/v2/checks/{checkID}/labelsrKLabelsResponserr rTrrNr_get_checks_id_labels_preparerr rr9r r r r[s(   z1ChecksService.get_checks_id_labels_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) auList all labels for a check. This method makes an asynchronous HTTP request. :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: LabelsResponse If the method is called asynchronously, returns the request thread. r]rKr^rr rTrrNrr_r9r r r get_checks_id_labels_asyncs(   z(ChecksService.get_checks_id_labels_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nr3r;r\zMMissing the required parameter `check_id` when calling `get_checks_id_labels`r<r=r(r)r>r?r r r r`s&   z+ChecksService._get_checks_id_labels_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)a)Retrieve a check query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_checks_id_query(check_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: FluxResponse If the method is called asynchronously, returns the request thread. Tr rN)r"get_checks_id_query_with_http_infor2r r r get_checks_id_querys  z!ChecksService.get_checks_id_querycKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a8Retrieve a check query. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_checks_id_query_with_http_info(check_id, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: FluxResponse If the method is called asynchronously, returns the request thread. /api/v2/checks/{checkID}/queryrK FluxResponserr rTrrNr_get_checks_id_query_preparerr rr9r r r rbs(   z0ChecksService.get_checks_id_query_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) anRetrieve a check query. This method makes an asynchronous HTTP request. :param async_req bool :param str check_id: The check ID. (required) :param str zap_trace_span: OpenTracing span context :return: FluxResponse If the method is called asynchronously, returns the request thread. rdrKrerr rTrrNrrfr9r r r get_checks_id_query_async)s(   z'ChecksService.get_checks_id_query_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nr3r;rczLMissing the required parameter `check_id` when calling `get_checks_id_query`r<r=r(r)r>r?r r r rgIs&   z*ChecksService._get_checks_id_query_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)akUpdate a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_checks_id(check_id, check_patch, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param CheckPatch check_patch: Check update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. Tr rN)rpatch_checks_id_with_http_info)rr3 check_patchrrr r r patch_checks_idds  zChecksService.patch_checks_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) azUpdate a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_checks_id_with_http_info(check_id, check_patch, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param CheckPatch check_patch: Check update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. r5PATCHrrr rTrrNr_patch_checks_id_preparerr r rr3rjrr"r#r$r%r&r r r ri{s(   z,ChecksService.patch_checks_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aUpdate a check. This method makes an asynchronous HTTP request. :param async_req bool :param str check_id: The check ID. (required) :param CheckPatch check_patch: Check update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. r5rlrrr rTrrNrrmror r r patch_checks_id_asyncs(   z#ChecksService.patch_checks_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) Nr3rjr;rkzHMissing the required parameter `check_id` when calling `patch_checks_id`zKMissing the required parameter `check_patch` when calling `patch_checks_id`r<r=r(r)r*r+) rr3rjrr"r0r#r$r%r&r r r rns8     z&ChecksService._patch_checks_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)a~Add a label to a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_checks_id_labels(check_id, label_mapping, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param LabelMapping label_mapping: Label to add (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, returns the request thread. Tr rN)r$post_checks_id_labels_with_http_info)rr3 label_mappingrrr r r post_checks_id_labelss  z#ChecksService.post_checks_id_labelsc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aAdd a label to a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_checks_id_labels_with_http_info(check_id, label_mapping, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param LabelMapping label_mapping: Label to add (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, returns the request thread. r]r LabelResponserr rTrrNr_post_checks_id_labels_preparerr r rr3rrrr"r#r$r%r&r r r rqs(   z2ChecksService.post_checks_id_labels_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aAdd a label to a check. This method makes an asynchronous HTTP request. :param async_req bool :param str check_id: The check ID. (required) :param LabelMapping label_mapping: Label to add (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, returns the request thread. r]rrtrr rTrrNrrurwr r r post_checks_id_labels_async s(   z)ChecksService.post_checks_id_labels_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) Nr3rrr;rszNMissing the required parameter `check_id` when calling `post_checks_id_labels`zSMissing the required parameter `label_mapping` when calling `post_checks_id_labels`r<r=r(r)r*r+) rr3rrrr"r0r#r$r%r&r r r rvAs8     z,ChecksService._post_checks_id_labels_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aXUpdate a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.put_checks_id(check_id, check, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param Check check: Check update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. Tr rN)rput_checks_id_with_http_info)rr3checkrrr r r put_checks_idfs  zChecksService.put_checks_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) agUpdate a check. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.put_checks_id_with_http_info(check_id, check, async_req=True) >>> result = thread.get() :param async_req bool :param str check_id: The check ID. (required) :param Check check: Check update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. r5PUTrrr rTrrNr_put_checks_id_preparerr r rr3rzrr"r#r$r%r&r r r ry}s(   z*ChecksService.put_checks_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aUpdate a check. This method makes an asynchronous HTTP request. :param async_req bool :param str check_id: The check ID. (required) :param Check check: Check update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Check If the method is called asynchronously, returns the request thread. r5r|rrr rTrrNrr}rr r r put_checks_id_asyncs(   z!ChecksService.put_checks_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) Nr3rzr;r{zFMissing the required parameter `check_id` when calling `put_checks_id`zCMissing the required parameter `check` when calling `put_checks_id`r<r=r(r)r*r+) rr3rzrr"r0r#r$r%r&r r r r~s8     z$ChecksService._put_checks_id_prepare)N).__name__ __module__ __qualname____doc__rrrr'rr4r1r:r8rBr@rGrErJrHrPrNrWrVrZrYr\r[rar`rcrbrhrgrkrirprnrsrqrxrvr{ryrr~ __classcell__r r r r rsT"# $!!%"%# # # $!%$!%$!r)r __future__rreZ%influxdb_client.service._base_servicerrr r r r s