Esempio n. 1
0
    def add_metadata_lock_field_with_http_info(self, type, id, lock_id,
                                               **kwargs):  # noqa: E501
        """Update a locking container  # noqa: E501

        Add new fields to the locking container and/or updates the expiry time.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.add_metadata_lock_field_with_http_info(type, id, lock_id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str type: The type of entity. (required)
        :param str id: The id. (required)
        :param str lock_id: The lock id. (required)
        :key list[str] field: Comma-separated list of fields to lock.
        :key int timeout: Time-out in seconds.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(MetadataLockType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['type', 'id', 'lock_id', 'field',
                      'timeout']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method add_metadata_lock_field" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'type' is set
        if ('type' not in local_var_params
                or local_var_params['type'] is None):
            raise ApiValueError(
                "Missing the required parameter `type` when calling `add_metadata_lock_field`"
            )  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in local_var_params or local_var_params['id'] is None):
            raise ApiValueError(
                "Missing the required parameter `id` when calling `add_metadata_lock_field`"
            )  # noqa: E501
        # verify the required parameter 'lock_id' is set
        if ('lock_id' not in local_var_params
                or local_var_params['lock_id'] is None):
            raise ApiValueError(
                "Missing the required parameter `lock_id` when calling `add_metadata_lock_field`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'type' in local_var_params:
            path_params['type'] = local_var_params['type']  # noqa: E501
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501
        if 'lock_id' in local_var_params:
            path_params['lock-id'] = local_var_params['lock_id']  # noqa: E501

        query_params = []
        if 'field' in local_var_params:
            query_params.append(
                ('field', local_var_params['field']))  # noqa: E501
            collection_formats['field'] = 'csv'  # noqa: E501
        if 'timeout' in local_var_params:
            query_params.append(
                ('timeout', local_var_params['timeout']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain',
             'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/{type}/{id}/metadata-lock/{lock-id}',
            'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MetadataLockType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 2
0
    def create_import_setting_with_http_info(self, import_settings_type, **kwargs):  # noqa: E501
        """Create an import profile  # noqa: E501

        Creates a new settings profile with the given settings.  # 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_import_setting_with_http_info(import_settings_type, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param ImportSettingsType import_settings_type: An <em>ImportSettingsDocument</em> containing the settings profile. (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(ImportSettingsType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['import_settings_type']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_import_setting" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'import_settings_type' is set
        if ('import_settings_type' not in local_var_params or
                local_var_params['import_settings_type'] is None):
            raise ApiValueError("Missing the required parameter `import_settings_type` when calling `create_import_setting`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'import_settings_type' in local_var_params:
            body_params = local_var_params['import_settings_type']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/import/settings', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ImportSettingsType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def update_resource_with_http_info(self, type, resource_id, resource_type, **kwargs):  # noqa: E501
        """Modify a resource  # noqa: E501

        Updates an existing resource.  # 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_resource_with_http_info(type, resource_id, resource_type, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str type: The type. (required)
        :param str resource_id: The resource id. (required)
        :param ResourceType resource_type: (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(ResourceType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['type', 'resource_id', 'resource_type']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_resource" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'type' is set
        if ('type' not in local_var_params or
                local_var_params['type'] is None):
            raise ApiValueError("Missing the required parameter `type` when calling `update_resource`")  # noqa: E501
        # verify the required parameter 'resource_id' is set
        if ('resource_id' not in local_var_params or
                local_var_params['resource_id'] is None):
            raise ApiValueError("Missing the required parameter `resource_id` when calling `update_resource`")  # noqa: E501
        # verify the required parameter 'resource_type' is set
        if ('resource_type' not in local_var_params or
                local_var_params['resource_type'] is None):
            raise ApiValueError("Missing the required parameter `resource_type` when calling `update_resource`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'type' in local_var_params:
            path_params['type'] = local_var_params['type']  # noqa: E501
        if 'resource_id' in local_var_params:
            path_params['resource-id'] = local_var_params['resource_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'resource_type' in local_var_params:
            body_params = local_var_params['resource_type']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain', 'application/xml'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/resource/{type}/{resource-id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ResourceType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 4
0
    def create_item_relation_with_http_info(self, direction, id1, id2, **kwargs):  # noqa: E501
        """Create an item relation  # noqa: E501

        Generates a new relation between the two items with the given ids, `id1` and `id2`, with the given parameters.  In addition, extra query parameters of the form `key=value` can be added, to set metadata of the item-to-item relation.  # 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_item_relation_with_http_info(direction, id1, id2, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str direction: - `U` - Set the direction of the relation as undirectional.  - `S` - Set the direction as `id1` being the source and `id2` being the target.  - `T` - Set the direction as `id2` being the source and `id1` being the target. (required)
        :param str id1: The id1. (required)
        :param str id2: The id2. (required)
        :key bool allow_duplicate: - `true` (default) - Allow duplicate relations.  - `false` - Avoid adding duplicate relations.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(ItemRelationType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['direction', 'id1', 'id2', 'allow_duplicate']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_item_relation" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'direction' is set
        if ('direction' not in local_var_params or
                local_var_params['direction'] is None):
            raise ApiValueError("Missing the required parameter `direction` when calling `create_item_relation`")  # noqa: E501
        # verify the required parameter 'id1' is set
        if ('id1' not in local_var_params or
                local_var_params['id1'] is None):
            raise ApiValueError("Missing the required parameter `id1` when calling `create_item_relation`")  # noqa: E501
        # verify the required parameter 'id2' is set
        if ('id2' not in local_var_params or
                local_var_params['id2'] is None):
            raise ApiValueError("Missing the required parameter `id2` when calling `create_item_relation`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id1' in local_var_params:
            path_params['id1'] = local_var_params['id1']  # noqa: E501
        if 'id2' in local_var_params:
            path_params['id2'] = local_var_params['id2']  # noqa: E501

        query_params = []
        if 'allow_duplicate' in local_var_params:
            query_params.append(('allowDuplicate', local_var_params['allow_duplicate']))  # noqa: E501
        if 'direction' in local_var_params:
            query_params.append(('direction', local_var_params['direction']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/item/{id1}/relation/{id2}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ItemRelationType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 5
0
    def update_item_relation_with_http_info(self, relation_id, **kwargs):  # noqa: E501
        """Update an item relation  # noqa: E501

        Updates the relation metadata for a relation with the id `relation-id`.  Query parameters of the form `key=value` are used to modify the metadata of the relation.  # 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_item_relation_with_http_info(relation_id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str relation_id: The relation id. (required)
        :key str direction: - `U` - Set the direction of the relation as undirectional.  - `S` - Set the direction as `id1` being the source and `id2` being the target.  - `T` - Set the direction as `id2` being the source and `id1` being the target.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(ItemRelationType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['relation_id', 'direction']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_item_relation" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'relation_id' is set
        if ('relation_id' not in local_var_params or
                local_var_params['relation_id'] is None):
            raise ApiValueError("Missing the required parameter `relation_id` when calling `update_item_relation`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'relation_id' in local_var_params:
            path_params['relation-id'] = local_var_params['relation_id']  # noqa: E501

        query_params = []
        if 'direction' in local_var_params:
            query_params.append(('direction', local_var_params['direction']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/relation/{relation-id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ItemRelationType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def get_quota_rules_with_http_info(self, **kwargs):  # noqa: E501
        """List all quota rules  # noqa: E501

        Returns the quota rules that exist in the system.  # 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_quota_rules_with_http_info(async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :key list[str] content: Comma-separated list of addition content to retrieve.
        :key bool exceeded: - `true` - Returns only rules where the usage of a resource exceeds the limit that has been specified for a rule.  - `false` (default) - Returns rules regardless of the current resource usage.
        :key list[str] filter: Comma-separated list of key-value pairs (in the format key=value) that can be used to filter the result set.  Valid key values are: `user`, `group`, `storage`, `storageGroup`, `collection`, `library` and `tag`.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(QuotaRuleListType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['content', 'exceeded', 'filter']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method get_quota_rules" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'content' in local_var_params:
            query_params.append(
                ('content', local_var_params['content']))  # noqa: E501
            collection_formats['content'] = 'csv'  # noqa: E501
        if 'exceeded' in local_var_params:
            query_params.append(
                ('exceeded', local_var_params['exceeded']))  # noqa: E501
        if 'filter' in local_var_params:
            query_params.append(
                ('filter', local_var_params['filter']))  # noqa: E501
            collection_formats['filter'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/quota/',
            'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QuotaRuleListType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 7
0
    def create_item_relations_with_http_info(self, item_relation_list_type, **kwargs):  # noqa: E501
        """Create multiple item relations  # noqa: E501

        Generates multiple relations at once. Each relation has a `source` and a `target`, and the direction can take the value `U`, if not set it generates a directional relation from `source` to `target`.  For example:  # 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_item_relations_with_http_info(item_relation_list_type, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param ItemRelationListType item_relation_list_type: (required)
        :key bool allow_duplicate: - `true` (default) - Allow duplicate relations.  - `false` - Avoid adding duplicate relations.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(ItemRelationListType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['item_relation_list_type', 'allow_duplicate']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_item_relations" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'item_relation_list_type' is set
        if ('item_relation_list_type' not in local_var_params or
                local_var_params['item_relation_list_type'] is None):
            raise ApiValueError("Missing the required parameter `item_relation_list_type` when calling `create_item_relations`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'allow_duplicate' in local_var_params:
            query_params.append(('allowDuplicate', local_var_params['allow_duplicate']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'item_relation_list_type' in local_var_params:
            body_params = local_var_params['item_relation_list_type']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/relation', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ItemRelationListType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 8
0
    def create_item_lock_with_http_info(self, item_id, **kwargs):  # noqa: E501
        """Create a lock  # noqa: E501

        Creates a new lock for the item with an expiration date. The expiration date is the sum of the timestamp and the duration. If no timestamp and no duration is given, the expiration date will be set to 24 hours forward in time.  # 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_item_lock_with_http_info(item_id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str item_id: The item id. (required)
        :key str duration: An ISO 8601 duration.
        :key str timestamp: An ISO 8601 timestamp.  Defaults to the current time.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['item_id', 'duration', 'timestamp']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method create_item_lock" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'item_id' is set
        if ('item_id' not in local_var_params
                or local_var_params['item_id'] is None):
            raise ApiValueError(
                "Missing the required parameter `item_id` when calling `create_item_lock`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'item_id' in local_var_params:
            path_params['item-id'] = local_var_params['item_id']  # noqa: E501

        query_params = []
        if 'duration' in local_var_params:
            query_params.append(
                ('duration', local_var_params['duration']))  # noqa: E501
        if 'timestamp' in local_var_params:
            query_params.append(
                ('timestamp', local_var_params['timestamp']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/item/{item-id}/lock',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 9
0
    def synchronize_eidr_item_with_http_info(self, item_id,
                                             **kwargs):  # noqa: E501
        """Synchronize EIDR metadata  # noqa: E501

        Synchronizes `item(s)` metadata that are out of date. An item is considered out of date if the EIDR record has changed or if the included projections have changed.  Returns a list of synchronized items with the metadata that was written to the item.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.synchronize_eidr_item_with_http_info(item_id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str item_id: The item id. (required)
        :key bool force_sync: - `true` - force metadata write to item.  - `false` - (default)
        :key str eidr_resource: If set, the resource identified by this id will be used instead of first found EIDR resource.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(MetadataListType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['item_id', 'force_sync', 'eidr_resource']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method synchronize_eidr_item" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'item_id' is set
        if ('item_id' not in local_var_params
                or local_var_params['item_id'] is None):
            raise ApiValueError(
                "Missing the required parameter `item_id` when calling `synchronize_eidr_item`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'item_id' in local_var_params:
            path_params['item-id'] = local_var_params['item_id']  # noqa: E501

        query_params = []
        if 'force_sync' in local_var_params:
            query_params.append(
                ('forceSync', local_var_params['force_sync']))  # noqa: E501
        if 'eidr_resource' in local_var_params:
            query_params.append(
                ('eidrResource',
                 local_var_params['eidr_resource']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/item/{item-id}/eidr/sync',
            'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MetadataListType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def search_documents_with_http_info(self, item_search_type, **kwargs):  # noqa: E501
        """Search for documents  # noqa: E501

        Searches for documents matching a provided *ItemSearchDocument*.  Note that document indexing is disabled by default. Make sure to enable document indexing using `indexDocumentMetadata` and trigger a reindex so that any existing documents are added to the index.  New in version 5.0.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_documents_with_http_info(item_search_type, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param ItemSearchType item_search_type: (required)
        :key int first: Start returning results from this index.
        :key bool count: - `true` (default) - Return hits in result.  - `false` - Do not return hits in result, in order to produce results faster.
        :key int number: Return at most this number of documents.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(SearchResultType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['item_search_type', 'first', 'count', 'number']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_documents" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'item_search_type' is set
        if ('item_search_type' not in local_var_params or
                local_var_params['item_search_type'] is None):
            raise ApiValueError("Missing the required parameter `item_search_type` when calling `search_documents`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'first' in local_var_params:
            query_params.append(('first', local_var_params['first']))  # noqa: E501
        if 'count' in local_var_params:
            query_params.append(('count', local_var_params['count']))  # noqa: E501
        if 'number' in local_var_params:
            query_params.append(('number', local_var_params['number']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'item_search_type' in local_var_params:
            body_params = local_var_params['item_search_type']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/document', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResultType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def update_or_create_document_with_http_info(self, name, metadata_type, **kwargs):  # noqa: E501
        """Update or creates a document  # noqa: E501

        Creates a new or modifies the existing document with the specified name.  # 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_or_create_document_with_http_info(name, metadata_type, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str name: The name. (required)
        :param MetadataType metadata_type: (required)
        :key str revision: The known revision.  If not specified, the change set will attempt to override existing change sets.
        :key bool skip_forbidden: Skip fields or groups that the user doesn't have write access to.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(MetadataType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['name', 'metadata_type', 'revision', 'skip_forbidden']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_or_create_document" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'name' is set
        if ('name' not in local_var_params or
                local_var_params['name'] is None):
            raise ApiValueError("Missing the required parameter `name` when calling `update_or_create_document`")  # noqa: E501
        # verify the required parameter 'metadata_type' is set
        if ('metadata_type' not in local_var_params or
                local_var_params['metadata_type'] is None):
            raise ApiValueError("Missing the required parameter `metadata_type` when calling `update_or_create_document`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'name' in local_var_params:
            path_params['name'] = local_var_params['name']  # noqa: E501

        query_params = []
        if 'revision' in local_var_params:
            query_params.append(('revision', local_var_params['revision']))  # noqa: E501
        if 'skip_forbidden' in local_var_params:
            query_params.append(('skipForbidden', local_var_params['skip_forbidden']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'metadata_type' in local_var_params:
            body_params = local_var_params['metadata_type']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/document/{name}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MetadataType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def get_document_change_sets_with_http_info(self, name, **kwargs):  # noqa: E501
        """View change sets  # noqa: E501

        Retrieves all change sets that have been applied to the document.  # 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_document_change_sets_with_http_info(name, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str name: The name. (required)
        :key str change: Retrieve a single change set.
        :key int first: Return change sets from that number in the list of sorted change sets.
        :key int number: Return at most that number of change sets.  Default is all change sets.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(MetadataChangeSetType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['name', 'change', 'first', 'number']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_document_change_sets" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'name' is set
        if ('name' not in local_var_params or
                local_var_params['name'] is None):
            raise ApiValueError("Missing the required parameter `name` when calling `get_document_change_sets`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'name' in local_var_params:
            path_params['name'] = local_var_params['name']  # noqa: E501

        query_params = []
        if 'change' in local_var_params:
            query_params.append(('change', local_var_params['change']))  # noqa: E501
        if 'first' in local_var_params:
            query_params.append(('first', local_var_params['first']))  # noqa: E501
        if 'number' in local_var_params:
            query_params.append(('number', local_var_params['number']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/document/{name}/changes', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MetadataChangeSetType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def get_document_with_http_info(self, name, **kwargs):  # noqa: E501
        """Retrieve a document  # noqa: E501

        Retrieves the document with the specified name. This resource shares the same query parameters as the item metadata resource.  # 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_document_with_http_info(name, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str name: The name. (required)
        :key list[str] language: Comma-separated list.   - *language-tag* - Return metadata for specific language, e. g.  `en_US`.  Wildcards may be used, e. g.  `*_CA` for both Canadian French and Canadian English.  - `none` - Return all metadata without language specification.  - `all` (default) - Return all metadata, with or without language specification.
        :key list[str] track: Comma-separated list.   - *track-type* *track-number* - Return metadata for specified track.  Example of track is `A2`.  - *track-type* *t1* `-` *t2* - Return metadata for specified track interval, e. g.  `A2-4`.  - *track-type* `*` - Return metadata for all tracks of specified type, e. g.  `A*`.  - `generic` - Return all non-tracked metadata.  - `all` (default) - All metadata, with or without track specification, are returned.
        :key str conflict: - `yes` (default) - Include all metadata conflicts, unresolved.  - `no` - Return conflicts resolved according to field rules.
        :key str samplerate: Convert all outgoing time instants to specified rate.  *NB!* Time codes which cannot be expressed in an integer number of samples will be returned as a decimal number, with risk of losing precision.
        :key bool default_value: - `true` - For unset fields, return default values.  - `false` (default) - Do not return default values.
        :key list[str] interval: Comma-separated list  - *time-span* - Filter out metadata, return only metadata for specified time span.  - `generic` - Return all non-timed metadata.  - `all` (default) - Return all metadata, same as `interval=generic,-INF-+INF`
        :key list[str] group: Comma-separated list.   - *group-name* - Return specified group.  - *group-name* `+` - Return specified group and subgroups.  - *group-name* `:` *new-name* - Return specified group, renamed to a new name in return value.  - `-` *group-name* - Exclude specified group.  - (default) - Return all groups.
        :key list[str] field: Comma-separated list.   - *field-name* - Return specified field.  - *field-name* \":\" *new-name* - Return specified field, renamed to a new name in return value.  - \"-\" *field-name* - Exclude specified field.  - (default) - Return all fields.
        :key str include: A list of keys.   Includes additional field specific data.  Additionally, if set to `type` the type definition of the field will be retrieved.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(MetadataType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['name', 'language', 'track', 'conflict', 'samplerate', 'default_value', 'interval', 'group', 'field', 'include']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_document" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'name' is set
        if ('name' not in local_var_params or
                local_var_params['name'] is None):
            raise ApiValueError("Missing the required parameter `name` when calling `get_document`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'name' in local_var_params:
            path_params['name'] = local_var_params['name']  # noqa: E501

        query_params = []
        if 'language' in local_var_params:
            query_params.append(('language', local_var_params['language']))  # noqa: E501
            collection_formats['language'] = 'csv'  # noqa: E501
        if 'track' in local_var_params:
            query_params.append(('track', local_var_params['track']))  # noqa: E501
            collection_formats['track'] = 'csv'  # noqa: E501
        if 'conflict' in local_var_params:
            query_params.append(('conflict', local_var_params['conflict']))  # noqa: E501
        if 'samplerate' in local_var_params:
            query_params.append(('samplerate', local_var_params['samplerate']))  # noqa: E501
        if 'default_value' in local_var_params:
            query_params.append(('defaultValue', local_var_params['default_value']))  # noqa: E501
        if 'interval' in local_var_params:
            query_params.append(('interval', local_var_params['interval']))  # noqa: E501
            collection_formats['interval'] = 'csv'  # noqa: E501
        if 'group' in local_var_params:
            query_params.append(('group', local_var_params['group']))  # noqa: E501
            collection_formats['group'] = 'csv'  # noqa: E501
        if 'field' in local_var_params:
            query_params.append(('field', local_var_params['field']))  # noqa: E501
            collection_formats['field'] = 'csv'  # noqa: E501
        if 'include' in local_var_params:
            query_params.append(('include', local_var_params['include']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/document/{name}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MetadataType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def create_or_update_auto_import_rule_with_http_info(
            self, storage_id, auto_import_rule_type, **kwargs):  # noqa: E501
        """Set an auto-import rule  # noqa: E501

        Sets the auto-import rule for the specified storage.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_or_update_auto_import_rule_with_http_info(storage_id, auto_import_rule_type, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str storage_id: The storage id. (required)
        :param AutoImportRuleType auto_import_rule_type: (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['storage_id', 'auto_import_rule_type']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_or_update_auto_import_rule" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'storage_id' is set
        if ('storage_id' not in local_var_params
                or local_var_params['storage_id'] is None):
            raise ApiValueError(
                "Missing the required parameter `storage_id` when calling `create_or_update_auto_import_rule`"
            )  # noqa: E501
        # verify the required parameter 'auto_import_rule_type' is set
        if ('auto_import_rule_type' not in local_var_params
                or local_var_params['auto_import_rule_type'] is None):
            raise ApiValueError(
                "Missing the required parameter `auto_import_rule_type` when calling `create_or_update_auto_import_rule`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'storage_id' in local_var_params:
            path_params['storage-id'] = local_var_params[
                'storage_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'auto_import_rule_type' in local_var_params:
            body_params = local_var_params['auto_import_rule_type']
        # HTTP header `Content-Type`
        header_params[
            'Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
                ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/storage/{storage-id}/auto-import/',
            'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def update_or_create_item_timeline_with_http_info(self, id, timeline_format, body, **kwargs):  # noqa: E501
        """Update or create a timeline  # noqa: E501

        updates or creates a timeline representation for an item.  # 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_or_create_item_timeline_with_http_info(id, timeline_format, body, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str id: The id. (required)
        :param str timeline_format: The timeline format. (required)
        :param str body: Timeline representation. The actual MIME type depends on timeline format. (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['id', 'timeline_format', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_or_create_item_timeline" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in local_var_params or
                local_var_params['id'] is None):
            raise ApiValueError("Missing the required parameter `id` when calling `update_or_create_item_timeline`")  # noqa: E501
        # verify the required parameter 'timeline_format' is set
        if ('timeline_format' not in local_var_params or
                local_var_params['timeline_format'] is None):
            raise ApiValueError("Missing the required parameter `timeline_format` when calling `update_or_create_item_timeline`")  # noqa: E501
        # verify the required parameter 'body' is set
        if ('body' not in local_var_params or
                local_var_params['body'] is None):
            raise ApiValueError("Missing the required parameter `body` when calling `update_or_create_item_timeline`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501
        if 'timeline_format' in local_var_params:
            path_params['timeline-format'] = local_var_params['timeline_format']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in local_var_params:
            body_params = local_var_params['body']
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/item/{id}/timeline/{timeline-format}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 16
0
    def search_with_http_info(self, item_search_type, **kwargs):  # noqa: E501
        """Search items and collections  # noqa: E501

        Searches items and collections with a shared search query.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_with_http_info(item_search_type, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param ItemSearchType item_search_type: (required)
        :key list[str] language: Comma-separated list.   - *language-tag* - Return metadata for specific language, e. g.  `en_US`.  Wildcards may be used, e. g.  `*_CA` for both Canadian French and Canadian English.  - `none` - Return all metadata without language specification.  - `all` (default) - Return all metadata, with or without language specification.
        :key str storage_type: Only return URIs for files from storages of this type.
        :key int first: From the resulting list of items, start return list from specified offset.
        :key bool closed_files: A URI parameter:  - `true` (default) - Return only URIs that point to closed files.  - `false` - Return all URIs.
        :key str terse: - `yes` - Return metadata in terse format.  - `no` (default) - Return metadata in verbose format.
        :key str method_metadata: Metadata used with storage method.
        :key int number: The number of entities to fetch.
        :key list[str] interval: Comma-separated list  - *time-span* - Filter out metadata, return only metadata for specified time span.  - `generic` - Return all non-timed metadata.  - `all` (default) - Return all metadata, same as `interval=generic,-INF-+INF`
        :key list[str] group: Comma-separated list.   - *group-name* - Return specified group.  - *group-name* `+` - Return specified group and subgroups.  - *group-name* `:` *new-name* - Return specified group, renamed to a new name in return value.  - `-` *group-name* - Exclude specified group.  - (default) - Return all groups.
        :key bool include_values: Return the value enumeration for each metadata field.
        :key str storage_group: Storage group id.  Return only files from storages specified in the storage group.
        :key list[str] track: Comma-separated list.   - *track-type* *track-number* - Return metadata for specified track.  Example of track is `A2`.  - *track-type* *t1* `-` *t2* - Return metadata for specified track interval, e. g.  `A2-4`.  - *track-type* `*` - Return metadata for all tracks of specified type, e. g.  `A*`.  - `generic` - Return all non-tracked metadata.  - `all` (default) - All metadata, with or without track specification, are returned.
        :key str conflict: - `yes` (default) - Include all metadata conflicts, unresolved.  - `no` - Return conflicts resolved according to field rules.
        :key list[str] content: Comma-separated list of the types of content to retrieve.
        :key str merged_extradata: Any possible extra data.
        :key bool include_transient_metadata: - `true` (default) - Include transient metadata.  - `false` - Do not include transient metadata in response.
        :key str merged_type: The type of operation to check for.
        :key bool default_value: - `true` - For unset fields, return default values.  - `false` (default) - Do not return default values.
        :key str tag: A URI parameter: Comma-separated list of shape tags to return.
        :key list[str] field: Comma-separated list.   - *field-name* - Return specified field.  - *field-name* \":\" *new-name* - Return specified field, renamed to a new name in return value.  - \"-\" *field-name* - Exclude specified field.  - (default) - Return all fields.
        :key str include: A list of keys.   Includes additional field specific data.  Additionally, if set to `type` the type definition of the field will be retrieved.
        :key str method_type: Access method.   - `AUTO` - Gives an APInoauth URI to the media.  Access to file is tunneled through Vidispine.  - `AZURE_SAS` - If the storage schema is azure:// you can get direct access to the media.  The resulting URI will not tunnel through Vidispine but rather point directly to the media location at the azure storage.
        :key list[str] p: Comma-separated list of paths specifying the content to include.  Overrides the content and filter parameters.
        :key str base_uri: Which base URI to use for the thumbnail URLs.
        :key list[str] uri_type: Comma-separated list of format types (container format) to return.
        :key list[str] storage: List of storage ids.  Return only files from specific storages.  Can be specified multiple times.
        :key str revision: Specifying which metadata revision to display.  Only used if requesting a single item or collection.
        :key str scheme: URI scheme to return.
        :key str version: Specifying which essence version to return for shapes.  If special value `all`, display all versions.  If special value `latest` (default), display latest version of shapes.
        :key str merged_permission: The lowest required permission level.
        :key str sample_rate: Convert all outgoing time instants to specified rate.  *NB!* Time codes which cannot be expressed in an integer number of samples will be returned as a decimal number, with risk of losing precision.
        :key bool count: - `true` (default) - Return hits in result.  - `false` - Do not return hits in result, in order to produce results faster.
        :key bool save: - `true` - Returns a `303 See Other`, with a `Location` header containing an URI to fetch the search result - `false` (default) - Returns a regular search result
        :key bool noauth_url: - `true` Return URIs that do not need authentication.  - `false` (default) Return normal URIs
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(SearchResultType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'item_search_type', 'language', 'storage_type', 'first',
            'closed_files', 'terse', 'method_metadata', 'number', 'interval',
            'group', 'include_values', 'storage_group', 'track', 'conflict',
            'content', 'merged_extradata', 'include_transient_metadata',
            'merged_type', 'default_value', 'tag', 'field', 'include',
            'method_type', 'p', 'base_uri', 'uri_type', 'storage', 'revision',
            'scheme', 'version', 'merged_permission', 'sample_rate', 'count',
            'save', 'noauth_url'
        ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method search" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'item_search_type' is set
        if ('item_search_type' not in local_var_params
                or local_var_params['item_search_type'] is None):
            raise ApiValueError(
                "Missing the required parameter `item_search_type` when calling `search`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'language' in local_var_params:
            query_params.append(
                ('language', local_var_params['language']))  # noqa: E501
            collection_formats['language'] = 'csv'  # noqa: E501
        if 'storage_type' in local_var_params:
            query_params.append(
                ('storageType',
                 local_var_params['storage_type']))  # noqa: E501
        if 'first' in local_var_params:
            query_params.append(
                ('first', local_var_params['first']))  # noqa: E501
        if 'closed_files' in local_var_params:
            query_params.append(
                ('closedFiles',
                 local_var_params['closed_files']))  # noqa: E501
        if 'terse' in local_var_params:
            query_params.append(
                ('terse', local_var_params['terse']))  # noqa: E501
        if 'method_metadata' in local_var_params:
            query_params.append(
                ('methodMetadata',
                 local_var_params['method_metadata']))  # noqa: E501
        if 'number' in local_var_params:
            query_params.append(
                ('number', local_var_params['number']))  # noqa: E501
        if 'interval' in local_var_params:
            query_params.append(
                ('interval', local_var_params['interval']))  # noqa: E501
            collection_formats['interval'] = 'csv'  # noqa: E501
        if 'group' in local_var_params:
            query_params.append(
                ('group', local_var_params['group']))  # noqa: E501
            collection_formats['group'] = 'csv'  # noqa: E501
        if 'include_values' in local_var_params:
            query_params.append(
                ('includeValues',
                 local_var_params['include_values']))  # noqa: E501
        if 'storage_group' in local_var_params:
            query_params.append(
                ('storageGroup',
                 local_var_params['storage_group']))  # noqa: E501
        if 'track' in local_var_params:
            query_params.append(
                ('track', local_var_params['track']))  # noqa: E501
            collection_formats['track'] = 'csv'  # noqa: E501
        if 'conflict' in local_var_params:
            query_params.append(
                ('conflict', local_var_params['conflict']))  # noqa: E501
        if 'content' in local_var_params:
            query_params.append(
                ('content', local_var_params['content']))  # noqa: E501
            collection_formats['content'] = 'csv'  # noqa: E501
        if 'merged_extradata' in local_var_params:
            query_params.append(
                ('mergedExtradata',
                 local_var_params['merged_extradata']))  # noqa: E501
        if 'include_transient_metadata' in local_var_params:
            query_params.append(
                ('includeTransientMetadata',
                 local_var_params['include_transient_metadata']))  # noqa: E501
        if 'merged_type' in local_var_params:
            query_params.append(
                ('mergedType', local_var_params['merged_type']))  # noqa: E501
        if 'default_value' in local_var_params:
            query_params.append(
                ('defaultValue',
                 local_var_params['default_value']))  # noqa: E501
        if 'tag' in local_var_params:
            query_params.append(('tag', local_var_params['tag']))  # noqa: E501
        if 'field' in local_var_params:
            query_params.append(
                ('field', local_var_params['field']))  # noqa: E501
            collection_formats['field'] = 'csv'  # noqa: E501
        if 'include' in local_var_params:
            query_params.append(
                ('include', local_var_params['include']))  # noqa: E501
        if 'method_type' in local_var_params:
            query_params.append(
                ('methodType', local_var_params['method_type']))  # noqa: E501
        if 'p' in local_var_params:
            query_params.append(('p', local_var_params['p']))  # noqa: E501
            collection_formats['p'] = 'csv'  # noqa: E501
        if 'base_uri' in local_var_params:
            query_params.append(
                ('baseURI', local_var_params['base_uri']))  # noqa: E501
        if 'uri_type' in local_var_params:
            query_params.append(
                ('uriType', local_var_params['uri_type']))  # noqa: E501
            collection_formats['uriType'] = 'csv'  # noqa: E501
        if 'storage' in local_var_params:
            query_params.append(
                ('storage', local_var_params['storage']))  # noqa: E501
            collection_formats['storage'] = 'multi'  # noqa: E501
        if 'revision' in local_var_params:
            query_params.append(
                ('revision', local_var_params['revision']))  # noqa: E501
        if 'scheme' in local_var_params:
            query_params.append(
                ('scheme', local_var_params['scheme']))  # noqa: E501
        if 'version' in local_var_params:
            query_params.append(
                ('version', local_var_params['version']))  # noqa: E501
        if 'merged_permission' in local_var_params:
            query_params.append(
                ('mergedPermission',
                 local_var_params['merged_permission']))  # noqa: E501
        if 'sample_rate' in local_var_params:
            query_params.append(
                ('sampleRate', local_var_params['sample_rate']))  # noqa: E501
        if 'count' in local_var_params:
            query_params.append(
                ('count', local_var_params['count']))  # noqa: E501
        if 'save' in local_var_params:
            query_params.append(
                ('save', local_var_params['save']))  # noqa: E501
        if 'noauth_url' in local_var_params:
            query_params.append(
                ('noauth-url', local_var_params['noauth_url']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'item_search_type' in local_var_params:
            body_params = local_var_params['item_search_type']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            'Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
                ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/search',
            'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResultType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def create_item_timeline_conform_job_with_http_info(self, id, timeline_format, **kwargs):  # noqa: E501
        """Start a conform job for an existing item  # noqa: E501

        Starts a new `CONFORM` job that creates one or more shapes that contains media according to the conform timeline.  The timeline must be a *ConformDocument*, else the request will be rejected.  # 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_item_timeline_conform_job_with_http_info(id, timeline_format, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str id: The id. (required)
        :param str timeline_format: The timeline format. (required)
        :key list[str] jobmetadata: Additional information for the job task.
        :key str notification_data: Any additional data to include for notifications on this job.
        :key bool conform_metadata: - `true` (default) - Copy metadata from the source items, according to the timeline, to the resulting item.  - `false` - Do not copy metadata from the source items.
        :key str thumbnail_service: Identifies which thumbnail resource that should be used.
        :key list[str] tag: Comma-separated list of shape tags, that specify the desired output.
        :key list[str] source_tag: Comma-separated list of shape tags, that specify the shapes that should be used as inputs.
        :key bool require_fast_start: - `true` (default) - Try to put the index tables (header) in front of the file.  - `false` - Put header at end of file.
        :key str notification: The placeholder job notification to use for this job.
        :key str fast_start_length: Estimated duration of the clip in seconds.
        :key bool create_thumbnails: - `true` - Creates thumbnails according to default transcoder rules.  - `false` (default) - No thumbnails will be created.
        :key str destination_item: An item id, to which the new new shape will be associated.
        :key str create_posters: A list of time codes to use for creating posters.
        :key bool override_fast_start: - `true` (default) - Use transcoder's estimate of the duration for allocating header space in MOV files and similar files.  - `false` - Do not use the transcoder's estimate of the duration.
        :key str original: If specified, should be one of the tags specified in the tag parameter.  Specifies that the original shape tag will be reset to the shape created to this tag.
        :key str priority: The priority to assign to the job.
        :key str resource_id: The transcoder resource to use to execute the transcode.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(JobType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['id', 'timeline_format', 'jobmetadata', 'notification_data', 'conform_metadata', 'thumbnail_service', 'tag', 'source_tag', 'require_fast_start', 'notification', 'fast_start_length', 'create_thumbnails', 'destination_item', 'create_posters', 'override_fast_start', 'original', 'priority', 'resource_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_item_timeline_conform_job" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in local_var_params or
                local_var_params['id'] is None):
            raise ApiValueError("Missing the required parameter `id` when calling `create_item_timeline_conform_job`")  # noqa: E501
        # verify the required parameter 'timeline_format' is set
        if ('timeline_format' not in local_var_params or
                local_var_params['timeline_format'] is None):
            raise ApiValueError("Missing the required parameter `timeline_format` when calling `create_item_timeline_conform_job`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501
        if 'timeline_format' in local_var_params:
            path_params['timeline-format'] = local_var_params['timeline_format']  # noqa: E501

        query_params = []
        if 'jobmetadata' in local_var_params:
            query_params.append(('jobmetadata', local_var_params['jobmetadata']))  # noqa: E501
            collection_formats['jobmetadata'] = 'multi'  # noqa: E501
        if 'notification_data' in local_var_params:
            query_params.append(('notificationData', local_var_params['notification_data']))  # noqa: E501
        if 'conform_metadata' in local_var_params:
            query_params.append(('conformMetadata', local_var_params['conform_metadata']))  # noqa: E501
        if 'thumbnail_service' in local_var_params:
            query_params.append(('thumbnailService', local_var_params['thumbnail_service']))  # noqa: E501
        if 'tag' in local_var_params:
            query_params.append(('tag', local_var_params['tag']))  # noqa: E501
            collection_formats['tag'] = 'csv'  # noqa: E501
        if 'source_tag' in local_var_params:
            query_params.append(('sourceTag', local_var_params['source_tag']))  # noqa: E501
            collection_formats['sourceTag'] = 'csv'  # noqa: E501
        if 'require_fast_start' in local_var_params:
            query_params.append(('requireFastStart', local_var_params['require_fast_start']))  # noqa: E501
        if 'notification' in local_var_params:
            query_params.append(('notification', local_var_params['notification']))  # noqa: E501
        if 'fast_start_length' in local_var_params:
            query_params.append(('fastStartLength', local_var_params['fast_start_length']))  # noqa: E501
        if 'create_thumbnails' in local_var_params:
            query_params.append(('createThumbnails', local_var_params['create_thumbnails']))  # noqa: E501
        if 'destination_item' in local_var_params:
            query_params.append(('destinationItem', local_var_params['destination_item']))  # noqa: E501
        if 'create_posters' in local_var_params:
            query_params.append(('createPosters', local_var_params['create_posters']))  # noqa: E501
        if 'override_fast_start' in local_var_params:
            query_params.append(('overrideFastStart', local_var_params['override_fast_start']))  # noqa: E501
        if 'original' in local_var_params:
            query_params.append(('original', local_var_params['original']))  # noqa: E501
        if 'priority' in local_var_params:
            query_params.append(('priority', local_var_params['priority']))  # noqa: E501
        if 'resource_id' in local_var_params:
            query_params.append(('resourceId', local_var_params['resource_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/item/{id}/timeline/{timeline-format}/conform', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='JobType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 18
0
    def optimize_search_index_with_http_info(self, **kwargs):  # noqa: E501
        """Optimize the search index  # noqa: E501

        Submits an optimize request to Solr.  This request can be made to block until the optimize request has completed using the `blocking` parameter.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.optimize_search_index_with_http_info(async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :key bool blocking: - `true` - The request will block until the Solr optimize request has finished.  - `false` (default) - Optimize will be scheduled and the request will return immediately.
        :key int timeout: Block for maximum number of specified milliseconds.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['blocking', 'timeout']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method optimize_search_index" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'blocking' in local_var_params:
            query_params.append(
                ('blocking', local_var_params['blocking']))  # noqa: E501
        if 'timeout' in local_var_params:
            query_params.append(
                ('timeout', local_var_params['timeout']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/search/optimize',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def create_user_access_key_with_http_info(self, username,
                                              **kwargs):  # noqa: E501
        """Create an access key  # noqa: E501

        Generates a new access key and secret for the specified user. The only time the access key secret will be available is in the response of this request.  # 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_user_access_key_with_http_info(username, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str username: The username. (required)
        :key str name: A friendly name/description of the key.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(AccessKeyType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['username', 'name']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method create_user_access_key" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'username' is set
        if ('username' not in local_var_params
                or local_var_params['username'] is None):
            raise ApiValueError(
                "Missing the required parameter `username` when calling `create_user_access_key`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'username' in local_var_params:
            path_params['username'] = local_var_params[
                'username']  # noqa: E501

        query_params = []
        if 'name' in local_var_params:
            query_params.append(
                ('name', local_var_params['name']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/user/{username}/key',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AccessKeyType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 20
0
    def search_shapes_with_http_info(self, shape_search_type,
                                     **kwargs):  # noqa: E501
        """Search shapes  # noqa: E501

        Searches shapes. Using GET is identical as performing a search with an empty search document.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_shapes_with_http_info(shape_search_type, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param ShapeSearchType shape_search_type: (required)
        :key str storage_type: Only return URIs for files from storages of this type.
        :key int first: From the resulting list of items, start return list from specified offset.
        :key list[str] content: Comma-separated list of the types of content to retrieve.
        :key int number: The number of entities to fetch.
        :key str scheme: URI scheme to return.
        :key bool count: - `true` (default) - Return hits in result.  - `false` - Do not return hits in result, in order to produce results faster.
        :key bool save: - `true` - Returns a `303 See Other`, with a `Location` header containing an URI to fetch the search result - `false` (default) - Returns a regular search result
        :key list[str] method_metadata: metadata used with storage method.
        :key str method_type: Return URIs from storage methods with a particular type.  By default, return URLs with empty `methodType`.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(ShapeListType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'shape_search_type', 'storage_type', 'first', 'content', 'number',
            'scheme', 'count', 'save', 'method_metadata', 'method_type'
        ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method search_shapes" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'shape_search_type' is set
        if ('shape_search_type' not in local_var_params
                or local_var_params['shape_search_type'] is None):
            raise ApiValueError(
                "Missing the required parameter `shape_search_type` when calling `search_shapes`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'storage_type' in local_var_params:
            query_params.append(
                ('storageType',
                 local_var_params['storage_type']))  # noqa: E501
        if 'first' in local_var_params:
            query_params.append(
                ('first', local_var_params['first']))  # noqa: E501
        if 'content' in local_var_params:
            query_params.append(
                ('content', local_var_params['content']))  # noqa: E501
            collection_formats['content'] = 'csv'  # noqa: E501
        if 'number' in local_var_params:
            query_params.append(
                ('number', local_var_params['number']))  # noqa: E501
        if 'scheme' in local_var_params:
            query_params.append(
                ('scheme', local_var_params['scheme']))  # noqa: E501
        if 'count' in local_var_params:
            query_params.append(
                ('count', local_var_params['count']))  # noqa: E501
        if 'save' in local_var_params:
            query_params.append(
                ('save', local_var_params['save']))  # noqa: E501
        if 'method_metadata' in local_var_params:
            query_params.append(
                ('methodMetadata',
                 local_var_params['method_metadata']))  # noqa: E501
            collection_formats['methodMetadata'] = 'multi'  # noqa: E501
        if 'method_type' in local_var_params:
            query_params.append(
                ('methodType', local_var_params['method_type']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'shape_search_type' in local_var_params:
            body_params = local_var_params['shape_search_type']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            'Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
                ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/search/shape',
            'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ShapeListType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 21
0
    def delete_item_to_item_relation_with_http_info(self, id1, id2, **kwargs):  # noqa: E501
        """Delete all relations between two items  # noqa: E501

        Deletes the relations with the specified direction or all relations between `id1` and `id2`.  # 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_item_to_item_relation_with_http_info(id1, id2, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str id1: The id1. (required)
        :param str id2: The id2. (required)
        :key str direction: - `A` - This is the default value.  Deletes all relations between `id1` and `id2`.  - `U` - Deletes only the relations with the direction as undirectional.  - `S` - Deletes only the relations where `id1` is the source and `id2` is the target.  - `T` - Deletes only the relations where `id2` is the source and `id1` is the target.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['id1', 'id2', 'direction']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_item_to_item_relation" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id1' is set
        if ('id1' not in local_var_params or
                local_var_params['id1'] is None):
            raise ApiValueError("Missing the required parameter `id1` when calling `delete_item_to_item_relation`")  # noqa: E501
        # verify the required parameter 'id2' is set
        if ('id2' not in local_var_params or
                local_var_params['id2'] is None):
            raise ApiValueError("Missing the required parameter `id2` when calling `delete_item_to_item_relation`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id1' in local_var_params:
            path_params['id1'] = local_var_params['id1']  # noqa: E501
        if 'id2' in local_var_params:
            path_params['id2'] = local_var_params['id2']  # noqa: E501

        query_params = []
        if 'direction' in local_var_params:
            query_params.append(('direction', local_var_params['direction']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/item/{id1}/relation/{id2}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def create_cost_estimate_with_http_info(self, path,
                                            **kwargs):  # noqa: E501
        """Request a cost estimate  # noqa: E501

        Requests a cost estimate for performing a specific operation.  The same query parameters and request body as used by the target request should be specified in the cost estimate request.  No additional roles or permissions are required to request a cost estimate. If a user has permission to for example transcode an item, then that user may also request a cost estimate for that operation.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_cost_estimate_with_http_info(path, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str path: The path. (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(CostEstimateType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['path']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method create_cost_estimate" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'path' is set
        if ('path' not in local_var_params
                or local_var_params['path'] is None):
            raise ApiValueError(
                "Missing the required parameter `path` when calling `create_cost_estimate`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'path' in local_var_params:
            path_params['path'] = local_var_params['path']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/cost/{path}',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CostEstimateType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 23
0
    def get_item_relations_with_http_info(self, id, **kwargs):  # noqa: E501
        """List all item relations  # noqa: E501

        Returns a list of relations that matches the search criteria. Item id can be an identifier, that is libraries can be used.  In addition, extra query parameters of the form `key=value` can be added, to only return relations that matches the key-value pair(s).  # 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_item_relations_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str id: The id. (required)
        :key str direction: - `U` - Only return undirectional relations where `id` is part of.  - `S` - Only return directional relations where `id` is the source item.  - `T` - Only return directional relations where `id` is the target item.  - `D` - Only return directional relations where `id` is the source or target item.  - `A` (default) - Return all relations that `id` is a part of.
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(ItemRelationListType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['id', 'direction']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_item_relations" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in local_var_params or
                local_var_params['id'] is None):
            raise ApiValueError("Missing the required parameter `id` when calling `get_item_relations`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501

        query_params = []
        if 'direction' in local_var_params:
            query_params.append(('direction', local_var_params['direction']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'text/plain', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/item/{id}/relation', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ItemRelationListType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def delete_scheduled_requests_with_http_info(self, **kwargs):  # noqa: E501
        """Delete all scheduled requests  # noqa: E501

        Deletes all scheduled requests for the current 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.delete_scheduled_requests_with_http_info(async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_scheduled_requests" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/scheduled-request/', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 25
0
    def delete_import_setting_with_http_info(self, settings_id, **kwargs):  # noqa: E501
        """Delete an import profile  # noqa: E501

        Deletes the profile with specified 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.delete_import_setting_with_http_info(settings_id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str settings_id: The settings id. (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['settings_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_import_setting" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'settings_id' is set
        if ('settings_id' not in local_var_params or
                local_var_params['settings_id'] is None):
            raise ApiValueError("Missing the required parameter `settings_id` when calling `delete_import_setting`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'settings_id' in local_var_params:
            path_params['settings-id'] = local_var_params['settings_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/import/settings/{settings-id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def get_scheduled_request_response_with_http_info(self, request_id, **kwargs):  # noqa: E501
        """Retrieve the response body  # noqa: E501

        Retrieves the response body of the scheduled request. This can only be called if the state of the request is either SUCCESS or BAD_REQUEST. The content-type is the same that was returned when the request was processed.  # 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_scheduled_request_response_with_http_info(request_id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str request_id: The request id. (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['request_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_scheduled_request_response" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'request_id' is set
        if ('request_id' not in local_var_params or
                local_var_params['request_id'] is None):
            raise ApiValueError("Missing the required parameter `request_id` when calling `get_scheduled_request_response`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'request_id' in local_var_params:
            path_params['request-id'] = local_var_params['request_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['*/*'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/scheduled-request/{request-id}/response', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def synchronize_ldap_with_http_info(self, type, resource_id, **kwargs):  # noqa: E501
        """Trigger LDAP synchronization  # noqa: E501

        Triggers a synchronization of users and groups.  If users and groups are already synchronizing, than this will have no effect.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.synchronize_ldap_with_http_info(type, resource_id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str type: Must be <pre>ldap</pre>. (required)
        :param str resource_id: The resource id. (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['type', 'resource_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method synchronize_ldap" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'type' is set
        if ('type' not in local_var_params or
                local_var_params['type'] is None):
            raise ApiValueError("Missing the required parameter `type` when calling `synchronize_ldap`")  # noqa: E501
        # verify the required parameter 'resource_id' is set
        if ('resource_id' not in local_var_params or
                local_var_params['resource_id'] is None):
            raise ApiValueError("Missing the required parameter `resource_id` when calling `synchronize_ldap`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'type' in local_var_params:
            path_params['type'] = local_var_params['type']  # noqa: E501
        if 'resource_id' in local_var_params:
            path_params['resource-id'] = local_var_params['resource_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/resource/{type}/{resource-id}/sync', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
    def get_item_timelines_with_http_info(self, id, **kwargs):  # noqa: E501
        """List all timelines  # noqa: E501

        Returns a list of timeline stored and all timeline formats that can be derived. The precision number returned is an estimation of how close the converted timeline format will match the original. The lowest number, 0, means the original timeline format, 1 means derived timeline without any loss of information compared to the original format. The highest number, 100, means straight cuts only.  # 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_item_timelines_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str id: The id. (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(str, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_item_timelines" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in local_var_params or
                local_var_params['id'] is None):
            raise ApiValueError("Missing the required parameter `id` when calling `get_item_timelines`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['text/plain'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/item/{id}/timeline', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 29
0
    def get_metadata_schema_with_http_info(self, **kwargs):  # noqa: E501
        """Retrieve the schema  # noqa: E501

        Retrieves the full metadata schema.  # 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_metadata_schema_with_http_info(async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: tuple(MetadataSchemaType, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method get_metadata_schema" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json', 'application/xml'])  # noqa: E501

        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/metadata-schema',
            'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='MetadataSchemaType',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 30
0
    def create_metadata_field_group_external_id_with_http_info(
            self, field_group_name, external_id, **kwargs):  # noqa: E501
        """Create a new external id  # noqa: E501

        Creates a new external id for the specified entity.  # 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_metadata_field_group_external_id_with_http_info(field_group_name, external_id, async_req=True)
        >>> result = thread.get()

        :key bool async_req: execute request asynchronously
        :param str field_group_name: The field group name. (required)
        :param str external_id: The external id. (required)
        :key _return_http_data_only: response data without head status code
                                       and headers
        :key _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :key _request_timeout: 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.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['field_group_name', 'external_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_metadata_field_group_external_id" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'field_group_name' is set
        if ('field_group_name' not in local_var_params
                or local_var_params['field_group_name'] is None):
            raise ApiValueError(
                "Missing the required parameter `field_group_name` when calling `create_metadata_field_group_external_id`"
            )  # noqa: E501
        # verify the required parameter 'external_id' is set
        if ('external_id' not in local_var_params
                or local_var_params['external_id'] is None):
            raise ApiValueError(
                "Missing the required parameter `external_id` when calling `create_metadata_field_group_external_id`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'field_group_name' in local_var_params:
            path_params['field-group-name'] = local_var_params[
                'field_group_name']  # noqa: E501
        if 'external_id' in local_var_params:
            path_params['external-id'] = local_var_params[
                'external_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['basicAuth']  # noqa: E501

        return self.api_client.call_api(
            '/metadata-field/field-group/{field-group-name}/external-id/{external-id}',
            'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)