U wi @sGdddeZdS)c@sfeZdZdddZddZedddZedd d Zedd d Z edd dZ dedddZ dS) _BaseServiceNcCs |dkrtd||_d|_dS)zInit common services operation.Nz0Invalid value for `api_client`, must be defined.) ValueError api_client _build_type)selfrrV/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/_base_service.py__init__sz_BaseService.__init__cCsv|d|d|d|d|d|dD],\}}||krbtd|d||||<q>|d=dS) NZ async_req_return_http_data_onlyZ_preload_contentZ_request_timeout urlopen_kwkwargsz$Got an unexpected keyword argument 'z ' to method )appenditems TypeError)rZ operation_idZsupported_paramsZ local_paramskeyvalrrr_check_operation_params s      z$_BaseService._check_operation_params)returncCs|js||_d|jkSNcloud)r build_typelowerrrrr_is_cloud_instances z_BaseService._is_cloud_instancecs$|js|IdH|_d|jkSr)rbuild_type_asyncrrrrr_is_cloud_instance_async!sz%_BaseService._is_cloud_instance_asynccCs0ddlm}||j}|jdd}|j|ddS)w Return the build type of the connected InfluxDB Server. :return: The type of InfluxDB build.  PingServiceFr X-Influxdb-Build header_name)influxdb_clientrrZget_ping_with_http_inforesponse_headerrrZ ping_serviceresponserrrr&s   z_BaseService.build_typecs6ddlm}||j}|jddIdH}|j|ddS)rrrFrNr r!)r#rrZget_ping_asyncr$r%rrrr2s  z_BaseService.build_type_asyncX-Influxdb-VersioncCs0|dk r,t|dkr,||dkr,|d|SdS)Nunknown)len)rr&r"rrrr$>s  z_BaseService.response_header)N)r') __name__ __module__ __qualname__rrboolrrstrrrr$rrrrrs   rN)objectrrrrr