U wâ’iÔã@s8dZddlmZddlZddlmZGdd„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 é)Úabsolute_importN)Ú _BaseServicecseZdZdZd=‡fdd„ Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Zd3d4„Zd5d6„Zd7d8„Zd9d:„Zd;d<„Z ‡Z!S)>ÚSourcesServicez‹NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncstƒ |¡dS)z0SourcesService - a operation defined in OpenAPI.N)ÚsuperÚ__init__)ÚselfÚ api_client©Ú __class__©úX/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/sources_service.pyrszSourcesService.__init__cKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)aDelete a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_sources_id(source_id, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. TÚ_return_http_data_onlyÚ async_reqN)ÚgetÚ delete_sources_id_with_http_info©rÚ source_idÚkwargsÚdatar r r Údelete_sources_id s  z SourcesService.delete_sources_idcKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d¡d S) a*Delete a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_sources_id_with_http_info(source_id, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. ú/api/v2/sources/{sourceID}ÚDELETENrr Ú_preload_contentTÚ_request_timeoutÚ urlopen_kw© ÚbodyZ post_paramsÚfilesZ response_typeZ auth_settingsrr rrZcollection_formatsr©Ú_delete_sources_id_preparerÚcall_apir©rrrÚlocal_var_paramsÚ path_paramsÚ query_paramsÚ header_paramsÚ body_paramsr r r r6s( ÿ   ñz/SourcesService.delete_sources_id_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d¡d IdHS) aaDelete a source. This method makes an asynchronous HTTP request. :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. rrNrr rTrrrrr!r r r Údelete_sources_id_asyncYs( ÿ   ñz&SourcesService.delete_sources_id_asyncc Kstƒ}ddg}| d||¡d|ks0|ddkr8tdƒ‚i}d|krP|d|d<g}i}d|krl|d|d<d}|j dg¡|d<|||||fS) NrÚzap_trace_spanrzKMissing the required parameter `source_id` when calling `delete_sources_id`ÚsourceIDúZap-Trace-Spanúapplication/jsonÚAccept©ÚlocalsÚ_check_operation_paramsÚ ValueErrorrÚselect_header_accept© rrrr"Ú all_paramsr#r$r%r&r r r rys& ÿ  ÿz)SourcesService._delete_sources_id_preparecKs2d|d<| d¡r|jf|ŽS|jf|Ž}|SdS)a List all sources. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sources(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str org: The name of the organization. :return: Sources If the method is called asynchronously, returns the request thread. Tr rN)rÚget_sources_with_http_info)rrrr r r Ú get_sources”s    zSourcesService.get_sourcescKsd|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) aList all sources. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sources_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str org: The name of the organization. :return: Sources If the method is called asynchronously, returns the request thread. ú/api/v2/sourcesÚGETÚSourcesrr rTrrNr©Ú_get_sources_preparerr r©rrr"r#r$r%r&r r r r4ªs( ÿ   ñz)SourcesService.get_sources_with_http_infocËsj|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) acList all sources. This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param str org: The name of the organization. :return: Sources If the method is called asynchronously, returns the request thread. r6r7r8rr rTrrNrr9r;r r r Úget_sources_asyncÍs( ÿ   ñz SourcesService.get_sources_asynccKsztƒ}ddg}| d||¡i}g}d|kr>| d|df¡i}d|krV|d|d<d}|j dg¡|d<|||||fS)Nr(Úorgr5r*r+r,)r.r/Úappendrr1)rrr"r3r#r$r%r&r r r r:ís ÿz#SourcesService._get_sources_preparecKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)aRetrieve a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sources_id(source_id, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. Tr rN)rÚget_sources_id_with_http_inforr r r Úget_sources_ids  zSourcesService.get_sources_idcKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) a+Retrieve a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sources_id_with_http_info(source_id, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. rr7ÚSourcerr rTrrNr©Ú_get_sources_id_preparerr rr!r r r r?s( ÿ   ñz,SourcesService.get_sources_id_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) aeRetrieve a source. This method makes an asynchronous HTTP request. :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. rr7rArr rTrrNrrBr!r r r Úget_sources_id_async=s( ÿ   ñz#SourcesService.get_sources_id_asyncc Kstƒ}ddg}| d||¡d|ks0|ddkr8tdƒ‚i}d|krP|d|d<g}i}d|krl|d|d<d}|j dg¡|d<|||||fS) Nrr(r@zHMissing the required parameter `source_id` when calling `get_sources_id`r)r*r+r,r-r2r r r rC]s& ÿ  ÿz&SourcesService._get_sources_id_preparecKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)aaGet buckets in a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sources_id_buckets(source_id, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :param str org: The name of the organization. :return: Buckets If the method is called asynchronously, returns the request thread. Tr rN)rÚ%get_sources_id_buckets_with_http_inforr r r Úget_sources_id_bucketsxs  z%SourcesService.get_sources_id_bucketscKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) apGet buckets in a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sources_id_buckets_with_http_info(source_id, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :param str org: The name of the organization. :return: Buckets If the method is called asynchronously, returns the request thread. ú"/api/v2/sources/{sourceID}/bucketsr7ÚBucketsrr rTrrNr©Ú_get_sources_id_buckets_preparerr rr!r r r rEs( ÿ   ñz4SourcesService.get_sources_id_buckets_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) a¢Get buckets in a source. This method makes an asynchronous HTTP request. :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :param str org: The name of the organization. :return: Buckets If the method is called asynchronously, returns the request thread. rGr7rHrr rTrrNrrIr!r r r Úget_sources_id_buckets_async³s( ÿ   ñz+SourcesService.get_sources_id_buckets_asyncc Ks¬tƒ}dddg}| d||¡d|ks2|ddkr:tdƒ‚i}d|krR|d|d<g}d|krp| d|df¡i}d|krˆ|d|d<d}|j dg¡|d <|||||fS) Nrr(r=rFzPMissing the required parameter `source_id` when calling `get_sources_id_buckets`r)r*r+r,)r.r/r0r>rr1r2r r r rJÔs*  ÿ  ÿz.SourcesService._get_sources_id_buckets_preparecKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)a1Get the health of a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sources_id_health(source_id, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: HealthCheck If the method is called asynchronously, returns the request thread. Tr rN)rÚ$get_sources_id_health_with_http_inforr r r Úget_sources_id_healthñs  z$SourcesService.get_sources_id_healthcKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) a@Get the health of a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sources_id_health_with_http_info(source_id, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: HealthCheck If the method is called asynchronously, returns the request thread. ú!/api/v2/sources/{sourceID}/healthr7Ú HealthCheckrr rTrrNr©Ú_get_sources_id_health_preparerr rr!r r r rLs( ÿ   ñz3SourcesService.get_sources_id_health_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) asGet the health of a source. This method makes an asynchronous HTTP request. :param async_req bool :param str source_id: The source ID. (required) :param str zap_trace_span: OpenTracing span context :return: HealthCheck If the method is called asynchronously, returns the request thread. rNr7rOrr rTrrNrrPr!r r r Úget_sources_id_health_async*s( ÿ   ñz*SourcesService.get_sources_id_health_asyncc Kstƒ}ddg}| d||¡d|ks0|ddkr8tdƒ‚i}d|krP|d|d<g}i}d|krl|d|d<d}|j dg¡|d<|||||fS) Nrr(rMzOMissing the required parameter `source_id` when calling `get_sources_id_health`r)r*r+r,r-r2r r r rQJs& ÿ  ÿz-SourcesService._get_sources_id_health_preparecKs:d|d<| d¡r"|j||f|ŽS|j||f|Ž}|SdS)a[Update a Source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_sources_id(source_id, source, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param Source source: Source update (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. Tr rN)rÚpatch_sources_id_with_http_info)rrÚsourcerrr r r Úpatch_sources_ides  zSourcesService.patch_sources_idc Ksh|j||f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) ajUpdate a Source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_sources_id_with_http_info(source_id, source, async_req=True) >>> result = thread.get() :param async_req bool :param str source_id: The source ID. (required) :param Source source: Source update (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. rÚPATCHrArr rTrrNr©Ú_patch_sources_id_preparerr r© rrrTrr"r#r$r%r&r r r rS|s(ÿ   ñz.SourcesService.patch_sources_id_with_http_infoc Ësn|j||f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) ašUpdate a Source. This method makes an asynchronous HTTP request. :param async_req bool :param str source_id: The source ID. (required) :param Source source: Source update (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. rrVrArr rTrrNrrWrYr r r Úpatch_sources_id_async s(ÿ   ñz%SourcesService.patch_sources_id_asyncc KsÐtƒ}dddg}| d||¡d|ks2|ddkr:tdƒ‚d|ksN|ddkrVtdƒ‚i}d|krn|d|d<g}i}d|krŠ|d|d<d} d|krž|d} |j d g¡|d <|j d g¡|d <||||| fS) NrrTr(rUzJMissing the required parameter `source_id` when calling `patch_sources_id`zGMissing the required parameter `source` when calling `patch_sources_id`r)r*r+r,ú Content-Type©r.r/r0rr1Zselect_header_content_type) rrrTrr"r3r#r$r%r&r r r rXÁs8  ÿ ÿ  ÿÿz(SourcesService._patch_sources_id_preparecKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)aCreate a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_sources(source, async_req=True) >>> result = thread.get() :param async_req bool :param Source source: Source to create (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. Tr rN)rÚpost_sources_with_http_info)rrTrrr r r Ú post_sourcesæs  zSourcesService.post_sourcescKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) a&Create a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_sources_with_http_info(source, async_req=True) >>> result = thread.get() :param async_req bool :param Source source: Source to create (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. r6ÚPOSTrArr rTrrNr©Ú_post_sources_preparerr r©rrTrr"r#r$r%r&r r r r]üs( ÿ   ñz*SourcesService.post_sources_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) aeCreate a source. This method makes an asynchronous HTTP request. :param async_req bool :param Source source: Source to create (required) :param str zap_trace_span: OpenTracing span context :return: Source If the method is called asynchronously, returns the request thread. r6r_rArr rTrrNrr`rbr r r Úpost_sources_asyncs( ÿ   ñz!SourcesService.post_sources_asyncc Ksžtƒ}ddg}| d||¡d|ks0|ddkr8tdƒ‚i}g}i}d|krX|d|d<d}d|krl|d}|j dg¡|d<|j dg¡|d<|||||fS) NrTr(r^zCMissing the required parameter `source` when calling `post_sources`r*r+r,r[r\) rrTrr"r3r#r$r%r&r r r ra?s, ÿ ÿÿz$SourcesService._post_sources_prepare)N)"Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrr'rr5r4r<r:r@r?rDrCrFrErKrJrMrLrRrQrUrSrZrXr^r]rcraÚ __classcell__r r r r rs<# # # $!# $!%# r)rgÚ __future__rÚreZ%influxdb_client.service._base_servicerrr r r r Ús