Пример #1
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_run(self, repository, run_id, **kwargs):
            """get a run  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_run(repository, run_id, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                run_id (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                ActionRun
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['run_id'] = \
                run_id
            return self.call_with_http_info(**kwargs)

        self.get_run = _Endpoint(settings={
            'response_type': (ActionRun, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/actions/runs/{run_id}',
            'operation_id':
            'get_run',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                 params_map={
                                     'all': [
                                         'repository',
                                         'run_id',
                                     ],
                                     'required': [
                                         'repository',
                                         'run_id',
                                     ],
                                     'nullable': [],
                                     'enum': [],
                                     'validation': []
                                 },
                                 root_map={
                                     'validations': {},
                                     'allowed_values': {},
                                     'openapi_types': {
                                         'repository': (str, ),
                                         'run_id': (str, ),
                                     },
                                     'attribute_map': {
                                         'repository': 'repository',
                                         'run_id': 'run_id',
                                     },
                                     'location_map': {
                                         'repository': 'path',
                                         'run_id': 'path',
                                     },
                                     'collection_format_map': {}
                                 },
                                 headers_map={
                                     'accept': ['application/json'],
                                     'content_type': [],
                                 },
                                 api_client=api_client,
                                 callable=__get_run)

        def __get_run_hook_output(self, repository, run_id, hook_run_id,
                                  **kwargs):
            """get run hook output  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_run_hook_output(repository, run_id, hook_run_id, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                run_id (str):
                hook_run_id (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                file_type
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['run_id'] = \
                run_id
            kwargs['hook_run_id'] = \
                hook_run_id
            return self.call_with_http_info(**kwargs)

        self.get_run_hook_output = _Endpoint(settings={
            'response_type': (file_type, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output',
            'operation_id':
            'get_run_hook_output',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                             params_map={
                                                 'all': [
                                                     'repository',
                                                     'run_id',
                                                     'hook_run_id',
                                                 ],
                                                 'required': [
                                                     'repository',
                                                     'run_id',
                                                     'hook_run_id',
                                                 ],
                                                 'nullable': [],
                                                 'enum': [],
                                                 'validation': []
                                             },
                                             root_map={
                                                 'validations': {},
                                                 'allowed_values': {},
                                                 'openapi_types': {
                                                     'repository': (str, ),
                                                     'run_id': (str, ),
                                                     'hook_run_id': (str, ),
                                                 },
                                                 'attribute_map': {
                                                     'repository':
                                                     'repository',
                                                     'run_id': 'run_id',
                                                     'hook_run_id':
                                                     'hook_run_id',
                                                 },
                                                 'location_map': {
                                                     'repository': 'path',
                                                     'run_id': 'path',
                                                     'hook_run_id': 'path',
                                                 },
                                                 'collection_format_map': {}
                                             },
                                             headers_map={
                                                 'accept': [
                                                     'application/octet-stream',
                                                     'application/json'
                                                 ],
                                                 'content_type': [],
                                             },
                                             api_client=api_client,
                                             callable=__get_run_hook_output)

        def __list_repository_runs(self, repository, **kwargs):
            """list runs  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_repository_runs(repository, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):

            Keyword Args:
                after (str): return items after this value. [optional]
                amount (int): how many items to return. [optional] if omitted the server will use the default value of 100
                branch (str): [optional]
                commit (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                ActionRunList
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            return self.call_with_http_info(**kwargs)

        self.list_repository_runs = _Endpoint(settings={
            'response_type': (ActionRunList, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/actions/runs',
            'operation_id':
            'list_repository_runs',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                              params_map={
                                                  'all': [
                                                      'repository',
                                                      'after',
                                                      'amount',
                                                      'branch',
                                                      'commit',
                                                  ],
                                                  'required': [
                                                      'repository',
                                                  ],
                                                  'nullable': [],
                                                  'enum': [],
                                                  'validation': [
                                                      'amount',
                                                  ]
                                              },
                                              root_map={
                                                  'validations': {
                                                      ('amount', ): {
                                                          'inclusive_maximum':
                                                          1000,
                                                          'inclusive_minimum':
                                                          -1,
                                                      },
                                                  },
                                                  'allowed_values': {},
                                                  'openapi_types': {
                                                      'repository': (str, ),
                                                      'after': (str, ),
                                                      'amount': (int, ),
                                                      'branch': (str, ),
                                                      'commit': (str, ),
                                                  },
                                                  'attribute_map': {
                                                      'repository':
                                                      'repository',
                                                      'after': 'after',
                                                      'amount': 'amount',
                                                      'branch': 'branch',
                                                      'commit': 'commit',
                                                  },
                                                  'location_map': {
                                                      'repository': 'path',
                                                      'after': 'query',
                                                      'amount': 'query',
                                                      'branch': 'query',
                                                      'commit': 'query',
                                                  },
                                                  'collection_format_map': {}
                                              },
                                              headers_map={
                                                  'accept':
                                                  ['application/json'],
                                                  'content_type': [],
                                              },
                                              api_client=api_client,
                                              callable=__list_repository_runs)

        def __list_run_hooks(self, repository, run_id, **kwargs):
            """list run hooks  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_run_hooks(repository, run_id, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                run_id (str):

            Keyword Args:
                after (str): return items after this value. [optional]
                amount (int): how many items to return. [optional] if omitted the server will use the default value of 100
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                HookRunList
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['run_id'] = \
                run_id
            return self.call_with_http_info(**kwargs)

        self.list_run_hooks = _Endpoint(settings={
            'response_type': (HookRunList, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/actions/runs/{run_id}/hooks',
            'operation_id':
            'list_run_hooks',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                        params_map={
                                            'all': [
                                                'repository',
                                                'run_id',
                                                'after',
                                                'amount',
                                            ],
                                            'required': [
                                                'repository',
                                                'run_id',
                                            ],
                                            'nullable': [],
                                            'enum': [],
                                            'validation': [
                                                'amount',
                                            ]
                                        },
                                        root_map={
                                            'validations': {
                                                ('amount', ): {
                                                    'inclusive_maximum': 1000,
                                                    'inclusive_minimum': -1,
                                                },
                                            },
                                            'allowed_values': {},
                                            'openapi_types': {
                                                'repository': (str, ),
                                                'run_id': (str, ),
                                                'after': (str, ),
                                                'amount': (int, ),
                                            },
                                            'attribute_map': {
                                                'repository': 'repository',
                                                'run_id': 'run_id',
                                                'after': 'after',
                                                'amount': 'amount',
                                            },
                                            'location_map': {
                                                'repository': 'path',
                                                'run_id': 'path',
                                                'after': 'query',
                                                'amount': 'query',
                                            },
                                            'collection_format_map': {}
                                        },
                                        headers_map={
                                            'accept': ['application/json'],
                                            'content_type': [],
                                        },
                                        api_client=api_client,
                                        callable=__list_run_hooks)
Пример #2
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __health_check(self, **kwargs):
            """health_check  # noqa: E501

            check that the API server is up and running  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.health_check(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.health_check = _Endpoint(settings={
            'response_type': None,
            'auth': [],
            'endpoint_path': '/healthcheck',
            'operation_id': 'health_check',
            'http_method': 'GET',
            'servers': None,
        },
                                      params_map={
                                          'all': [],
                                          'required': [],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {},
                                          'attribute_map': {},
                                          'location_map': {},
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': [],
                                          'content_type': [],
                                      },
                                      api_client=api_client,
                                      callable=__health_check)
Пример #3
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_physical_address(self, repository, branch, path, **kwargs):
            """get a physical address and a return token to write object to underlying storage  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_physical_address(repository, branch, path, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):
                path (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                StagingLocation
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            kwargs['path'] = \
                path
            return self.call_with_http_info(**kwargs)

        self.get_physical_address = _Endpoint(settings={
            'response_type': (StagingLocation, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}/staging/backing',
            'operation_id':
            'get_physical_address',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                              params_map={
                                                  'all': [
                                                      'repository',
                                                      'branch',
                                                      'path',
                                                  ],
                                                  'required': [
                                                      'repository',
                                                      'branch',
                                                      'path',
                                                  ],
                                                  'nullable': [],
                                                  'enum': [],
                                                  'validation': []
                                              },
                                              root_map={
                                                  'validations': {},
                                                  'allowed_values': {},
                                                  'openapi_types': {
                                                      'repository': (str, ),
                                                      'branch': (str, ),
                                                      'path': (str, ),
                                                  },
                                                  'attribute_map': {
                                                      'repository':
                                                      'repository',
                                                      'branch': 'branch',
                                                      'path': 'path',
                                                  },
                                                  'location_map': {
                                                      'repository': 'path',
                                                      'branch': 'path',
                                                      'path': 'query',
                                                  },
                                                  'collection_format_map': {}
                                              },
                                              headers_map={
                                                  'accept':
                                                  ['application/json'],
                                                  'content_type': [],
                                              },
                                              api_client=api_client,
                                              callable=__get_physical_address)

        def __link_physical_address(self, repository, branch, path,
                                    staging_metadata, **kwargs):
            """associate staging on this physical address with a path  # noqa: E501

            If the supplied token matches the current staging token, associate the object as the physical address with the supplied path.  Otherwise, if staging has been committed and the token has expired, return a conflict and hint where to place the object to try again.  Caller should copy the object to the new physical address and PUT again with the new staging token.  (No need to back off, this is due to losing the race against a concurrent commit operation.)   # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.link_physical_address(repository, branch, path, staging_metadata, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):
                path (str):
                staging_metadata (StagingMetadata):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            kwargs['path'] = \
                path
            kwargs['staging_metadata'] = \
                staging_metadata
            return self.call_with_http_info(**kwargs)

        self.link_physical_address = _Endpoint(
            settings={
                'response_type': None,
                'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
                'endpoint_path':
                '/repositories/{repository}/branches/{branch}/staging/backing',
                'operation_id': 'link_physical_address',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'repository',
                    'branch',
                    'path',
                    'staging_metadata',
                ],
                'required': [
                    'repository',
                    'branch',
                    'path',
                    'staging_metadata',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'repository': (str, ),
                    'branch': (str, ),
                    'path': (str, ),
                    'staging_metadata': (StagingMetadata, ),
                },
                'attribute_map': {
                    'repository': 'repository',
                    'branch': 'branch',
                    'path': 'path',
                },
                'location_map': {
                    'repository': 'path',
                    'branch': 'path',
                    'path': 'query',
                    'staging_metadata': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__link_physical_address)
Пример #4
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_config(self, **kwargs):
            """get_config  # noqa: E501

            retrieve the lakefs config  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_config(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                Config
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_config = _Endpoint(settings={
            'response_type': (Config, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/config',
            'operation_id':
            'get_config',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                    params_map={
                                        'all': [],
                                        'required': [],
                                        'nullable': [],
                                        'enum': [],
                                        'validation': []
                                    },
                                    root_map={
                                        'validations': {},
                                        'allowed_values': {},
                                        'openapi_types': {},
                                        'attribute_map': {},
                                        'location_map': {},
                                        'collection_format_map': {}
                                    },
                                    headers_map={
                                        'accept': ['application/json'],
                                        'content_type': [],
                                    },
                                    api_client=api_client,
                                    callable=__get_config)

        def __setup(self, setup, **kwargs):
            """setup lakeFS and create a first user  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.setup(setup, async_req=True)
            >>> result = thread.get()

            Args:
                setup (Setup):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                CredentialsWithSecret
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['setup'] = \
                setup
            return self.call_with_http_info(**kwargs)

        self.setup = _Endpoint(settings={
            'response_type': (CredentialsWithSecret, ),
            'auth': [],
            'endpoint_path': '/setup_lakefs',
            'operation_id': 'setup',
            'http_method': 'POST',
            'servers': None,
        },
                               params_map={
                                   'all': [
                                       'setup',
                                   ],
                                   'required': [
                                       'setup',
                                   ],
                                   'nullable': [],
                                   'enum': [],
                                   'validation': []
                               },
                               root_map={
                                   'validations': {},
                                   'allowed_values': {},
                                   'openapi_types': {
                                       'setup': (Setup, ),
                                   },
                                   'attribute_map': {},
                                   'location_map': {
                                       'setup': 'body',
                                   },
                                   'collection_format_map': {}
                               },
                               headers_map={
                                   'accept': ['application/json'],
                                   'content_type': ['application/json']
                               },
                               api_client=api_client,
                               callable=__setup)
Пример #5
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_branch(self, repository, branch_creation, **kwargs):
            """create branch  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.create_branch(repository, branch_creation, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch_creation (BranchCreation):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                str
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch_creation'] = \
                branch_creation
            return self.call_with_http_info(**kwargs)

        self.create_branch = _Endpoint(settings={
            'response_type': (str, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches',
            'operation_id':
            'create_branch',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                       params_map={
                                           'all': [
                                               'repository',
                                               'branch_creation',
                                           ],
                                           'required': [
                                               'repository',
                                               'branch_creation',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'repository': (str, ),
                                               'branch_creation':
                                               (BranchCreation, ),
                                           },
                                           'attribute_map': {
                                               'repository': 'repository',
                                           },
                                           'location_map': {
                                               'repository': 'path',
                                               'branch_creation': 'body',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept':
                                           ['text/html', 'application/json'],
                                           'content_type':
                                           ['application/json']
                                       },
                                       api_client=api_client,
                                       callable=__create_branch)

        def __delete_branch(self, repository, branch, **kwargs):
            """delete branch  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.delete_branch(repository, branch, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            return self.call_with_http_info(**kwargs)

        self.delete_branch = _Endpoint(settings={
            'response_type':
            None,
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}',
            'operation_id':
            'delete_branch',
            'http_method':
            'DELETE',
            'servers':
            None,
        },
                                       params_map={
                                           'all': [
                                               'repository',
                                               'branch',
                                           ],
                                           'required': [
                                               'repository',
                                               'branch',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'repository': (str, ),
                                               'branch': (str, ),
                                           },
                                           'attribute_map': {
                                               'repository': 'repository',
                                               'branch': 'branch',
                                           },
                                           'location_map': {
                                               'repository': 'path',
                                               'branch': 'path',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type': [],
                                       },
                                       api_client=api_client,
                                       callable=__delete_branch)

        def __diff_branch(self, repository, branch, **kwargs):
            """diff branch  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.diff_branch(repository, branch, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):

            Keyword Args:
                after (str): return items after this value. [optional]
                amount (int): how many items to return. [optional] if omitted the server will use the default value of 100
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                DiffList
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            return self.call_with_http_info(**kwargs)

        self.diff_branch = _Endpoint(settings={
            'response_type': (DiffList, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}/diff',
            'operation_id':
            'diff_branch',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                     params_map={
                                         'all': [
                                             'repository',
                                             'branch',
                                             'after',
                                             'amount',
                                         ],
                                         'required': [
                                             'repository',
                                             'branch',
                                         ],
                                         'nullable': [],
                                         'enum': [],
                                         'validation': [
                                             'amount',
                                         ]
                                     },
                                     root_map={
                                         'validations': {
                                             ('amount', ): {
                                                 'inclusive_maximum': 1000,
                                                 'inclusive_minimum': -1,
                                             },
                                         },
                                         'allowed_values': {},
                                         'openapi_types': {
                                             'repository': (str, ),
                                             'branch': (str, ),
                                             'after': (str, ),
                                             'amount': (int, ),
                                         },
                                         'attribute_map': {
                                             'repository': 'repository',
                                             'branch': 'branch',
                                             'after': 'after',
                                             'amount': 'amount',
                                         },
                                         'location_map': {
                                             'repository': 'path',
                                             'branch': 'path',
                                             'after': 'query',
                                             'amount': 'query',
                                         },
                                         'collection_format_map': {}
                                     },
                                     headers_map={
                                         'accept': ['application/json'],
                                         'content_type': [],
                                     },
                                     api_client=api_client,
                                     callable=__diff_branch)

        def __get_branch(self, repository, branch, **kwargs):
            """get branch  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_branch(repository, branch, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                Ref
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            return self.call_with_http_info(**kwargs)

        self.get_branch = _Endpoint(settings={
            'response_type': (Ref, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}',
            'operation_id':
            'get_branch',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                    params_map={
                                        'all': [
                                            'repository',
                                            'branch',
                                        ],
                                        'required': [
                                            'repository',
                                            'branch',
                                        ],
                                        'nullable': [],
                                        'enum': [],
                                        'validation': []
                                    },
                                    root_map={
                                        'validations': {},
                                        'allowed_values': {},
                                        'openapi_types': {
                                            'repository': (str, ),
                                            'branch': (str, ),
                                        },
                                        'attribute_map': {
                                            'repository': 'repository',
                                            'branch': 'branch',
                                        },
                                        'location_map': {
                                            'repository': 'path',
                                            'branch': 'path',
                                        },
                                        'collection_format_map': {}
                                    },
                                    headers_map={
                                        'accept': ['application/json'],
                                        'content_type': [],
                                    },
                                    api_client=api_client,
                                    callable=__get_branch)

        def __list_branches(self, repository, **kwargs):
            """list branches  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_branches(repository, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):

            Keyword Args:
                prefix (str): return items prefixed with this value. [optional]
                after (str): return items after this value. [optional]
                amount (int): how many items to return. [optional] if omitted the server will use the default value of 100
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                RefList
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            return self.call_with_http_info(**kwargs)

        self.list_branches = _Endpoint(settings={
            'response_type': (RefList, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches',
            'operation_id':
            'list_branches',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                       params_map={
                                           'all': [
                                               'repository',
                                               'prefix',
                                               'after',
                                               'amount',
                                           ],
                                           'required': [
                                               'repository',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': [
                                               'amount',
                                           ]
                                       },
                                       root_map={
                                           'validations': {
                                               ('amount', ): {
                                                   'inclusive_maximum': 1000,
                                                   'inclusive_minimum': -1,
                                               },
                                           },
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'repository': (str, ),
                                               'prefix': (str, ),
                                               'after': (str, ),
                                               'amount': (int, ),
                                           },
                                           'attribute_map': {
                                               'repository': 'repository',
                                               'prefix': 'prefix',
                                               'after': 'after',
                                               'amount': 'amount',
                                           },
                                           'location_map': {
                                               'repository': 'path',
                                               'prefix': 'query',
                                               'after': 'query',
                                               'amount': 'query',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type': [],
                                       },
                                       api_client=api_client,
                                       callable=__list_branches)

        def __reset_branch(self, repository, branch, reset_creation, **kwargs):
            """reset branch  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.reset_branch(repository, branch, reset_creation, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):
                reset_creation (ResetCreation):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            kwargs['reset_creation'] = \
                reset_creation
            return self.call_with_http_info(**kwargs)

        self.reset_branch = _Endpoint(settings={
            'response_type':
            None,
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}',
            'operation_id':
            'reset_branch',
            'http_method':
            'PUT',
            'servers':
            None,
        },
                                      params_map={
                                          'all': [
                                              'repository',
                                              'branch',
                                              'reset_creation',
                                          ],
                                          'required': [
                                              'repository',
                                              'branch',
                                              'reset_creation',
                                          ],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {
                                              'repository': (str, ),
                                              'branch': (str, ),
                                              'reset_creation':
                                              (ResetCreation, ),
                                          },
                                          'attribute_map': {
                                              'repository': 'repository',
                                              'branch': 'branch',
                                          },
                                          'location_map': {
                                              'repository': 'path',
                                              'branch': 'path',
                                              'reset_creation': 'body',
                                          },
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': ['application/json']
                                      },
                                      api_client=api_client,
                                      callable=__reset_branch)

        def __revert_branch(self, repository, branch, revert_creation,
                            **kwargs):
            """revert  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.revert_branch(repository, branch, revert_creation, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):
                revert_creation (RevertCreation):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            kwargs['revert_creation'] = \
                revert_creation
            return self.call_with_http_info(**kwargs)

        self.revert_branch = _Endpoint(settings={
            'response_type':
            None,
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}/revert',
            'operation_id':
            'revert_branch',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                       params_map={
                                           'all': [
                                               'repository',
                                               'branch',
                                               'revert_creation',
                                           ],
                                           'required': [
                                               'repository',
                                               'branch',
                                               'revert_creation',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'repository': (str, ),
                                               'branch': (str, ),
                                               'revert_creation':
                                               (RevertCreation, ),
                                           },
                                           'attribute_map': {
                                               'repository': 'repository',
                                               'branch': 'branch',
                                           },
                                           'location_map': {
                                               'repository': 'path',
                                               'branch': 'path',
                                               'revert_creation': 'body',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type':
                                           ['application/json']
                                       },
                                       api_client=api_client,
                                       callable=__revert_branch)
Пример #6
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __delete_object(self, repository, branch, path, **kwargs):
            """delete object  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.delete_object(repository, branch, path, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):
                path (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            kwargs['path'] = \
                path
            return self.call_with_http_info(**kwargs)

        self.delete_object = _Endpoint(settings={
            'response_type':
            None,
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}/objects',
            'operation_id':
            'delete_object',
            'http_method':
            'DELETE',
            'servers':
            None,
        },
                                       params_map={
                                           'all': [
                                               'repository',
                                               'branch',
                                               'path',
                                           ],
                                           'required': [
                                               'repository',
                                               'branch',
                                               'path',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'repository': (str, ),
                                               'branch': (str, ),
                                               'path': (str, ),
                                           },
                                           'attribute_map': {
                                               'repository': 'repository',
                                               'branch': 'branch',
                                               'path': 'path',
                                           },
                                           'location_map': {
                                               'repository': 'path',
                                               'branch': 'path',
                                               'path': 'query',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type': [],
                                       },
                                       api_client=api_client,
                                       callable=__delete_object)

        def __get_object(self, repository, ref, path, **kwargs):
            """get object content  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_object(repository, ref, path, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                ref (str): a reference (could be either a branch or a commit ID)
                path (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                file_type
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['ref'] = \
                ref
            kwargs['path'] = \
                path
            return self.call_with_http_info(**kwargs)

        self.get_object = _Endpoint(
            settings={
                'response_type': (file_type, ),
                'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
                'endpoint_path':
                '/repositories/{repository}/refs/{ref}/objects',
                'operation_id': 'get_object',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'repository',
                    'ref',
                    'path',
                ],
                'required': [
                    'repository',
                    'ref',
                    'path',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'repository': (str, ),
                    'ref': (str, ),
                    'path': (str, ),
                },
                'attribute_map': {
                    'repository': 'repository',
                    'ref': 'ref',
                    'path': 'path',
                },
                'location_map': {
                    'repository': 'path',
                    'ref': 'path',
                    'path': 'query',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/octet-stream', 'application/json'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_object)

        def __get_underlying_properties(self, repository, ref, path, **kwargs):
            """get object properties on underlying storage  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_underlying_properties(repository, ref, path, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                ref (str): a reference (could be either a branch or a commit ID)
                path (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                UnderlyingObjectProperties
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['ref'] = \
                ref
            kwargs['path'] = \
                path
            return self.call_with_http_info(**kwargs)

        self.get_underlying_properties = _Endpoint(settings={
            'response_type': (UnderlyingObjectProperties, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/refs/{ref}/objects/underlyingProperties',
            'operation_id':
            'get_underlying_properties',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                                   params_map={
                                                       'all': [
                                                           'repository',
                                                           'ref',
                                                           'path',
                                                       ],
                                                       'required': [
                                                           'repository',
                                                           'ref',
                                                           'path',
                                                       ],
                                                       'nullable': [],
                                                       'enum': [],
                                                       'validation': []
                                                   },
                                                   root_map={
                                                       'validations': {},
                                                       'allowed_values': {},
                                                       'openapi_types': {
                                                           'repository':
                                                           (str, ),
                                                           'ref': (str, ),
                                                           'path': (str, ),
                                                       },
                                                       'attribute_map': {
                                                           'repository':
                                                           'repository',
                                                           'ref': 'ref',
                                                           'path': 'path',
                                                       },
                                                       'location_map': {
                                                           'repository':
                                                           'path',
                                                           'ref': 'path',
                                                           'path': 'query',
                                                       },
                                                       'collection_format_map':
                                                       {}
                                                   },
                                                   headers_map={
                                                       'accept':
                                                       ['application/json'],
                                                       'content_type': [],
                                                   },
                                                   api_client=api_client,
                                                   callable=
                                                   __get_underlying_properties)

        def __list_objects(self, repository, ref, **kwargs):
            """list objects under a given prefix  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_objects(repository, ref, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                ref (str): a reference (could be either a branch or a commit ID)

            Keyword Args:
                prefix (str): [optional]
                after (str): return items after this value. [optional]
                amount (int): how many items to return. [optional] if omitted the server will use the default value of 100
                delimiter (str): [optional] if omitted the server will use the default value of "/"
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                ObjectStatsList
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['ref'] = \
                ref
            return self.call_with_http_info(**kwargs)

        self.list_objects = _Endpoint(settings={
            'response_type': (ObjectStatsList, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/refs/{ref}/objects/ls',
            'operation_id':
            'list_objects',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                      params_map={
                                          'all': [
                                              'repository',
                                              'ref',
                                              'prefix',
                                              'after',
                                              'amount',
                                              'delimiter',
                                          ],
                                          'required': [
                                              'repository',
                                              'ref',
                                          ],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': [
                                              'amount',
                                          ]
                                      },
                                      root_map={
                                          'validations': {
                                              ('amount', ): {
                                                  'inclusive_maximum': 1000,
                                                  'inclusive_minimum': -1,
                                              },
                                          },
                                          'allowed_values': {},
                                          'openapi_types': {
                                              'repository': (str, ),
                                              'ref': (str, ),
                                              'prefix': (str, ),
                                              'after': (str, ),
                                              'amount': (int, ),
                                              'delimiter': (str, ),
                                          },
                                          'attribute_map': {
                                              'repository': 'repository',
                                              'ref': 'ref',
                                              'prefix': 'prefix',
                                              'after': 'after',
                                              'amount': 'amount',
                                              'delimiter': 'delimiter',
                                          },
                                          'location_map': {
                                              'repository': 'path',
                                              'ref': 'path',
                                              'prefix': 'query',
                                              'after': 'query',
                                              'amount': 'query',
                                              'delimiter': 'query',
                                          },
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': [],
                                      },
                                      api_client=api_client,
                                      callable=__list_objects)

        def __stage_object(self, repository, branch, path,
                           object_stage_creation, **kwargs):
            """stage an object\"s metadata for the given branch  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.stage_object(repository, branch, path, object_stage_creation, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):
                path (str):
                object_stage_creation (ObjectStageCreation):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                ObjectStats
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            kwargs['path'] = \
                path
            kwargs['object_stage_creation'] = \
                object_stage_creation
            return self.call_with_http_info(**kwargs)

        self.stage_object = _Endpoint(settings={
            'response_type': (ObjectStats, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}/objects',
            'operation_id':
            'stage_object',
            'http_method':
            'PUT',
            'servers':
            None,
        },
                                      params_map={
                                          'all': [
                                              'repository',
                                              'branch',
                                              'path',
                                              'object_stage_creation',
                                          ],
                                          'required': [
                                              'repository',
                                              'branch',
                                              'path',
                                              'object_stage_creation',
                                          ],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {
                                              'repository': (str, ),
                                              'branch': (str, ),
                                              'path': (str, ),
                                              'object_stage_creation':
                                              (ObjectStageCreation, ),
                                          },
                                          'attribute_map': {
                                              'repository': 'repository',
                                              'branch': 'branch',
                                              'path': 'path',
                                          },
                                          'location_map': {
                                              'repository': 'path',
                                              'branch': 'path',
                                              'path': 'query',
                                              'object_stage_creation': 'body',
                                          },
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': ['application/json']
                                      },
                                      api_client=api_client,
                                      callable=__stage_object)

        def __stat_object(self, repository, ref, path, **kwargs):
            """get object metadata  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.stat_object(repository, ref, path, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                ref (str): a reference (could be either a branch or a commit ID)
                path (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                ObjectStats
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['ref'] = \
                ref
            kwargs['path'] = \
                path
            return self.call_with_http_info(**kwargs)

        self.stat_object = _Endpoint(settings={
            'response_type': (ObjectStats, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/refs/{ref}/objects/stat',
            'operation_id':
            'stat_object',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                     params_map={
                                         'all': [
                                             'repository',
                                             'ref',
                                             'path',
                                         ],
                                         'required': [
                                             'repository',
                                             'ref',
                                             'path',
                                         ],
                                         'nullable': [],
                                         'enum': [],
                                         'validation': []
                                     },
                                     root_map={
                                         'validations': {},
                                         'allowed_values': {},
                                         'openapi_types': {
                                             'repository': (str, ),
                                             'ref': (str, ),
                                             'path': (str, ),
                                         },
                                         'attribute_map': {
                                             'repository': 'repository',
                                             'ref': 'ref',
                                             'path': 'path',
                                         },
                                         'location_map': {
                                             'repository': 'path',
                                             'ref': 'path',
                                             'path': 'query',
                                         },
                                         'collection_format_map': {}
                                     },
                                     headers_map={
                                         'accept': ['application/json'],
                                         'content_type': [],
                                     },
                                     api_client=api_client,
                                     callable=__stat_object)

        def __upload_object(self, repository, branch, path, **kwargs):
            """upload_object  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.upload_object(repository, branch, path, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):
                path (str):

            Keyword Args:
                storage_class (str): [optional]
                content (file_type): Object content to upload. [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                ObjectStats
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            kwargs['path'] = \
                path
            return self.call_with_http_info(**kwargs)

        self.upload_object = _Endpoint(settings={
            'response_type': (ObjectStats, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/branches/{branch}/objects',
            'operation_id':
            'upload_object',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                       params_map={
                                           'all': [
                                               'repository',
                                               'branch',
                                               'path',
                                               'storage_class',
                                               'content',
                                           ],
                                           'required': [
                                               'repository',
                                               'branch',
                                               'path',
                                           ],
                                           'nullable': [],
                                           'enum': [],
                                           'validation': []
                                       },
                                       root_map={
                                           'validations': {},
                                           'allowed_values': {},
                                           'openapi_types': {
                                               'repository': (str, ),
                                               'branch': (str, ),
                                               'path': (str, ),
                                               'storage_class': (str, ),
                                               'content': (file_type, ),
                                           },
                                           'attribute_map': {
                                               'repository': 'repository',
                                               'branch': 'branch',
                                               'path': 'path',
                                               'storage_class': 'storageClass',
                                               'content': 'content',
                                           },
                                           'location_map': {
                                               'repository': 'path',
                                               'branch': 'path',
                                               'path': 'query',
                                               'storage_class': 'query',
                                               'content': 'form',
                                           },
                                           'collection_format_map': {}
                                       },
                                       headers_map={
                                           'accept': ['application/json'],
                                           'content_type':
                                           ['multipart/form-data']
                                       },
                                       api_client=api_client,
                                       callable=__upload_object)
Пример #7
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_symlink_file(self, repository, branch, **kwargs):
            """creates symlink files corresponding to the given directory  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.create_symlink_file(repository, branch, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                branch (str):

            Keyword Args:
                location (str): path to the table data. [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                StorageURI
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['branch'] = \
                branch
            return self.call_with_http_info(**kwargs)

        self.create_symlink_file = _Endpoint(settings={
            'response_type': (StorageURI, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/refs/{branch}/symlink',
            'operation_id':
            'create_symlink_file',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                             params_map={
                                                 'all': [
                                                     'repository',
                                                     'branch',
                                                     'location',
                                                 ],
                                                 'required': [
                                                     'repository',
                                                     'branch',
                                                 ],
                                                 'nullable': [],
                                                 'enum': [],
                                                 'validation': []
                                             },
                                             root_map={
                                                 'validations': {},
                                                 'allowed_values': {},
                                                 'openapi_types': {
                                                     'repository': (str, ),
                                                     'branch': (str, ),
                                                     'location': (str, ),
                                                 },
                                                 'attribute_map': {
                                                     'repository':
                                                     'repository',
                                                     'branch': 'branch',
                                                     'location': 'location',
                                                 },
                                                 'location_map': {
                                                     'repository': 'path',
                                                     'branch': 'path',
                                                     'location': 'query',
                                                 },
                                                 'collection_format_map': {}
                                             },
                                             headers_map={
                                                 'accept':
                                                 ['application/json'],
                                                 'content_type': [],
                                             },
                                             api_client=api_client,
                                             callable=__create_symlink_file)

        def __get_meta_range(self, repository, meta_range, **kwargs):
            """return URI to a meta-range file  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_meta_range(repository, meta_range, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                meta_range (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                StorageURI
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['meta_range'] = \
                meta_range
            return self.call_with_http_info(**kwargs)

        self.get_meta_range = _Endpoint(settings={
            'response_type': (StorageURI, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/metadata/meta_range/{meta_range}',
            'operation_id':
            'get_meta_range',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                        params_map={
                                            'all': [
                                                'repository',
                                                'meta_range',
                                            ],
                                            'required': [
                                                'repository',
                                                'meta_range',
                                            ],
                                            'nullable': [],
                                            'enum': [],
                                            'validation': []
                                        },
                                        root_map={
                                            'validations': {},
                                            'allowed_values': {},
                                            'openapi_types': {
                                                'repository': (str, ),
                                                'meta_range': (str, ),
                                            },
                                            'attribute_map': {
                                                'repository': 'repository',
                                                'meta_range': 'meta_range',
                                            },
                                            'location_map': {
                                                'repository': 'path',
                                                'meta_range': 'path',
                                            },
                                            'collection_format_map': {}
                                        },
                                        headers_map={
                                            'accept': ['application/json'],
                                            'content_type': [],
                                        },
                                        api_client=api_client,
                                        callable=__get_meta_range)

        def __get_range(self, repository, range, **kwargs):
            """return URI to a range file  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.get_range(repository, range, async_req=True)
            >>> result = thread.get()

            Args:
                repository (str):
                range (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int/None): specifies the index of the server
                    that we want to use.
                    Default is read from the configuration.
                async_req (bool): execute request asynchronously

            Returns:
                StorageURI
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index')
            kwargs['repository'] = \
                repository
            kwargs['range'] = \
                range
            return self.call_with_http_info(**kwargs)

        self.get_range = _Endpoint(settings={
            'response_type': (StorageURI, ),
            'auth': ['basic_auth', 'cookie_auth', 'jwt_token'],
            'endpoint_path':
            '/repositories/{repository}/metadata/range/{range}',
            'operation_id':
            'get_range',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                   params_map={
                                       'all': [
                                           'repository',
                                           'range',
                                       ],
                                       'required': [
                                           'repository',
                                           'range',
                                       ],
                                       'nullable': [],
                                       'enum': [],
                                       'validation': []
                                   },
                                   root_map={
                                       'validations': {},
                                       'allowed_values': {},
                                       'openapi_types': {
                                           'repository': (str, ),
                                           'range': (str, ),
                                       },
                                       'attribute_map': {
                                           'repository': 'repository',
                                           'range': 'range',
                                       },
                                       'location_map': {
                                           'repository': 'path',
                                           'range': 'path',
                                       },
                                       'collection_format_map': {}
                                   },
                                   headers_map={
                                       'accept': ['application/json'],
                                       'content_type': [],
                                   },
                                   api_client=api_client,
                                   callable=__get_range)