U vi%@s`dZddlmZddlZddlZddlZddlZddlZGdddeZ Gddde e dZ dS) 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_importNcs0eZdZdZfddZddZddZZS)TypeWithDefaultNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. cstt||||d|_dS)zInitialize with defaults.N)superr__init___default)clsnamebasesdct __class__N/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/configuration.pyrszTypeWithDefault.__init__cCs"|jdkrt||_t|jS)zCall self as a function.N)rtype__call__copy)rrrrr#s  zTypeWithDefault.__call__cCst||_dS)z Set dafaults.N)rr)rdefaultrrr set_default)szTypeWithDefault.set_default)__name__ __module__ __qualname____doc__rrr __classcell__rrr rrs rc@seZdZdZddZeddZejddZeddZejd dZed d Z e jd d Z d dZ ddZ ddZ ddZ eedddZedddZdS) ConfigurationrcCsd|_d|_i|_i|_d|_d|_i|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_d|_d|_d|_d|_td|_d|_d|_d|_d|_d|_dS)zInitialize configuration.zhttp://localhost/api/v2Nz%%(asctime)s %(levelname)s %(message)sFT)hostZtemp_folder_pathapi_keyapi_key_prefixusernamepasswordloggers logger_formatZlogger_stream_handlerlogger_file_handler logger_filedebugZ verify_sslZ ssl_ca_cert cert_fileZ cert_key_fileZcert_key_passwordassert_hostname ssl_contextmultiprocessing cpu_countZconnection_pool_maxsizetimeoutZ auth_basicproxy proxy_headersZsafe_chars_for_path_paramselfrrrr5s2zConfiguration.__init__cCs|jS)Logger file. If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str )_Configuration__logger_filer/rrrr%ys zConfiguration.logger_filecCsL||_|jrHt|j|_|j|j|jD]\}}||jq2dS)r1N) r2logging FileHandlerr$ setFormatterlogger_formatterr"items addHandler)r0value_loggerrrrr%s cCs|jS)bDebug status. :param value: The debug status, True or False. :type: bool )_Configuration__debugr/rrrr&szConfiguration.debugcCs||_|jr\|jD]B\}}|tj|dkrttdd|js| t t j qn |jD]\}}|tj qfdS)r<zinfluxdb_client.client.httpcSst|tjo|jtjkS)N) isinstancer3 StreamHandlerstreamsysstdout)hrrrz%Configuration.debug..N)r=r"r7setLevelr3DEBUGanymaphandlersr8r?rArBWARNING)r0r9r r;r:rrrr&s  cCs|jS)Logger format. The logger_formatter will be updated when sets logger_format. :param value: The format string. :type: str )_Configuration__logger_formatr/rrrr#s zConfiguration.logger_formatcCs||_t|j|_dS)rLN)rMr3 Formatterr6)r0r9rrrr#s cCsJ|j|r0|j|r0|j|d|j|S|j|rF|j|SdS)zGet API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication.  N)rgetr)r0 identifierrrrget_api_key_with_prefixs    z%Configuration.get_api_key_with_prefixcCs tjj|jd|jddS)zrGet HTTP basic authentication header (string). :return: The token for basic HTTP authentication. :) basic_auth authorization)urllib3util make_headersr r!rPr/rrrget_basic_auth_tokens z"Configuration.get_basic_auth_tokencCs(ddd|dddd|dddS)zeGet Auth Settings dict for api client. :return: The Auth Settings information dict. basicheader Authorization)rinkeyr9r)ZBasicAuthenticationZTokenAuthentication)rYrRr/rrr auth_settingsszConfiguration.auth_settingscCs ddlm}djtjtj|dS)zaGet the essential information for debugging. :return: The report for debugging. r)VERSIONz~Python SDK Debug Report: OS: {env} Python Version: {pyversion} Version of the API: 2.0.0 SDK Package Version: {client_version})envZ pyversionclient_version)Zinfluxdb_clientr`formatrAplatformversion)r0r`rrrto_debug_reports  zConfiguration.to_debug_report)pathparamscCsdS)zUpdate header params based on custom settings. :param path: Resource path :param params: Header parameters dict to be updated. Nr)r0rgrhrrrupdate_request_header_params sz*Configuration.update_request_header_params)rgcCs|S)zUpdate http body based on custom settings. :param path: Resource path :param body: Request body to be updated. :return: Updated body r)r0rgbodyrrrupdate_request_bodysz!Configuration.update_request_bodyN)rrrrrpropertyr%setterr&r#rRrYr_rfstrdictrirkrrrrr.s(D         r) metaclass) r __future__rrr3r*rArVrrobjectrrrrrs