Exemplo n.º 1
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __app_settings(self, **kwargs):
            """GET all AppSettings  # noqa: E501

            GET all AppSettings. This is an administrative Endpoint that is not accessible for regular users.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.app_settings(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:
                [AppSettingsResponse]
                    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.app_settings = _Endpoint(settings={
            'response_type': ([AppSettingsResponse], ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/appsettings',
            'operation_id': 'app_settings',
            '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=__app_settings)

        def __update_app_settings(self, id, **kwargs):
            """Update a specific appsetting. This is an administrative Endpoint that is not accessible for regular users.  # noqa: E501

            Update a specific appsetting  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (str): ID of the appsetting

            Keyword Args:
                app_settings_update_request (AppSettingsUpdateRequest): [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:
                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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.update_app_settings = _Endpoint(
            settings={
                'response_type': None,
                'auth': ['bearerAuth', 'cookieAuth'],
                'endpoint_path': '/appsettings/{id}',
                'operation_id': 'update_app_settings',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'app_settings_update_request',
                ],
                'required': [
                    'id',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'id': (str, ),
                    'app_settings_update_request':
                    (AppSettingsUpdateRequest, ),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                    'app_settings_update_request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__update_app_settings)
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_submission(self, **kwargs):
            """Create a New Submission  # noqa: E501

            Creates a new Submission. A submission consists of a list of metadatasets and a list of files.  # 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_submission(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                submission_request (SubmissionRequest): Provide a list of metadatasets and a list of files.. [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:
                SubmissionResponse
                    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.create_submission = _Endpoint(settings={
            'response_type': (SubmissionResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path':
            '/submissions',
            'operation_id':
            'create_submission',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                           params_map={
                                               'all': [
                                                   'submission_request',
                                               ],
                                               'required': [],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'submission_request':
                                                   (SubmissionRequest, ),
                                               },
                                               'attribute_map': {},
                                               'location_map': {
                                                   'submission_request':
                                                   'body',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type':
                                               ['application/json']
                                           },
                                           api_client=api_client,
                                           callable=__create_submission)

        def __get_group_submissions(self, id, **kwargs):
            """Get A List of All Submissions of A Group.  # noqa: E501

            Get a list of all submissions of a group.  # 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_group_submissions(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID of the group

            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:
                GroupSubmissions
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.get_group_submissions = _Endpoint(
            settings={
                'response_type': (GroupSubmissions, ),
                'auth': ['bearerAuth', 'cookieAuth'],
                'endpoint_path': '/groups/{id}/submissions',
                'operation_id': 'get_group_submissions',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'id': (str, ),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_group_submissions)

        def __prevalidate_submission(self, **kwargs):
            """Pre-validate a submission  # noqa: E501

            Pre-validates a submission request without actually creating a submission.  A submission request consists of a list of metadatasets and a list of files.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                submission_request (SubmissionRequest): Provide a list of metadatasets and a list of files.. [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:
                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.prevalidate_submission = _Endpoint(
            settings={
                'response_type': None,
                'auth': ['bearerAuth', 'cookieAuth'],
                'endpoint_path': '/presubvalidation',
                'operation_id': 'prevalidate_submission',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'submission_request',
                ],
                'required': [],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'submission_request': (SubmissionRequest, ),
                },
                'attribute_map': {},
                'location_map': {
                    'submission_request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__prevalidate_submission)
Exemplo n.º 3
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_server_info(self, **kwargs):
            """Get DataMeta server information  # noqa: E501

            Get information about the DataMeta server serving this API  # 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_server_info(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:
                ServerInfoResponse
                    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_server_info = _Endpoint(settings={
            'response_type': (ServerInfoResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/server',
            'operation_id': 'get_server_info',
            '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_server_info)
Exemplo n.º 4
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_meta_data_set(self, **kwargs):
            """Create a New MetaDataSet  # noqa: E501

            Create a new MetaDataSet  # 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_meta_data_set(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                meta_data_set (MetaDataSet): Provide all properties for one MetaDataSet.. [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:
                MetaDataSetResponse
                    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.create_meta_data_set = _Endpoint(settings={
            'response_type': (MetaDataSetResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path':
            '/metadatasets',
            'operation_id':
            'create_meta_data_set',
            'http_method':
            'POST',
            'servers':
            None,
        },
                                              params_map={
                                                  'all': [
                                                      'meta_data_set',
                                                  ],
                                                  'required': [],
                                                  'nullable': [],
                                                  'enum': [],
                                                  'validation': []
                                              },
                                              root_map={
                                                  'validations': {},
                                                  'allowed_values': {},
                                                  'openapi_types': {
                                                      'meta_data_set':
                                                      (MetaDataSet, ),
                                                  },
                                                  'attribute_map': {},
                                                  'location_map': {
                                                      'meta_data_set': 'body',
                                                  },
                                                  'collection_format_map': {}
                                              },
                                              headers_map={
                                                  'accept':
                                                  ['application/json'],
                                                  'content_type':
                                                  ['application/json']
                                              },
                                              api_client=api_client,
                                              callable=__create_meta_data_set)

        def __create_meta_datum(self, **kwargs):
            """Create a New MetaDatum  # noqa: E501

            Create a new MetaDatum. This is an administrative Endpoint that is not accessible for regular users.  # 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_meta_datum(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                meta_datum (MetaDatum): Provide all properties for one MetaDatum.. [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:
                MetaDataResponse
                    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.create_meta_datum = _Endpoint(settings={
            'response_type': (MetaDataResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/metadata',
            'operation_id': 'create_meta_datum',
            'http_method': 'POST',
            'servers': None,
        },
                                           params_map={
                                               'all': [
                                                   'meta_datum',
                                               ],
                                               'required': [],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'meta_datum': (MetaDatum, ),
                                               },
                                               'attribute_map': {},
                                               'location_map': {
                                                   'meta_datum': 'body',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type':
                                               ['application/json']
                                           },
                                           api_client=api_client,
                                           callable=__create_meta_datum)

        def __delete_metadata_set(self, id, **kwargs):
            """Delete Not-Submitted Metadataset  # noqa: E501

            Delete File. Please note: This is only allowed if the metadataset has not been part of a Submission, yet.  # 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_metadata_set(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID of the Metadataset

            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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.delete_metadata_set = _Endpoint(settings={
            'response_type':
            None,
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path':
            '/metadatasets/{id}',
            'operation_id':
            'delete_metadata_set',
            'http_method':
            'DELETE',
            'servers':
            None,
        },
                                             params_map={
                                                 'all': [
                                                     'id',
                                                 ],
                                                 'required': [
                                                     'id',
                                                 ],
                                                 'nullable': [],
                                                 'enum': [],
                                                 'validation': []
                                             },
                                             root_map={
                                                 'validations': {},
                                                 'allowed_values': {},
                                                 'openapi_types': {
                                                     'id': (str, ),
                                                 },
                                                 'attribute_map': {
                                                     'id': 'id',
                                                 },
                                                 'location_map': {
                                                     'id': 'path',
                                                 },
                                                 'collection_format_map': {}
                                             },
                                             headers_map={
                                                 'accept':
                                                 ['application/json'],
                                                 'content_type': [],
                                             },
                                             api_client=api_client,
                                             callable=__delete_metadata_set)

        def __get_meta_data(self, **kwargs):
            """Get metadata definitions  # noqa: E501

            Get the metadata definitions that are configured for this site.  # 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_data(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:
                MetaDatumResponse
                    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_meta_data = _Endpoint(settings={
            'response_type': (MetaDatumResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/metadata',
            'operation_id': 'get_meta_data',
            '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_meta_data)

        def __get_meta_data_set(self, id, **kwargs):
            """Get Details for a MetaDataSet  # noqa: E501

            Get details for a metadataset.  # 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_data_set(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID of the MetaDataSet

            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:
                MetaDataSetResponse
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.get_meta_data_set = _Endpoint(settings={
            'response_type': (MetaDataSetResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path':
            '/metadatasets/{id}',
            'operation_id':
            'get_meta_data_set',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                           params_map={
                                               'all': [
                                                   'id',
                                               ],
                                               'required': [
                                                   'id',
                                               ],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'id': (str, ),
                                               },
                                               'attribute_map': {
                                                   'id': 'id',
                                               },
                                               'location_map': {
                                                   'id': 'path',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type': [],
                                           },
                                           api_client=api_client,
                                           callable=__get_meta_data_set)

        def __get_meta_data_sets(self, **kwargs):
            """Query metadatasets  # noqa: E501

            Query all metadatasets  # 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_data_sets(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                submitted_after (datetime): ISO datetime string specifying an exclusive lower bound for the submission date of the returned metadatasets.. [optional]
                submitted_before (datetime): ISO datetime string specifying an exclusive upper bound for the submission date of the returned metadatasets.. [optional]
                awaiting_service (str): Identifier for a service. Restricts the result to metadatsets for which the specified service has not been executed yet.. [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:
                [MetaDataSetResponse]
                    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_meta_data_sets = _Endpoint(settings={
            'response_type': ([MetaDataSetResponse], ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path':
            '/metadatasets',
            'operation_id':
            'get_meta_data_sets',
            'http_method':
            'GET',
            'servers':
            None,
        },
                                            params_map={
                                                'all': [
                                                    'submitted_after',
                                                    'submitted_before',
                                                    'awaiting_service',
                                                ],
                                                'required': [],
                                                'nullable': [],
                                                'enum': [],
                                                'validation': []
                                            },
                                            root_map={
                                                'validations': {},
                                                'allowed_values': {},
                                                'openapi_types': {
                                                    'submitted_after':
                                                    (datetime, ),
                                                    'submitted_before':
                                                    (datetime, ),
                                                    'awaiting_service':
                                                    (str, ),
                                                },
                                                'attribute_map': {
                                                    'submitted_after':
                                                    'submittedAfter',
                                                    'submitted_before':
                                                    'submittedBefore',
                                                    'awaiting_service':
                                                    'awaitingService',
                                                },
                                                'location_map': {
                                                    'submitted_after': 'query',
                                                    'submitted_before':
                                                    'query',
                                                    'awaiting_service':
                                                    'query',
                                                },
                                                'collection_format_map': {}
                                            },
                                            headers_map={
                                                'accept': ['application/json'],
                                                'content_type': [],
                                            },
                                            api_client=api_client,
                                            callable=__get_meta_data_sets)

        def __update_meta_datum(self, id, **kwargs):
            """Update a MetaDatum  # noqa: E501

            Update a MetaDatum. This is an administrative Endpoint that is not accessible for regular users.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (str): User ID

            Keyword Args:
                meta_datum (MetaDatum): [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:
                MetaDataResponse
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.update_meta_datum = _Endpoint(settings={
            'response_type': (MetaDataResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/metadata/{id}',
            'operation_id': 'update_meta_datum',
            'http_method': 'PUT',
            'servers': None,
        },
                                           params_map={
                                               'all': [
                                                   'id',
                                                   'meta_datum',
                                               ],
                                               'required': [
                                                   'id',
                                               ],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'id': (str, ),
                                                   'meta_datum': (MetaDatum, ),
                                               },
                                               'attribute_map': {
                                                   'id': 'id',
                                               },
                                               'location_map': {
                                                   'id': 'path',
                                                   'meta_datum': 'body',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type':
                                               ['application/json']
                                           },
                                           api_client=api_client,
                                           callable=__update_meta_datum)
Exemplo n.º 5
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __bulk_delete_staged_files(self, **kwargs):
            """Bulk-delete Staged Files  # noqa: E501

            Bulk-delete Staged Files.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                staged_files (StagedFiles): Provide a list of staged files to be deleted.. [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:
                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.bulk_delete_staged_files = _Endpoint(
            settings={
                'response_type': None,
                'auth': ['bearerAuth', 'cookieAuth'],
                'endpoint_path': '/rpc/delete-files',
                'operation_id': 'bulk_delete_staged_files',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'staged_files',
                ],
                'required': [],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'staged_files': (StagedFiles, ),
                },
                'attribute_map': {},
                'location_map': {
                    'staged_files': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__bulk_delete_staged_files)

        def __bulk_delete_staged_meta_data_sets(self, **kwargs):
            """Bulk-delete Staged MetaDataSets  # noqa: E501

            Bulk-delete Staged MetaDataSets.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                staged_meta_data_sets (StagedMetaDataSets): Provide a list of staged MetaDataSets to be deleted.. [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:
                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.bulk_delete_staged_meta_data_sets = _Endpoint(
            settings={
                'response_type': None,
                'auth': ['bearerAuth', 'cookieAuth'],
                'endpoint_path': '/rpc/delete-metadatasets',
                'operation_id': 'bulk_delete_staged_meta_data_sets',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'staged_meta_data_sets',
                ],
                'required': [],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'staged_meta_data_sets': (StagedMetaDataSets, ),
                },
                'attribute_map': {},
                'location_map': {
                    'staged_meta_data_sets': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__bulk_delete_staged_meta_data_sets)

        def __get_file_url(self, id, **kwargs):
            """[Not RESTful]: Redirects to a temporary, pre-signed HTTP-URL for downloading a file.  # noqa: E501

            For the file with the given ID, this enpoint will redirect to a pre-signed HTTP URL for downloading the requested file. The pre-signed URL times out after a certain amount of time which can be configured with the \"expires\" query string. [Attention this endpoint is not RESTful, the result should not be cached.]  # 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_file_url(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID of the file

            Keyword Args:
                expires (int): Minutes until the pre-signed URL will expire, defaults to 1. [optional] if omitted the server will use the default value of 1
                redirect (bool): If set to true, the endpoint will return a 307 response, otherwise a 200 response.. [optional] if omitted the server will use the default value of False
                _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:
                FileUrl
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.get_file_url = _Endpoint(settings={
            'response_type': (FileUrl, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/rpc/get-file-url/{id}',
            'operation_id': 'get_file_url',
            'http_method': 'GET',
            'servers': None,
        },
                                      params_map={
                                          'all': [
                                              'id',
                                              'expires',
                                              'redirect',
                                          ],
                                          'required': [
                                              'id',
                                          ],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {
                                              'id': (str, ),
                                              'expires': (int, ),
                                              'redirect': (bool, ),
                                          },
                                          'attribute_map': {
                                              'id': 'id',
                                              'expires': 'expires',
                                              'redirect': 'redirect',
                                          },
                                          'location_map': {
                                              'id': 'path',
                                              'expires': 'query',
                                              'redirect': 'query',
                                          },
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': [],
                                      },
                                      api_client=api_client,
                                      callable=__get_file_url)

        def __get_user_information(self, **kwargs):
            """[Not RESTful]: Returns information about the authenticated user  # noqa: E501

            Returns the ids, name, groupAdmin, siteAdmin, email and groupName attributes for the logged in user. [Attention this endpoint is not RESTful, the result should not be cached.]  # 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_user_information(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:
                WhoamiResponse
                    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_user_information = _Endpoint(settings={
            'response_type': (WhoamiResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path':
            '/rpc/whoami',
            'operation_id':
            'get_user_information',
            '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_user_information)
Exemplo n.º 6
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_file(
            self,
            **kwargs
        ):
            """Create a New File  # noqa: E501

            Creates a new empty file object. Attention: this endpoint does not take the file content for upload. Instead, it will respond with a presigned URL which you can use to upload (PUT) your file 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.create_file(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                file_announcement (FileAnnouncement): Provide essential properties of the file that shall be uploaded. [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:
                FileUploadResponse
                    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.create_file = _Endpoint(
            settings={
                'response_type': (FileUploadResponse,),
                'auth': [
                    'bearerAuth',
                    'cookieAuth'
                ],
                'endpoint_path': '/files',
                'operation_id': 'create_file',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'file_announcement',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'file_announcement':
                        (FileAnnouncement,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'file_announcement': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_file
        )

        def __delete_file(
            self,
            id,
            **kwargs
        ):
            """Delete Not-Submitted File  # noqa: E501

            Delete File. Please note: This is only allowed if the File has not been part of a Submission, yet.  # 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_file(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID of the File

            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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.delete_file = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'bearerAuth',
                    'cookieAuth'
                ],
                'endpoint_path': '/files/{id}',
                'operation_id': 'delete_file',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (str,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__delete_file
        )

        def __get_file(
            self,
            id,
            **kwargs
        ):
            """Get Details for A File  # noqa: E501

            Get details for a 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_file(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID of the File

            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:
                FileResponse
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.get_file = _Endpoint(
            settings={
                'response_type': (FileResponse,),
                'auth': [
                    'bearerAuth',
                    'cookieAuth'
                ],
                'endpoint_path': '/files/{id}',
                'operation_id': 'get_file',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (str,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_file
        )

        def __update_file(
            self,
            id,
            **kwargs
        ):
            """Update File Details  # noqa: E501

            Update details for a File. E.g. to indicate that the File content has been uploaded (set contentUploaded=true). Please note: this only works for Files that have not been submitted, yet. Other file attributes (checksum and name) can only be updated until contentUploaded has been set to 'true'.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (str): ID of the File

            Keyword Args:
                file_update_request (FileUpdateRequest): Provide properties of the file that shall be updated.. [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:
                FileResponse
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.update_file = _Endpoint(
            settings={
                'response_type': (FileResponse,),
                'auth': [
                    'bearerAuth',
                    'cookieAuth'
                ],
                'endpoint_path': '/files/{id}',
                'operation_id': 'update_file',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'file_update_request',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (str,),
                    'file_update_request':
                        (FileUpdateRequest,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                    'file_update_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_file
        )
Exemplo n.º 7
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_service_info(self, **kwargs):
            """Get Services information  # noqa: E501

            Get names and IDs for all services  # 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_service_info(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:
                Services
                    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_service_info = _Endpoint(settings={
            'response_type': (Services, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/services',
            'operation_id': 'get_service_info',
            '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_service_info)

        def __post_service(self, **kwargs):
            """Create a new service.  # noqa: E501

            Create a new service.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                service_request (ServiceRequest): [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:
                ServiceResponse
                    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.post_service = _Endpoint(settings={
            'response_type': (ServiceResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/services',
            'operation_id': 'post_service',
            'http_method': 'POST',
            'servers': None,
        },
                                      params_map={
                                          'all': [
                                              'service_request',
                                          ],
                                          'required': [],
                                          'nullable': [],
                                          'enum': [],
                                          'validation': []
                                      },
                                      root_map={
                                          'validations': {},
                                          'allowed_values': {},
                                          'openapi_types': {
                                              'service_request':
                                              (ServiceRequest, ),
                                          },
                                          'attribute_map': {},
                                          'location_map': {
                                              'service_request': 'body',
                                          },
                                          'collection_format_map': {}
                                      },
                                      headers_map={
                                          'accept': ['application/json'],
                                          'content_type': ['application/json']
                                      },
                                      api_client=api_client,
                                      callable=__post_service)

        def __put_service(self, id, **kwargs):
            """Update a specific service.  # noqa: E501

            Update the name and/or the users of this service.  If the name, or the userIds are omitted, those will not be updated upon request. To remove all users, an empty array must be submitted for userIds.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (str): ID of the service

            Keyword Args:
                service_update_request (ServiceUpdateRequest): [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:
                ServiceResponse
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.put_service = _Endpoint(settings={
            'response_type': (ServiceResponse, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/services/{id}',
            'operation_id': 'put_service',
            'http_method': 'PUT',
            'servers': None,
        },
                                     params_map={
                                         'all': [
                                             'id',
                                             'service_update_request',
                                         ],
                                         'required': [
                                             'id',
                                         ],
                                         'nullable': [],
                                         'enum': [],
                                         'validation': []
                                     },
                                     root_map={
                                         'validations': {},
                                         'allowed_values': {},
                                         'openapi_types': {
                                             'id': (str, ),
                                             'service_update_request':
                                             (ServiceUpdateRequest, ),
                                         },
                                         'attribute_map': {
                                             'id': 'id',
                                         },
                                         'location_map': {
                                             'id': 'path',
                                             'service_update_request': 'body',
                                         },
                                         'collection_format_map': {}
                                     },
                                     headers_map={
                                         'accept': ['application/json'],
                                         'content_type': ['application/json']
                                     },
                                     api_client=api_client,
                                     callable=__put_service)

        def __service_set_meta_datum(self, service_id, metadataset_id,
                                     **kwargs):
            """Endpoint to store the result of a service execution for a single metadataset  # noqa: E501

            This endpoint is used to report the result of a service execution in the form of metadatum key - value pairs for the service-related metadata and corresponding files if file metadata are involved.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.service_set_meta_datum(service_id, metadataset_id, async_req=True)
            >>> result = thread.get()

            Args:
                service_id (str): ID of the service
                metadataset_id (str): ID of the metadataset

            Keyword Args:
                service_execution (ServiceExecution): The `records` attribute of the request body must describe the result of the service execution in form of key/value pairs corresponding to the metadata associated with the service. The `fileIds` list must contain all file IDs of files referenced in values of file metadata. It can be empty (`[]`) but not `null` or missing.. [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:
                MetaDataSetResponse
                    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['service_id'] = \
                service_id
            kwargs['metadataset_id'] = \
                metadataset_id
            return self.call_with_http_info(**kwargs)

        self.service_set_meta_datum = _Endpoint(
            settings={
                'response_type': (MetaDataSetResponse, ),
                'auth': ['bearerAuth', 'cookieAuth'],
                'endpoint_path':
                '/service-execution/{serviceId}/{metadatasetId}',
                'operation_id': 'service_set_meta_datum',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'service_id',
                    'metadataset_id',
                    'service_execution',
                ],
                'required': [
                    'service_id',
                    'metadataset_id',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'service_id': (str, ),
                    'metadataset_id': (str, ),
                    'service_execution': (ServiceExecution, ),
                },
                'attribute_map': {
                    'service_id': 'serviceId',
                    'metadataset_id': 'metadatasetId',
                },
                'location_map': {
                    'service_id': 'path',
                    'metadataset_id': 'path',
                    'service_execution': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': ['application/json']
            },
            api_client=api_client,
            callable=__service_set_meta_datum)
Exemplo n.º 8
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_api_key(self, **kwargs):
            """Create new API Key/Token  # noqa: E501

            Create new API Key/Token  # 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_api_key(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                create_token_request (CreateTokenRequest): Credentials to use (optional when using cookie sessions), a label for the ApiKey to be created and the date it expires.. [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:
                UserSession
                    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.create_api_key = _Endpoint(settings={
            'response_type': (UserSession, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/keys',
            'operation_id': 'create_api_key',
            'http_method': 'POST',
            'servers': None,
        },
                                        params_map={
                                            'all': [
                                                'create_token_request',
                                            ],
                                            'required': [],
                                            'nullable': [],
                                            'enum': [],
                                            'validation': []
                                        },
                                        root_map={
                                            'validations': {},
                                            'allowed_values': {},
                                            'openapi_types': {
                                                'create_token_request':
                                                (CreateTokenRequest, ),
                                            },
                                            'attribute_map': {},
                                            'location_map': {
                                                'create_token_request': 'body',
                                            },
                                            'collection_format_map': {}
                                        },
                                        headers_map={
                                            'accept': ['application/json'],
                                            'content_type':
                                            ['application/json']
                                        },
                                        api_client=api_client,
                                        callable=__create_api_key)

        def __delete_api_key(self, id, **kwargs):
            """Delete ApiKey by label  # noqa: E501

            Delete ApiKey by label.  # 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_api_key(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID (not label) of Apikey

            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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.delete_api_key = _Endpoint(settings={
            'response_type': None,
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/keys/{id}',
            'operation_id': 'delete_api_key',
            'http_method': 'DELETE',
            'servers': None,
        },
                                        params_map={
                                            'all': [
                                                'id',
                                            ],
                                            'required': [
                                                'id',
                                            ],
                                            'nullable': [],
                                            'enum': [],
                                            'validation': []
                                        },
                                        root_map={
                                            'validations': {},
                                            'allowed_values': {},
                                            'openapi_types': {
                                                'id': (str, ),
                                            },
                                            'attribute_map': {
                                                'id': 'id',
                                            },
                                            'location_map': {
                                                'id': 'path',
                                            },
                                            'collection_format_map': {}
                                        },
                                        headers_map={
                                            'accept': ['application/json'],
                                            'content_type': [],
                                        },
                                        api_client=api_client,
                                        callable=__delete_api_key)

        def __get_user_api_keys(self, id, **kwargs):
            """All API keys for a user  # noqa: E501

            Get a list of all API keys for a user. Please note that you cannot retrieve the tokens themselves because they are stored in a hashed format in our database as only the respective user is allowed to know them.  # 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_user_api_keys(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID of the User

            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:
                ApiKeyList
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.get_user_api_keys = _Endpoint(settings={
            'response_type': (ApiKeyList, ),
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/users/{id}/keys',
            'operation_id': 'get_user_api_keys',
            'http_method': 'GET',
            'servers': None,
        },
                                           params_map={
                                               'all': [
                                                   'id',
                                               ],
                                               'required': [
                                                   'id',
                                               ],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'id': (str, ),
                                               },
                                               'attribute_map': {
                                                   'id': 'id',
                                               },
                                               'location_map': {
                                                   'id': 'path',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type': [],
                                           },
                                           api_client=api_client,
                                           callable=__get_user_api_keys)

        def __set_user_password(self, id, **kwargs):
            """Update a user's password  # noqa: E501

            Update a user's password. The user ID can be specified either as a UUID or as a site ID.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (str): User ID, either as UUID or as site ID. '0' for password reset token based access.

            Keyword Args:
                password_change (PasswordChange): Old and new password. [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:
                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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.set_user_password = _Endpoint(settings={
            'response_type': None,
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path': '/users/{id}/password',
            'operation_id': 'set_user_password',
            'http_method': 'PUT',
            'servers': None,
        },
                                           params_map={
                                               'all': [
                                                   'id',
                                                   'password_change',
                                               ],
                                               'required': [
                                                   'id',
                                               ],
                                               'nullable': [],
                                               'enum': [],
                                               'validation': []
                                           },
                                           root_map={
                                               'validations': {},
                                               'allowed_values': {},
                                               'openapi_types': {
                                                   'id': (str, ),
                                                   'password_change':
                                                   (PasswordChange, ),
                                               },
                                               'attribute_map': {
                                                   'id': 'id',
                                               },
                                               'location_map': {
                                                   'id': 'path',
                                                   'password_change': 'body',
                                               },
                                               'collection_format_map': {}
                                           },
                                           headers_map={
                                               'accept': ['application/json'],
                                               'content_type':
                                               ['application/json']
                                           },
                                           api_client=api_client,
                                           callable=__set_user_password)

        def __user_information_request(self, id, **kwargs):
            """Get user information  # noqa: E501

            Get information about a 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.user_information_request(id, async_req=True)
            >>> result = thread.get()

            Args:
                id (str): ID of the user

            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:
                UserResponse
                    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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.user_information_request = _Endpoint(
            settings={
                'response_type': (UserResponse, ),
                'auth': ['bearerAuth', 'cookieAuth'],
                'endpoint_path': '/users/{id}',
                'operation_id': 'user_information_request',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'id': (str, ),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/json'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__user_information_request)

        def __user_update_request(self, id, **kwargs):
            """Update a user's credentials and status  # noqa: E501

            Update a user's name, group, admin status and enabled status.  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (str): User ID

            Keyword Args:
                user_update_request (UserUpdateRequest): username, group, admin status and enabled status. [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:
                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['id'] = \
                id
            return self.call_with_http_info(**kwargs)

        self.user_update_request = _Endpoint(settings={
            'response_type':
            None,
            'auth': ['bearerAuth', 'cookieAuth'],
            'endpoint_path':
            '/users/{id}',
            'operation_id':
            'user_update_request',
            'http_method':
            'PUT',
            'servers':
            None,
        },
                                             params_map={
                                                 'all': [
                                                     'id',
                                                     'user_update_request',
                                                 ],
                                                 'required': [
                                                     'id',
                                                 ],
                                                 'nullable': [],
                                                 'enum': [],
                                                 'validation': []
                                             },
                                             root_map={
                                                 'validations': {},
                                                 'allowed_values': {},
                                                 'openapi_types': {
                                                     'id': (str, ),
                                                     'user_update_request':
                                                     (UserUpdateRequest, ),
                                                 },
                                                 'attribute_map': {
                                                     'id': 'id',
                                                 },
                                                 'location_map': {
                                                     'id': 'path',
                                                     'user_update_request':
                                                     'body',
                                                 },
                                                 'collection_format_map': {}
                                             },
                                             headers_map={
                                                 'accept':
                                                 ['application/json'],
                                                 'content_type':
                                                 ['application/json']
                                             },
                                             api_client=api_client,
                                             callable=__user_update_request)