11# coding: utf-8
22"""
3- Influx API Service
3+ Influx API Service.
44
5- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
5+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
66
7- OpenAPI spec version: 0.1.0
8- Generated by: https://openapi-generator.tech
7+ OpenAPI spec version: 0.1.0
8+ Generated by: https://openapi-generator.tech
99"""
1010
1111from __future__ import absolute_import
2828
2929
3030class ApiClient (object ):
31- """Generic API client for OpenAPI client library builds .
31+ """Generic API client for OpenAPI client library Build .
3232
3333 OpenAPI generic API client. This client handles the client-
3434 server communication, and is invariant across implementations. Specifics of
@@ -64,6 +64,7 @@ class ApiClient(object):
6464
6565 def __init__ (self , configuration = None , header_name = None , header_value = None ,
6666 cookie = None , pool_threads = None ):
67+ """Initialize generic API client."""
6768 if configuration is None :
6869 configuration = Configuration ()
6970 self .configuration = configuration
@@ -78,6 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7879 self .user_agent = 'influxdb-client-python/1.9.0dev'
7980
8081 def __del__ (self ):
82+ """Dispose pools."""
8183 if self ._pool :
8284 self ._pool .close ()
8385 self ._pool .join ()
@@ -87,23 +89,23 @@ def __del__(self):
8789
8890 @property
8991 def pool (self ):
90- """Create thread pool on first request
91- avoids instantiating unused threadpool for blocking clients.
92- """
92+ """Create thread pool on first request avoids instantiating unused threadpool for blocking clients."""
9393 if self ._pool is None :
9494 self ._pool = ThreadPool (self .pool_threads )
9595 return self ._pool
9696
9797 @property
9898 def user_agent (self ):
99- """User agent for this API client"""
99+ """User agent for this API client. """
100100 return self .default_headers ['User-Agent' ]
101101
102102 @user_agent .setter
103103 def user_agent (self , value ):
104+ """Set User agent for this API client."""
104105 self .default_headers ['User-Agent' ] = value
105106
106107 def set_default_header (self , header_name , header_value ):
108+ """Set HTTP header for this API client."""
107109 self .default_headers [header_name ] = header_value
108110
109111 def __call_api (
@@ -186,7 +188,7 @@ def __call_api(
186188 response_data .getheaders ())
187189
188190 def sanitize_for_serialization (self , obj ):
189- """Builds a JSON POST object.
191+ """Build a JSON POST object.
190192
191193 If obj is None, return None.
192194 If obj is str, int, long, float, bool, return directly.
@@ -294,7 +296,7 @@ def call_api(self, resource_path, method,
294296 response_type = None , auth_settings = None , async_req = None ,
295297 _return_http_data_only = None , collection_formats = None ,
296298 _preload_content = True , _request_timeout = None ):
297- """Makes the HTTP request (synchronous) and returns deserialized data.
299+ """Make the HTTP request (synchronous) and Return deserialized data.
298300
299301 To make an async_req request, set the async_req parameter.
300302
@@ -351,7 +353,7 @@ def call_api(self, resource_path, method,
351353 def request (self , method , url , query_params = None , headers = None ,
352354 post_params = None , body = None , _preload_content = True ,
353355 _request_timeout = None ):
354- """Makes the HTTP request using RESTClient."""
356+ """Make the HTTP request using RESTClient."""
355357 if method == "GET" :
356358 return self .rest_client .GET (url ,
357359 query_params = query_params ,
@@ -440,7 +442,7 @@ def parameters_to_tuples(self, params, collection_formats):
440442 return new_params
441443
442444 def prepare_post_parameters (self , post_params = None , files = None ):
443- """Builds form parameters.
445+ """Build form parameters.
444446
445447 :param post_params: Normal form parameters.
446448 :param files: File parameters.
@@ -468,7 +470,7 @@ def prepare_post_parameters(self, post_params=None, files=None):
468470 return params
469471
470472 def select_header_accept (self , accepts ):
471- """Returns `Accept` based on an array of accepts provided.
473+ """Return `Accept` based on an array of accepts provided.
472474
473475 :param accepts: List of headers.
474476 :return: Accept (e.g. application/json).
@@ -484,7 +486,7 @@ def select_header_accept(self, accepts):
484486 return ', ' .join (accepts )
485487
486488 def select_header_content_type (self , content_types ):
487- """Returns `Content-Type` based on an array of content_types provided.
489+ """Return `Content-Type` based on an array of content_types provided.
488490
489491 :param content_types: List of content-types.
490492 :return: Content-Type (e.g. application/json).
@@ -500,7 +502,7 @@ def select_header_content_type(self, content_types):
500502 return content_types [0 ]
501503
502504 def update_params_for_auth (self , headers , querys , auth_settings ):
503- """Updates header and query params based on authentication setting.
505+ """Update header and query params based on authentication setting.
504506
505507 :param headers: Header parameters dict to be updated.
506508 :param querys: Query parameters tuple list to be updated.
@@ -524,7 +526,7 @@ def update_params_for_auth(self, headers, querys, auth_settings):
524526 )
525527
526528 def __deserialize_file (self , response ):
527- """Deserializes body to file
529+ """Deserializes body to file.
528530
529531 Saves response body into a file in a temporary folder,
530532 using the filename from the `Content-Disposition` header if provided.
@@ -615,7 +617,6 @@ def __deserialize_model(self, data, klass):
615617 :param klass: class literal.
616618 :return: model object.
617619 """
618-
619620 if not klass .openapi_types and not hasattr (klass ,
620621 'get_real_child_model' ):
621622 return data
0 commit comments