github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python-legacy/lakefs_client/api/health_check_api.py (about) 1 """ 2 lakeFS API 3 4 lakeFS HTTP API # noqa: E501 5 6 The version of the OpenAPI document: 1.0.0 7 Contact: services@treeverse.io 8 Generated by: https://openapi-generator.tech 9 """ 10 11 12 import re # noqa: F401 13 import sys # noqa: F401 14 15 from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint 16 from lakefs_client.model_utils import ( # noqa: F401 17 check_allowed_values, 18 check_validations, 19 date, 20 datetime, 21 file_type, 22 none_type, 23 validate_and_convert_types 24 ) 25 26 27 class HealthCheckApi(object): 28 """NOTE: This class is auto generated by OpenAPI Generator 29 Ref: https://openapi-generator.tech 30 31 Do not edit the class manually. 32 """ 33 34 def __init__(self, api_client=None): 35 if api_client is None: 36 api_client = ApiClient() 37 self.api_client = api_client 38 self.health_check_endpoint = _Endpoint( 39 settings={ 40 'response_type': None, 41 'auth': [], 42 'endpoint_path': '/healthcheck', 43 'operation_id': 'health_check', 44 'http_method': 'GET', 45 'servers': None, 46 }, 47 params_map={ 48 'all': [ 49 ], 50 'required': [], 51 'nullable': [ 52 ], 53 'enum': [ 54 ], 55 'validation': [ 56 ] 57 }, 58 root_map={ 59 'validations': { 60 }, 61 'allowed_values': { 62 }, 63 'openapi_types': { 64 }, 65 'attribute_map': { 66 }, 67 'location_map': { 68 }, 69 'collection_format_map': { 70 } 71 }, 72 headers_map={ 73 'accept': [], 74 'content_type': [], 75 }, 76 api_client=api_client 77 ) 78 79 def health_check( 80 self, 81 **kwargs 82 ): 83 """health_check # noqa: E501 84 85 check that the API server is up and running # noqa: E501 86 This method makes a synchronous HTTP request by default. To make an 87 asynchronous HTTP request, please pass async_req=True 88 89 >>> thread = api.health_check(async_req=True) 90 >>> result = thread.get() 91 92 93 Keyword Args: 94 _return_http_data_only (bool): response data without head status 95 code and headers. Default is True. 96 _preload_content (bool): if False, the urllib3.HTTPResponse object 97 will be returned without reading/decoding response data. 98 Default is True. 99 _request_timeout (int/float/tuple): timeout setting for this request. If 100 one number provided, it will be total request timeout. It can also 101 be a pair (tuple) of (connection, read) timeouts. 102 Default is None. 103 _check_input_type (bool): specifies if type checking 104 should be done one the data sent to the server. 105 Default is True. 106 _check_return_type (bool): specifies if type checking 107 should be done one the data received from the server. 108 Default is True. 109 _host_index (int/None): specifies the index of the server 110 that we want to use. 111 Default is read from the configuration. 112 async_req (bool): execute request asynchronously 113 114 Returns: 115 None 116 If the method is called asynchronously, returns the request 117 thread. 118 """ 119 kwargs['async_req'] = kwargs.get( 120 'async_req', False 121 ) 122 kwargs['_return_http_data_only'] = kwargs.get( 123 '_return_http_data_only', True 124 ) 125 kwargs['_preload_content'] = kwargs.get( 126 '_preload_content', True 127 ) 128 kwargs['_request_timeout'] = kwargs.get( 129 '_request_timeout', None 130 ) 131 kwargs['_check_input_type'] = kwargs.get( 132 '_check_input_type', True 133 ) 134 kwargs['_check_return_type'] = kwargs.get( 135 '_check_return_type', True 136 ) 137 kwargs['_host_index'] = kwargs.get('_host_index') 138 return self.health_check_endpoint.call_with_http_info(**kwargs) 139