github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python-legacy/lakefs_client/api/config_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 from lakefs_client.model.config import Config 26 from lakefs_client.model.error import Error 27 28 29 class ConfigApi(object): 30 """NOTE: This class is auto generated by OpenAPI Generator 31 Ref: https://openapi-generator.tech 32 33 Do not edit the class manually. 34 """ 35 36 def __init__(self, api_client=None): 37 if api_client is None: 38 api_client = ApiClient() 39 self.api_client = api_client 40 self.get_config_endpoint = _Endpoint( 41 settings={ 42 'response_type': (Config,), 43 'auth': [ 44 'basic_auth', 45 'cookie_auth', 46 'jwt_token', 47 'oidc_auth', 48 'saml_auth' 49 ], 50 'endpoint_path': '/config', 51 'operation_id': 'get_config', 52 'http_method': 'GET', 53 'servers': None, 54 }, 55 params_map={ 56 'all': [ 57 ], 58 'required': [], 59 'nullable': [ 60 ], 61 'enum': [ 62 ], 63 'validation': [ 64 ] 65 }, 66 root_map={ 67 'validations': { 68 }, 69 'allowed_values': { 70 }, 71 'openapi_types': { 72 }, 73 'attribute_map': { 74 }, 75 'location_map': { 76 }, 77 'collection_format_map': { 78 } 79 }, 80 headers_map={ 81 'accept': [ 82 'application/json' 83 ], 84 'content_type': [], 85 }, 86 api_client=api_client 87 ) 88 89 def get_config( 90 self, 91 **kwargs 92 ): 93 """get_config # noqa: E501 94 95 retrieve lakeFS configuration # noqa: E501 96 This method makes a synchronous HTTP request by default. To make an 97 asynchronous HTTP request, please pass async_req=True 98 99 >>> thread = api.get_config(async_req=True) 100 >>> result = thread.get() 101 102 103 Keyword Args: 104 _return_http_data_only (bool): response data without head status 105 code and headers. Default is True. 106 _preload_content (bool): if False, the urllib3.HTTPResponse object 107 will be returned without reading/decoding response data. 108 Default is True. 109 _request_timeout (int/float/tuple): timeout setting for this request. If 110 one number provided, it will be total request timeout. It can also 111 be a pair (tuple) of (connection, read) timeouts. 112 Default is None. 113 _check_input_type (bool): specifies if type checking 114 should be done one the data sent to the server. 115 Default is True. 116 _check_return_type (bool): specifies if type checking 117 should be done one the data received from the server. 118 Default is True. 119 _host_index (int/None): specifies the index of the server 120 that we want to use. 121 Default is read from the configuration. 122 async_req (bool): execute request asynchronously 123 124 Returns: 125 Config 126 If the method is called asynchronously, returns the request 127 thread. 128 """ 129 kwargs['async_req'] = kwargs.get( 130 'async_req', False 131 ) 132 kwargs['_return_http_data_only'] = kwargs.get( 133 '_return_http_data_only', True 134 ) 135 kwargs['_preload_content'] = kwargs.get( 136 '_preload_content', True 137 ) 138 kwargs['_request_timeout'] = kwargs.get( 139 '_request_timeout', None 140 ) 141 kwargs['_check_input_type'] = kwargs.get( 142 '_check_input_type', True 143 ) 144 kwargs['_check_return_type'] = kwargs.get( 145 '_check_return_type', True 146 ) 147 kwargs['_host_index'] = kwargs.get('_host_index') 148 return self.get_config_endpoint.call_with_http_info(**kwargs) 149