From 6edeb99751f71d2c6b22d6038b388a5a82636a59 Mon Sep 17 00:00:00 2001 From: Paul Fisher Date: Wed, 11 Sep 2024 14:56:53 -0400 Subject: [PATCH 1/3] Regenerate generated API code. Based on spec version 9c2e4c4a57253d43d4d3ceeee03936957f19d654. --- src/tiledb/cloud/_common/api_v2/README.md | 8 +- src/tiledb/cloud/_common/api_v2/__init__.py | 12 +- .../cloud/_common/api_v2/api/groups_api.py | 293 +++++++------- .../_common/api_v2/docs/ArrayActivityLog.md | 2 +- .../_common/api_v2/docs/AssetActivityLog.md | 14 + ...ivityAsset.md => AssetActivityLogAsset.md} | 2 +- src/tiledb/cloud/_common/api_v2/docs/Error.md | 9 +- .../_common/api_v2/docs/GroupActivityLog.md | 14 - .../api_v2/docs/GroupActivityLogResponse.md | 12 - .../api_v2/docs/GroupActivityResponse.md | 12 + .../api_v2/docs/GroupContentActivity.md | 8 +- .../cloud/_common/api_v2/docs/GroupsApi.md | 204 +++++----- .../cloud/_common/api_v2/models/__init__.py | 12 +- .../api_v2/models/access_credential_type.py | 3 +- .../api_v2/models/asset_activity_log.py | 294 ++++++++++++++ ...y_asset.py => asset_activity_log_asset.py} | 40 +- .../cloud/_common/api_v2/models/error.py | 30 +- .../api_v2/models/group_activity_log.py | 213 ---------- ...response.py => group_activity_response.py} | 34 +- .../api_v2/models/group_content_activity.py | 6 +- src/tiledb/cloud/rest_api/README.md | 12 + src/tiledb/cloud/rest_api/__init__.py | 16 + src/tiledb/cloud/rest_api/api/__init__.py | 1 + src/tiledb/cloud/rest_api/api/array_api.py | 199 ++++++++- src/tiledb/cloud/rest_api/api/assets_api.py | 376 +++++++++++++++++ src/tiledb/cloud/rest_api/api/groups_api.py | 30 ++ .../cloud/rest_api/api/invitation_api.py | 4 +- src/tiledb/cloud/rest_api/docs/ArrayApi.md | 183 ++++++++- .../docs/ArrayConsolidationRequest.md | 7 +- src/tiledb/cloud/rest_api/docs/ArrayInfo.md | 56 +-- src/tiledb/cloud/rest_api/docs/ArrayTask.md | 2 + .../cloud/rest_api/docs/AssetBackingType.md | 10 + src/tiledb/cloud/rest_api/docs/AssetInfo.md | 20 + .../cloud/rest_api/docs/AssetListResponse.md | 12 + .../rest_api/docs/AssetOwnershipLevel.md | 10 + src/tiledb/cloud/rest_api/docs/AssetsApi.md | 313 ++++++++++++++ src/tiledb/cloud/rest_api/docs/GroupInfo.md | 46 ++- src/tiledb/cloud/rest_api/docs/GroupsApi.md | 107 ++--- .../cloud/rest_api/docs/InlineObject1.md | 9 + .../cloud/rest_api/docs/InvitationApi.md | 12 +- .../rest_api/docs/LoadArraySchemaRequest.md | 11 + .../rest_api/docs/LoadArraySchemaResponse.md | 12 + .../rest_api/docs/MetadataStringified.md | 11 + .../rest_api/docs/MetadataStringifiedEntry.md | 13 + src/tiledb/cloud/rest_api/docs/NotebookApi.md | 1 - .../cloud/rest_api/docs/OrganizationUser.md | 18 +- src/tiledb/cloud/rest_api/docs/TaskGraph.md | 2 +- .../cloud/rest_api/docs/TaskGraphLog.md | 2 + src/tiledb/cloud/rest_api/models/__init__.py | 15 + .../models/array_consolidation_request.py | 34 +- .../cloud/rest_api/models/array_info.py | 58 +++ .../cloud/rest_api/models/array_task.py | 58 +++ .../rest_api/models/asset_backing_type.py | 100 +++++ .../cloud/rest_api/models/asset_info.py | 381 ++++++++++++++++++ .../rest_api/models/asset_list_response.py | 149 +++++++ .../rest_api/models/asset_ownership_level.py | 100 +++++ .../cloud/rest_api/models/group_info.py | 58 +++ .../cloud/rest_api/models/inline_object1.py | 118 ++++++ .../models/load_array_schema_request.py | 118 ++++++ .../models/load_array_schema_response.py | 155 +++++++ .../rest_api/models/metadata_stringified.py | 120 ++++++ .../models/metadata_stringified_entry.py | 174 ++++++++ .../rest_api/models/organization_user.py | 58 +++ .../rest_api/models/registered_task_graph.py | 8 + .../cloud/rest_api/models/task_graph.py | 12 +- .../cloud/rest_api/models/task_graph_log.py | 58 +++ .../rest_api/models/task_graph_log_status.py | 2 - .../cloud/rest_api/models/task_graph_node.py | 8 + .../models/task_graph_node_metadata.py | 8 + 69 files changed, 3814 insertions(+), 695 deletions(-) create mode 100644 src/tiledb/cloud/_common/api_v2/docs/AssetActivityLog.md rename src/tiledb/cloud/_common/api_v2/docs/{GroupContentActivityAsset.md => AssetActivityLogAsset.md} (96%) delete mode 100644 src/tiledb/cloud/_common/api_v2/docs/GroupActivityLog.md delete mode 100644 src/tiledb/cloud/_common/api_v2/docs/GroupActivityLogResponse.md create mode 100644 src/tiledb/cloud/_common/api_v2/docs/GroupActivityResponse.md create mode 100644 src/tiledb/cloud/_common/api_v2/models/asset_activity_log.py rename src/tiledb/cloud/_common/api_v2/models/{group_content_activity_asset.py => asset_activity_log_asset.py} (75%) delete mode 100644 src/tiledb/cloud/_common/api_v2/models/group_activity_log.py rename src/tiledb/cloud/_common/api_v2/models/{group_activity_log_response.py => group_activity_response.py} (77%) create mode 100644 src/tiledb/cloud/rest_api/api/assets_api.py create mode 100644 src/tiledb/cloud/rest_api/docs/AssetBackingType.md create mode 100644 src/tiledb/cloud/rest_api/docs/AssetInfo.md create mode 100644 src/tiledb/cloud/rest_api/docs/AssetListResponse.md create mode 100644 src/tiledb/cloud/rest_api/docs/AssetOwnershipLevel.md create mode 100644 src/tiledb/cloud/rest_api/docs/AssetsApi.md create mode 100644 src/tiledb/cloud/rest_api/docs/InlineObject1.md create mode 100644 src/tiledb/cloud/rest_api/docs/LoadArraySchemaRequest.md create mode 100644 src/tiledb/cloud/rest_api/docs/LoadArraySchemaResponse.md create mode 100644 src/tiledb/cloud/rest_api/docs/MetadataStringified.md create mode 100644 src/tiledb/cloud/rest_api/docs/MetadataStringifiedEntry.md create mode 100644 src/tiledb/cloud/rest_api/models/asset_backing_type.py create mode 100644 src/tiledb/cloud/rest_api/models/asset_info.py create mode 100644 src/tiledb/cloud/rest_api/models/asset_list_response.py create mode 100644 src/tiledb/cloud/rest_api/models/asset_ownership_level.py create mode 100644 src/tiledb/cloud/rest_api/models/inline_object1.py create mode 100644 src/tiledb/cloud/rest_api/models/load_array_schema_request.py create mode 100644 src/tiledb/cloud/rest_api/models/load_array_schema_response.py create mode 100644 src/tiledb/cloud/rest_api/models/metadata_stringified.py create mode 100644 src/tiledb/cloud/rest_api/models/metadata_stringified_entry.py diff --git a/src/tiledb/cloud/_common/api_v2/README.md b/src/tiledb/cloud/_common/api_v2/README.md index dbed9c05b..3f318baaa 100644 --- a/src/tiledb/cloud/_common/api_v2/README.md +++ b/src/tiledb/cloud/_common/api_v2/README.md @@ -98,10 +98,10 @@ All URIs are relative to _http://localhost_ | _GroupsApi_ | [**create_group**](docs/GroupsApi.md#create_group) | **POST** /v2/groups/{group_namespace} | | _GroupsApi_ | [**delete_group**](docs/GroupsApi.md#delete_group) | **DELETE** /v2/groups/{group_namespace}/{group_name}/delete | | _GroupsApi_ | [**deregister_group**](docs/GroupsApi.md#deregister_group) | **DELETE** /v2/groups/{group_namespace}/{group_name} | +| _GroupsApi_ | [**get_group_activity**](docs/GroupsApi.md#get_group_activity) | **GET** /v2/groups/{group_namespace}/{group_name}/activity | | _GroupsApi_ | [**get_group_content_activity**](docs/GroupsApi.md#get_group_content_activity) | **GET** /v2/groups/{group_namespace}/{group_name}/content_activity | | _GroupsApi_ | [**get_group_metadata**](docs/GroupsApi.md#get_group_metadata) | **POST** /v2/groups/{group_namespace}/{group_name}/metadata | | _GroupsApi_ | [**groups_group_namespace_group_name_options**](docs/GroupsApi.md#groups_group_namespace_group_name_options) | **OPTIONS** /v2/groups/{group_namespace}/{group_name} | -| _GroupsApi_ | [**list_group_activity**](docs/GroupsApi.md#list_group_activity) | **GET** /v2/groups/{namespace}/{group}/activity | | _GroupsApi_ | [**register_group**](docs/GroupsApi.md#register_group) | **PUT** /v2/groups/{group_namespace} | | _GroupsApi_ | [**retrieve_group**](docs/GroupsApi.md#retrieve_group) | **POST** /v2/groups/{group_namespace}/{group_name} | | _GroupsApi_ | [**update_group_contents**](docs/GroupsApi.md#update_group_contents) | **PATCH** /v2/groups/{group_namespace}/{group_name} | @@ -141,6 +141,8 @@ All URIs are relative to _http://localhost_ - [ArraySchemaEntry](docs/ArraySchemaEntry.md) - [ArraySchemaMap](docs/ArraySchemaMap.md) - [ArrayType](docs/ArrayType.md) +- [AssetActivityLog](docs/AssetActivityLog.md) +- [AssetActivityLogAsset](docs/AssetActivityLogAsset.md) - [AssetType](docs/AssetType.md) - [Attribute](docs/Attribute.md) - [AttributeBufferHeader](docs/AttributeBufferHeader.md) @@ -166,10 +168,8 @@ All URIs are relative to _http://localhost_ - [GCPServiceAccountKey](docs/GCPServiceAccountKey.md) - [GenericTileOffsets](docs/GenericTileOffsets.md) - [GroupActivityEventType](docs/GroupActivityEventType.md) -- [GroupActivityLog](docs/GroupActivityLog.md) -- [GroupActivityLogResponse](docs/GroupActivityLogResponse.md) +- [GroupActivityResponse](docs/GroupActivityResponse.md) - [GroupContentActivity](docs/GroupContentActivity.md) -- [GroupContentActivityAsset](docs/GroupContentActivityAsset.md) - [GroupContentActivityResponse](docs/GroupContentActivityResponse.md) - [GroupContentsChangesRequest](docs/GroupContentsChangesRequest.md) - [GroupContentsChangesRequestGroupChanges](docs/GroupContentsChangesRequestGroupChanges.md) diff --git a/src/tiledb/cloud/_common/api_v2/__init__.py b/src/tiledb/cloud/_common/api_v2/__init__.py index 9e6003fa4..97c9e7d3c 100644 --- a/src/tiledb/cloud/_common/api_v2/__init__.py +++ b/src/tiledb/cloud/_common/api_v2/__init__.py @@ -67,6 +67,10 @@ from tiledb.cloud._common.api_v2.models.array_schema_entry import ArraySchemaEntry from tiledb.cloud._common.api_v2.models.array_schema_map import ArraySchemaMap from tiledb.cloud._common.api_v2.models.array_type import ArrayType +from tiledb.cloud._common.api_v2.models.asset_activity_log import AssetActivityLog +from tiledb.cloud._common.api_v2.models.asset_activity_log_asset import ( + AssetActivityLogAsset, +) from tiledb.cloud._common.api_v2.models.asset_type import AssetType from tiledb.cloud._common.api_v2.models.attribute import Attribute from tiledb.cloud._common.api_v2.models.attribute_buffer_header import ( @@ -102,16 +106,12 @@ from tiledb.cloud._common.api_v2.models.group_activity_event_type import ( GroupActivityEventType, ) -from tiledb.cloud._common.api_v2.models.group_activity_log import GroupActivityLog -from tiledb.cloud._common.api_v2.models.group_activity_log_response import ( - GroupActivityLogResponse, +from tiledb.cloud._common.api_v2.models.group_activity_response import ( + GroupActivityResponse, ) from tiledb.cloud._common.api_v2.models.group_content_activity import ( GroupContentActivity, ) -from tiledb.cloud._common.api_v2.models.group_content_activity_asset import ( - GroupContentActivityAsset, -) from tiledb.cloud._common.api_v2.models.group_content_activity_response import ( GroupContentActivityResponse, ) diff --git a/src/tiledb/cloud/_common/api_v2/api/groups_api.py b/src/tiledb/cloud/_common/api_v2/api/groups_api.py index 8c8c827ff..93c3d7d8b 100644 --- a/src/tiledb/cloud/_common/api_v2/api/groups_api.py +++ b/src/tiledb/cloud/_common/api_v2/api/groups_api.py @@ -485,20 +485,20 @@ def deregister_group_with_http_info( collection_formats=collection_formats, ) - def get_group_content_activity( - self, group_namespace, group_name, **kwargs - ): # noqa: E501 - """get_group_content_activity # noqa: E501 + def get_group_activity(self, group_namespace, group_name, **kwargs): # noqa: E501 + """get_group_activity # noqa: E501 - Retrieves combined activity logs for all assets contained in a group. # noqa: E501 + Retrieves activity logs for all assets contained in a group (arrays and other groups) including the parent group itself. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_content_activity(group_namespace, group_name, async_req=True) + >>> thread = api.get_group_activity(group_namespace, group_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str group_namespace: The namespace of the group (required) - :param str group_name: The unique name or id of the group (required) + :param str group_namespace: namespace group is in (an organization name or user's username) (required) + :param str group_name: name/uri of group that is url-encoded (required) + :param int start: Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) + :param int end: End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) :param int page: pagination offset :param int per_page: pagination limit :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -508,29 +508,31 @@ def get_group_content_activity( number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: GroupContentActivityResponse + :return: GroupActivityResponse If the method is called asynchronously, returns the request thread. """ kwargs["_return_http_data_only"] = True - return self.get_group_content_activity_with_http_info( + return self.get_group_activity_with_http_info( group_namespace, group_name, **kwargs ) # noqa: E501 - def get_group_content_activity_with_http_info( + def get_group_activity_with_http_info( self, group_namespace, group_name, **kwargs ): # noqa: E501 - """get_group_content_activity # noqa: E501 + """get_group_activity # noqa: E501 - Retrieves combined activity logs for all assets contained in a group. # noqa: E501 + Retrieves activity logs for all assets contained in a group (arrays and other groups) including the parent group itself. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_content_activity_with_http_info(group_namespace, group_name, async_req=True) + >>> thread = api.get_group_activity_with_http_info(group_namespace, group_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str group_namespace: The namespace of the group (required) - :param str group_name: The unique name or id of the group (required) + :param str group_namespace: namespace group is in (an organization name or user's username) (required) + :param str group_name: name/uri of group that is url-encoded (required) + :param int start: Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) + :param int end: End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) :param int page: pagination offset :param int per_page: pagination limit :param _return_http_data_only: response data without head status code @@ -542,14 +544,21 @@ def get_group_content_activity_with_http_info( number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(GroupContentActivityResponse, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(GroupActivityResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ["group_namespace", "group_name", "page", "per_page"] + all_params = [ + "group_namespace", + "group_name", + "start", + "end", + "page", + "per_page", + ] all_params.extend( [ "async_req", @@ -563,7 +572,7 @@ def get_group_content_activity_with_http_info( if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_group_content_activity" % key + " to method get_group_activity" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -573,7 +582,7 @@ def get_group_content_activity_with_http_info( or local_var_params["group_namespace"] is None # noqa: E501 ): # noqa: E501 raise ApiValueError( - "Missing the required parameter `group_namespace` when calling `get_group_content_activity`" + "Missing the required parameter `group_namespace` when calling `get_group_activity`" ) # noqa: E501 # verify the required parameter 'group_name' is set if self.api_client.client_side_validation and ( @@ -581,7 +590,7 @@ def get_group_content_activity_with_http_info( or local_var_params["group_name"] is None # noqa: E501 ): # noqa: E501 raise ApiValueError( - "Missing the required parameter `group_name` when calling `get_group_content_activity`" + "Missing the required parameter `group_name` when calling `get_group_activity`" ) # noqa: E501 collection_formats = {} @@ -595,6 +604,14 @@ def get_group_content_activity_with_http_info( path_params["group_name"] = local_var_params["group_name"] # noqa: E501 query_params = [] + if ( + "start" in local_var_params and local_var_params["start"] is not None + ): # noqa: E501 + query_params.append(("start", local_var_params["start"])) # noqa: E501 + if ( + "end" in local_var_params and local_var_params["end"] is not None + ): # noqa: E501 + query_params.append(("end", local_var_params["end"])) # noqa: E501 if ( "page" in local_var_params and local_var_params["page"] is not None ): # noqa: E501 @@ -621,7 +638,7 @@ def get_group_content_activity_with_http_info( auth_settings = ["ApiKeyAuth", "BasicAuth"] # noqa: E501 return self.api_client.call_api( - "/v2/groups/{group_namespace}/{group_name}/content_activity", + "/v2/groups/{group_namespace}/{group_name}/activity", "GET", path_params, query_params, @@ -629,7 +646,7 @@ def get_group_content_activity_with_http_info( body=body_params, post_params=form_params, files=local_var_files, - response_type="GroupContentActivityResponse", # noqa: E501 + response_type="GroupActivityResponse", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( @@ -640,19 +657,22 @@ def get_group_content_activity_with_http_info( collection_formats=collection_formats, ) - def get_group_metadata(self, group_namespace, group_name, **kwargs): # noqa: E501 - """get_group_metadata # noqa: E501 + def get_group_content_activity( + self, group_namespace, group_name, **kwargs + ): # noqa: E501 + """get_group_content_activity # noqa: E501 - get metadata on a group using the requested config # noqa: E501 + Retrieves combined activity logs for all assets contained in a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_metadata(group_namespace, group_name, async_req=True) + >>> thread = api.get_group_content_activity(group_namespace, group_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str group_namespace: The namespace of the group (required) :param str group_name: The unique name or id of the group (required) - :param GroupMetadataRetrievalRequest metadata_retrieval: + :param int page: pagination offset + :param int per_page: pagination limit :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -660,30 +680,31 @@ def get_group_metadata(self, group_namespace, group_name, **kwargs): # noqa: E5 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: Metadata + :return: GroupContentActivityResponse If the method is called asynchronously, returns the request thread. """ kwargs["_return_http_data_only"] = True - return self.get_group_metadata_with_http_info( + return self.get_group_content_activity_with_http_info( group_namespace, group_name, **kwargs ) # noqa: E501 - def get_group_metadata_with_http_info( + def get_group_content_activity_with_http_info( self, group_namespace, group_name, **kwargs ): # noqa: E501 - """get_group_metadata # noqa: E501 + """get_group_content_activity # noqa: E501 - get metadata on a group using the requested config # noqa: E501 + Retrieves combined activity logs for all assets contained in a group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_metadata_with_http_info(group_namespace, group_name, async_req=True) + >>> thread = api.get_group_content_activity_with_http_info(group_namespace, group_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str group_namespace: The namespace of the group (required) :param str group_name: The unique name or id of the group (required) - :param GroupMetadataRetrievalRequest metadata_retrieval: + :param int page: pagination offset + :param int per_page: pagination limit :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -693,14 +714,14 @@ def get_group_metadata_with_http_info( number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(Metadata, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(GroupContentActivityResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ["group_namespace", "group_name", "metadata_retrieval"] + all_params = ["group_namespace", "group_name", "page", "per_page"] all_params.extend( [ "async_req", @@ -714,7 +735,7 @@ def get_group_metadata_with_http_info( if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_group_metadata" % key + " to method get_group_content_activity" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -724,7 +745,7 @@ def get_group_metadata_with_http_info( or local_var_params["group_namespace"] is None # noqa: E501 ): # noqa: E501 raise ApiValueError( - "Missing the required parameter `group_namespace` when calling `get_group_metadata`" + "Missing the required parameter `group_namespace` when calling `get_group_content_activity`" ) # noqa: E501 # verify the required parameter 'group_name' is set if self.api_client.client_side_validation and ( @@ -732,7 +753,7 @@ def get_group_metadata_with_http_info( or local_var_params["group_name"] is None # noqa: E501 ): # noqa: E501 raise ApiValueError( - "Missing the required parameter `group_name` when calling `get_group_metadata`" + "Missing the required parameter `group_name` when calling `get_group_content_activity`" ) # noqa: E501 collection_formats = {} @@ -746,6 +767,16 @@ def get_group_metadata_with_http_info( path_params["group_name"] = local_var_params["group_name"] # noqa: E501 query_params = [] + if ( + "page" in local_var_params and local_var_params["page"] is not None + ): # noqa: E501 + query_params.append(("page", local_var_params["page"])) # noqa: E501 + if ( + "per_page" in local_var_params and local_var_params["per_page"] is not None + ): # noqa: E501 + query_params.append( + ("per_page", local_var_params["per_page"]) + ) # noqa: E501 header_params = {} @@ -753,33 +784,24 @@ def get_group_metadata_with_http_info( local_var_files = {} body_params = None - if "metadata_retrieval" in local_var_params: - body_params = local_var_params["metadata_retrieval"] # HTTP header `Accept` header_params["Accept"] = self.api_client.select_header_accept( ["application/json"] ) # noqa: E501 - # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["application/json"] - ) # noqa: E501 - # Authentication setting auth_settings = ["ApiKeyAuth", "BasicAuth"] # noqa: E501 return self.api_client.call_api( - "/v2/groups/{group_namespace}/{group_name}/metadata", - "POST", + "/v2/groups/{group_namespace}/{group_name}/content_activity", + "GET", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="Metadata", # noqa: E501 + response_type="GroupContentActivityResponse", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( @@ -790,21 +812,19 @@ def get_group_metadata_with_http_info( collection_formats=collection_formats, ) - def groups_group_namespace_group_name_options( - self, group_namespace, group_name, **kwargs - ): # noqa: E501 - """groups_group_namespace_group_name_options # noqa: E501 + def get_group_metadata(self, group_namespace, group_name, **kwargs): # noqa: E501 + """get_group_metadata # noqa: E501 - can be used to check if the resource exists # noqa: E501 + get metadata on a group using the requested config # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.groups_group_namespace_group_name_options(group_namespace, group_name, async_req=True) + >>> thread = api.get_group_metadata(group_namespace, group_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str group_namespace: The namespace of the group (required) :param str group_name: The unique name or id of the group (required) - :param str x_tiledb_cloud_access_credentials_name: Optional registered access credentials to use for creation + :param GroupMetadataRetrievalRequest metadata_retrieval: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -812,30 +832,30 @@ def groups_group_namespace_group_name_options( number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: None + :return: Metadata If the method is called asynchronously, returns the request thread. """ kwargs["_return_http_data_only"] = True - return self.groups_group_namespace_group_name_options_with_http_info( + return self.get_group_metadata_with_http_info( group_namespace, group_name, **kwargs ) # noqa: E501 - def groups_group_namespace_group_name_options_with_http_info( + def get_group_metadata_with_http_info( self, group_namespace, group_name, **kwargs ): # noqa: E501 - """groups_group_namespace_group_name_options # noqa: E501 + """get_group_metadata # noqa: E501 - can be used to check if the resource exists # noqa: E501 + get metadata on a group using the requested config # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.groups_group_namespace_group_name_options_with_http_info(group_namespace, group_name, async_req=True) + >>> thread = api.get_group_metadata_with_http_info(group_namespace, group_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str group_namespace: The namespace of the group (required) :param str group_name: The unique name or id of the group (required) - :param str x_tiledb_cloud_access_credentials_name: Optional registered access credentials to use for creation + :param GroupMetadataRetrievalRequest metadata_retrieval: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -845,18 +865,14 @@ def groups_group_namespace_group_name_options_with_http_info( number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: None + :return: tuple(Metadata, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = [ - "group_namespace", - "group_name", - "x_tiledb_cloud_access_credentials_name", - ] + all_params = ["group_namespace", "group_name", "metadata_retrieval"] all_params.extend( [ "async_req", @@ -870,7 +886,7 @@ def groups_group_namespace_group_name_options_with_http_info( if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method groups_group_namespace_group_name_options" % key + " to method get_group_metadata" % key ) local_var_params[key] = val del local_var_params["kwargs"] @@ -880,7 +896,7 @@ def groups_group_namespace_group_name_options_with_http_info( or local_var_params["group_namespace"] is None # noqa: E501 ): # noqa: E501 raise ApiValueError( - "Missing the required parameter `group_namespace` when calling `groups_group_namespace_group_name_options`" + "Missing the required parameter `group_namespace` when calling `get_group_metadata`" ) # noqa: E501 # verify the required parameter 'group_name' is set if self.api_client.client_side_validation and ( @@ -888,7 +904,7 @@ def groups_group_namespace_group_name_options_with_http_info( or local_var_params["group_name"] is None # noqa: E501 ): # noqa: E501 raise ApiValueError( - "Missing the required parameter `group_name` when calling `groups_group_namespace_group_name_options`" + "Missing the required parameter `group_name` when calling `get_group_metadata`" ) # noqa: E501 collection_formats = {} @@ -904,33 +920,38 @@ def groups_group_namespace_group_name_options_with_http_info( query_params = [] header_params = {} - if "x_tiledb_cloud_access_credentials_name" in local_var_params: - header_params["X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME"] = local_var_params[ - "x_tiledb_cloud_access_credentials_name" - ] # noqa: E501 form_params = [] local_var_files = {} body_params = None + if "metadata_retrieval" in local_var_params: + body_params = local_var_params["metadata_retrieval"] # HTTP header `Accept` header_params["Accept"] = self.api_client.select_header_accept( ["application/json"] ) # noqa: E501 + # HTTP header `Content-Type` + header_params[ + "Content-Type" + ] = self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) # noqa: E501 + # Authentication setting auth_settings = ["ApiKeyAuth", "BasicAuth"] # noqa: E501 return self.api_client.call_api( - "/v2/groups/{group_namespace}/{group_name}", - "OPTIONS", + "/v2/groups/{group_namespace}/{group_name}/metadata", + "POST", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type="Metadata", # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get("async_req"), _return_http_data_only=local_var_params.get( @@ -941,22 +962,21 @@ def groups_group_namespace_group_name_options_with_http_info( collection_formats=collection_formats, ) - def list_group_activity(self, namespace, group, **kwargs): # noqa: E501 - """list_group_activity # noqa: E501 + def groups_group_namespace_group_name_options( + self, group_namespace, group_name, **kwargs + ): # noqa: E501 + """groups_group_namespace_group_name_options # noqa: E501 - get group activity logs # noqa: E501 + can be used to check if the resource exists # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_group_activity(namespace, group, async_req=True) + >>> thread = api.groups_group_namespace_group_name_options(group_namespace, group_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str namespace: namespace group is in (an organization name or user's username) (required) - :param str group: name/uri of group that is url-encoded (required) - :param int start: Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) - :param int end: End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) - :param int page: pagination offset - :param int per_page: pagination limit + :param str group_namespace: The namespace of the group (required) + :param str group_name: The unique name or id of the group (required) + :param str x_tiledb_cloud_access_credentials_name: Optional registered access credentials to use for creation :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -964,33 +984,30 @@ def list_group_activity(self, namespace, group, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: GroupActivityLogResponse + :return: None If the method is called asynchronously, returns the request thread. """ kwargs["_return_http_data_only"] = True - return self.list_group_activity_with_http_info( - namespace, group, **kwargs + return self.groups_group_namespace_group_name_options_with_http_info( + group_namespace, group_name, **kwargs ) # noqa: E501 - def list_group_activity_with_http_info( - self, namespace, group, **kwargs + def groups_group_namespace_group_name_options_with_http_info( + self, group_namespace, group_name, **kwargs ): # noqa: E501 - """list_group_activity # noqa: E501 + """groups_group_namespace_group_name_options # noqa: E501 - get group activity logs # noqa: E501 + can be used to check if the resource exists # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_group_activity_with_http_info(namespace, group, async_req=True) + >>> thread = api.groups_group_namespace_group_name_options_with_http_info(group_namespace, group_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param str namespace: namespace group is in (an organization name or user's username) (required) - :param str group: name/uri of group that is url-encoded (required) - :param int start: Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) - :param int end: End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) - :param int page: pagination offset - :param int per_page: pagination limit + :param str group_namespace: The namespace of the group (required) + :param str group_name: The unique name or id of the group (required) + :param str x_tiledb_cloud_access_credentials_name: Optional registered access credentials to use for creation :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1000,14 +1017,18 @@ def list_group_activity_with_http_info( number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(GroupActivityLogResponse, status_code(int), headers(HTTPHeaderDict)) + :return: None If the method is called asynchronously, returns the request thread. """ local_var_params = locals() - all_params = ["namespace", "group", "start", "end", "page", "per_page"] + all_params = [ + "group_namespace", + "group_name", + "x_tiledb_cloud_access_credentials_name", + ] all_params.extend( [ "async_req", @@ -1021,56 +1042,44 @@ def list_group_activity_with_http_info( if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_group_activity" % key + " to method groups_group_namespace_group_name_options" % key ) local_var_params[key] = val del local_var_params["kwargs"] - # verify the required parameter 'namespace' is set + # verify the required parameter 'group_namespace' is set if self.api_client.client_side_validation and ( - "namespace" not in local_var_params - or local_var_params["namespace"] is None # noqa: E501 + "group_namespace" not in local_var_params + or local_var_params["group_namespace"] is None # noqa: E501 ): # noqa: E501 raise ApiValueError( - "Missing the required parameter `namespace` when calling `list_group_activity`" + "Missing the required parameter `group_namespace` when calling `groups_group_namespace_group_name_options`" ) # noqa: E501 - # verify the required parameter 'group' is set + # verify the required parameter 'group_name' is set if self.api_client.client_side_validation and ( - "group" not in local_var_params - or local_var_params["group"] is None # noqa: E501 + "group_name" not in local_var_params + or local_var_params["group_name"] is None # noqa: E501 ): # noqa: E501 raise ApiValueError( - "Missing the required parameter `group` when calling `list_group_activity`" + "Missing the required parameter `group_name` when calling `groups_group_namespace_group_name_options`" ) # noqa: E501 collection_formats = {} path_params = {} - if "namespace" in local_var_params: - path_params["namespace"] = local_var_params["namespace"] # noqa: E501 - if "group" in local_var_params: - path_params["group"] = local_var_params["group"] # noqa: E501 + if "group_namespace" in local_var_params: + path_params["group_namespace"] = local_var_params[ + "group_namespace" + ] # noqa: E501 + if "group_name" in local_var_params: + path_params["group_name"] = local_var_params["group_name"] # noqa: E501 query_params = [] - if ( - "start" in local_var_params and local_var_params["start"] is not None - ): # noqa: E501 - query_params.append(("start", local_var_params["start"])) # noqa: E501 - if ( - "end" in local_var_params and local_var_params["end"] is not None - ): # noqa: E501 - query_params.append(("end", local_var_params["end"])) # noqa: E501 - if ( - "page" in local_var_params and local_var_params["page"] is not None - ): # noqa: E501 - query_params.append(("page", local_var_params["page"])) # noqa: E501 - if ( - "per_page" in local_var_params and local_var_params["per_page"] is not None - ): # noqa: E501 - query_params.append( - ("per_page", local_var_params["per_page"]) - ) # noqa: E501 header_params = {} + if "x_tiledb_cloud_access_credentials_name" in local_var_params: + header_params["X-TILEDB-CLOUD-ACCESS-CREDENTIALS-NAME"] = local_var_params[ + "x_tiledb_cloud_access_credentials_name" + ] # noqa: E501 form_params = [] local_var_files = {} @@ -1085,15 +1094,15 @@ def list_group_activity_with_http_info( auth_settings = ["ApiKeyAuth", "BasicAuth"] # noqa: E501 return self.api_client.call_api( - "/v2/groups/{namespace}/{group}/activity", - "GET", + "/v2/groups/{group_namespace}/{group_name}", + "OPTIONS", path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="GroupActivityLogResponse", # noqa: E501 + 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( diff --git a/src/tiledb/cloud/_common/api_v2/docs/ArrayActivityLog.md b/src/tiledb/cloud/_common/api_v2/docs/ArrayActivityLog.md index da426213b..f3a6923ba 100644 --- a/src/tiledb/cloud/_common/api_v2/docs/ArrayActivityLog.md +++ b/src/tiledb/cloud/_common/api_v2/docs/ArrayActivityLog.md @@ -1,6 +1,6 @@ # ArrayActivityLog -Actvity of an Array +Activity of an Array ## Properties diff --git a/src/tiledb/cloud/_common/api_v2/docs/AssetActivityLog.md b/src/tiledb/cloud/_common/api_v2/docs/AssetActivityLog.md new file mode 100644 index 000000000..dacf84d02 --- /dev/null +++ b/src/tiledb/cloud/_common/api_v2/docs/AssetActivityLog.md @@ -0,0 +1,14 @@ +# AssetActivityLog + +## Properties + +| Name | Type | Description | Notes | +| ----------------- | ----------------------------------------------------- | ------------------------------- | ---------- | +| **id** | **str** | The ID of the activity | +| **event_at** | **datetime** | time event took place (RFC3339) | +| **action** | **str** | type of the event | +| **username** | **str** | User who performed action | +| **array_task_id** | **str** | uuid of associated array task | [optional] | +| **asset** | [**AssetActivityLogAsset**](AssetActivityLogAsset.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/_common/api_v2/docs/GroupContentActivityAsset.md b/src/tiledb/cloud/_common/api_v2/docs/AssetActivityLogAsset.md similarity index 96% rename from src/tiledb/cloud/_common/api_v2/docs/GroupContentActivityAsset.md rename to src/tiledb/cloud/_common/api_v2/docs/AssetActivityLogAsset.md index 61199b7b2..f42aedb3d 100644 --- a/src/tiledb/cloud/_common/api_v2/docs/GroupContentActivityAsset.md +++ b/src/tiledb/cloud/_common/api_v2/docs/AssetActivityLogAsset.md @@ -1,4 +1,4 @@ -# GroupContentActivityAsset +# AssetActivityLogAsset The asset details diff --git a/src/tiledb/cloud/_common/api_v2/docs/Error.md b/src/tiledb/cloud/_common/api_v2/docs/Error.md index 43dd8b416..5a4274e53 100644 --- a/src/tiledb/cloud/_common/api_v2/docs/Error.md +++ b/src/tiledb/cloud/_common/api_v2/docs/Error.md @@ -2,9 +2,10 @@ ## Properties -| Name | Type | Description | Notes | -| ----------- | ------- | ----------- | ---------- | -| **code** | **int** | | [optional] | -| **message** | **str** | | [optional] | +| Name | Type | Description | Notes | +| -------------- | ------- | ----------- | ---------- | +| **code** | **int** | | [optional] | +| **message** | **str** | | [optional] | +| **request_id** | **str** | | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/_common/api_v2/docs/GroupActivityLog.md b/src/tiledb/cloud/_common/api_v2/docs/GroupActivityLog.md deleted file mode 100644 index ff9657124..000000000 --- a/src/tiledb/cloud/_common/api_v2/docs/GroupActivityLog.md +++ /dev/null @@ -1,14 +0,0 @@ -# GroupActivityLog - -Activity of a Group - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------------------------------------------------- | ------------------------------- | ---------- | -| **id** | **str** | id of the activity | [optional] | -| **event_at** | **datetime** | time event took place (RFC3339) | [optional] | -| **action** | [**GroupActivityEventType**](GroupActivityEventType.md) | | [optional] | -| **username** | **str** | user who performed the action | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/_common/api_v2/docs/GroupActivityLogResponse.md b/src/tiledb/cloud/_common/api_v2/docs/GroupActivityLogResponse.md deleted file mode 100644 index 53c955314..000000000 --- a/src/tiledb/cloud/_common/api_v2/docs/GroupActivityLogResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GroupActivityLogResponse - -Object containing activity logs of a group along with the pagination metadata - -## Properties - -| Name | Type | Description | Notes | -| ----------------------- | ------------------------------------------------- | ------------------------- | ---------- | -| **activity_logs** | [**list[GroupActivityLog]**](GroupActivityLog.md) | Array of GroupActivityLog | [optional] | -| **pagination_metadata** | [**PaginationMetadata**](PaginationMetadata.md) | | [optional] | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/_common/api_v2/docs/GroupActivityResponse.md b/src/tiledb/cloud/_common/api_v2/docs/GroupActivityResponse.md new file mode 100644 index 000000000..744b87ad3 --- /dev/null +++ b/src/tiledb/cloud/_common/api_v2/docs/GroupActivityResponse.md @@ -0,0 +1,12 @@ +# GroupActivityResponse + +Object containing activity logs of a group and its content (arrays and subgroups) along with pagination metadata + +## Properties + +| Name | Type | Description | Notes | +| ----------------------- | ------------------------------------------------- | ----------------------------------------------------------------- | ---------- | +| **activity_logs** | [**list[AssetActivityLog]**](AssetActivityLog.md) | Array of activity logs, including both group and array activities | [optional] | +| **pagination_metadata** | [**PaginationMetadata**](PaginationMetadata.md) | | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/_common/api_v2/docs/GroupContentActivity.md b/src/tiledb/cloud/_common/api_v2/docs/GroupContentActivity.md index 006047690..49c38c74f 100644 --- a/src/tiledb/cloud/_common/api_v2/docs/GroupContentActivity.md +++ b/src/tiledb/cloud/_common/api_v2/docs/GroupContentActivity.md @@ -4,9 +4,9 @@ Object containing activity of an asset of a group ## Properties -| Name | Type | Description | Notes | -| ---------------- | ------------------------------------------------------------- | ----------- | ---------- | -| **asset** | [**GroupContentActivityAsset**](GroupContentActivityAsset.md) | | [optional] | -| **activity_log** | [**ArrayActivityLog**](ArrayActivityLog.md) | | [optional] | +| Name | Type | Description | Notes | +| ---------------- | ----------------------------------------------------- | ----------- | ---------- | +| **asset** | [**AssetActivityLogAsset**](AssetActivityLogAsset.md) | | [optional] | +| **activity_log** | [**ArrayActivityLog**](ArrayActivityLog.md) | | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/_common/api_v2/docs/GroupsApi.md b/src/tiledb/cloud/_common/api_v2/docs/GroupsApi.md index 477d6cba6..b20406870 100644 --- a/src/tiledb/cloud/_common/api_v2/docs/GroupsApi.md +++ b/src/tiledb/cloud/_common/api_v2/docs/GroupsApi.md @@ -7,10 +7,10 @@ All URIs are relative to _http://localhost_ | [**create_group**](GroupsApi.md#create_group) | **POST** /v2/groups/{group_namespace} | | [**delete_group**](GroupsApi.md#delete_group) | **DELETE** /v2/groups/{group_namespace}/{group_name}/delete | | [**deregister_group**](GroupsApi.md#deregister_group) | **DELETE** /v2/groups/{group_namespace}/{group_name} | +| [**get_group_activity**](GroupsApi.md#get_group_activity) | **GET** /v2/groups/{group_namespace}/{group_name}/activity | | [**get_group_content_activity**](GroupsApi.md#get_group_content_activity) | **GET** /v2/groups/{group_namespace}/{group_name}/content_activity | | [**get_group_metadata**](GroupsApi.md#get_group_metadata) | **POST** /v2/groups/{group_namespace}/{group_name}/metadata | | [**groups_group_namespace_group_name_options**](GroupsApi.md#groups_group_namespace_group_name_options) | **OPTIONS** /v2/groups/{group_namespace}/{group_name} | -| [**list_group_activity**](GroupsApi.md#list_group_activity) | **GET** /v2/groups/{namespace}/{group}/activity | | [**register_group**](GroupsApi.md#register_group) | **PUT** /v2/groups/{group_namespace} | | [**retrieve_group**](GroupsApi.md#retrieve_group) | **POST** /v2/groups/{group_namespace}/{group_name} | | [**update_group_contents**](GroupsApi.md#update_group_contents) | **PATCH** /v2/groups/{group_namespace}/{group_name} | @@ -432,11 +432,11 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_group_content_activity** +# **get_group_activity** -> GroupContentActivityResponse get_group_content_activity(group_namespace, group_name, page=page, per_page=per_page) +> GroupActivityResponse get_group_activity(group_namespace, group_name, start=start, end=end, page=page, per_page=per_page) -Retrieves combined activity logs for all assets contained in a group. +Retrieves activity logs for all assets contained in a group (arrays and other groups) including the parent group itself. ### Example @@ -479,16 +479,18 @@ configuration = tiledb.cloud._common.api_v2.Configuration( with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tiledb.cloud._common.api_v2.GroupsApi(api_client) - group_namespace = 'group_namespace_example' # str | The namespace of the group -group_name = 'group_name_example' # str | The unique name or id of the group + group_namespace = 'group_namespace_example' # str | namespace group is in (an organization name or user's username) +group_name = 'group_name_example' # str | name/uri of group that is url-encoded +start = 56 # int | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) (optional) +end = 56 # int | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) (optional) page = 56 # int | pagination offset (optional) per_page = 56 # int | pagination limit (optional) try: - api_response = api_instance.get_group_content_activity(group_namespace, group_name, page=page, per_page=per_page) + api_response = api_instance.get_group_activity(group_namespace, group_name, start=start, end=end, page=page, per_page=per_page) pprint(api_response) except ApiException as e: - print("Exception when calling GroupsApi->get_group_content_activity: %s\n" % e) + print("Exception when calling GroupsApi->get_group_activity: %s\n" % e) ``` - Basic Authentication (BasicAuth): @@ -530,30 +532,34 @@ configuration = tiledb.cloud._common.api_v2.Configuration( with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tiledb.cloud._common.api_v2.GroupsApi(api_client) - group_namespace = 'group_namespace_example' # str | The namespace of the group -group_name = 'group_name_example' # str | The unique name or id of the group + group_namespace = 'group_namespace_example' # str | namespace group is in (an organization name or user's username) +group_name = 'group_name_example' # str | name/uri of group that is url-encoded +start = 56 # int | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) (optional) +end = 56 # int | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) (optional) page = 56 # int | pagination offset (optional) per_page = 56 # int | pagination limit (optional) try: - api_response = api_instance.get_group_content_activity(group_namespace, group_name, page=page, per_page=per_page) + api_response = api_instance.get_group_activity(group_namespace, group_name, start=start, end=end, page=page, per_page=per_page) pprint(api_response) except ApiException as e: - print("Exception when calling GroupsApi->get_group_content_activity: %s\n" % e) + print("Exception when calling GroupsApi->get_group_activity: %s\n" % e) ``` ### Parameters -| Name | Type | Description | Notes | -| ------------------- | ------- | ---------------------------------- | ---------- | -| **group_namespace** | **str** | The namespace of the group | -| **group_name** | **str** | The unique name or id of the group | -| **page** | **int** | pagination offset | [optional] | -| **per_page** | **int** | pagination limit | [optional] | +| Name | Type | Description | Notes | +| ------------------- | ------- | ---------------------------------------------------------------------------------------- | ---------- | +| **group_namespace** | **str** | namespace group is in (an organization name or user's username) | +| **group_name** | **str** | name/uri of group that is url-encoded | +| **start** | **int** | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) | [optional] | +| **end** | **int** | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) | [optional] | +| **page** | **int** | pagination offset | [optional] | +| **per_page** | **int** | pagination limit | [optional] | ### Return type -[**GroupContentActivityResponse**](GroupContentActivityResponse.md) +[**GroupActivityResponse**](GroupActivityResponse.md) ### Authorization @@ -566,19 +572,19 @@ per_page = 56 # int | pagination limit (optional) ### HTTP response details -| Status code | Description | Response headers | -| ----------- | ------------------------------------------------------------------ | ---------------- | -| **200** | Activity logs of group contents along with the pagination metadata | - | -| **502** | Bad Gateway | - | -| **0** | error response | - | +| Status code | Description | Response headers | +| ----------- | ----------------------------------------------------------------------------- | ---------------- | +| **200** | Activity logs of group and all its content along with the pagination metadata | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_group_metadata** +# **get_group_content_activity** -> Metadata get_group_metadata(group_namespace, group_name, metadata_retrieval=metadata_retrieval) +> GroupContentActivityResponse get_group_content_activity(group_namespace, group_name, page=page, per_page=per_page) -get metadata on a group using the requested config +Retrieves combined activity logs for all assets contained in a group. ### Example @@ -623,13 +629,14 @@ with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client: api_instance = tiledb.cloud._common.api_v2.GroupsApi(api_client) group_namespace = 'group_namespace_example' # str | The namespace of the group group_name = 'group_name_example' # str | The unique name or id of the group -metadata_retrieval = tiledb.cloud._common.api_v2.GroupMetadataRetrievalRequest() # GroupMetadataRetrievalRequest | (optional) +page = 56 # int | pagination offset (optional) +per_page = 56 # int | pagination limit (optional) try: - api_response = api_instance.get_group_metadata(group_namespace, group_name, metadata_retrieval=metadata_retrieval) + api_response = api_instance.get_group_content_activity(group_namespace, group_name, page=page, per_page=per_page) pprint(api_response) except ApiException as e: - print("Exception when calling GroupsApi->get_group_metadata: %s\n" % e) + print("Exception when calling GroupsApi->get_group_content_activity: %s\n" % e) ``` - Basic Authentication (BasicAuth): @@ -673,26 +680,28 @@ with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client: api_instance = tiledb.cloud._common.api_v2.GroupsApi(api_client) group_namespace = 'group_namespace_example' # str | The namespace of the group group_name = 'group_name_example' # str | The unique name or id of the group -metadata_retrieval = tiledb.cloud._common.api_v2.GroupMetadataRetrievalRequest() # GroupMetadataRetrievalRequest | (optional) +page = 56 # int | pagination offset (optional) +per_page = 56 # int | pagination limit (optional) try: - api_response = api_instance.get_group_metadata(group_namespace, group_name, metadata_retrieval=metadata_retrieval) + api_response = api_instance.get_group_content_activity(group_namespace, group_name, page=page, per_page=per_page) pprint(api_response) except ApiException as e: - print("Exception when calling GroupsApi->get_group_metadata: %s\n" % e) + print("Exception when calling GroupsApi->get_group_content_activity: %s\n" % e) ``` ### Parameters -| Name | Type | Description | Notes | -| ---------------------- | --------------------------------------------------------------------- | ---------------------------------- | ---------- | -| **group_namespace** | **str** | The namespace of the group | -| **group_name** | **str** | The unique name or id of the group | -| **metadata_retrieval** | [**GroupMetadataRetrievalRequest**](GroupMetadataRetrievalRequest.md) | | [optional] | +| Name | Type | Description | Notes | +| ------------------- | ------- | ---------------------------------- | ---------- | +| **group_namespace** | **str** | The namespace of the group | +| **group_name** | **str** | The unique name or id of the group | +| **page** | **int** | pagination offset | [optional] | +| **per_page** | **int** | pagination limit | [optional] | ### Return type -[**Metadata**](Metadata.md) +[**GroupContentActivityResponse**](GroupContentActivityResponse.md) ### Authorization @@ -700,24 +709,24 @@ metadata_retrieval = tiledb.cloud._common.api_v2.GroupMetadataRetrievalRequest() ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details -| Status code | Description | Response headers | -| ----------- | ----------------------------- | ---------------- | -| **200** | retrieve metadata for a group | - | -| **502** | Bad Gateway | - | -| **0** | error response | - | +| Status code | Description | Response headers | +| ----------- | ------------------------------------------------------------------ | ---------------- | +| **200** | Activity logs of group contents along with the pagination metadata | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **groups_group_namespace_group_name_options** +# **get_group_metadata** -> groups_group_namespace_group_name_options(group_namespace, group_name, x_tiledb_cloud_access_credentials_name=x_tiledb_cloud_access_credentials_name) +> Metadata get_group_metadata(group_namespace, group_name, metadata_retrieval=metadata_retrieval) -can be used to check if the resource exists +get metadata on a group using the requested config ### Example @@ -762,12 +771,13 @@ with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client: api_instance = tiledb.cloud._common.api_v2.GroupsApi(api_client) group_namespace = 'group_namespace_example' # str | The namespace of the group group_name = 'group_name_example' # str | The unique name or id of the group -x_tiledb_cloud_access_credentials_name = 'x_tiledb_cloud_access_credentials_name_example' # str | Optional registered access credentials to use for creation (optional) +metadata_retrieval = tiledb.cloud._common.api_v2.GroupMetadataRetrievalRequest() # GroupMetadataRetrievalRequest | (optional) try: - api_instance.groups_group_namespace_group_name_options(group_namespace, group_name, x_tiledb_cloud_access_credentials_name=x_tiledb_cloud_access_credentials_name) + api_response = api_instance.get_group_metadata(group_namespace, group_name, metadata_retrieval=metadata_retrieval) + pprint(api_response) except ApiException as e: - print("Exception when calling GroupsApi->groups_group_namespace_group_name_options: %s\n" % e) + print("Exception when calling GroupsApi->get_group_metadata: %s\n" % e) ``` - Basic Authentication (BasicAuth): @@ -811,25 +821,26 @@ with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client: api_instance = tiledb.cloud._common.api_v2.GroupsApi(api_client) group_namespace = 'group_namespace_example' # str | The namespace of the group group_name = 'group_name_example' # str | The unique name or id of the group -x_tiledb_cloud_access_credentials_name = 'x_tiledb_cloud_access_credentials_name_example' # str | Optional registered access credentials to use for creation (optional) +metadata_retrieval = tiledb.cloud._common.api_v2.GroupMetadataRetrievalRequest() # GroupMetadataRetrievalRequest | (optional) try: - api_instance.groups_group_namespace_group_name_options(group_namespace, group_name, x_tiledb_cloud_access_credentials_name=x_tiledb_cloud_access_credentials_name) + api_response = api_instance.get_group_metadata(group_namespace, group_name, metadata_retrieval=metadata_retrieval) + pprint(api_response) except ApiException as e: - print("Exception when calling GroupsApi->groups_group_namespace_group_name_options: %s\n" % e) + print("Exception when calling GroupsApi->get_group_metadata: %s\n" % e) ``` ### Parameters -| Name | Type | Description | Notes | -| ------------------------------------------ | ------- | ---------------------------------------------------------- | ---------- | -| **group_namespace** | **str** | The namespace of the group | -| **group_name** | **str** | The unique name or id of the group | -| **x_tiledb_cloud_access_credentials_name** | **str** | Optional registered access credentials to use for creation | [optional] | +| Name | Type | Description | Notes | +| ---------------------- | --------------------------------------------------------------------- | ---------------------------------- | ---------- | +| **group_namespace** | **str** | The namespace of the group | +| **group_name** | **str** | The unique name or id of the group | +| **metadata_retrieval** | [**GroupMetadataRetrievalRequest**](GroupMetadataRetrievalRequest.md) | | [optional] | ### Return type -void (empty response body) +[**Metadata**](Metadata.md) ### Authorization @@ -837,25 +848,24 @@ void (empty response body) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details -| Status code | Description | Response headers | -| ----------- | --------------------------- | ---------------- | -| **204** | the resource exists | - | -| **404** | the resource does not exist | - | -| **502** | Bad Gateway | - | -| **0** | error response | - | +| Status code | Description | Response headers | +| ----------- | ----------------------------- | ---------------- | +| **200** | retrieve metadata for a group | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_group_activity** +# **groups_group_namespace_group_name_options** -> GroupActivityLogResponse list_group_activity(namespace, group, start=start, end=end, page=page, per_page=per_page) +> groups_group_namespace_group_name_options(group_namespace, group_name, x_tiledb_cloud_access_credentials_name=x_tiledb_cloud_access_credentials_name) -get group activity logs +can be used to check if the resource exists ### Example @@ -898,18 +908,14 @@ configuration = tiledb.cloud._common.api_v2.Configuration( with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tiledb.cloud._common.api_v2.GroupsApi(api_client) - namespace = 'namespace_example' # str | namespace group is in (an organization name or user's username) -group = 'group_example' # str | name/uri of group that is url-encoded -start = 56 # int | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) (optional) -end = 56 # int | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) (optional) -page = 56 # int | pagination offset (optional) -per_page = 56 # int | pagination limit (optional) + group_namespace = 'group_namespace_example' # str | The namespace of the group +group_name = 'group_name_example' # str | The unique name or id of the group +x_tiledb_cloud_access_credentials_name = 'x_tiledb_cloud_access_credentials_name_example' # str | Optional registered access credentials to use for creation (optional) try: - api_response = api_instance.list_group_activity(namespace, group, start=start, end=end, page=page, per_page=per_page) - pprint(api_response) + api_instance.groups_group_namespace_group_name_options(group_namespace, group_name, x_tiledb_cloud_access_credentials_name=x_tiledb_cloud_access_credentials_name) except ApiException as e: - print("Exception when calling GroupsApi->list_group_activity: %s\n" % e) + print("Exception when calling GroupsApi->groups_group_namespace_group_name_options: %s\n" % e) ``` - Basic Authentication (BasicAuth): @@ -951,34 +957,27 @@ configuration = tiledb.cloud._common.api_v2.Configuration( with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tiledb.cloud._common.api_v2.GroupsApi(api_client) - namespace = 'namespace_example' # str | namespace group is in (an organization name or user's username) -group = 'group_example' # str | name/uri of group that is url-encoded -start = 56 # int | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) (optional) -end = 56 # int | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) (optional) -page = 56 # int | pagination offset (optional) -per_page = 56 # int | pagination limit (optional) + group_namespace = 'group_namespace_example' # str | The namespace of the group +group_name = 'group_name_example' # str | The unique name or id of the group +x_tiledb_cloud_access_credentials_name = 'x_tiledb_cloud_access_credentials_name_example' # str | Optional registered access credentials to use for creation (optional) try: - api_response = api_instance.list_group_activity(namespace, group, start=start, end=end, page=page, per_page=per_page) - pprint(api_response) + api_instance.groups_group_namespace_group_name_options(group_namespace, group_name, x_tiledb_cloud_access_credentials_name=x_tiledb_cloud_access_credentials_name) except ApiException as e: - print("Exception when calling GroupsApi->list_group_activity: %s\n" % e) + print("Exception when calling GroupsApi->groups_group_namespace_group_name_options: %s\n" % e) ``` ### Parameters -| Name | Type | Description | Notes | -| ------------- | ------- | ---------------------------------------------------------------------------------------- | ---------- | -| **namespace** | **str** | namespace group is in (an organization name or user's username) | -| **group** | **str** | name/uri of group that is url-encoded | -| **start** | **int** | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) | [optional] | -| **end** | **int** | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) | [optional] | -| **page** | **int** | pagination offset | [optional] | -| **per_page** | **int** | pagination limit | [optional] | +| Name | Type | Description | Notes | +| ------------------------------------------ | ------- | ---------------------------------------------------------- | ---------- | +| **group_namespace** | **str** | The namespace of the group | +| **group_name** | **str** | The unique name or id of the group | +| **x_tiledb_cloud_access_credentials_name** | **str** | Optional registered access credentials to use for creation | [optional] | ### Return type -[**GroupActivityLogResponse**](GroupActivityLogResponse.md) +void (empty response body) ### Authorization @@ -991,11 +990,12 @@ per_page = 56 # int | pagination limit (optional) ### HTTP response details -| Status code | Description | Response headers | -| ----------- | --------------------- | ---------------- | -| **200** | log of group activity | - | -| **502** | Bad Gateway | - | -| **0** | error response | - | +| Status code | Description | Response headers | +| ----------- | --------------------------- | ---------------- | +| **204** | the resource exists | - | +| **404** | the resource does not exist | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/_common/api_v2/models/__init__.py b/src/tiledb/cloud/_common/api_v2/models/__init__.py index 2dfc50777..2aaf99c4f 100644 --- a/src/tiledb/cloud/_common/api_v2/models/__init__.py +++ b/src/tiledb/cloud/_common/api_v2/models/__init__.py @@ -46,6 +46,10 @@ from tiledb.cloud._common.api_v2.models.array_schema_entry import ArraySchemaEntry from tiledb.cloud._common.api_v2.models.array_schema_map import ArraySchemaMap from tiledb.cloud._common.api_v2.models.array_type import ArrayType +from tiledb.cloud._common.api_v2.models.asset_activity_log import AssetActivityLog +from tiledb.cloud._common.api_v2.models.asset_activity_log_asset import ( + AssetActivityLogAsset, +) from tiledb.cloud._common.api_v2.models.asset_type import AssetType from tiledb.cloud._common.api_v2.models.attribute import Attribute from tiledb.cloud._common.api_v2.models.attribute_buffer_header import ( @@ -81,16 +85,12 @@ from tiledb.cloud._common.api_v2.models.group_activity_event_type import ( GroupActivityEventType, ) -from tiledb.cloud._common.api_v2.models.group_activity_log import GroupActivityLog -from tiledb.cloud._common.api_v2.models.group_activity_log_response import ( - GroupActivityLogResponse, +from tiledb.cloud._common.api_v2.models.group_activity_response import ( + GroupActivityResponse, ) from tiledb.cloud._common.api_v2.models.group_content_activity import ( GroupContentActivity, ) -from tiledb.cloud._common.api_v2.models.group_content_activity_asset import ( - GroupContentActivityAsset, -) from tiledb.cloud._common.api_v2.models.group_content_activity_response import ( GroupContentActivityResponse, ) diff --git a/src/tiledb/cloud/_common/api_v2/models/access_credential_type.py b/src/tiledb/cloud/_common/api_v2/models/access_credential_type.py index 772e93f34..4945da1f9 100644 --- a/src/tiledb/cloud/_common/api_v2/models/access_credential_type.py +++ b/src/tiledb/cloud/_common/api_v2/models/access_credential_type.py @@ -30,9 +30,10 @@ class AccessCredentialType(object): """ KEY = "key" ARN = "arn" + TOKEN = "token" AZURE_TOKEN = "azure_token" - allowable_values = [KEY, ARN, AZURE_TOKEN] # noqa: E501 + allowable_values = [KEY, ARN, TOKEN, AZURE_TOKEN] # noqa: E501 """ Attributes: diff --git a/src/tiledb/cloud/_common/api_v2/models/asset_activity_log.py b/src/tiledb/cloud/_common/api_v2/models/asset_activity_log.py new file mode 100644 index 000000000..148226438 --- /dev/null +++ b/src/tiledb/cloud/_common/api_v2/models/asset_activity_log.py @@ -0,0 +1,294 @@ +# coding: utf-8 + +""" + Tiledb Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 1.4.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud._common.api_v2.configuration import Configuration + + +class AssetActivityLog(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "id": "str", + "event_at": "datetime", + "action": "str", + "username": "str", + "array_task_id": "str", + "asset": "AssetActivityLogAsset", + } + + attribute_map = { + "id": "id", + "event_at": "event_at", + "action": "action", + "username": "username", + "array_task_id": "array_task_id", + "asset": "asset", + } + + def __init__( + self, + id=None, + event_at=None, + action=None, + username=None, + array_task_id=None, + asset=None, + local_vars_configuration=None, + ): # noqa: E501 + """AssetActivityLog - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._event_at = None + self._action = None + self._username = None + self._array_task_id = None + self._asset = None + self.discriminator = None + + self.id = id + self.event_at = event_at + self.action = action + self.username = username + if array_task_id is not None: + self.array_task_id = array_task_id + self.asset = asset + + @property + def id(self): + """Gets the id of this AssetActivityLog. # noqa: E501 + + The ID of the activity # noqa: E501 + + :return: The id of this AssetActivityLog. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetActivityLog. + + The ID of the activity # noqa: E501 + + :param id: The id of this AssetActivityLog. # noqa: E501 + :type: str + """ + if ( + self.local_vars_configuration.client_side_validation and id is None + ): # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def event_at(self): + """Gets the event_at of this AssetActivityLog. # noqa: E501 + + time event took place (RFC3339) # noqa: E501 + + :return: The event_at of this AssetActivityLog. # noqa: E501 + :rtype: datetime + """ + return self._event_at + + @event_at.setter + def event_at(self, event_at): + """Sets the event_at of this AssetActivityLog. + + time event took place (RFC3339) # noqa: E501 + + :param event_at: The event_at of this AssetActivityLog. # noqa: E501 + :type: datetime + """ + if ( + self.local_vars_configuration.client_side_validation and event_at is None + ): # noqa: E501 + raise ValueError( + "Invalid value for `event_at`, must not be `None`" + ) # noqa: E501 + + self._event_at = event_at + + @property + def action(self): + """Gets the action of this AssetActivityLog. # noqa: E501 + + type of the event # noqa: E501 + + :return: The action of this AssetActivityLog. # noqa: E501 + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this AssetActivityLog. + + type of the event # noqa: E501 + + :param action: The action of this AssetActivityLog. # noqa: E501 + :type: str + """ + if ( + self.local_vars_configuration.client_side_validation and action is None + ): # noqa: E501 + raise ValueError( + "Invalid value for `action`, must not be `None`" + ) # noqa: E501 + + self._action = action + + @property + def username(self): + """Gets the username of this AssetActivityLog. # noqa: E501 + + User who performed action # noqa: E501 + + :return: The username of this AssetActivityLog. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this AssetActivityLog. + + User who performed action # noqa: E501 + + :param username: The username of this AssetActivityLog. # noqa: E501 + :type: str + """ + if ( + self.local_vars_configuration.client_side_validation and username is None + ): # noqa: E501 + raise ValueError( + "Invalid value for `username`, must not be `None`" + ) # noqa: E501 + + self._username = username + + @property + def array_task_id(self): + """Gets the array_task_id of this AssetActivityLog. # noqa: E501 + + uuid of associated array task # noqa: E501 + + :return: The array_task_id of this AssetActivityLog. # noqa: E501 + :rtype: str + """ + return self._array_task_id + + @array_task_id.setter + def array_task_id(self, array_task_id): + """Sets the array_task_id of this AssetActivityLog. + + uuid of associated array task # noqa: E501 + + :param array_task_id: The array_task_id of this AssetActivityLog. # noqa: E501 + :type: str + """ + + self._array_task_id = array_task_id + + @property + def asset(self): + """Gets the asset of this AssetActivityLog. # noqa: E501 + + + :return: The asset of this AssetActivityLog. # noqa: E501 + :rtype: AssetActivityLogAsset + """ + return self._asset + + @asset.setter + def asset(self, asset): + """Sets the asset of this AssetActivityLog. + + + :param asset: The asset of this AssetActivityLog. # noqa: E501 + :type: AssetActivityLogAsset + """ + if ( + self.local_vars_configuration.client_side_validation and asset is None + ): # noqa: E501 + raise ValueError( + "Invalid value for `asset`, must not be `None`" + ) # noqa: E501 + + self._asset = asset + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetActivityLog): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AssetActivityLog): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/_common/api_v2/models/group_content_activity_asset.py b/src/tiledb/cloud/_common/api_v2/models/asset_activity_log_asset.py similarity index 75% rename from src/tiledb/cloud/_common/api_v2/models/group_content_activity_asset.py rename to src/tiledb/cloud/_common/api_v2/models/asset_activity_log_asset.py index c0020ef96..949580a14 100644 --- a/src/tiledb/cloud/_common/api_v2/models/group_content_activity_asset.py +++ b/src/tiledb/cloud/_common/api_v2/models/asset_activity_log_asset.py @@ -18,7 +18,7 @@ from tiledb.cloud._common.api_v2.configuration import Configuration -class GroupContentActivityAsset(object): +class AssetActivityLogAsset(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,7 +54,7 @@ def __init__( asset_type=None, local_vars_configuration=None, ): # noqa: E501 - """GroupContentActivityAsset - a model defined in OpenAPI""" # noqa: E501 + """AssetActivityLogAsset - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -76,22 +76,22 @@ def __init__( @property def id(self): - """Gets the id of this GroupContentActivityAsset. # noqa: E501 + """Gets the id of this AssetActivityLogAsset. # noqa: E501 The asset ID # noqa: E501 - :return: The id of this GroupContentActivityAsset. # noqa: E501 + :return: The id of this AssetActivityLogAsset. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this GroupContentActivityAsset. + """Sets the id of this AssetActivityLogAsset. The asset ID # noqa: E501 - :param id: The id of this GroupContentActivityAsset. # noqa: E501 + :param id: The id of this AssetActivityLogAsset. # noqa: E501 :type: str """ @@ -99,22 +99,22 @@ def id(self, id): @property def name(self): - """Gets the name of this GroupContentActivityAsset. # noqa: E501 + """Gets the name of this AssetActivityLogAsset. # noqa: E501 The asset name # noqa: E501 - :return: The name of this GroupContentActivityAsset. # noqa: E501 + :return: The name of this AssetActivityLogAsset. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this GroupContentActivityAsset. + """Sets the name of this AssetActivityLogAsset. The asset name # noqa: E501 - :param name: The name of this GroupContentActivityAsset. # noqa: E501 + :param name: The name of this AssetActivityLogAsset. # noqa: E501 :type: str """ @@ -122,22 +122,22 @@ def name(self, name): @property def namespace(self): - """Gets the namespace of this GroupContentActivityAsset. # noqa: E501 + """Gets the namespace of this AssetActivityLogAsset. # noqa: E501 The namespace that the asset belongs to # noqa: E501 - :return: The namespace of this GroupContentActivityAsset. # noqa: E501 + :return: The namespace of this AssetActivityLogAsset. # noqa: E501 :rtype: str """ return self._namespace @namespace.setter def namespace(self, namespace): - """Sets the namespace of this GroupContentActivityAsset. + """Sets the namespace of this AssetActivityLogAsset. The namespace that the asset belongs to # noqa: E501 - :param namespace: The namespace of this GroupContentActivityAsset. # noqa: E501 + :param namespace: The namespace of this AssetActivityLogAsset. # noqa: E501 :type: str """ @@ -145,20 +145,20 @@ def namespace(self, namespace): @property def asset_type(self): - """Gets the asset_type of this GroupContentActivityAsset. # noqa: E501 + """Gets the asset_type of this AssetActivityLogAsset. # noqa: E501 - :return: The asset_type of this GroupContentActivityAsset. # noqa: E501 + :return: The asset_type of this AssetActivityLogAsset. # noqa: E501 :rtype: AssetType """ return self._asset_type @asset_type.setter def asset_type(self, asset_type): - """Sets the asset_type of this GroupContentActivityAsset. + """Sets the asset_type of this AssetActivityLogAsset. - :param asset_type: The asset_type of this GroupContentActivityAsset. # noqa: E501 + :param asset_type: The asset_type of this AssetActivityLogAsset. # noqa: E501 :type: AssetType """ @@ -200,14 +200,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, GroupContentActivityAsset): + if not isinstance(other, AssetActivityLogAsset): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, GroupContentActivityAsset): + if not isinstance(other, AssetActivityLogAsset): return True return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/_common/api_v2/models/error.py b/src/tiledb/cloud/_common/api_v2/models/error.py index 821bfa541..7f528eff3 100644 --- a/src/tiledb/cloud/_common/api_v2/models/error.py +++ b/src/tiledb/cloud/_common/api_v2/models/error.py @@ -32,12 +32,12 @@ class Error(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"code": "int", "message": "str"} + openapi_types = {"code": "int", "message": "str", "request_id": "str"} - attribute_map = {"code": "code", "message": "message"} + attribute_map = {"code": "code", "message": "message", "request_id": "request_id"} def __init__( - self, code=None, message=None, local_vars_configuration=None + self, code=None, message=None, request_id=None, local_vars_configuration=None ): # noqa: E501 """Error - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: @@ -46,12 +46,15 @@ def __init__( self._code = None self._message = None + self._request_id = None self.discriminator = None if code is not None: self.code = code if message is not None: self.message = message + if request_id is not None: + self.request_id = request_id @property def code(self): @@ -95,6 +98,27 @@ def message(self, message): self._message = message + @property + def request_id(self): + """Gets the request_id of this Error. # noqa: E501 + + + :return: The request_id of this Error. # noqa: E501 + :rtype: str + """ + return self._request_id + + @request_id.setter + def request_id(self, request_id): + """Sets the request_id of this Error. + + + :param request_id: The request_id of this Error. # noqa: E501 + :type: str + """ + + self._request_id = request_id + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/tiledb/cloud/_common/api_v2/models/group_activity_log.py b/src/tiledb/cloud/_common/api_v2/models/group_activity_log.py deleted file mode 100644 index 71f60ad52..000000000 --- a/src/tiledb/cloud/_common/api_v2/models/group_activity_log.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Tiledb Storage Platform API - - TileDB Storage Platform REST API # noqa: E501 - - The version of the OpenAPI document: 1.4.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from tiledb.cloud._common.api_v2.configuration import Configuration - - -class GroupActivityLog(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - "id": "str", - "event_at": "datetime", - "action": "GroupActivityEventType", - "username": "str", - } - - attribute_map = { - "id": "id", - "event_at": "event_at", - "action": "action", - "username": "username", - } - - def __init__( - self, - id=None, - event_at=None, - action=None, - username=None, - local_vars_configuration=None, - ): # noqa: E501 - """GroupActivityLog - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._event_at = None - self._action = None - self._username = None - self.discriminator = None - - if id is not None: - self.id = id - if event_at is not None: - self.event_at = event_at - if action is not None: - self.action = action - if username is not None: - self.username = username - - @property - def id(self): - """Gets the id of this GroupActivityLog. # noqa: E501 - - id of the activity # noqa: E501 - - :return: The id of this GroupActivityLog. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this GroupActivityLog. - - id of the activity # noqa: E501 - - :param id: The id of this GroupActivityLog. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def event_at(self): - """Gets the event_at of this GroupActivityLog. # noqa: E501 - - time event took place (RFC3339) # noqa: E501 - - :return: The event_at of this GroupActivityLog. # noqa: E501 - :rtype: datetime - """ - return self._event_at - - @event_at.setter - def event_at(self, event_at): - """Sets the event_at of this GroupActivityLog. - - time event took place (RFC3339) # noqa: E501 - - :param event_at: The event_at of this GroupActivityLog. # noqa: E501 - :type: datetime - """ - - self._event_at = event_at - - @property - def action(self): - """Gets the action of this GroupActivityLog. # noqa: E501 - - - :return: The action of this GroupActivityLog. # noqa: E501 - :rtype: GroupActivityEventType - """ - return self._action - - @action.setter - def action(self, action): - """Sets the action of this GroupActivityLog. - - - :param action: The action of this GroupActivityLog. # noqa: E501 - :type: GroupActivityEventType - """ - - self._action = action - - @property - def username(self): - """Gets the username of this GroupActivityLog. # noqa: E501 - - user who performed the action # noqa: E501 - - :return: The username of this GroupActivityLog. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this GroupActivityLog. - - user who performed the action # noqa: E501 - - :param username: The username of this GroupActivityLog. # noqa: E501 - :type: str - """ - - self._username = username - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GroupActivityLog): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GroupActivityLog): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/_common/api_v2/models/group_activity_log_response.py b/src/tiledb/cloud/_common/api_v2/models/group_activity_response.py similarity index 77% rename from src/tiledb/cloud/_common/api_v2/models/group_activity_log_response.py rename to src/tiledb/cloud/_common/api_v2/models/group_activity_response.py index 555a9eddc..40fd38741 100644 --- a/src/tiledb/cloud/_common/api_v2/models/group_activity_log_response.py +++ b/src/tiledb/cloud/_common/api_v2/models/group_activity_response.py @@ -18,7 +18,7 @@ from tiledb.cloud._common.api_v2.configuration import Configuration -class GroupActivityLogResponse(object): +class GroupActivityResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,7 +33,7 @@ class GroupActivityLogResponse(object): and the value is json key in definition. """ openapi_types = { - "activity_logs": "list[GroupActivityLog]", + "activity_logs": "list[AssetActivityLog]", "pagination_metadata": "PaginationMetadata", } @@ -48,7 +48,7 @@ def __init__( pagination_metadata=None, local_vars_configuration=None, ): # noqa: E501 - """GroupActivityLogResponse - a model defined in OpenAPI""" # noqa: E501 + """GroupActivityResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -64,43 +64,43 @@ def __init__( @property def activity_logs(self): - """Gets the activity_logs of this GroupActivityLogResponse. # noqa: E501 + """Gets the activity_logs of this GroupActivityResponse. # noqa: E501 - Array of GroupActivityLog # noqa: E501 + Array of activity logs, including both group and array activities # noqa: E501 - :return: The activity_logs of this GroupActivityLogResponse. # noqa: E501 - :rtype: list[GroupActivityLog] + :return: The activity_logs of this GroupActivityResponse. # noqa: E501 + :rtype: list[AssetActivityLog] """ return self._activity_logs @activity_logs.setter def activity_logs(self, activity_logs): - """Sets the activity_logs of this GroupActivityLogResponse. + """Sets the activity_logs of this GroupActivityResponse. - Array of GroupActivityLog # noqa: E501 + Array of activity logs, including both group and array activities # noqa: E501 - :param activity_logs: The activity_logs of this GroupActivityLogResponse. # noqa: E501 - :type: list[GroupActivityLog] + :param activity_logs: The activity_logs of this GroupActivityResponse. # noqa: E501 + :type: list[AssetActivityLog] """ self._activity_logs = activity_logs @property def pagination_metadata(self): - """Gets the pagination_metadata of this GroupActivityLogResponse. # noqa: E501 + """Gets the pagination_metadata of this GroupActivityResponse. # noqa: E501 - :return: The pagination_metadata of this GroupActivityLogResponse. # noqa: E501 + :return: The pagination_metadata of this GroupActivityResponse. # noqa: E501 :rtype: PaginationMetadata """ return self._pagination_metadata @pagination_metadata.setter def pagination_metadata(self, pagination_metadata): - """Sets the pagination_metadata of this GroupActivityLogResponse. + """Sets the pagination_metadata of this GroupActivityResponse. - :param pagination_metadata: The pagination_metadata of this GroupActivityLogResponse. # noqa: E501 + :param pagination_metadata: The pagination_metadata of this GroupActivityResponse. # noqa: E501 :type: PaginationMetadata """ @@ -142,14 +142,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, GroupActivityLogResponse): + if not isinstance(other, GroupActivityResponse): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, GroupActivityLogResponse): + if not isinstance(other, GroupActivityResponse): return True return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/_common/api_v2/models/group_content_activity.py b/src/tiledb/cloud/_common/api_v2/models/group_content_activity.py index 5e7363ff4..73027f8cc 100644 --- a/src/tiledb/cloud/_common/api_v2/models/group_content_activity.py +++ b/src/tiledb/cloud/_common/api_v2/models/group_content_activity.py @@ -33,7 +33,7 @@ class GroupContentActivity(object): and the value is json key in definition. """ openapi_types = { - "asset": "GroupContentActivityAsset", + "asset": "AssetActivityLogAsset", "activity_log": "ArrayActivityLog", } @@ -62,7 +62,7 @@ def asset(self): :return: The asset of this GroupContentActivity. # noqa: E501 - :rtype: GroupContentActivityAsset + :rtype: AssetActivityLogAsset """ return self._asset @@ -72,7 +72,7 @@ def asset(self, asset): :param asset: The asset of this GroupContentActivity. # noqa: E501 - :type: GroupContentActivityAsset + :type: AssetActivityLogAsset """ self._asset = asset diff --git a/src/tiledb/cloud/rest_api/README.md b/src/tiledb/cloud/rest_api/README.md index 97f8ccac6..b97718ffe 100644 --- a/src/tiledb/cloud/rest_api/README.md +++ b/src/tiledb/cloud/rest_api/README.md @@ -117,6 +117,7 @@ All URIs are relative to _http://localhost_ | _ArrayApi_ | [**get_arrays_in_namespace**](docs/ArrayApi.md#get_arrays_in_namespace) | **GET** /v1/arrays/{namespace} | | _ArrayApi_ | [**get_fragment_end_timestamp**](docs/ArrayApi.md#get_fragment_end_timestamp) | **GET** /v1/arrays/{namespace}/{array}/fragment_end_timestamp | | _ArrayApi_ | [**get_last_accessed_arrays**](docs/ArrayApi.md#get_last_accessed_arrays) | **GET** /v1/arrays/last_accessed | +| _ArrayApi_ | [**load_array_schema**](docs/ArrayApi.md#load_array_schema) | **POST** /v1/arrays/{namespace}/{array}/schema | | _ArrayApi_ | [**load_enumerations**](docs/ArrayApi.md#load_enumerations) | **POST** /v1/arrays/{namespace}/{array}/enumerations | | _ArrayApi_ | [**register_array**](docs/ArrayApi.md#register_array) | **POST** /v1/arrays/{namespace}/{array}/register | | _ArrayApi_ | [**share_array**](docs/ArrayApi.md#share_array) | **PATCH** /v1/arrays/{namespace}/{array}/share | @@ -124,6 +125,8 @@ All URIs are relative to _http://localhost_ | _ArrayApi_ | [**update_array_metadata_capnp**](docs/ArrayApi.md#update_array_metadata_capnp) | **POST** /v1/arrays/{namespace}/{array}/array_metadata | | _ArrayApi_ | [**vacuum_array**](docs/ArrayApi.md#vacuum_array) | **POST** /v1/arrays/{namespace}/{array}/vacuum | | _ArrayTasksApi_ | [**get_array_tasks_sidebar**](docs/ArrayTasksApi.md#get_array_tasks_sidebar) | **GET** /v1/tasks/sidebar | +| _AssetsApi_ | [**list_assets**](docs/AssetsApi.md#list_assets) | **GET** /v1/assets/{namespace} | +| _AssetsApi_ | [**list_public_assets**](docs/AssetsApi.md#list_public_assets) | **GET** /v1/public_assets | | _FavoritesApi_ | [**add_array_favorite**](docs/FavoritesApi.md#add_array_favorite) | **POST** /v1/arrays/favorites/{namespace}/{name} | | _FavoritesApi_ | [**add_ml_model_favorite**](docs/FavoritesApi.md#add_ml_model_favorite) | **POST** /v1/ml_models/favorites/{namespace}/{name} | | _FavoritesApi_ | [**add_notebook_favorite**](docs/FavoritesApi.md#add_notebook_favorite) | **POST** /v1/notebooks/favorites/{namespace}/{name} | @@ -294,7 +297,11 @@ All URIs are relative to _http://localhost_ - [ArrayTaskType](docs/ArrayTaskType.md) - [ArrayType](docs/ArrayType.md) - [ArrayVacuumRequest](docs/ArrayVacuumRequest.md) +- [AssetBackingType](docs/AssetBackingType.md) +- [AssetInfo](docs/AssetInfo.md) +- [AssetListResponse](docs/AssetListResponse.md) - [AssetLocations](docs/AssetLocations.md) +- [AssetOwnershipLevel](docs/AssetOwnershipLevel.md) - [AssetType](docs/AssetType.md) - [Attribute](docs/Attribute.md) - [AttributeBufferHeader](docs/AttributeBufferHeader.md) @@ -349,6 +356,7 @@ All URIs are relative to _http://localhost_ - [GroupTypeMetadataKey](docs/GroupTypeMetadataKey.md) - [GroupUpdate](docs/GroupUpdate.md) - [InlineObject](docs/InlineObject.md) +- [InlineObject1](docs/InlineObject1.md) - [InlineResponse200](docs/InlineResponse200.md) - [Invitation](docs/Invitation.md) - [InvitationArrayShareEmail](docs/InvitationArrayShareEmail.md) @@ -360,11 +368,15 @@ All URIs are relative to _http://localhost_ - [InvitationType](docs/InvitationType.md) - [LastAccessedArray](docs/LastAccessedArray.md) - [Layout](docs/Layout.md) +- [LoadArraySchemaRequest](docs/LoadArraySchemaRequest.md) +- [LoadArraySchemaResponse](docs/LoadArraySchemaResponse.md) - [LoadEnumerationsRequest](docs/LoadEnumerationsRequest.md) - [LoadEnumerationsResponse](docs/LoadEnumerationsResponse.md) - [MLModelFavorite](docs/MLModelFavorite.md) - [MLModelFavoritesData](docs/MLModelFavoritesData.md) - [MaxBufferSizes](docs/MaxBufferSizes.md) +- [MetadataStringified](docs/MetadataStringified.md) +- [MetadataStringifiedEntry](docs/MetadataStringifiedEntry.md) - [MultiArrayUDF](docs/MultiArrayUDF.md) - [NamespaceActions](docs/NamespaceActions.md) - [NonEmptyDomain](docs/NonEmptyDomain.md) diff --git a/src/tiledb/cloud/rest_api/__init__.py b/src/tiledb/cloud/rest_api/__init__.py index ce5e79089..168ddb590 100644 --- a/src/tiledb/cloud/rest_api/__init__.py +++ b/src/tiledb/cloud/rest_api/__init__.py @@ -19,6 +19,7 @@ # import apis into sdk package from tiledb.cloud.rest_api.api.array_api import ArrayApi from tiledb.cloud.rest_api.api.array_tasks_api import ArrayTasksApi +from tiledb.cloud.rest_api.api.assets_api import AssetsApi from tiledb.cloud.rest_api.api.favorites_api import FavoritesApi from tiledb.cloud.rest_api.api.files_api import FilesApi from tiledb.cloud.rest_api.api.groups_api import GroupsApi @@ -76,7 +77,11 @@ from tiledb.cloud.rest_api.models.array_task_type import ArrayTaskType from tiledb.cloud.rest_api.models.array_type import ArrayType from tiledb.cloud.rest_api.models.array_vacuum_request import ArrayVacuumRequest +from tiledb.cloud.rest_api.models.asset_backing_type import AssetBackingType +from tiledb.cloud.rest_api.models.asset_info import AssetInfo +from tiledb.cloud.rest_api.models.asset_list_response import AssetListResponse from tiledb.cloud.rest_api.models.asset_locations import AssetLocations +from tiledb.cloud.rest_api.models.asset_ownership_level import AssetOwnershipLevel from tiledb.cloud.rest_api.models.asset_type import AssetType from tiledb.cloud.rest_api.models.attribute import Attribute from tiledb.cloud.rest_api.models.attribute_buffer_header import AttributeBufferHeader @@ -141,6 +146,7 @@ from tiledb.cloud.rest_api.models.group_type_metadata_key import GroupTypeMetadataKey from tiledb.cloud.rest_api.models.group_update import GroupUpdate from tiledb.cloud.rest_api.models.inline_object import InlineObject +from tiledb.cloud.rest_api.models.inline_object1 import InlineObject1 from tiledb.cloud.rest_api.models.inline_response200 import InlineResponse200 from tiledb.cloud.rest_api.models.invitation import Invitation from tiledb.cloud.rest_api.models.invitation_array_share_email import ( @@ -160,6 +166,12 @@ from tiledb.cloud.rest_api.models.invitation_type import InvitationType from tiledb.cloud.rest_api.models.last_accessed_array import LastAccessedArray from tiledb.cloud.rest_api.models.layout import Layout +from tiledb.cloud.rest_api.models.load_array_schema_request import ( + LoadArraySchemaRequest, +) +from tiledb.cloud.rest_api.models.load_array_schema_response import ( + LoadArraySchemaResponse, +) from tiledb.cloud.rest_api.models.load_enumerations_request import ( LoadEnumerationsRequest, ) @@ -169,6 +181,10 @@ from tiledb.cloud.rest_api.models.ml_model_favorite import MLModelFavorite from tiledb.cloud.rest_api.models.ml_model_favorites_data import MLModelFavoritesData from tiledb.cloud.rest_api.models.max_buffer_sizes import MaxBufferSizes +from tiledb.cloud.rest_api.models.metadata_stringified import MetadataStringified +from tiledb.cloud.rest_api.models.metadata_stringified_entry import ( + MetadataStringifiedEntry, +) from tiledb.cloud.rest_api.models.multi_array_udf import MultiArrayUDF from tiledb.cloud.rest_api.models.namespace_actions import NamespaceActions from tiledb.cloud.rest_api.models.non_empty_domain import NonEmptyDomain diff --git a/src/tiledb/cloud/rest_api/api/__init__.py b/src/tiledb/cloud/rest_api/api/__init__.py index 318a0dfaf..a0e59ca86 100644 --- a/src/tiledb/cloud/rest_api/api/__init__.py +++ b/src/tiledb/cloud/rest_api/api/__init__.py @@ -5,6 +5,7 @@ # import apis into api package from tiledb.cloud.rest_api.api.array_api import ArrayApi from tiledb.cloud.rest_api.api.array_tasks_api import ArrayTasksApi +from tiledb.cloud.rest_api.api.assets_api import AssetsApi from tiledb.cloud.rest_api.api.favorites_api import FavoritesApi from tiledb.cloud.rest_api.api.files_api import FilesApi from tiledb.cloud.rest_api.api.groups_api import GroupsApi diff --git a/src/tiledb/cloud/rest_api/api/array_api.py b/src/tiledb/cloud/rest_api/api/array_api.py index 107b2a517..97453563d 100644 --- a/src/tiledb/cloud/rest_api/api/array_api.py +++ b/src/tiledb/cloud/rest_api/api/array_api.py @@ -236,6 +236,7 @@ def arrays_browser_owned_get(self, **kwargs): # noqa: E501 :param list[str] file_type: file_type to search for, more than one can be included :param list[str] exclude_file_type: file_type to exclude matching array in results, more than one can be included :param list[str] file_property: file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + :param bool with_metadata: include the metadata of the array :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -271,6 +272,7 @@ def arrays_browser_owned_get_with_http_info(self, **kwargs): # noqa: E501 :param list[str] file_type: file_type to search for, more than one can be included :param list[str] exclude_file_type: file_type to exclude matching array in results, more than one can be included :param list[str] file_property: file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + :param bool with_metadata: include the metadata of the array :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -299,6 +301,7 @@ def arrays_browser_owned_get_with_http_info(self, **kwargs): # noqa: E501 "file_type", "exclude_file_type", "file_property", + "with_metadata", ] all_params.extend( [ @@ -392,6 +395,13 @@ def arrays_browser_owned_get_with_http_info(self, **kwargs): # noqa: E501 ("file_property", local_var_params["file_property"]) ) # noqa: E501 collection_formats["file_property"] = "multi" # noqa: E501 + if ( + "with_metadata" in local_var_params + and local_var_params["with_metadata"] is not None + ): # noqa: E501 + query_params.append( + ("with_metadata", local_var_params["with_metadata"]) + ) # noqa: E501 header_params = {} @@ -589,6 +599,7 @@ def arrays_browser_public_get(self, **kwargs): # noqa: E501 :param list[str] file_type: file_type to search for, more than one can be included :param list[str] exclude_file_type: file_type to exclude matching array in results, more than one can be included :param list[str] file_property: file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + :param bool with_metadata: include the metadata of the array :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -624,6 +635,7 @@ def arrays_browser_public_get_with_http_info(self, **kwargs): # noqa: E501 :param list[str] file_type: file_type to search for, more than one can be included :param list[str] exclude_file_type: file_type to exclude matching array in results, more than one can be included :param list[str] file_property: file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included + :param bool with_metadata: include the metadata of the array :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -652,6 +664,7 @@ def arrays_browser_public_get_with_http_info(self, **kwargs): # noqa: E501 "file_type", "exclude_file_type", "file_property", + "with_metadata", ] all_params.extend( [ @@ -745,6 +758,13 @@ def arrays_browser_public_get_with_http_info(self, **kwargs): # noqa: E501 ("file_property", local_var_params["file_property"]) ) # noqa: E501 collection_formats["file_property"] = "multi" # noqa: E501 + if ( + "with_metadata" in local_var_params + and local_var_params["with_metadata"] is not None + ): # noqa: E501 + query_params.append( + ("with_metadata", local_var_params["with_metadata"]) + ) # noqa: E501 header_params = {} @@ -943,6 +963,7 @@ def arrays_browser_shared_get(self, **kwargs): # noqa: E501 :param list[str] exclude_file_type: file_type to exclude matching array in results, more than one can be included :param list[str] file_property: file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included :param list[str] shared_to: namespaces to filter results of where there arrays were shared to + :param bool with_metadata: include the metadata of the array :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -979,6 +1000,7 @@ def arrays_browser_shared_get_with_http_info(self, **kwargs): # noqa: E501 :param list[str] exclude_file_type: file_type to exclude matching array in results, more than one can be included :param list[str] file_property: file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included :param list[str] shared_to: namespaces to filter results of where there arrays were shared to + :param bool with_metadata: include the metadata of the array :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1008,6 +1030,7 @@ def arrays_browser_shared_get_with_http_info(self, **kwargs): # noqa: E501 "exclude_file_type", "file_property", "shared_to", + "with_metadata", ] all_params.extend( [ @@ -1109,6 +1132,13 @@ def arrays_browser_shared_get_with_http_info(self, **kwargs): # noqa: E501 ("shared_to", local_var_params["shared_to"]) ) # noqa: E501 collection_formats["shared_to"] = "multi" # noqa: E501 + if ( + "with_metadata" in local_var_params + and local_var_params["with_metadata"] is not None + ): # noqa: E501 + query_params.append( + ("with_metadata", local_var_params["with_metadata"]) + ) # noqa: E501 header_params = {} @@ -3849,6 +3879,7 @@ def get_arrays_in_namespace(self, namespace, **kwargs): # noqa: E501 :param async_req bool: execute request asynchronously :param str namespace: namespace array is in (an organization name or user's username) (required) + :param bool with_metadata: include the metadata of the arrays :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -3876,6 +3907,7 @@ def get_arrays_in_namespace_with_http_info(self, namespace, **kwargs): # noqa: :param async_req bool: execute request asynchronously :param str namespace: namespace array is in (an organization name or user's username) (required) + :param bool with_metadata: include the metadata of the arrays :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -3892,7 +3924,7 @@ def get_arrays_in_namespace_with_http_info(self, namespace, **kwargs): # noqa: local_var_params = locals() - all_params = ["namespace"] + all_params = ["namespace", "with_metadata"] all_params.extend( [ "async_req", @@ -3926,6 +3958,13 @@ def get_arrays_in_namespace_with_http_info(self, namespace, **kwargs): # noqa: path_params["namespace"] = local_var_params["namespace"] # noqa: E501 query_params = [] + if ( + "with_metadata" in local_var_params + and local_var_params["with_metadata"] is not None + ): # noqa: E501 + query_params.append( + ("with_metadata", local_var_params["with_metadata"]) + ) # noqa: E501 header_params = {} @@ -4214,6 +4253,164 @@ def get_last_accessed_arrays_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats, ) + def load_array_schema( + self, namespace, array, load_array_schema_request, **kwargs + ): # noqa: E501 + """load_array_schema # noqa: E501 + + request to get the array 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.load_array_schema(namespace, array, load_array_schema_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str namespace: namespace array is in (an organization name or user's username) (required) + :param str array: name/uri of array that is url-encoded (required) + :param LoadArraySchemaRequest load_array_schema_request: Load Array Schema Request (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _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: LoadArraySchemaResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs["_return_http_data_only"] = True + return self.load_array_schema_with_http_info( + namespace, array, load_array_schema_request, **kwargs + ) # noqa: E501 + + def load_array_schema_with_http_info( + self, namespace, array, load_array_schema_request, **kwargs + ): # noqa: E501 + """load_array_schema # noqa: E501 + + request to get the array 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.load_array_schema_with_http_info(namespace, array, load_array_schema_request, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str namespace: namespace array is in (an organization name or user's username) (required) + :param str array: name/uri of array that is url-encoded (required) + :param LoadArraySchemaRequest load_array_schema_request: Load Array Schema Request (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _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(LoadArraySchemaResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ["namespace", "array", "load_array_schema_request"] + all_params.extend( + [ + "async_req", + "_return_http_data_only", + "_preload_content", + "_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 load_array_schema" % key + ) + local_var_params[key] = val + del local_var_params["kwargs"] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and ( + "namespace" not in local_var_params + or local_var_params["namespace"] is None # noqa: E501 + ): # noqa: E501 + raise ApiValueError( + "Missing the required parameter `namespace` when calling `load_array_schema`" + ) # noqa: E501 + # verify the required parameter 'array' is set + if self.api_client.client_side_validation and ( + "array" not in local_var_params + or local_var_params["array"] is None # noqa: E501 + ): # noqa: E501 + raise ApiValueError( + "Missing the required parameter `array` when calling `load_array_schema`" + ) # noqa: E501 + # verify the required parameter 'load_array_schema_request' is set + if self.api_client.client_side_validation and ( + "load_array_schema_request" not in local_var_params + or local_var_params["load_array_schema_request"] is None # noqa: E501 + ): # noqa: E501 + raise ApiValueError( + "Missing the required parameter `load_array_schema_request` when calling `load_array_schema`" + ) # noqa: E501 + + collection_formats = {} + + path_params = {} + if "namespace" in local_var_params: + path_params["namespace"] = local_var_params["namespace"] # noqa: E501 + if "array" in local_var_params: + path_params["array"] = local_var_params["array"] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if "load_array_schema_request" in local_var_params: + body_params = local_var_params["load_array_schema_request"] + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) # noqa: E501 + + # HTTP header `Content-Type` + header_params[ + "Content-Type" + ] = self.api_client.select_header_content_type( # noqa: E501 + ["application/json"] + ) # noqa: E501 + + # Authentication setting + auth_settings = ["ApiKeyAuth", "BasicAuth"] # noqa: E501 + + return self.api_client.call_api( + "/v1/arrays/{namespace}/{array}/schema", + "POST", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="LoadArraySchemaResponse", # 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 load_enumerations( self, namespace, array, load_enumerations_request, **kwargs ): # noqa: E501 diff --git a/src/tiledb/cloud/rest_api/api/assets_api.py b/src/tiledb/cloud/rest_api/api/assets_api.py new file mode 100644 index 000000000..465733004 --- /dev/null +++ b/src/tiledb/cloud/rest_api/api/assets_api.py @@ -0,0 +1,376 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tiledb.cloud.rest_api.api_client import ApiClient +from tiledb.cloud.rest_api.exceptions import ApiTypeError # noqa: F401 +from tiledb.cloud.rest_api.exceptions import ApiValueError # noqa: F401 + + +class AssetsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_assets(self, namespace, **kwargs): # noqa: E501 + """list_assets # noqa: E501 + + List assets in a namespace # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_assets(namespace, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str namespace: namespace (required) + :param str asset_type: asset_type to filter to + :param str ownership_level: ownership_level to filter to (owned, shared) + :param str depth: depth of assets to be returned + :param str search: search string + :param int page: pagination offset + :param int per_page: pagination limit + :param str order_by: order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. + :param str expand: expansion option for the AssetInfo object to be added to the response + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _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: AssetListResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs["_return_http_data_only"] = True + return self.list_assets_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_assets_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_assets # noqa: E501 + + List assets in a namespace # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_assets_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str namespace: namespace (required) + :param str asset_type: asset_type to filter to + :param str ownership_level: ownership_level to filter to (owned, shared) + :param str depth: depth of assets to be returned + :param str search: search string + :param int page: pagination offset + :param int per_page: pagination limit + :param str order_by: order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. + :param str expand: expansion option for the AssetInfo object to be added to the response + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _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(AssetListResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + "namespace", + "asset_type", + "ownership_level", + "depth", + "search", + "page", + "per_page", + "order_by", + "expand", + ] + all_params.extend( + [ + "async_req", + "_return_http_data_only", + "_preload_content", + "_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 list_assets" % key + ) + local_var_params[key] = val + del local_var_params["kwargs"] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and ( + "namespace" not in local_var_params + or local_var_params["namespace"] is None # noqa: E501 + ): # noqa: E501 + raise ApiValueError( + "Missing the required parameter `namespace` when calling `list_assets`" + ) # noqa: E501 + + collection_formats = {} + + path_params = {} + if "namespace" in local_var_params: + path_params["namespace"] = local_var_params["namespace"] # noqa: E501 + + query_params = [] + if ( + "asset_type" in local_var_params + and local_var_params["asset_type"] is not None + ): # noqa: E501 + query_params.append( + ("asset_type", local_var_params["asset_type"]) + ) # noqa: E501 + if ( + "ownership_level" in local_var_params + and local_var_params["ownership_level"] is not None + ): # noqa: E501 + query_params.append( + ("ownership_level", local_var_params["ownership_level"]) + ) # noqa: E501 + if ( + "depth" in local_var_params and local_var_params["depth"] is not None + ): # noqa: E501 + query_params.append(("depth", local_var_params["depth"])) # noqa: E501 + if ( + "search" in local_var_params and local_var_params["search"] is not None + ): # noqa: E501 + query_params.append(("search", local_var_params["search"])) # noqa: E501 + if ( + "page" in local_var_params and local_var_params["page"] is not None + ): # noqa: E501 + query_params.append(("page", local_var_params["page"])) # noqa: E501 + if ( + "per_page" in local_var_params and local_var_params["per_page"] is not None + ): # noqa: E501 + query_params.append( + ("per_page", local_var_params["per_page"]) + ) # noqa: E501 + if ( + "order_by" in local_var_params and local_var_params["order_by"] is not None + ): # noqa: E501 + query_params.append( + ("order_by", local_var_params["order_by"]) + ) # noqa: E501 + if ( + "expand" in local_var_params and local_var_params["expand"] is not None + ): # noqa: E501 + query_params.append(("expand", local_var_params["expand"])) # 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"] + ) # noqa: E501 + + # Authentication setting + auth_settings = ["ApiKeyAuth", "BasicAuth"] # noqa: E501 + + return self.api_client.call_api( + "/v1/assets/{namespace}", + "GET", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="AssetListResponse", # 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 list_public_assets(self, **kwargs): # noqa: E501 + """list_public_assets # noqa: E501 + + List public assets # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_public_assets(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str asset_type: asset_type to filter to + :param str depth: depth of assets to be returned + :param str search: search string + :param int page: pagination offset + :param int per_page: pagination limit + :param str order_by: order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _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: AssetListResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs["_return_http_data_only"] = True + return self.list_public_assets_with_http_info(**kwargs) # noqa: E501 + + def list_public_assets_with_http_info(self, **kwargs): # noqa: E501 + """list_public_assets # noqa: E501 + + List public assets # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_public_assets_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str asset_type: asset_type to filter to + :param str depth: depth of assets to be returned + :param str search: search string + :param int page: pagination offset + :param int per_page: pagination limit + :param str order_by: order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _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(AssetListResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ["asset_type", "depth", "search", "page", "per_page", "order_by"] + all_params.extend( + [ + "async_req", + "_return_http_data_only", + "_preload_content", + "_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 list_public_assets" % key + ) + local_var_params[key] = val + del local_var_params["kwargs"] + + collection_formats = {} + + path_params = {} + + query_params = [] + if ( + "asset_type" in local_var_params + and local_var_params["asset_type"] is not None + ): # noqa: E501 + query_params.append( + ("asset_type", local_var_params["asset_type"]) + ) # noqa: E501 + if ( + "depth" in local_var_params and local_var_params["depth"] is not None + ): # noqa: E501 + query_params.append(("depth", local_var_params["depth"])) # noqa: E501 + if ( + "search" in local_var_params and local_var_params["search"] is not None + ): # noqa: E501 + query_params.append(("search", local_var_params["search"])) # noqa: E501 + if ( + "page" in local_var_params and local_var_params["page"] is not None + ): # noqa: E501 + query_params.append(("page", local_var_params["page"])) # noqa: E501 + if ( + "per_page" in local_var_params and local_var_params["per_page"] is not None + ): # noqa: E501 + query_params.append( + ("per_page", local_var_params["per_page"]) + ) # noqa: E501 + if ( + "order_by" in local_var_params and local_var_params["order_by"] is not None + ): # noqa: E501 + query_params.append( + ("order_by", local_var_params["order_by"]) + ) # 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"] + ) # noqa: E501 + + # Authentication setting + auth_settings = ["ApiKeyAuth", "BasicAuth"] # noqa: E501 + + return self.api_client.call_api( + "/v1/public_assets", + "GET", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="AssetListResponse", # 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, + ) diff --git a/src/tiledb/cloud/rest_api/api/groups_api.py b/src/tiledb/cloud/rest_api/api/groups_api.py index e4acee0bd..fbfa50503 100644 --- a/src/tiledb/cloud/rest_api/api/groups_api.py +++ b/src/tiledb/cloud/rest_api/api/groups_api.py @@ -1629,6 +1629,7 @@ def list_owned_groups(self, **kwargs): # noqa: E501 :param list[str] exclude_tag: tags to exclude matching array in results, more than one can be included :param bool flat: if true, ignores the nesting of groups and searches all of them :param str parent: search only the children of the groups with this uuid + :param bool with_metadata: include the metadata of the groups :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1664,6 +1665,7 @@ def list_owned_groups_with_http_info(self, **kwargs): # noqa: E501 :param list[str] exclude_tag: tags to exclude matching array in results, more than one can be included :param bool flat: if true, ignores the nesting of groups and searches all of them :param str parent: search only the children of the groups with this uuid + :param bool with_metadata: include the metadata of the groups :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1692,6 +1694,7 @@ def list_owned_groups_with_http_info(self, **kwargs): # noqa: E501 "exclude_tag", "flat", "parent", + "with_metadata", ] all_params.extend( [ @@ -1776,6 +1779,13 @@ def list_owned_groups_with_http_info(self, **kwargs): # noqa: E501 "parent" in local_var_params and local_var_params["parent"] is not None ): # noqa: E501 query_params.append(("parent", local_var_params["parent"])) # noqa: E501 + if ( + "with_metadata" in local_var_params + and local_var_params["with_metadata"] is not None + ): # noqa: E501 + query_params.append( + ("with_metadata", local_var_params["with_metadata"]) + ) # noqa: E501 header_params = {} @@ -1832,6 +1842,7 @@ def list_public_groups(self, **kwargs): # noqa: E501 :param list[str] exclude_tag: tags to exclude matching array in results, more than one can be included :param bool flat: if true, ignores the nesting of groups and searches all of them :param str parent: search only the children of the groups with this uuid + :param bool with_metadata: include the metadata of the groups :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1867,6 +1878,7 @@ def list_public_groups_with_http_info(self, **kwargs): # noqa: E501 :param list[str] exclude_tag: tags to exclude matching array in results, more than one can be included :param bool flat: if true, ignores the nesting of groups and searches all of them :param str parent: search only the children of the groups with this uuid + :param bool with_metadata: include the metadata of the groups :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -1895,6 +1907,7 @@ def list_public_groups_with_http_info(self, **kwargs): # noqa: E501 "exclude_tag", "flat", "parent", + "with_metadata", ] all_params.extend( [ @@ -1979,6 +1992,13 @@ def list_public_groups_with_http_info(self, **kwargs): # noqa: E501 "parent" in local_var_params and local_var_params["parent"] is not None ): # noqa: E501 query_params.append(("parent", local_var_params["parent"])) # noqa: E501 + if ( + "with_metadata" in local_var_params + and local_var_params["with_metadata"] is not None + ): # noqa: E501 + query_params.append( + ("with_metadata", local_var_params["with_metadata"]) + ) # noqa: E501 header_params = {} @@ -2036,6 +2056,7 @@ def list_shared_groups(self, **kwargs): # noqa: E501 :param bool flat: if true, ignores the nesting of groups and searches all of them :param str parent: search only the children of the groups with this uuid :param list[str] shared_to: namespaces to filter results of where there groups were shared to + :param bool with_metadata: include the metadata of the groups :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -2072,6 +2093,7 @@ def list_shared_groups_with_http_info(self, **kwargs): # noqa: E501 :param bool flat: if true, ignores the nesting of groups and searches all of them :param str parent: search only the children of the groups with this uuid :param list[str] shared_to: namespaces to filter results of where there groups were shared to + :param bool with_metadata: include the metadata of the groups :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -2101,6 +2123,7 @@ def list_shared_groups_with_http_info(self, **kwargs): # noqa: E501 "flat", "parent", "shared_to", + "with_metadata", ] all_params.extend( [ @@ -2193,6 +2216,13 @@ def list_shared_groups_with_http_info(self, **kwargs): # noqa: E501 ("shared_to", local_var_params["shared_to"]) ) # noqa: E501 collection_formats["shared_to"] = "multi" # noqa: E501 + if ( + "with_metadata" in local_var_params + and local_var_params["with_metadata"] is not None + ): # noqa: E501 + query_params.append( + ("with_metadata", local_var_params["with_metadata"]) + ) # noqa: E501 header_params = {} diff --git a/src/tiledb/cloud/rest_api/api/invitation_api.py b/src/tiledb/cloud/rest_api/api/invitation_api.py index 4cf10f236..117bd7658 100644 --- a/src/tiledb/cloud/rest_api/api/invitation_api.py +++ b/src/tiledb/cloud/rest_api/api/invitation_api.py @@ -1389,7 +1389,7 @@ def share_payment(self, namespace, **kwargs): # noqa: E501 :param async_req bool: execute request asynchronously :param str namespace: name or UUID of namespace sharing their payment info (required) - :param object email_invite: Recipients of the invitation. These may only be namespaces, not email addresses. + :param InlineObject1 email_invite: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -1415,7 +1415,7 @@ def share_payment_with_http_info(self, namespace, **kwargs): # noqa: E501 :param async_req bool: execute request asynchronously :param str namespace: name or UUID of namespace sharing their payment info (required) - :param object email_invite: Recipients of the invitation. These may only be namespaces, not email addresses. + :param InlineObject1 email_invite: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will diff --git a/src/tiledb/cloud/rest_api/docs/ArrayApi.md b/src/tiledb/cloud/rest_api/docs/ArrayApi.md index 7feb7be20..ee5164996 100644 --- a/src/tiledb/cloud/rest_api/docs/ArrayApi.md +++ b/src/tiledb/cloud/rest_api/docs/ArrayApi.md @@ -31,6 +31,7 @@ All URIs are relative to _http://localhost_ | [**get_arrays_in_namespace**](ArrayApi.md#get_arrays_in_namespace) | **GET** /v1/arrays/{namespace} | | [**get_fragment_end_timestamp**](ArrayApi.md#get_fragment_end_timestamp) | **GET** /v1/arrays/{namespace}/{array}/fragment_end_timestamp | | [**get_last_accessed_arrays**](ArrayApi.md#get_last_accessed_arrays) | **GET** /v1/arrays/last_accessed | +| [**load_array_schema**](ArrayApi.md#load_array_schema) | **POST** /v1/arrays/{namespace}/{array}/schema | | [**load_enumerations**](ArrayApi.md#load_enumerations) | **POST** /v1/arrays/{namespace}/{array}/enumerations | | [**register_array**](ArrayApi.md#register_array) | **POST** /v1/arrays/{namespace}/{array}/register | | [**share_array**](ArrayApi.md#share_array) | **PATCH** /v1/arrays/{namespace}/{array}/share | @@ -191,7 +192,7 @@ has_task_id = True # bool | Excludes activity log results that do not contain an # **arrays_browser_owned_get** -> ArrayBrowserData arrays_browser_owned_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property) +> ArrayBrowserData arrays_browser_owned_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, with_metadata=with_metadata) Fetch a list of all arrays that are owned directly by user or user's organizations @@ -247,9 +248,10 @@ exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching arr file_type = ['file_type_example'] # list[str] | file_type to search for, more than one can be included (optional) exclude_file_type = ['exclude_file_type_example'] # list[str] | file_type to exclude matching array in results, more than one can be included (optional) file_property = ['file_property_example'] # list[str] | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) +with_metadata = True # bool | include the metadata of the array (optional) try: - api_response = api_instance.arrays_browser_owned_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property) + api_response = api_instance.arrays_browser_owned_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling ArrayApi->arrays_browser_owned_get: %s\n" % e) @@ -305,9 +307,10 @@ exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching arr file_type = ['file_type_example'] # list[str] | file_type to search for, more than one can be included (optional) exclude_file_type = ['exclude_file_type_example'] # list[str] | file_type to exclude matching array in results, more than one can be included (optional) file_property = ['file_property_example'] # list[str] | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) +with_metadata = True # bool | include the metadata of the array (optional) try: - api_response = api_instance.arrays_browser_owned_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property) + api_response = api_instance.arrays_browser_owned_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling ArrayApi->arrays_browser_owned_get: %s\n" % e) @@ -328,6 +331,7 @@ file_property = ['file_property_example'] # list[str] | file_property key-value | **file_type** | [**list[str]**](str.md) | file_type to search for, more than one can be included | [optional] | | **exclude_file_type** | [**list[str]**](str.md) | file_type to exclude matching array in results, more than one can be included | [optional] | | **file_property** | [**list[str]**](str.md) | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included | [optional] | +| **with_metadata** | **bool** | include the metadata of the array | [optional] | ### Return type @@ -493,7 +497,7 @@ file_property = ['file_property_example'] # list[str] | file_property key-value # **arrays_browser_public_get** -> ArrayBrowserData arrays_browser_public_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property) +> ArrayBrowserData arrays_browser_public_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, with_metadata=with_metadata) Fetch a list of all arrays that have been shared publically @@ -549,9 +553,10 @@ exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching arr file_type = ['file_type_example'] # list[str] | file_type to search for, more than one can be included (optional) exclude_file_type = ['exclude_file_type_example'] # list[str] | file_type to exclude matching array in results, more than one can be included (optional) file_property = ['file_property_example'] # list[str] | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) +with_metadata = True # bool | include the metadata of the array (optional) try: - api_response = api_instance.arrays_browser_public_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property) + api_response = api_instance.arrays_browser_public_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling ArrayApi->arrays_browser_public_get: %s\n" % e) @@ -607,9 +612,10 @@ exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching arr file_type = ['file_type_example'] # list[str] | file_type to search for, more than one can be included (optional) exclude_file_type = ['exclude_file_type_example'] # list[str] | file_type to exclude matching array in results, more than one can be included (optional) file_property = ['file_property_example'] # list[str] | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) +with_metadata = True # bool | include the metadata of the array (optional) try: - api_response = api_instance.arrays_browser_public_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property) + api_response = api_instance.arrays_browser_public_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling ArrayApi->arrays_browser_public_get: %s\n" % e) @@ -630,6 +636,7 @@ file_property = ['file_property_example'] # list[str] | file_property key-value | **file_type** | [**list[str]**](str.md) | file_type to search for, more than one can be included | [optional] | | **exclude_file_type** | [**list[str]**](str.md) | file_type to exclude matching array in results, more than one can be included | [optional] | | **file_property** | [**list[str]**](str.md) | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included | [optional] | +| **with_metadata** | **bool** | include the metadata of the array | [optional] | ### Return type @@ -795,7 +802,7 @@ file_property = ['file_property_example'] # list[str] | file_property key-value # **arrays_browser_shared_get** -> ArrayBrowserData arrays_browser_shared_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, shared_to=shared_to) +> ArrayBrowserData arrays_browser_shared_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, shared_to=shared_to, with_metadata=with_metadata) Fetch a list of all arrays that have been shared with the user @@ -852,9 +859,10 @@ file_type = ['file_type_example'] # list[str] | file_type to search for, more th exclude_file_type = ['exclude_file_type_example'] # list[str] | file_type to exclude matching array in results, more than one can be included (optional) file_property = ['file_property_example'] # list[str] | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) shared_to = ['shared_to_example'] # list[str] | namespaces to filter results of where there arrays were shared to (optional) +with_metadata = True # bool | include the metadata of the array (optional) try: - api_response = api_instance.arrays_browser_shared_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, shared_to=shared_to) + api_response = api_instance.arrays_browser_shared_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, shared_to=shared_to, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling ArrayApi->arrays_browser_shared_get: %s\n" % e) @@ -911,9 +919,10 @@ file_type = ['file_type_example'] # list[str] | file_type to search for, more th exclude_file_type = ['exclude_file_type_example'] # list[str] | file_type to exclude matching array in results, more than one can be included (optional) file_property = ['file_property_example'] # list[str] | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included (optional) shared_to = ['shared_to_example'] # list[str] | namespaces to filter results of where there arrays were shared to (optional) +with_metadata = True # bool | include the metadata of the array (optional) try: - api_response = api_instance.arrays_browser_shared_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, shared_to=shared_to) + api_response = api_instance.arrays_browser_shared_get(page=page, per_page=per_page, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, file_type=file_type, exclude_file_type=exclude_file_type, file_property=file_property, shared_to=shared_to, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling ArrayApi->arrays_browser_shared_get: %s\n" % e) @@ -935,6 +944,7 @@ shared_to = ['shared_to_example'] # list[str] | namespaces to filter results of | **exclude_file_type** | [**list[str]**](str.md) | file_type to exclude matching array in results, more than one can be included | [optional] | | **file_property** | [**list[str]**](str.md) | file_property key-value pair (comma separated, i.e. key,value) to search for, more than one can be included | [optional] | | **shared_to** | [**list[str]**](str.md) | namespaces to filter results of where there arrays were shared to | [optional] | +| **with_metadata** | **bool** | include the metadata of the array | [optional] | ### Return type @@ -3461,7 +3471,7 @@ array = 'array_example' # str | name/uri of array that is url-encoded # **get_arrays_in_namespace** -> list[ArrayInfo] get_arrays_in_namespace(namespace) +> list[ArrayInfo] get_arrays_in_namespace(namespace, with_metadata=with_metadata) get metadata on all arrays in a namespace @@ -3507,9 +3517,10 @@ with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tiledb.cloud.rest_api.ArrayApi(api_client) namespace = 'namespace_example' # str | namespace array is in (an organization name or user's username) +with_metadata = True # bool | include the metadata of the arrays (optional) try: - api_response = api_instance.get_arrays_in_namespace(namespace) + api_response = api_instance.get_arrays_in_namespace(namespace, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling ArrayApi->get_arrays_in_namespace: %s\n" % e) @@ -3555,9 +3566,10 @@ with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tiledb.cloud.rest_api.ArrayApi(api_client) namespace = 'namespace_example' # str | namespace array is in (an organization name or user's username) +with_metadata = True # bool | include the metadata of the arrays (optional) try: - api_response = api_instance.get_arrays_in_namespace(namespace) + api_response = api_instance.get_arrays_in_namespace(namespace, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling ArrayApi->get_arrays_in_namespace: %s\n" % e) @@ -3565,9 +3577,10 @@ with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: ### Parameters -| Name | Type | Description | Notes | -| ------------- | ------- | ------------------------------------------------------------------- | ----- | -| **namespace** | **str** | namespace array is in (an organization name or user's username) | +| Name | Type | Description | Notes | +| ----------------- | -------- | ------------------------------------------------------------------- | ---------- | +| **namespace** | **str** | namespace array is in (an organization name or user's username) | +| **with_metadata** | **bool** | include the metadata of the arrays | [optional] | ### Return type @@ -3858,6 +3871,146 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **load_array_schema** + +> LoadArraySchemaResponse load_array_schema(namespace, array, load_array_schema_request) + +request to get the array schema + +### Example + +- Api Key Authentication (ApiKeyAuth): + +```python +from __future__ import print_function +import time +import tiledb.cloud.rest_api +from tiledb.cloud.rest_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost", + api_key = { + 'X-TILEDB-REST-API-KEY': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-TILEDB-REST-API-KEY'] = 'Bearer' + +# Configure HTTP basic authorization: BasicAuth +configuration = tiledb.cloud.rest_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tiledb.cloud.rest_api.ArrayApi(api_client) + namespace = 'namespace_example' # str | namespace array is in (an organization name or user's username) +array = 'array_example' # str | name/uri of array that is url-encoded +load_array_schema_request = tiledb.cloud.rest_api.LoadArraySchemaRequest() # LoadArraySchemaRequest | Load Array Schema Request + + try: + api_response = api_instance.load_array_schema(namespace, array, load_array_schema_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling ArrayApi->load_array_schema: %s\n" % e) +``` + +- Basic Authentication (BasicAuth): + +```python +from __future__ import print_function +import time +import tiledb.cloud.rest_api +from tiledb.cloud.rest_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost", + api_key = { + 'X-TILEDB-REST-API-KEY': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-TILEDB-REST-API-KEY'] = 'Bearer' + +# Configure HTTP basic authorization: BasicAuth +configuration = tiledb.cloud.rest_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tiledb.cloud.rest_api.ArrayApi(api_client) + namespace = 'namespace_example' # str | namespace array is in (an organization name or user's username) +array = 'array_example' # str | name/uri of array that is url-encoded +load_array_schema_request = tiledb.cloud.rest_api.LoadArraySchemaRequest() # LoadArraySchemaRequest | Load Array Schema Request + + try: + api_response = api_instance.load_array_schema(namespace, array, load_array_schema_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling ArrayApi->load_array_schema: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| ----------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------- | ----- | +| **namespace** | **str** | namespace array is in (an organization name or user's username) | +| **array** | **str** | name/uri of array that is url-encoded | +| **load_array_schema_request** | [**LoadArraySchemaRequest**](LoadArraySchemaRequest.md) | Load Array Schema Request | + +### Return type + +[**LoadArraySchemaResponse**](LoadArraySchemaResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +| ----------- | ------------------------------------------------------------------- | ---------------- | +| **200** | array schemas returned successfully | - | +| **404** | Array does not exist or user does not have permissions to access it | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **load_enumerations** > LoadEnumerationsResponse load_enumerations(namespace, array, load_enumerations_request) diff --git a/src/tiledb/cloud/rest_api/docs/ArrayConsolidationRequest.md b/src/tiledb/cloud/rest_api/docs/ArrayConsolidationRequest.md index ce4698147..11a70d861 100644 --- a/src/tiledb/cloud/rest_api/docs/ArrayConsolidationRequest.md +++ b/src/tiledb/cloud/rest_api/docs/ArrayConsolidationRequest.md @@ -4,8 +4,9 @@ Request to consolidate an array ## Properties -| Name | Type | Description | Notes | -| ---------- | ----------------------------------- | ----------- | ---------- | -| **config** | [**TileDBConfig**](TileDBConfig.md) | | [optional] | +| Name | Type | Description | Notes | +| ------------- | ----------------------------------- | --------------------------------------------- | ---------- | +| **config** | [**TileDBConfig**](TileDBConfig.md) | | [optional] | +| **fragments** | **list[str]** | list of fragments in the array to consolidate | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/ArrayInfo.md b/src/tiledb/cloud/rest_api/docs/ArrayInfo.md index f14e17000..a43ec2496 100644 --- a/src/tiledb/cloud/rest_api/docs/ArrayInfo.md +++ b/src/tiledb/cloud/rest_api/docs/ArrayInfo.md @@ -4,32 +4,34 @@ metadata of an array ## Properties -| Name | Type | Description | Notes | -| --------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------- | --------------------- | -| **id** | **str** | unique ID of registered array | [optional] | -| **file_type** | [**FileType**](FileType.md) | | [optional] | -| **file_properties** | **dict(str, str)** | map of file properties created for this array | [optional] | -| **uri** | **str** | uri of array | [optional] | -| **namespace** | **str** | namespace array is in | [optional] | -| **size** | **float** | size in bytes of array | [optional] | -| **last_accessed** | **datetime** | Datetime array was last accessed in UTC | [optional] | -| **description** | **str** | description of array | [optional] | -| **name** | **str** | name of array | [optional] | -| **allowed_actions** | [**list[ArrayActions]**](ArrayActions.md) | list of actions user is allowed to do on this array | [optional] | -| **pricing** | [**list[Pricing]**](Pricing.md) | list of pricing created for this array | [optional] | -| **subscriptions** | [**list[Subscription]**](Subscription.md) | list of subscriptions created for this array | [optional] | -| **logo** | **str** | logo (base64 encoded) for the array. Optional | [optional] | -| **access_credentials_name** | **str** | the name of the access credentials to use. if unset, the default credentials will be used | [optional] | -| **type** | [**ArrayType**](ArrayType.md) | | [optional] | -| **share_count** | **float** | number of unique namespaces this array is shared with | [optional] | -| **public_share** | **bool** | Suggests if the array was shared to public by owner | [optional] | -| **namespace_subscribed** | **bool** | Depends on the namespace asking, denotes the existence of subscription of namespace to this array | [optional] [readonly] | -| **tiledb_uri** | **str** | uri for access through TileDB cloud | [optional] | -| **tags** | **list[str]** | optional tags for array | [optional] | -| **license_id** | **str** | License identifier from SPDX License List or Custom | [optional] | -| **license_text** | **str** | License text | [optional] | -| **read_only** | **bool** | Suggests if the array is in read_only mode | [optional] | -| **is_favorite** | **bool** | Indicates whether the array is in user favorites | [optional] | -| **created_at** | **datetime** | Datetime array was registered with tiledb | [optional] | +| Name | Type | Description | Notes | +| --------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | +| **id** | **str** | unique ID of registered array | [optional] | +| **file_type** | [**FileType**](FileType.md) | | [optional] | +| **file_properties** | **dict(str, str)** | map of file properties created for this array | [optional] | +| **uri** | **str** | uri of array | [optional] | +| **namespace** | **str** | namespace array is in | [optional] | +| **size** | **float** | size in bytes of array | [optional] | +| **last_accessed** | **datetime** | Datetime array was last accessed in UTC | [optional] | +| **description** | **str** | description of array | [optional] | +| **name** | **str** | name of array | [optional] | +| **allowed_actions** | [**list[ArrayActions]**](ArrayActions.md) | list of actions user is allowed to do on this array | [optional] | +| **pricing** | [**list[Pricing]**](Pricing.md) | list of pricing created for this array | [optional] | +| **subscriptions** | [**list[Subscription]**](Subscription.md) | list of subscriptions created for this array | [optional] | +| **logo** | **str** | logo (base64 encoded) for the array. Optional | [optional] | +| **access_credentials_name** | **str** | the name of the access credentials to use. if unset, the default credentials will be used | [optional] | +| **type** | [**ArrayType**](ArrayType.md) | | [optional] | +| **share_count** | **float** | number of unique namespaces this array is shared with | [optional] | +| **public_share** | **bool** | Suggests if the array was shared to public by owner | [optional] | +| **namespace_subscribed** | **bool** | Depends on the namespace asking, denotes the existence of subscription of namespace to this array | [optional] [readonly] | +| **tiledb_uri** | **str** | uri for access through TileDB cloud | [optional] | +| **tags** | **list[str]** | optional tags for array | [optional] | +| **license_id** | **str** | License identifier from SPDX License List or Custom | [optional] | +| **license_text** | **str** | License text | [optional] | +| **read_only** | **bool** | Suggests if the array is in read_only mode | [optional] | +| **is_favorite** | **bool** | Indicates whether the array is in user favorites | [optional] | +| **created_at** | **datetime** | Datetime array was registered with tiledb | [optional] | +| **created_by** | **str** | The user who created the array, if known. | [optional] | +| **metadata** | [**list[MetadataStringifiedEntry]**](MetadataStringifiedEntry.md) | Contains the metadata of the array. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/ArrayTask.md b/src/tiledb/cloud/rest_api/docs/ArrayTask.md index cf529be85..7991e48f6 100644 --- a/src/tiledb/cloud/rest_api/docs/ArrayTask.md +++ b/src/tiledb/cloud/rest_api/docs/ArrayTask.md @@ -35,5 +35,7 @@ Synchronous Task to Run | **result_format** | [**ResultFormat**](ResultFormat.md) | | [optional] | | **task_graph_uuid** | **str** | If set, the ID of the log for the task graph that this was part of. | [optional] | | **client_node_uuid** | **str** | If set, the client-defined ID of the node within this task's graph. | [optional] | +| **cloud_provider** | **str** | The name of the cloud provider where this task executed. | [optional] | +| **cloud_region** | **str** | The region of the cloud provider where this task executed. | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/AssetBackingType.md b/src/tiledb/cloud/rest_api/docs/AssetBackingType.md new file mode 100644 index 000000000..edb7de600 --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/AssetBackingType.md @@ -0,0 +1,10 @@ +# AssetBackingType + +The technology that an asset is backed by + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/AssetInfo.md b/src/tiledb/cloud/rest_api/docs/AssetInfo.md new file mode 100644 index 000000000..e4c003a8b --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/AssetInfo.md @@ -0,0 +1,20 @@ +# AssetInfo + +metadata of an asset + +## Properties + +| Name | Type | Description | Notes | +| ------------------------- | ------------------------------------------------- | ---------------------------------------------- | --------------------- | +| **uuid** | **str** | unique ID of a registered asset | [optional] | +| **asset_type** | [**AssetType**](AssetType.md) | | [optional] | +| **asset_backing_type** | [**AssetBackingType**](AssetBackingType.md) | | [optional] | +| **asset_ownership_level** | [**AssetOwnershipLevel**](AssetOwnershipLevel.md) | | [optional] | +| **namespace_name** | **str** | namespace_name that the asset is registered to | [optional] | +| **namespace_uuid** | **str** | namespace_uuid that the asset is registered to | [optional] | +| **name** | **str** | name of asset | [optional] | +| **mime_type** | **str** | mime type of the asset | [optional] | +| **created_at** | **datetime** | Time when the asset was created (rfc3339) | [optional] [readonly] | +| **metadata** | [**MetadataStringified**](MetadataStringified.md) | | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/AssetListResponse.md b/src/tiledb/cloud/rest_api/docs/AssetListResponse.md new file mode 100644 index 000000000..aacb587bf --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/AssetListResponse.md @@ -0,0 +1,12 @@ +# AssetListResponse + +Asset associated with a TileDB Cloud account + +## Properties + +| Name | Type | Description | Notes | +| ----------------------- | ----------------------------------------------- | -------------------------------- | ---------- | +| **data** | [**list[AssetInfo]**](AssetInfo.md) | asset information for each asset | [optional] | +| **pagination_metadata** | [**PaginationMetadata**](PaginationMetadata.md) | | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/AssetOwnershipLevel.md b/src/tiledb/cloud/rest_api/docs/AssetOwnershipLevel.md new file mode 100644 index 000000000..a44309b4e --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/AssetOwnershipLevel.md @@ -0,0 +1,10 @@ +# AssetOwnershipLevel + +The ownership level of the asset + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/AssetsApi.md b/src/tiledb/cloud/rest_api/docs/AssetsApi.md new file mode 100644 index 000000000..245f5ffd6 --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/AssetsApi.md @@ -0,0 +1,313 @@ +# tiledb.cloud.rest_api.AssetsApi + +All URIs are relative to _http://localhost_ + +| Method | HTTP request | Description | +| --------------------------------------------------------- | ------------------------------ | ----------- | +| [**list_assets**](AssetsApi.md#list_assets) | **GET** /v1/assets/{namespace} | +| [**list_public_assets**](AssetsApi.md#list_public_assets) | **GET** /v1/public_assets | + +# **list_assets** + +> AssetListResponse list_assets(namespace, asset_type=asset_type, ownership_level=ownership_level, depth=depth, search=search, page=page, per_page=per_page, order_by=order_by, expand=expand) + +List assets in a namespace + +### Example + +- Api Key Authentication (ApiKeyAuth): + +```python +from __future__ import print_function +import time +import tiledb.cloud.rest_api +from tiledb.cloud.rest_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost", + api_key = { + 'X-TILEDB-REST-API-KEY': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-TILEDB-REST-API-KEY'] = 'Bearer' + +# Configure HTTP basic authorization: BasicAuth +configuration = tiledb.cloud.rest_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tiledb.cloud.rest_api.AssetsApi(api_client) + namespace = 'namespace_example' # str | namespace +asset_type = 'asset_type_example' # str | asset_type to filter to (optional) +ownership_level = 'ownership_level_example' # str | ownership_level to filter to (owned, shared) (optional) +depth = 'depth_example' # str | depth of assets to be returned (optional) +search = 'search_example' # str | search string (optional) +page = 56 # int | pagination offset (optional) +per_page = 56 # int | pagination limit (optional) +order_by = 'order_by_example' # str | order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) +expand = 'expand_example' # str | expansion option for the AssetInfo object to be added to the response (optional) + + try: + api_response = api_instance.list_assets(namespace, asset_type=asset_type, ownership_level=ownership_level, depth=depth, search=search, page=page, per_page=per_page, order_by=order_by, expand=expand) + pprint(api_response) + except ApiException as e: + print("Exception when calling AssetsApi->list_assets: %s\n" % e) +``` + +- Basic Authentication (BasicAuth): + +```python +from __future__ import print_function +import time +import tiledb.cloud.rest_api +from tiledb.cloud.rest_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost", + api_key = { + 'X-TILEDB-REST-API-KEY': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-TILEDB-REST-API-KEY'] = 'Bearer' + +# Configure HTTP basic authorization: BasicAuth +configuration = tiledb.cloud.rest_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tiledb.cloud.rest_api.AssetsApi(api_client) + namespace = 'namespace_example' # str | namespace +asset_type = 'asset_type_example' # str | asset_type to filter to (optional) +ownership_level = 'ownership_level_example' # str | ownership_level to filter to (owned, shared) (optional) +depth = 'depth_example' # str | depth of assets to be returned (optional) +search = 'search_example' # str | search string (optional) +page = 56 # int | pagination offset (optional) +per_page = 56 # int | pagination limit (optional) +order_by = 'order_by_example' # str | order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) +expand = 'expand_example' # str | expansion option for the AssetInfo object to be added to the response (optional) + + try: + api_response = api_instance.list_assets(namespace, asset_type=asset_type, ownership_level=ownership_level, depth=depth, search=search, page=page, per_page=per_page, order_by=order_by, expand=expand) + pprint(api_response) + except ApiException as e: + print("Exception when calling AssetsApi->list_assets: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| **namespace** | **str** | namespace | +| **asset_type** | **str** | asset_type to filter to | [optional] | +| **ownership_level** | **str** | ownership_level to filter to (owned, shared) | [optional] | +| **depth** | **str** | depth of assets to be returned | [optional] | +| **search** | **str** | search string | [optional] | +| **page** | **int** | pagination offset | [optional] | +| **per_page** | **int** | pagination limit | [optional] | +| **order_by** | **str** | order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. | [optional] | +| **expand** | **str** | expansion option for the AssetInfo object to be added to the response | [optional] | + +### Return type + +[**AssetListResponse**](AssetListResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +| ----------- | ------------------------- | ---------------- | +| **200** | Successful list of assets | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_public_assets** + +> AssetListResponse list_public_assets(asset_type=asset_type, depth=depth, search=search, page=page, per_page=per_page, order_by=order_by) + +List public assets + +### Example + +- Api Key Authentication (ApiKeyAuth): + +```python +from __future__ import print_function +import time +import tiledb.cloud.rest_api +from tiledb.cloud.rest_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost", + api_key = { + 'X-TILEDB-REST-API-KEY': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-TILEDB-REST-API-KEY'] = 'Bearer' + +# Configure HTTP basic authorization: BasicAuth +configuration = tiledb.cloud.rest_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tiledb.cloud.rest_api.AssetsApi(api_client) + asset_type = 'asset_type_example' # str | asset_type to filter to (optional) +depth = 'depth_example' # str | depth of assets to be returned (optional) +search = 'search_example' # str | search string (optional) +page = 56 # int | pagination offset (optional) +per_page = 56 # int | pagination limit (optional) +order_by = 'order_by_example' # str | order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) + + try: + api_response = api_instance.list_public_assets(asset_type=asset_type, depth=depth, search=search, page=page, per_page=per_page, order_by=order_by) + pprint(api_response) + except ApiException as e: + print("Exception when calling AssetsApi->list_public_assets: %s\n" % e) +``` + +- Basic Authentication (BasicAuth): + +```python +from __future__ import print_function +import time +import tiledb.cloud.rest_api +from tiledb.cloud.rest_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration = tiledb.cloud.rest_api.Configuration( + host = "http://localhost", + api_key = { + 'X-TILEDB-REST-API-KEY': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-TILEDB-REST-API-KEY'] = 'Bearer' + +# Configure HTTP basic authorization: BasicAuth +configuration = tiledb.cloud.rest_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tiledb.cloud.rest_api.AssetsApi(api_client) + asset_type = 'asset_type_example' # str | asset_type to filter to (optional) +depth = 'depth_example' # str | depth of assets to be returned (optional) +search = 'search_example' # str | search string (optional) +page = 56 # int | pagination offset (optional) +per_page = 56 # int | pagination limit (optional) +order_by = 'order_by_example' # str | order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. (optional) + + try: + api_response = api_instance.list_public_assets(asset_type=asset_type, depth=depth, search=search, page=page, per_page=per_page, order_by=order_by) + pprint(api_response) + except ApiException as e: + print("Exception when calling AssetsApi->list_public_assets: %s\n" % e) +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| **asset_type** | **str** | asset_type to filter to | [optional] | +| **depth** | **str** | depth of assets to be returned | [optional] | +| **search** | **str** | search string | [optional] | +| **page** | **int** | pagination offset | [optional] | +| **per_page** | **int** | pagination limit | [optional] | +| **order_by** | **str** | order by a specific property, defaults to `created_at desc` supported values are created_at, name, asset_type can also include the order type (asc or desc) separated by space i.e. `name asc` `name desc` etc. | [optional] | + +### Return type + +[**AssetListResponse**](AssetListResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +| ----------- | ------------------------- | ---------------- | +| **200** | Successful list of assets | - | +| **502** | Bad Gateway | - | +| **0** | error response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/GroupInfo.md b/src/tiledb/cloud/rest_api/docs/GroupInfo.md index 3f93c5415..b692b0b97 100644 --- a/src/tiledb/cloud/rest_api/docs/GroupInfo.md +++ b/src/tiledb/cloud/rest_api/docs/GroupInfo.md @@ -4,27 +4,29 @@ metadata of a group ## Properties -| Name | Type | Description | Notes | -| --------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------- | ---------- | -| **id** | **str** | unique ID of registered group | [optional] | -| **namespace** | **str** | namespace group is in | [optional] | -| **name** | **str** | name of group | [optional] | -| **description** | **str** | description of group | [optional] | -| **uri** | **str** | uri of group | [optional] | -| **tiledb_uri** | **str** | uri for access through TileDB cloud | [optional] | -| **asset_count** | **float** | A count of direct array members | [optional] | -| **group_count** | **float** | A count of direct group members | [optional] | -| **size** | **float** | A count of direct members. This is the sum of asset_count and group_count | [optional] | -| **last_accessed** | **datetime** | Datetime groups was last accessed in UTC | [optional] | -| **allowed_actions** | [**list[GroupActions]**](GroupActions.md) | list of actions user is allowed to do on this group | [optional] | -| **group_type** | [**GroupType**](GroupType.md) | | [optional] | -| **logo** | **str** | logo (base64 encoded) for the gruop. Optional | [optional] | -| **access_credentials_name** | **str** | the name of the access credentials to use. if unset, the default credentials will be used | [optional] | -| **share_count** | **float** | number of unique namespaces this group is shared with | [optional] | -| **public_share** | **bool** | Suggests if the group was shared to public by owner | [optional] | -| **tags** | **list[str]** | optional tags for group | [optional] | -| **license_id** | **str** | License identifier from SPDX License List or Custom | [optional] | -| **license_text** | **str** | License text | [optional] | -| **created_at** | **datetime** | Datetime the group was registered with tiledb | [optional] | +| Name | Type | Description | Notes | +| --------------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| **id** | **str** | unique ID of registered group | [optional] | +| **namespace** | **str** | namespace group is in | [optional] | +| **name** | **str** | name of group | [optional] | +| **description** | **str** | description of group | [optional] | +| **uri** | **str** | uri of group | [optional] | +| **tiledb_uri** | **str** | uri for access through TileDB cloud | [optional] | +| **asset_count** | **float** | A count of direct array members | [optional] | +| **group_count** | **float** | A count of direct group members | [optional] | +| **size** | **float** | A count of direct members. This is the sum of asset_count and group_count | [optional] | +| **last_accessed** | **datetime** | Datetime groups was last accessed in UTC | [optional] | +| **allowed_actions** | [**list[GroupActions]**](GroupActions.md) | list of actions user is allowed to do on this group | [optional] | +| **group_type** | [**GroupType**](GroupType.md) | | [optional] | +| **logo** | **str** | logo (base64 encoded) for the gruop. Optional | [optional] | +| **access_credentials_name** | **str** | the name of the access credentials to use. if unset, the default credentials will be used | [optional] | +| **share_count** | **float** | number of unique namespaces this group is shared with | [optional] | +| **public_share** | **bool** | Suggests if the group was shared to public by owner | [optional] | +| **tags** | **list[str]** | optional tags for group | [optional] | +| **license_id** | **str** | License identifier from SPDX License List or Custom | [optional] | +| **license_text** | **str** | License text | [optional] | +| **created_at** | **datetime** | Datetime the group was registered with tiledb | [optional] | +| **created_by** | **str** | The username of the group's creator, if known. | [optional] | +| **metadata** | [**list[MetadataStringifiedEntry]**](MetadataStringifiedEntry.md) | Contains metadata of the group. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/GroupsApi.md b/src/tiledb/cloud/rest_api/docs/GroupsApi.md index 208b4dbda..0a38286cc 100644 --- a/src/tiledb/cloud/rest_api/docs/GroupsApi.md +++ b/src/tiledb/cloud/rest_api/docs/GroupsApi.md @@ -1538,7 +1538,7 @@ group_name = 'group_name_example' # str | The unique name or id of the group # **list_owned_groups** -> GroupBrowserData list_owned_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent) +> GroupBrowserData list_owned_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, with_metadata=with_metadata) Returns one page of owned groups. @@ -1594,9 +1594,10 @@ tag = ['tag_example'] # list[str] | tag to search for, more than one can be incl exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching array in results, more than one can be included (optional) flat = True # bool | if true, ignores the nesting of groups and searches all of them (optional) parent = 'parent_example' # str | search only the children of the groups with this uuid (optional) +with_metadata = True # bool | include the metadata of the groups (optional) try: - api_response = api_instance.list_owned_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent) + api_response = api_instance.list_owned_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling GroupsApi->list_owned_groups: %s\n" % e) @@ -1652,9 +1653,10 @@ tag = ['tag_example'] # list[str] | tag to search for, more than one can be incl exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching array in results, more than one can be included (optional) flat = True # bool | if true, ignores the nesting of groups and searches all of them (optional) parent = 'parent_example' # str | search only the children of the groups with this uuid (optional) +with_metadata = True # bool | include the metadata of the groups (optional) try: - api_response = api_instance.list_owned_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent) + api_response = api_instance.list_owned_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling GroupsApi->list_owned_groups: %s\n" % e) @@ -1662,19 +1664,20 @@ parent = 'parent_example' # str | search only the children of the groups with th ### Parameters -| Name | Type | Description | Notes | -| --------------- | ----------------------- | ------------------------------------------------------------------------ | ---------- | -| **page** | **int** | pagination offset | [optional] | -| **per_page** | **int** | pagination limit | [optional] | -| **group_type** | **str** | filter by a specific group type | [optional] | -| **search** | **str** | search string that will look at name, namespace or description fields | [optional] | -| **namespace** | **str** | namespace | [optional] | -| **orderby** | **str** | sort by which field valid values include last_accessed, size, name | [optional] | -| **permissions** | **str** | permissions valid values include read, read_write, write, admin | [optional] | -| **tag** | [**list[str]**](str.md) | tag to search for, more than one can be included | [optional] | -| **exclude_tag** | [**list[str]**](str.md) | tags to exclude matching array in results, more than one can be included | [optional] | -| **flat** | **bool** | if true, ignores the nesting of groups and searches all of them | [optional] | -| **parent** | **str** | search only the children of the groups with this uuid | [optional] | +| Name | Type | Description | Notes | +| ----------------- | ----------------------- | ------------------------------------------------------------------------ | ---------- | +| **page** | **int** | pagination offset | [optional] | +| **per_page** | **int** | pagination limit | [optional] | +| **group_type** | **str** | filter by a specific group type | [optional] | +| **search** | **str** | search string that will look at name, namespace or description fields | [optional] | +| **namespace** | **str** | namespace | [optional] | +| **orderby** | **str** | sort by which field valid values include last_accessed, size, name | [optional] | +| **permissions** | **str** | permissions valid values include read, read_write, write, admin | [optional] | +| **tag** | [**list[str]**](str.md) | tag to search for, more than one can be included | [optional] | +| **exclude_tag** | [**list[str]**](str.md) | tags to exclude matching array in results, more than one can be included | [optional] | +| **flat** | **bool** | if true, ignores the nesting of groups and searches all of them | [optional] | +| **parent** | **str** | search only the children of the groups with this uuid | [optional] | +| **with_metadata** | **bool** | include the metadata of the groups | [optional] | ### Return type @@ -1701,7 +1704,7 @@ parent = 'parent_example' # str | search only the children of the groups with th # **list_public_groups** -> GroupBrowserData list_public_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent) +> GroupBrowserData list_public_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, with_metadata=with_metadata) Returns one page of public groups. @@ -1757,9 +1760,10 @@ tag = ['tag_example'] # list[str] | tag to search for, more than one can be incl exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching array in results, more than one can be included (optional) flat = True # bool | if true, ignores the nesting of groups and searches all of them (optional) parent = 'parent_example' # str | search only the children of the groups with this uuid (optional) +with_metadata = True # bool | include the metadata of the groups (optional) try: - api_response = api_instance.list_public_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent) + api_response = api_instance.list_public_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling GroupsApi->list_public_groups: %s\n" % e) @@ -1815,9 +1819,10 @@ tag = ['tag_example'] # list[str] | tag to search for, more than one can be incl exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching array in results, more than one can be included (optional) flat = True # bool | if true, ignores the nesting of groups and searches all of them (optional) parent = 'parent_example' # str | search only the children of the groups with this uuid (optional) +with_metadata = True # bool | include the metadata of the groups (optional) try: - api_response = api_instance.list_public_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent) + api_response = api_instance.list_public_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling GroupsApi->list_public_groups: %s\n" % e) @@ -1825,19 +1830,20 @@ parent = 'parent_example' # str | search only the children of the groups with th ### Parameters -| Name | Type | Description | Notes | -| --------------- | ----------------------- | ------------------------------------------------------------------------ | ---------- | -| **page** | **int** | pagination offset | [optional] | -| **per_page** | **int** | pagination limit | [optional] | -| **group_type** | **str** | filter by a specific group type | [optional] | -| **search** | **str** | search string that will look at name, namespace or description fields | [optional] | -| **namespace** | **str** | namespace | [optional] | -| **orderby** | **str** | sort by which field valid values include last_accessed, size, name | [optional] | -| **permissions** | **str** | permissions valid values include read, read_write, write, admin | [optional] | -| **tag** | [**list[str]**](str.md) | tag to search for, more than one can be included | [optional] | -| **exclude_tag** | [**list[str]**](str.md) | tags to exclude matching array in results, more than one can be included | [optional] | -| **flat** | **bool** | if true, ignores the nesting of groups and searches all of them | [optional] | -| **parent** | **str** | search only the children of the groups with this uuid | [optional] | +| Name | Type | Description | Notes | +| ----------------- | ----------------------- | ------------------------------------------------------------------------ | ---------- | +| **page** | **int** | pagination offset | [optional] | +| **per_page** | **int** | pagination limit | [optional] | +| **group_type** | **str** | filter by a specific group type | [optional] | +| **search** | **str** | search string that will look at name, namespace or description fields | [optional] | +| **namespace** | **str** | namespace | [optional] | +| **orderby** | **str** | sort by which field valid values include last_accessed, size, name | [optional] | +| **permissions** | **str** | permissions valid values include read, read_write, write, admin | [optional] | +| **tag** | [**list[str]**](str.md) | tag to search for, more than one can be included | [optional] | +| **exclude_tag** | [**list[str]**](str.md) | tags to exclude matching array in results, more than one can be included | [optional] | +| **flat** | **bool** | if true, ignores the nesting of groups and searches all of them | [optional] | +| **parent** | **str** | search only the children of the groups with this uuid | [optional] | +| **with_metadata** | **bool** | include the metadata of the groups | [optional] | ### Return type @@ -1864,7 +1870,7 @@ parent = 'parent_example' # str | search only the children of the groups with th # **list_shared_groups** -> GroupBrowserData list_shared_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, shared_to=shared_to) +> GroupBrowserData list_shared_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, shared_to=shared_to, with_metadata=with_metadata) Returns one page of shared groups. @@ -1921,9 +1927,10 @@ exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching arr flat = True # bool | if true, ignores the nesting of groups and searches all of them (optional) parent = 'parent_example' # str | search only the children of the groups with this uuid (optional) shared_to = ['shared_to_example'] # list[str] | namespaces to filter results of where there groups were shared to (optional) +with_metadata = True # bool | include the metadata of the groups (optional) try: - api_response = api_instance.list_shared_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, shared_to=shared_to) + api_response = api_instance.list_shared_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, shared_to=shared_to, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling GroupsApi->list_shared_groups: %s\n" % e) @@ -1980,9 +1987,10 @@ exclude_tag = ['exclude_tag_example'] # list[str] | tags to exclude matching arr flat = True # bool | if true, ignores the nesting of groups and searches all of them (optional) parent = 'parent_example' # str | search only the children of the groups with this uuid (optional) shared_to = ['shared_to_example'] # list[str] | namespaces to filter results of where there groups were shared to (optional) +with_metadata = True # bool | include the metadata of the groups (optional) try: - api_response = api_instance.list_shared_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, shared_to=shared_to) + api_response = api_instance.list_shared_groups(page=page, per_page=per_page, group_type=group_type, search=search, namespace=namespace, orderby=orderby, permissions=permissions, tag=tag, exclude_tag=exclude_tag, flat=flat, parent=parent, shared_to=shared_to, with_metadata=with_metadata) pprint(api_response) except ApiException as e: print("Exception when calling GroupsApi->list_shared_groups: %s\n" % e) @@ -1990,20 +1998,21 @@ shared_to = ['shared_to_example'] # list[str] | namespaces to filter results of ### Parameters -| Name | Type | Description | Notes | -| --------------- | ----------------------- | ------------------------------------------------------------------------ | ---------- | -| **page** | **int** | pagination offset | [optional] | -| **per_page** | **int** | pagination limit | [optional] | -| **group_type** | **str** | filter by a specific group type | [optional] | -| **search** | **str** | search string that will look at name, namespace or description fields | [optional] | -| **namespace** | **str** | namespace | [optional] | -| **orderby** | **str** | sort by which field valid values include last_accessed, size, name | [optional] | -| **permissions** | **str** | permissions valid values include read, read_write, write, admin | [optional] | -| **tag** | [**list[str]**](str.md) | tag to search for, more than one can be included | [optional] | -| **exclude_tag** | [**list[str]**](str.md) | tags to exclude matching array in results, more than one can be included | [optional] | -| **flat** | **bool** | if true, ignores the nesting of groups and searches all of them | [optional] | -| **parent** | **str** | search only the children of the groups with this uuid | [optional] | -| **shared_to** | [**list[str]**](str.md) | namespaces to filter results of where there groups were shared to | [optional] | +| Name | Type | Description | Notes | +| ----------------- | ----------------------- | ------------------------------------------------------------------------ | ---------- | +| **page** | **int** | pagination offset | [optional] | +| **per_page** | **int** | pagination limit | [optional] | +| **group_type** | **str** | filter by a specific group type | [optional] | +| **search** | **str** | search string that will look at name, namespace or description fields | [optional] | +| **namespace** | **str** | namespace | [optional] | +| **orderby** | **str** | sort by which field valid values include last_accessed, size, name | [optional] | +| **permissions** | **str** | permissions valid values include read, read_write, write, admin | [optional] | +| **tag** | [**list[str]**](str.md) | tag to search for, more than one can be included | [optional] | +| **exclude_tag** | [**list[str]**](str.md) | tags to exclude matching array in results, more than one can be included | [optional] | +| **flat** | **bool** | if true, ignores the nesting of groups and searches all of them | [optional] | +| **parent** | **str** | search only the children of the groups with this uuid | [optional] | +| **shared_to** | [**list[str]**](str.md) | namespaces to filter results of where there groups were shared to | [optional] | +| **with_metadata** | **bool** | include the metadata of the groups | [optional] | ### Return type diff --git a/src/tiledb/cloud/rest_api/docs/InlineObject1.md b/src/tiledb/cloud/rest_api/docs/InlineObject1.md new file mode 100644 index 000000000..281bc8207 --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/InlineObject1.md @@ -0,0 +1,9 @@ +# InlineObject1 + +## Properties + +| Name | Type | Description | Notes | +| -------------- | ------------- | ----------- | ---------- | +| **namespaces** | **list[str]** | | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/InvitationApi.md b/src/tiledb/cloud/rest_api/docs/InvitationApi.md index 7e9184a77..608eb0fe4 100644 --- a/src/tiledb/cloud/rest_api/docs/InvitationApi.md +++ b/src/tiledb/cloud/rest_api/docs/InvitationApi.md @@ -1314,7 +1314,7 @@ with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tiledb.cloud.rest_api.InvitationApi(api_client) namespace = 'namespace_example' # str | name or UUID of namespace sharing their payment info -email_invite = None # object | Recipients of the invitation. These may only be namespaces, not email addresses. (optional) +email_invite = tiledb.cloud.rest_api.InlineObject1() # InlineObject1 | (optional) try: api_instance.share_payment(namespace, email_invite=email_invite) @@ -1362,7 +1362,7 @@ with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tiledb.cloud.rest_api.InvitationApi(api_client) namespace = 'namespace_example' # str | name or UUID of namespace sharing their payment info -email_invite = None # object | Recipients of the invitation. These may only be namespaces, not email addresses. (optional) +email_invite = tiledb.cloud.rest_api.InlineObject1() # InlineObject1 | (optional) try: api_instance.share_payment(namespace, email_invite=email_invite) @@ -1372,10 +1372,10 @@ email_invite = None # object | Recipients of the invitation. These may only be n ### Parameters -| Name | Type | Description | Notes | -| ---------------- | ---------- | -------------------------------------------------------------------------------- | ---------- | -| **namespace** | **str** | name or UUID of namespace sharing their payment info | -| **email_invite** | **object** | Recipients of the invitation. These may only be namespaces, not email addresses. | [optional] | +| Name | Type | Description | Notes | +| ---------------- | ------------------------------------- | ---------------------------------------------------- | ---------- | +| **namespace** | **str** | name or UUID of namespace sharing their payment info | +| **email_invite** | [**InlineObject1**](InlineObject1.md) | | [optional] | ### Return type diff --git a/src/tiledb/cloud/rest_api/docs/LoadArraySchemaRequest.md b/src/tiledb/cloud/rest_api/docs/LoadArraySchemaRequest.md new file mode 100644 index 000000000..a7a6078d9 --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/LoadArraySchemaRequest.md @@ -0,0 +1,11 @@ +# LoadArraySchemaRequest + +Request to load an array schema + +## Properties + +| Name | Type | Description | Notes | +| ---------- | ----------------------------------- | ----------- | ---------- | +| **config** | [**TileDBConfig**](TileDBConfig.md) | | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/LoadArraySchemaResponse.md b/src/tiledb/cloud/rest_api/docs/LoadArraySchemaResponse.md new file mode 100644 index 000000000..dd409280d --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/LoadArraySchemaResponse.md @@ -0,0 +1,12 @@ +# LoadArraySchemaResponse + +Contains the latest schema and all schemas for the opened array + +## Properties + +| Name | Type | Description | Notes | +| ----------------------- | -------------------------------------------- | ------------------------ | ---------- | +| **latest_array_schema** | [**ArraySchema**](ArraySchema.md) | | [optional] | +| **all_array_schemas** | [**dict(str, ArraySchema)**](ArraySchema.md) | map of all array schemas | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/MetadataStringified.md b/src/tiledb/cloud/rest_api/docs/MetadataStringified.md new file mode 100644 index 000000000..757351822 --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/MetadataStringified.md @@ -0,0 +1,11 @@ +# MetadataStringified + +The user's TileDB metadata + +## Properties + +| Name | Type | Description | Notes | +| ----------- | ----------------------------------------------------------------- | ------------------------ | ---------- | +| **entries** | [**list[MetadataStringifiedEntry]**](MetadataStringifiedEntry.md) | List of metadata entries | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/MetadataStringifiedEntry.md b/src/tiledb/cloud/rest_api/docs/MetadataStringifiedEntry.md new file mode 100644 index 000000000..c3dde87b1 --- /dev/null +++ b/src/tiledb/cloud/rest_api/docs/MetadataStringifiedEntry.md @@ -0,0 +1,13 @@ +# MetadataStringifiedEntry + +key/value pair representing an asset metadata map entry + +## Properties + +| Name | Type | Description | Notes | +| --------- | ------- | ------------------ | ---------- | +| **key** | **str** | The metadata key | [optional] | +| **value** | **str** | The metadata value | [optional] | +| **type** | **str** | The metadata type | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/NotebookApi.md b/src/tiledb/cloud/rest_api/docs/NotebookApi.md index bd7d25be1..e4d9ff87e 100644 --- a/src/tiledb/cloud/rest_api/docs/NotebookApi.md +++ b/src/tiledb/cloud/rest_api/docs/NotebookApi.md @@ -138,7 +138,6 @@ with tiledb.cloud.rest_api.ApiClient(configuration) as api_client: | Status code | Description | Response headers | | ----------- | -------------------------- | ---------------- | | **200** | status of running notebook | - | -| **202** | Notebook server is pending | - | | **402** | Payment required | - | | **404** | Notebook is not running | - | | **502** | Bad Gateway | - | diff --git a/src/tiledb/cloud/rest_api/docs/OrganizationUser.md b/src/tiledb/cloud/rest_api/docs/OrganizationUser.md index fb4014aa1..d936f229c 100644 --- a/src/tiledb/cloud/rest_api/docs/OrganizationUser.md +++ b/src/tiledb/cloud/rest_api/docs/OrganizationUser.md @@ -4,13 +4,15 @@ user in an organization ## Properties -| Name | Type | Description | Notes | -| --------------------- | ------------------------------------------------- | ---------------------------------------------------------- | ---------- | -| **user_id** | **str** | unique ID of user | [optional] | -| **organization_id** | **str** | unique ID of organization | [optional] | -| **username** | **str** | username for user | [optional] | -| **organization_name** | **str** | name of organization | [optional] | -| **role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] | -| **allowed_actions** | [**list[NamespaceActions]**](NamespaceActions.md) | list of actions user is allowed to do on this organization | [optional] | +| Name | Type | Description | Notes | +| --------------------- | ------------------------------------------------- | ----------------------------------------------------------- | ---------- | +| **user_id** | **str** | unique ID of user | [optional] | +| **organization_id** | **str** | unique ID of organization | [optional] | +| **username** | **str** | username for user | [optional] | +| **user_full_name** | **str** | full name of the user; available to organization admins | [optional] | +| **user_email** | **str** | email address of the user; available to organization admins | [optional] | +| **organization_name** | **str** | name of organization | [optional] | +| **role** | [**OrganizationRoles**](OrganizationRoles.md) | | [optional] | +| **allowed_actions** | [**list[NamespaceActions]**](NamespaceActions.md) | list of actions user is allowed to do on this organization | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/TaskGraph.md b/src/tiledb/cloud/rest_api/docs/TaskGraph.md index df1ac2b5f..a7c0ac033 100644 --- a/src/tiledb/cloud/rest_api/docs/TaskGraph.md +++ b/src/tiledb/cloud/rest_api/docs/TaskGraph.md @@ -14,7 +14,7 @@ Information about a task graph. | **nodes** | [**list[TaskGraphNode]**](TaskGraphNode.md) | The structure of the graph. This is provided by the client when first setting up the task graph. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. | [optional] | | **parallelism** | **int** | Parallelism limits the max total parallel pods that can execute at the same time in a workflow. | [optional] | | **retry_strategy** | [**RetryStrategy**](RetryStrategy.md) | | [optional] | -| **deadline** | **int** | Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. | [optional] | +| **deadline** | **int** | Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. Defaults to 24h when unset | [optional] | | **task_graph_type** | [**TaskGraphType**](TaskGraphType.md) | | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/docs/TaskGraphLog.md b/src/tiledb/cloud/rest_api/docs/TaskGraphLog.md index fb3938c3b..3728f2325 100644 --- a/src/tiledb/cloud/rest_api/docs/TaskGraphLog.md +++ b/src/tiledb/cloud/rest_api/docs/TaskGraphLog.md @@ -22,5 +22,7 @@ Logging information about the execution of a task graph. | **nodes** | [**list[TaskGraphNodeMetadata]**](TaskGraphNodeMetadata.md) | The structure of the graph. This is provided by the client when first setting up the task graph. Thereafter, it is read-only. This must be topographically sorted; that is, each node must appear after all nodes that it depends upon. | [optional] | | **task_graph_type** | [**TaskGraphType**](TaskGraphType.md) | | [optional] | | **task_graph_id** | **str** | The UUID of the task graph. | [optional] | +| **cloud_provider** | **str** | The name of the cloud provider where this task graph executed. | [optional] | +| **cloud_region** | **str** | The region of the cloud provider where this task graph executed. | [optional] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/tiledb/cloud/rest_api/models/__init__.py b/src/tiledb/cloud/rest_api/models/__init__.py index 1d7926308..7980d11a8 100644 --- a/src/tiledb/cloud/rest_api/models/__init__.py +++ b/src/tiledb/cloud/rest_api/models/__init__.py @@ -44,7 +44,11 @@ from tiledb.cloud.rest_api.models.array_task_type import ArrayTaskType from tiledb.cloud.rest_api.models.array_type import ArrayType from tiledb.cloud.rest_api.models.array_vacuum_request import ArrayVacuumRequest +from tiledb.cloud.rest_api.models.asset_backing_type import AssetBackingType +from tiledb.cloud.rest_api.models.asset_info import AssetInfo +from tiledb.cloud.rest_api.models.asset_list_response import AssetListResponse from tiledb.cloud.rest_api.models.asset_locations import AssetLocations +from tiledb.cloud.rest_api.models.asset_ownership_level import AssetOwnershipLevel from tiledb.cloud.rest_api.models.asset_type import AssetType from tiledb.cloud.rest_api.models.attribute import Attribute from tiledb.cloud.rest_api.models.attribute_buffer_header import AttributeBufferHeader @@ -109,6 +113,7 @@ from tiledb.cloud.rest_api.models.group_type_metadata_key import GroupTypeMetadataKey from tiledb.cloud.rest_api.models.group_update import GroupUpdate from tiledb.cloud.rest_api.models.inline_object import InlineObject +from tiledb.cloud.rest_api.models.inline_object1 import InlineObject1 from tiledb.cloud.rest_api.models.inline_response200 import InlineResponse200 from tiledb.cloud.rest_api.models.invitation import Invitation from tiledb.cloud.rest_api.models.invitation_array_share_email import ( @@ -128,6 +133,12 @@ from tiledb.cloud.rest_api.models.invitation_type import InvitationType from tiledb.cloud.rest_api.models.last_accessed_array import LastAccessedArray from tiledb.cloud.rest_api.models.layout import Layout +from tiledb.cloud.rest_api.models.load_array_schema_request import ( + LoadArraySchemaRequest, +) +from tiledb.cloud.rest_api.models.load_array_schema_response import ( + LoadArraySchemaResponse, +) from tiledb.cloud.rest_api.models.load_enumerations_request import ( LoadEnumerationsRequest, ) @@ -137,6 +148,10 @@ from tiledb.cloud.rest_api.models.ml_model_favorite import MLModelFavorite from tiledb.cloud.rest_api.models.ml_model_favorites_data import MLModelFavoritesData from tiledb.cloud.rest_api.models.max_buffer_sizes import MaxBufferSizes +from tiledb.cloud.rest_api.models.metadata_stringified import MetadataStringified +from tiledb.cloud.rest_api.models.metadata_stringified_entry import ( + MetadataStringifiedEntry, +) from tiledb.cloud.rest_api.models.multi_array_udf import MultiArrayUDF from tiledb.cloud.rest_api.models.namespace_actions import NamespaceActions from tiledb.cloud.rest_api.models.non_empty_domain import NonEmptyDomain diff --git a/src/tiledb/cloud/rest_api/models/array_consolidation_request.py b/src/tiledb/cloud/rest_api/models/array_consolidation_request.py index c0e02836d..994400484 100644 --- a/src/tiledb/cloud/rest_api/models/array_consolidation_request.py +++ b/src/tiledb/cloud/rest_api/models/array_consolidation_request.py @@ -32,21 +32,26 @@ class ArrayConsolidationRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"config": "TileDBConfig"} + openapi_types = {"config": "TileDBConfig", "fragments": "list[str]"} - attribute_map = {"config": "config"} + attribute_map = {"config": "config", "fragments": "fragments"} - def __init__(self, config=None, local_vars_configuration=None): # noqa: E501 + def __init__( + self, config=None, fragments=None, local_vars_configuration=None + ): # noqa: E501 """ArrayConsolidationRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._config = None + self._fragments = None self.discriminator = None if config is not None: self.config = config + if fragments is not None: + self.fragments = fragments @property def config(self): @@ -69,6 +74,29 @@ def config(self, config): self._config = config + @property + def fragments(self): + """Gets the fragments of this ArrayConsolidationRequest. # noqa: E501 + + list of fragments in the array to consolidate # noqa: E501 + + :return: The fragments of this ArrayConsolidationRequest. # noqa: E501 + :rtype: list[str] + """ + return self._fragments + + @fragments.setter + def fragments(self, fragments): + """Sets the fragments of this ArrayConsolidationRequest. + + list of fragments in the array to consolidate # noqa: E501 + + :param fragments: The fragments of this ArrayConsolidationRequest. # noqa: E501 + :type: list[str] + """ + + self._fragments = fragments + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/tiledb/cloud/rest_api/models/array_info.py b/src/tiledb/cloud/rest_api/models/array_info.py index 87640ef0a..e90d94a9b 100644 --- a/src/tiledb/cloud/rest_api/models/array_info.py +++ b/src/tiledb/cloud/rest_api/models/array_info.py @@ -58,6 +58,8 @@ class ArrayInfo(object): "read_only": "bool", "is_favorite": "bool", "created_at": "datetime", + "created_by": "str", + "metadata": "list[MetadataStringifiedEntry]", } attribute_map = { @@ -86,6 +88,8 @@ class ArrayInfo(object): "read_only": "read_only", "is_favorite": "is_favorite", "created_at": "created_at", + "created_by": "created_by", + "metadata": "metadata", } def __init__( @@ -115,6 +119,8 @@ def __init__( read_only=None, is_favorite=None, created_at=None, + created_by=None, + metadata=None, local_vars_configuration=None, ): # noqa: E501 """ArrayInfo - a model defined in OpenAPI""" # noqa: E501 @@ -147,6 +153,8 @@ def __init__( self._read_only = None self._is_favorite = None self._created_at = None + self._created_by = None + self._metadata = None self.discriminator = None if id is not None: @@ -196,6 +204,10 @@ def __init__( self.is_favorite = is_favorite if created_at is not None: self.created_at = created_at + if created_by is not None: + self.created_by = created_by + if metadata is not None: + self.metadata = metadata @property def id(self): @@ -768,6 +780,52 @@ def created_at(self, created_at): self._created_at = created_at + @property + def created_by(self): + """Gets the created_by of this ArrayInfo. # noqa: E501 + + The user who created the array, if known. # noqa: E501 + + :return: The created_by of this ArrayInfo. # noqa: E501 + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """Sets the created_by of this ArrayInfo. + + The user who created the array, if known. # noqa: E501 + + :param created_by: The created_by of this ArrayInfo. # noqa: E501 + :type: str + """ + + self._created_by = created_by + + @property + def metadata(self): + """Gets the metadata of this ArrayInfo. # noqa: E501 + + Contains the metadata of the array. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. # noqa: E501 + + :return: The metadata of this ArrayInfo. # noqa: E501 + :rtype: list[MetadataStringifiedEntry] + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this ArrayInfo. + + Contains the metadata of the array. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. # noqa: E501 + + :param metadata: The metadata of this ArrayInfo. # noqa: E501 + :type: list[MetadataStringifiedEntry] + """ + + self._metadata = metadata + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/tiledb/cloud/rest_api/models/array_task.py b/src/tiledb/cloud/rest_api/models/array_task.py index ffd8bf53c..48be95ee8 100644 --- a/src/tiledb/cloud/rest_api/models/array_task.py +++ b/src/tiledb/cloud/rest_api/models/array_task.py @@ -62,6 +62,8 @@ class ArrayTask(object): "result_format": "ResultFormat", "task_graph_uuid": "str", "client_node_uuid": "str", + "cloud_provider": "str", + "cloud_region": "str", } attribute_map = { @@ -94,6 +96,8 @@ class ArrayTask(object): "result_format": "result_format", "task_graph_uuid": "task_graph_uuid", "client_node_uuid": "client_node_uuid", + "cloud_provider": "cloud_provider", + "cloud_region": "cloud_region", } def __init__( @@ -127,6 +131,8 @@ def __init__( result_format=None, task_graph_uuid=None, client_node_uuid=None, + cloud_provider=None, + cloud_region=None, local_vars_configuration=None, ): # noqa: E501 """ArrayTask - a model defined in OpenAPI""" # noqa: E501 @@ -163,6 +169,8 @@ def __init__( self._result_format = None self._task_graph_uuid = None self._client_node_uuid = None + self._cloud_provider = None + self._cloud_region = None self.discriminator = None if id is not None: @@ -220,6 +228,10 @@ def __init__( self.task_graph_uuid = task_graph_uuid if client_node_uuid is not None: self.client_node_uuid = client_node_uuid + if cloud_provider is not None: + self.cloud_provider = cloud_provider + if cloud_region is not None: + self.cloud_region = cloud_region @property def id(self): @@ -876,6 +888,52 @@ def client_node_uuid(self, client_node_uuid): self._client_node_uuid = client_node_uuid + @property + def cloud_provider(self): + """Gets the cloud_provider of this ArrayTask. # noqa: E501 + + The name of the cloud provider where this task executed. # noqa: E501 + + :return: The cloud_provider of this ArrayTask. # noqa: E501 + :rtype: str + """ + return self._cloud_provider + + @cloud_provider.setter + def cloud_provider(self, cloud_provider): + """Sets the cloud_provider of this ArrayTask. + + The name of the cloud provider where this task executed. # noqa: E501 + + :param cloud_provider: The cloud_provider of this ArrayTask. # noqa: E501 + :type: str + """ + + self._cloud_provider = cloud_provider + + @property + def cloud_region(self): + """Gets the cloud_region of this ArrayTask. # noqa: E501 + + The region of the cloud provider where this task executed. # noqa: E501 + + :return: The cloud_region of this ArrayTask. # noqa: E501 + :rtype: str + """ + return self._cloud_region + + @cloud_region.setter + def cloud_region(self, cloud_region): + """Sets the cloud_region of this ArrayTask. + + The region of the cloud provider where this task executed. # noqa: E501 + + :param cloud_region: The cloud_region of this ArrayTask. # noqa: E501 + :type: str + """ + + self._cloud_region = cloud_region + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/tiledb/cloud/rest_api/models/asset_backing_type.py b/src/tiledb/cloud/rest_api/models/asset_backing_type.py new file mode 100644 index 000000000..0d1b80598 --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/asset_backing_type.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class AssetBackingType(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + ARRAY = "array" + GROUP = "group" + + allowable_values = [ARRAY, GROUP] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {} + + attribute_map = {} + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """AssetBackingType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetBackingType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AssetBackingType): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/asset_info.py b/src/tiledb/cloud/rest_api/models/asset_info.py new file mode 100644 index 000000000..5372fa365 --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/asset_info.py @@ -0,0 +1,381 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class AssetInfo(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "uuid": "str", + "asset_type": "AssetType", + "asset_backing_type": "AssetBackingType", + "asset_ownership_level": "AssetOwnershipLevel", + "namespace_name": "str", + "namespace_uuid": "str", + "name": "str", + "mime_type": "str", + "created_at": "datetime", + "metadata": "MetadataStringified", + } + + attribute_map = { + "uuid": "uuid", + "asset_type": "asset_type", + "asset_backing_type": "asset_backing_type", + "asset_ownership_level": "asset_ownership_level", + "namespace_name": "namespace_name", + "namespace_uuid": "namespace_uuid", + "name": "name", + "mime_type": "mime_type", + "created_at": "created_at", + "metadata": "metadata", + } + + def __init__( + self, + uuid=None, + asset_type=None, + asset_backing_type=None, + asset_ownership_level=None, + namespace_name=None, + namespace_uuid=None, + name=None, + mime_type=None, + created_at=None, + metadata=None, + local_vars_configuration=None, + ): # noqa: E501 + """AssetInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._uuid = None + self._asset_type = None + self._asset_backing_type = None + self._asset_ownership_level = None + self._namespace_name = None + self._namespace_uuid = None + self._name = None + self._mime_type = None + self._created_at = None + self._metadata = None + self.discriminator = None + + if uuid is not None: + self.uuid = uuid + if asset_type is not None: + self.asset_type = asset_type + if asset_backing_type is not None: + self.asset_backing_type = asset_backing_type + if asset_ownership_level is not None: + self.asset_ownership_level = asset_ownership_level + if namespace_name is not None: + self.namespace_name = namespace_name + if namespace_uuid is not None: + self.namespace_uuid = namespace_uuid + if name is not None: + self.name = name + if mime_type is not None: + self.mime_type = mime_type + if created_at is not None: + self.created_at = created_at + if metadata is not None: + self.metadata = metadata + + @property + def uuid(self): + """Gets the uuid of this AssetInfo. # noqa: E501 + + unique ID of a registered asset # noqa: E501 + + :return: The uuid of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this AssetInfo. + + unique ID of a registered asset # noqa: E501 + + :param uuid: The uuid of this AssetInfo. # noqa: E501 + :type: str + """ + + self._uuid = uuid + + @property + def asset_type(self): + """Gets the asset_type of this AssetInfo. # noqa: E501 + + + :return: The asset_type of this AssetInfo. # noqa: E501 + :rtype: AssetType + """ + return self._asset_type + + @asset_type.setter + def asset_type(self, asset_type): + """Sets the asset_type of this AssetInfo. + + + :param asset_type: The asset_type of this AssetInfo. # noqa: E501 + :type: AssetType + """ + + self._asset_type = asset_type + + @property + def asset_backing_type(self): + """Gets the asset_backing_type of this AssetInfo. # noqa: E501 + + + :return: The asset_backing_type of this AssetInfo. # noqa: E501 + :rtype: AssetBackingType + """ + return self._asset_backing_type + + @asset_backing_type.setter + def asset_backing_type(self, asset_backing_type): + """Sets the asset_backing_type of this AssetInfo. + + + :param asset_backing_type: The asset_backing_type of this AssetInfo. # noqa: E501 + :type: AssetBackingType + """ + + self._asset_backing_type = asset_backing_type + + @property + def asset_ownership_level(self): + """Gets the asset_ownership_level of this AssetInfo. # noqa: E501 + + + :return: The asset_ownership_level of this AssetInfo. # noqa: E501 + :rtype: AssetOwnershipLevel + """ + return self._asset_ownership_level + + @asset_ownership_level.setter + def asset_ownership_level(self, asset_ownership_level): + """Sets the asset_ownership_level of this AssetInfo. + + + :param asset_ownership_level: The asset_ownership_level of this AssetInfo. # noqa: E501 + :type: AssetOwnershipLevel + """ + + self._asset_ownership_level = asset_ownership_level + + @property + def namespace_name(self): + """Gets the namespace_name of this AssetInfo. # noqa: E501 + + namespace_name that the asset is registered to # noqa: E501 + + :return: The namespace_name of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """Sets the namespace_name of this AssetInfo. + + namespace_name that the asset is registered to # noqa: E501 + + :param namespace_name: The namespace_name of this AssetInfo. # noqa: E501 + :type: str + """ + + self._namespace_name = namespace_name + + @property + def namespace_uuid(self): + """Gets the namespace_uuid of this AssetInfo. # noqa: E501 + + namespace_uuid that the asset is registered to # noqa: E501 + + :return: The namespace_uuid of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._namespace_uuid + + @namespace_uuid.setter + def namespace_uuid(self, namespace_uuid): + """Sets the namespace_uuid of this AssetInfo. + + namespace_uuid that the asset is registered to # noqa: E501 + + :param namespace_uuid: The namespace_uuid of this AssetInfo. # noqa: E501 + :type: str + """ + + self._namespace_uuid = namespace_uuid + + @property + def name(self): + """Gets the name of this AssetInfo. # noqa: E501 + + name of asset # noqa: E501 + + :return: The name of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AssetInfo. + + name of asset # noqa: E501 + + :param name: The name of this AssetInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def mime_type(self): + """Gets the mime_type of this AssetInfo. # noqa: E501 + + mime type of the asset # noqa: E501 + + :return: The mime_type of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._mime_type + + @mime_type.setter + def mime_type(self, mime_type): + """Sets the mime_type of this AssetInfo. + + mime type of the asset # noqa: E501 + + :param mime_type: The mime_type of this AssetInfo. # noqa: E501 + :type: str + """ + + self._mime_type = mime_type + + @property + def created_at(self): + """Gets the created_at of this AssetInfo. # noqa: E501 + + Time when the asset was created (rfc3339) # noqa: E501 + + :return: The created_at of this AssetInfo. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this AssetInfo. + + Time when the asset was created (rfc3339) # noqa: E501 + + :param created_at: The created_at of this AssetInfo. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def metadata(self): + """Gets the metadata of this AssetInfo. # noqa: E501 + + + :return: The metadata of this AssetInfo. # noqa: E501 + :rtype: MetadataStringified + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this AssetInfo. + + + :param metadata: The metadata of this AssetInfo. # noqa: E501 + :type: MetadataStringified + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AssetInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/asset_list_response.py b/src/tiledb/cloud/rest_api/models/asset_list_response.py new file mode 100644 index 000000000..b70d82e05 --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/asset_list_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class AssetListResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "data": "list[AssetInfo]", + "pagination_metadata": "PaginationMetadata", + } + + attribute_map = {"data": "data", "pagination_metadata": "pagination_metadata"} + + def __init__( + self, data=None, pagination_metadata=None, local_vars_configuration=None + ): # noqa: E501 + """AssetListResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self._pagination_metadata = None + self.discriminator = None + + if data is not None: + self.data = data + if pagination_metadata is not None: + self.pagination_metadata = pagination_metadata + + @property + def data(self): + """Gets the data of this AssetListResponse. # noqa: E501 + + asset information for each asset # noqa: E501 + + :return: The data of this AssetListResponse. # noqa: E501 + :rtype: list[AssetInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AssetListResponse. + + asset information for each asset # noqa: E501 + + :param data: The data of this AssetListResponse. # noqa: E501 + :type: list[AssetInfo] + """ + + self._data = data + + @property + def pagination_metadata(self): + """Gets the pagination_metadata of this AssetListResponse. # noqa: E501 + + + :return: The pagination_metadata of this AssetListResponse. # noqa: E501 + :rtype: PaginationMetadata + """ + return self._pagination_metadata + + @pagination_metadata.setter + def pagination_metadata(self, pagination_metadata): + """Sets the pagination_metadata of this AssetListResponse. + + + :param pagination_metadata: The pagination_metadata of this AssetListResponse. # noqa: E501 + :type: PaginationMetadata + """ + + self._pagination_metadata = pagination_metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetListResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AssetListResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/asset_ownership_level.py b/src/tiledb/cloud/rest_api/models/asset_ownership_level.py new file mode 100644 index 000000000..b24f328f8 --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/asset_ownership_level.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class AssetOwnershipLevel(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + OWNED = "owned" + SHARED = "shared" + + allowable_values = [OWNED, SHARED] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {} + + attribute_map = {} + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """AssetOwnershipLevel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetOwnershipLevel): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AssetOwnershipLevel): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/group_info.py b/src/tiledb/cloud/rest_api/models/group_info.py index abdce38d7..fd8df5ec0 100644 --- a/src/tiledb/cloud/rest_api/models/group_info.py +++ b/src/tiledb/cloud/rest_api/models/group_info.py @@ -53,6 +53,8 @@ class GroupInfo(object): "license_id": "str", "license_text": "str", "created_at": "datetime", + "created_by": "str", + "metadata": "list[MetadataStringifiedEntry]", } attribute_map = { @@ -76,6 +78,8 @@ class GroupInfo(object): "license_id": "license_id", "license_text": "license_text", "created_at": "created_at", + "created_by": "created_by", + "metadata": "metadata", } def __init__( @@ -100,6 +104,8 @@ def __init__( license_id=None, license_text=None, created_at=None, + created_by=None, + metadata=None, local_vars_configuration=None, ): # noqa: E501 """GroupInfo - a model defined in OpenAPI""" # noqa: E501 @@ -127,6 +133,8 @@ def __init__( self._license_id = None self._license_text = None self._created_at = None + self._created_by = None + self._metadata = None self.discriminator = None if id is not None: @@ -168,6 +176,10 @@ def __init__( self.license_text = license_text if created_at is not None: self.created_at = created_at + if created_by is not None: + self.created_by = created_by + if metadata is not None: + self.metadata = metadata @property def id(self): @@ -627,6 +639,52 @@ def created_at(self, created_at): self._created_at = created_at + @property + def created_by(self): + """Gets the created_by of this GroupInfo. # noqa: E501 + + The username of the group's creator, if known. # noqa: E501 + + :return: The created_by of this GroupInfo. # noqa: E501 + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """Sets the created_by of this GroupInfo. + + The username of the group's creator, if known. # noqa: E501 + + :param created_by: The created_by of this GroupInfo. # noqa: E501 + :type: str + """ + + self._created_by = created_by + + @property + def metadata(self): + """Gets the metadata of this GroupInfo. # noqa: E501 + + Contains metadata of the group. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. # noqa: E501 + + :return: The metadata of this GroupInfo. # noqa: E501 + :rtype: list[MetadataStringifiedEntry] + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this GroupInfo. + + Contains metadata of the group. **Note:** This property is included in the response only if the `with_metadata` query parameter is set to `true`. # noqa: E501 + + :param metadata: The metadata of this GroupInfo. # noqa: E501 + :type: list[MetadataStringifiedEntry] + """ + + self._metadata = metadata + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/tiledb/cloud/rest_api/models/inline_object1.py b/src/tiledb/cloud/rest_api/models/inline_object1.py new file mode 100644 index 000000000..cf7528f20 --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/inline_object1.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class InlineObject1(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"namespaces": "list[str]"} + + attribute_map = {"namespaces": "namespaces"} + + def __init__(self, namespaces=None, local_vars_configuration=None): # noqa: E501 + """InlineObject1 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._namespaces = None + self.discriminator = None + + if namespaces is not None: + self.namespaces = namespaces + + @property + def namespaces(self): + """Gets the namespaces of this InlineObject1. # noqa: E501 + + + :return: The namespaces of this InlineObject1. # noqa: E501 + :rtype: list[str] + """ + return self._namespaces + + @namespaces.setter + def namespaces(self, namespaces): + """Sets the namespaces of this InlineObject1. + + + :param namespaces: The namespaces of this InlineObject1. # noqa: E501 + :type: list[str] + """ + + self._namespaces = namespaces + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineObject1): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineObject1): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/load_array_schema_request.py b/src/tiledb/cloud/rest_api/models/load_array_schema_request.py new file mode 100644 index 000000000..e0cbd97fc --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/load_array_schema_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class LoadArraySchemaRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"config": "TileDBConfig"} + + attribute_map = {"config": "config"} + + def __init__(self, config=None, local_vars_configuration=None): # noqa: E501 + """LoadArraySchemaRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._config = None + self.discriminator = None + + if config is not None: + self.config = config + + @property + def config(self): + """Gets the config of this LoadArraySchemaRequest. # noqa: E501 + + + :return: The config of this LoadArraySchemaRequest. # noqa: E501 + :rtype: TileDBConfig + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this LoadArraySchemaRequest. + + + :param config: The config of this LoadArraySchemaRequest. # noqa: E501 + :type: TileDBConfig + """ + + self._config = config + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LoadArraySchemaRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LoadArraySchemaRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/load_array_schema_response.py b/src/tiledb/cloud/rest_api/models/load_array_schema_response.py new file mode 100644 index 000000000..4e1ea6aed --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/load_array_schema_response.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class LoadArraySchemaResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "latest_array_schema": "ArraySchema", + "all_array_schemas": "dict(str, ArraySchema)", + } + + attribute_map = { + "latest_array_schema": "latest_array_schema", + "all_array_schemas": "all_array_schemas", + } + + def __init__( + self, + latest_array_schema=None, + all_array_schemas=None, + local_vars_configuration=None, + ): # noqa: E501 + """LoadArraySchemaResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._latest_array_schema = None + self._all_array_schemas = None + self.discriminator = None + + if latest_array_schema is not None: + self.latest_array_schema = latest_array_schema + if all_array_schemas is not None: + self.all_array_schemas = all_array_schemas + + @property + def latest_array_schema(self): + """Gets the latest_array_schema of this LoadArraySchemaResponse. # noqa: E501 + + + :return: The latest_array_schema of this LoadArraySchemaResponse. # noqa: E501 + :rtype: ArraySchema + """ + return self._latest_array_schema + + @latest_array_schema.setter + def latest_array_schema(self, latest_array_schema): + """Sets the latest_array_schema of this LoadArraySchemaResponse. + + + :param latest_array_schema: The latest_array_schema of this LoadArraySchemaResponse. # noqa: E501 + :type: ArraySchema + """ + + self._latest_array_schema = latest_array_schema + + @property + def all_array_schemas(self): + """Gets the all_array_schemas of this LoadArraySchemaResponse. # noqa: E501 + + map of all array schemas # noqa: E501 + + :return: The all_array_schemas of this LoadArraySchemaResponse. # noqa: E501 + :rtype: dict(str, ArraySchema) + """ + return self._all_array_schemas + + @all_array_schemas.setter + def all_array_schemas(self, all_array_schemas): + """Sets the all_array_schemas of this LoadArraySchemaResponse. + + map of all array schemas # noqa: E501 + + :param all_array_schemas: The all_array_schemas of this LoadArraySchemaResponse. # noqa: E501 + :type: dict(str, ArraySchema) + """ + + self._all_array_schemas = all_array_schemas + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LoadArraySchemaResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LoadArraySchemaResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/metadata_stringified.py b/src/tiledb/cloud/rest_api/models/metadata_stringified.py new file mode 100644 index 000000000..db3068219 --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/metadata_stringified.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class MetadataStringified(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"entries": "list[MetadataStringifiedEntry]"} + + attribute_map = {"entries": "entries"} + + def __init__(self, entries=None, local_vars_configuration=None): # noqa: E501 + """MetadataStringified - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._entries = None + self.discriminator = None + + if entries is not None: + self.entries = entries + + @property + def entries(self): + """Gets the entries of this MetadataStringified. # noqa: E501 + + List of metadata entries # noqa: E501 + + :return: The entries of this MetadataStringified. # noqa: E501 + :rtype: list[MetadataStringifiedEntry] + """ + return self._entries + + @entries.setter + def entries(self, entries): + """Sets the entries of this MetadataStringified. + + List of metadata entries # noqa: E501 + + :param entries: The entries of this MetadataStringified. # noqa: E501 + :type: list[MetadataStringifiedEntry] + """ + + self._entries = entries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MetadataStringified): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MetadataStringified): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/metadata_stringified_entry.py b/src/tiledb/cloud/rest_api/models/metadata_stringified_entry.py new file mode 100644 index 000000000..d8897d770 --- /dev/null +++ b/src/tiledb/cloud/rest_api/models/metadata_stringified_entry.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + TileDB Storage Platform API + + TileDB Storage Platform REST API # noqa: E501 + + The version of the OpenAPI document: 2.17.51 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tiledb.cloud.rest_api.configuration import Configuration + + +class MetadataStringifiedEntry(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"key": "str", "value": "str", "type": "str"} + + attribute_map = {"key": "key", "value": "value", "type": "type"} + + def __init__( + self, key=None, value=None, type=None, local_vars_configuration=None + ): # noqa: E501 + """MetadataStringifiedEntry - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._key = None + self._value = None + self._type = None + self.discriminator = None + + if key is not None: + self.key = key + if value is not None: + self.value = value + if type is not None: + self.type = type + + @property + def key(self): + """Gets the key of this MetadataStringifiedEntry. # noqa: E501 + + The metadata key # noqa: E501 + + :return: The key of this MetadataStringifiedEntry. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this MetadataStringifiedEntry. + + The metadata key # noqa: E501 + + :param key: The key of this MetadataStringifiedEntry. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def value(self): + """Gets the value of this MetadataStringifiedEntry. # noqa: E501 + + The metadata value # noqa: E501 + + :return: The value of this MetadataStringifiedEntry. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this MetadataStringifiedEntry. + + The metadata value # noqa: E501 + + :param value: The value of this MetadataStringifiedEntry. # noqa: E501 + :type: str + """ + + self._value = value + + @property + def type(self): + """Gets the type of this MetadataStringifiedEntry. # noqa: E501 + + The metadata type # noqa: E501 + + :return: The type of this MetadataStringifiedEntry. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this MetadataStringifiedEntry. + + The metadata type # noqa: E501 + + :param type: The type of this MetadataStringifiedEntry. # noqa: E501 + :type: str + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list( + map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) + ) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") + else item, + value.items(), + ) + ) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MetadataStringifiedEntry): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MetadataStringifiedEntry): + return True + + return self.to_dict() != other.to_dict() diff --git a/src/tiledb/cloud/rest_api/models/organization_user.py b/src/tiledb/cloud/rest_api/models/organization_user.py index d3465d098..76db8648f 100644 --- a/src/tiledb/cloud/rest_api/models/organization_user.py +++ b/src/tiledb/cloud/rest_api/models/organization_user.py @@ -36,6 +36,8 @@ class OrganizationUser(object): "user_id": "str", "organization_id": "str", "username": "str", + "user_full_name": "str", + "user_email": "str", "organization_name": "str", "role": "OrganizationRoles", "allowed_actions": "list[NamespaceActions]", @@ -45,6 +47,8 @@ class OrganizationUser(object): "user_id": "user_id", "organization_id": "organization_id", "username": "username", + "user_full_name": "user_full_name", + "user_email": "user_email", "organization_name": "organization_name", "role": "role", "allowed_actions": "allowed_actions", @@ -55,6 +59,8 @@ def __init__( user_id=None, organization_id=None, username=None, + user_full_name=None, + user_email=None, organization_name=None, role=None, allowed_actions=None, @@ -68,6 +74,8 @@ def __init__( self._user_id = None self._organization_id = None self._username = None + self._user_full_name = None + self._user_email = None self._organization_name = None self._role = None self._allowed_actions = None @@ -79,6 +87,10 @@ def __init__( self.organization_id = organization_id if username is not None: self.username = username + if user_full_name is not None: + self.user_full_name = user_full_name + if user_email is not None: + self.user_email = user_email if organization_name is not None: self.organization_name = organization_name if role is not None: @@ -155,6 +167,52 @@ def username(self, username): self._username = username + @property + def user_full_name(self): + """Gets the user_full_name of this OrganizationUser. # noqa: E501 + + full name of the user; available to organization admins # noqa: E501 + + :return: The user_full_name of this OrganizationUser. # noqa: E501 + :rtype: str + """ + return self._user_full_name + + @user_full_name.setter + def user_full_name(self, user_full_name): + """Sets the user_full_name of this OrganizationUser. + + full name of the user; available to organization admins # noqa: E501 + + :param user_full_name: The user_full_name of this OrganizationUser. # noqa: E501 + :type: str + """ + + self._user_full_name = user_full_name + + @property + def user_email(self): + """Gets the user_email of this OrganizationUser. # noqa: E501 + + email address of the user; available to organization admins # noqa: E501 + + :return: The user_email of this OrganizationUser. # noqa: E501 + :rtype: str + """ + return self._user_email + + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this OrganizationUser. + + email address of the user; available to organization admins # noqa: E501 + + :param user_email: The user_email of this OrganizationUser. # noqa: E501 + :type: str + """ + + self._user_email = user_email + @property def organization_name(self): """Gets the organization_name of this OrganizationUser. # noqa: E501 diff --git a/src/tiledb/cloud/rest_api/models/registered_task_graph.py b/src/tiledb/cloud/rest_api/models/registered_task_graph.py index 2b6d0c7ed..a78377827 100644 --- a/src/tiledb/cloud/rest_api/models/registered_task_graph.py +++ b/src/tiledb/cloud/rest_api/models/registered_task_graph.py @@ -162,6 +162,14 @@ def name(self, name): :param name: The name of this RegisteredTaskGraph. # noqa: E501 :type: str """ + if ( + self.local_vars_configuration.client_side_validation + and name is not None + and len(name) > 255 + ): + raise ValueError( + "Invalid value for `name`, length must be less than or equal to `255`" + ) # noqa: E501 self._name = name diff --git a/src/tiledb/cloud/rest_api/models/task_graph.py b/src/tiledb/cloud/rest_api/models/task_graph.py index 399450931..279c248e4 100644 --- a/src/tiledb/cloud/rest_api/models/task_graph.py +++ b/src/tiledb/cloud/rest_api/models/task_graph.py @@ -197,6 +197,14 @@ def name(self, name): :param name: The name of this TaskGraph. # noqa: E501 :type: str """ + if ( + self.local_vars_configuration.client_side_validation + and name is not None + and len(name) > 255 + ): + raise ValueError( + "Invalid value for `name`, length must be less than or equal to `255`" + ) # noqa: E501 self._name = name @@ -294,7 +302,7 @@ def retry_strategy(self, retry_strategy): def deadline(self): """Gets the deadline of this TaskGraph. # noqa: E501 - Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. # noqa: E501 + Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. Defaults to 24h when unset # noqa: E501 :return: The deadline of this TaskGraph. # noqa: E501 :rtype: int @@ -305,7 +313,7 @@ def deadline(self): def deadline(self, deadline): """Sets the deadline of this TaskGraph. - Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. # noqa: E501 + Duration in seconds relative to the workflow start time which the workflow is allowed to run before it gets terminated. Defaults to 24h when unset # noqa: E501 :param deadline: The deadline of this TaskGraph. # noqa: E501 :type: int diff --git a/src/tiledb/cloud/rest_api/models/task_graph_log.py b/src/tiledb/cloud/rest_api/models/task_graph_log.py index 96f7e1bd2..42ab90e58 100644 --- a/src/tiledb/cloud/rest_api/models/task_graph_log.py +++ b/src/tiledb/cloud/rest_api/models/task_graph_log.py @@ -49,6 +49,8 @@ class TaskGraphLog(object): "nodes": "list[TaskGraphNodeMetadata]", "task_graph_type": "TaskGraphType", "task_graph_id": "str", + "cloud_provider": "str", + "cloud_region": "str", } attribute_map = { @@ -68,6 +70,8 @@ class TaskGraphLog(object): "nodes": "nodes", "task_graph_type": "task_graph_type", "task_graph_id": "task_graph_id", + "cloud_provider": "cloud_provider", + "cloud_region": "cloud_region", } def __init__( @@ -88,6 +92,8 @@ def __init__( nodes=None, task_graph_type=None, task_graph_id=None, + cloud_provider=None, + cloud_region=None, local_vars_configuration=None, ): # noqa: E501 """TaskGraphLog - a model defined in OpenAPI""" # noqa: E501 @@ -111,6 +117,8 @@ def __init__( self._nodes = None self._task_graph_type = None self._task_graph_id = None + self._cloud_provider = None + self._cloud_region = None self.discriminator = None if uuid is not None: @@ -140,6 +148,10 @@ def __init__( self.task_graph_type = task_graph_type if task_graph_id is not None: self.task_graph_id = task_graph_id + if cloud_provider is not None: + self.cloud_provider = cloud_provider + if cloud_region is not None: + self.cloud_region = cloud_region @property def uuid(self): @@ -505,6 +517,52 @@ def task_graph_id(self, task_graph_id): self._task_graph_id = task_graph_id + @property + def cloud_provider(self): + """Gets the cloud_provider of this TaskGraphLog. # noqa: E501 + + The name of the cloud provider where this task graph executed. # noqa: E501 + + :return: The cloud_provider of this TaskGraphLog. # noqa: E501 + :rtype: str + """ + return self._cloud_provider + + @cloud_provider.setter + def cloud_provider(self, cloud_provider): + """Sets the cloud_provider of this TaskGraphLog. + + The name of the cloud provider where this task graph executed. # noqa: E501 + + :param cloud_provider: The cloud_provider of this TaskGraphLog. # noqa: E501 + :type: str + """ + + self._cloud_provider = cloud_provider + + @property + def cloud_region(self): + """Gets the cloud_region of this TaskGraphLog. # noqa: E501 + + The region of the cloud provider where this task graph executed. # noqa: E501 + + :return: The cloud_region of this TaskGraphLog. # noqa: E501 + :rtype: str + """ + return self._cloud_region + + @cloud_region.setter + def cloud_region(self, cloud_region): + """Sets the cloud_region of this TaskGraphLog. + + The region of the cloud provider where this task graph executed. # noqa: E501 + + :param cloud_region: The cloud_region of this TaskGraphLog. # noqa: E501 + :type: str + """ + + self._cloud_region = cloud_region + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/src/tiledb/cloud/rest_api/models/task_graph_log_status.py b/src/tiledb/cloud/rest_api/models/task_graph_log_status.py index 64f1b9b92..bfd83ce43 100644 --- a/src/tiledb/cloud/rest_api/models/task_graph_log_status.py +++ b/src/tiledb/cloud/rest_api/models/task_graph_log_status.py @@ -31,7 +31,6 @@ class TaskGraphLogStatus(object): SUBMITTED = "submitted" RUNNING = "running" IDLE = "idle" - UNFINISHED = "unfinished" ABANDONED = "abandoned" SUCCEEDED = "succeeded" FAILED = "failed" @@ -41,7 +40,6 @@ class TaskGraphLogStatus(object): SUBMITTED, RUNNING, IDLE, - UNFINISHED, ABANDONED, SUCCEEDED, FAILED, diff --git a/src/tiledb/cloud/rest_api/models/task_graph_node.py b/src/tiledb/cloud/rest_api/models/task_graph_node.py index 634a5a537..46c4bafe1 100644 --- a/src/tiledb/cloud/rest_api/models/task_graph_node.py +++ b/src/tiledb/cloud/rest_api/models/task_graph_node.py @@ -147,6 +147,14 @@ def name(self, name): :param name: The name of this TaskGraphNode. # noqa: E501 :type: str """ + if ( + self.local_vars_configuration.client_side_validation + and name is not None + and len(name) > 255 + ): + raise ValueError( + "Invalid value for `name`, length must be less than or equal to `255`" + ) # noqa: E501 self._name = name diff --git a/src/tiledb/cloud/rest_api/models/task_graph_node_metadata.py b/src/tiledb/cloud/rest_api/models/task_graph_node_metadata.py index 663a155fa..9ce890ca3 100644 --- a/src/tiledb/cloud/rest_api/models/task_graph_node_metadata.py +++ b/src/tiledb/cloud/rest_api/models/task_graph_node_metadata.py @@ -134,6 +134,14 @@ def name(self, name): :param name: The name of this TaskGraphNodeMetadata. # noqa: E501 :type: str """ + if ( + self.local_vars_configuration.client_side_validation + and name is not None + and len(name) > 255 + ): + raise ValueError( + "Invalid value for `name`, length must be less than or equal to `255`" + ) # noqa: E501 self._name = name From bf9065b391b92c2714a3d63a65226dd41c13e0c5 Mon Sep 17 00:00:00 2001 From: Paul Fisher Date: Wed, 11 Sep 2024 15:41:59 -0400 Subject: [PATCH 2/3] Add functions to access new asset listing endpoints. --- src/tiledb/cloud/__init__.py | 4 ++ src/tiledb/cloud/asset.py | 104 ++++++++++++++++++++++++++++++++--- tests/test_asset.py | 12 ++++ 3 files changed, 113 insertions(+), 7 deletions(-) diff --git a/src/tiledb/cloud/__init__.py b/src/tiledb/cloud/__init__.py index a8fc26a1a..33bace447 100644 --- a/src/tiledb/cloud/__init__.py +++ b/src/tiledb/cloud/__init__.py @@ -16,6 +16,8 @@ from .array import register_array from .array import share_array from .array import unshare_array +from .asset import list as list_assets +from .asset import list_public as list_public_assets from .client import Config from .client import Ctx from .client import list_arrays @@ -72,7 +74,9 @@ "Config", "Ctx", "list_arrays", + "list_assets", "list_public_arrays", + "list_public_assets", "list_public_groups", "list_shared_arrays", "list_shared_groups", diff --git a/src/tiledb/cloud/asset.py b/src/tiledb/cloud/asset.py index 3ecf71f61..a6057c1ee 100644 --- a/src/tiledb/cloud/asset.py +++ b/src/tiledb/cloud/asset.py @@ -1,19 +1,109 @@ """An asset may be an array or a group.""" from functools import partial -from typing import Callable, List, Mapping, Optional, Union +from typing import Callable, List, Literal, Mapping, Optional, Union import tiledb -from . import array # type: ignore -from . import groups # type: ignore -from .rest_api.models import ArrayInfo # type: ignore -from .rest_api.models import GroupInfo # type: ignore +from . import array +from . import client +from . import groups +from .rest_api import models +from .rest_api.api import assets_api + +_AssetType = Union[Literal["array"], Literal["group"]] +_Depth = Union[Literal["root"], Literal["all"]] +_OwnershipLevel = Union[Literal["owned"], Literal["shared"]] + + +def list( + *, + namespace: Optional[str] = None, + search: Optional[str] = None, + type: Optional[_AssetType] = None, + ownership_level: Optional[_OwnershipLevel] = None, + depth: Optional[_Depth] = None, + expand: Optional[str] = None, + page: Optional[int] = None, + per_page: Optional[int] = None, + order_by: Optional[str] = None, +) -> models.AssetListResponse: + """List/search for stored assets. + + :param namespace: The namespace to use, or the current user if absent. + :param search: A search string to use. + :param type: If provided, include only assets of the specified type + ("array" or "group"). + :param ownership_level: If provided, include only assets you own ("owned"), + or only assets that are shared with you ("shared"). + :param depth: The depth to provide return information. + If "root", only root assets (i.e., arrays and groups that are not + contained within another group) will be returned. + If "all", all assets that match (including those which are contained in + another group) will be included. + :param expand: Comma-separated string specifying additional information + to include in the response. As of this writing, "metadata" is supported. + :param page: Which page of results to retrieve. 1-based. + :param per_page: How many results to include on each page. + :param order_by: The order to return assets, by default "created_at desc". + Supported keys are "created_at", "name", and "asset_type". + They can be used alone or with "asc" or "desc" separated by a space + (e.g. "created_at", "asset_type asc"). + """ + return client.build(assets_api.AssetsApi).list_assets( + namespace or client.default_user().username, + search=search, + asset_type=type, + ownership_level=ownership_level, + depth=depth, + expand=expand, + page=page, + per_page=per_page, + order_by=order_by, + ) + + +def list_public( + *, + search: Optional[str] = None, + type: Optional[_AssetType] = None, + depth: Optional[_Depth] = None, + page: Optional[int] = None, + per_page: Optional[int] = None, + order_by: Optional[str] = None, +) -> models.AssetListResponse: + """List/search for publicly-shared assets. + + :param search: A search string to use. + :param type: If provided, include only assets of the specified type + ("array" or "group"). + :param depth: The depth to provide return information. + If "root", only root assets (i.e., arrays and groups that are not + contained within another group) will be returned. + If "all", all assets that match (including those which are contained in + another group) will be included. + :param expand: Comma-separated string specifying additional information + to include in the response. As of this writing, "metadata" is supported. + :param page: Which page of results to retrieve. 1-based. + :param per_page: How many results to include on each page. + :param order_by: The order to return assets, by default "created_at desc". + Supported keys are "created_at", "name", and "asset_type". + They can be used alone or with "asc" or "desc" separated by a space + (e.g. "created_at", "asset_type asc"). + """ + return client.build(assets_api.AssetsApi).list_public_assets( + search=search, + asset_type=type, + depth=depth, + page=page, + per_page=per_page, + order_by=order_by, + ) def register( storage_uri: str, - type: str, + type: _AssetType, *, dest_uri: Optional[str] = None, name: Optional[str] = None, @@ -108,7 +198,7 @@ def delete(uri: str, *, recursive: Optional[bool] = False) -> None: return func(uri) -def info(uri: str) -> Union[ArrayInfo, GroupInfo]: +def info(uri: str) -> Union[models.ArrayInfo, models.GroupInfo]: """Retrieve information about an asset. :param uri: tiledb URI of the asset. diff --git a/tests/test_asset.py b/tests/test_asset.py index 6ff6c7b77..fe5e235f9 100644 --- a/tests/test_asset.py +++ b/tests/test_asset.py @@ -217,6 +217,18 @@ def test_asset_deregister_group_recursive_dispatch(deregister_group, object_type deregister_group.assert_called_once_with("g", recursive=True) +class ListingTest(unittest.TestCase): + def test_list(self) -> None: + # Ensure that we have at least one asset registered (a UDF) + with testonly.register_udf(lambda: 1, func_name="some_lambda"): + result = asset.list(page=1, per_page=2) + self.assertGreater(result.pagination_metadata.total_items, 0) + + def test_list_public(self) -> None: + result = asset.list_public(page=1, per_page=2) + self.assertGreater(result.pagination_metadata.total_items, 0) + + class RegistrationTest(unittest.TestCase): def setUp(self): super().setUp() From 5fe5f27c0900eae4377722ed8f0e87549260288c Mon Sep 17 00:00:00 2001 From: Paul Fisher Date: Thu, 12 Sep 2024 16:21:12 -0400 Subject: [PATCH 3/3] Allow passing "expand" as a sequence. --- src/tiledb/cloud/asset.py | 17 ++++++++++++++--- tests/test_asset.py | 12 ++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/tiledb/cloud/asset.py b/src/tiledb/cloud/asset.py index a6057c1ee..8199b0647 100644 --- a/src/tiledb/cloud/asset.py +++ b/src/tiledb/cloud/asset.py @@ -1,7 +1,7 @@ """An asset may be an array or a group.""" from functools import partial -from typing import Callable, List, Literal, Mapping, Optional, Union +from typing import Callable, Iterable, List, Literal, Mapping, Optional, Union import tiledb @@ -14,6 +14,8 @@ _AssetType = Union[Literal["array"], Literal["group"]] _Depth = Union[Literal["root"], Literal["all"]] _OwnershipLevel = Union[Literal["owned"], Literal["shared"]] +_CSVString = Union[str, Iterable[str]] +"""Either a CSV-style string ``"a,b,c"`` or a sequence ``("a", "b", "c")``.""" def list( @@ -23,7 +25,7 @@ def list( type: Optional[_AssetType] = None, ownership_level: Optional[_OwnershipLevel] = None, depth: Optional[_Depth] = None, - expand: Optional[str] = None, + expand: Optional[_CSVString] = None, page: Optional[int] = None, per_page: Optional[int] = None, order_by: Optional[str] = None, @@ -56,7 +58,7 @@ def list( asset_type=type, ownership_level=ownership_level, depth=depth, - expand=expand, + expand=_canonicalize_csv(expand), page=page, per_page=per_page, order_by=order_by, @@ -317,3 +319,12 @@ def unshare(uri: str, namespace: str) -> None: """ share(uri, namespace, []) + + +def _canonicalize_csv(seq: Optional[_CSVString]) -> Optional[str]: + """Canonicalizes sequences into a CSV-like string. Empty becomes None.""" + if not seq: + return None + if not isinstance(seq, str): + seq = ",".join(seq) + return seq or None diff --git a/tests/test_asset.py b/tests/test_asset.py index fe5e235f9..ac1823217 100644 --- a/tests/test_asset.py +++ b/tests/test_asset.py @@ -228,6 +228,18 @@ def test_list_public(self) -> None: result = asset.list_public(page=1, per_page=2) self.assertGreater(result.pagination_metadata.total_items, 0) + def test_canonicalize_csv(self) -> None: + in_out = ( + ("", None), + ("a,b", "a,b"), + (("a", "b"), "a,b"), + ([""], None), + ((), None), + (None, None), + ) + for inp, outp in in_out: + self.assertEqual(outp, asset._canonicalize_csv(inp)) + class RegistrationTest(unittest.TestCase): def setUp(self):