Skip to content

Commit

Permalink
Update specs for input expiration (#1466)
Browse files Browse the repository at this point in the history
  • Loading branch information
guarin authored Jan 5, 2024
1 parent ee016da commit 534cdf4
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 565 deletions.
2 changes: 1 addition & 1 deletion lightly/openapi_generated/swagger_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_create_request import DockerWorkerConfigV3CreateRequest
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_data import DockerWorkerConfigV3Data
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_datasource_input_expiration import DockerWorkerConfigV3DatasourceInputExpiration
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker import DockerWorkerConfigV3Docker
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_corruptness_check import DockerWorkerConfigV3DockerCorruptnessCheck
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_datasource import DockerWorkerConfigV3DockerDatasource
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_datasource_input_expiration import DockerWorkerConfigV3DockerDatasourceInputExpiration
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_training import DockerWorkerConfigV3DockerTraining
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly import DockerWorkerConfigV3Lightly
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_checkpoint_callback import DockerWorkerConfigV3LightlyCheckpointCallback
Expand Down
280 changes: 0 additions & 280 deletions lightly/openapi_generated/swagger_client/__init__.py-e

This file was deleted.

22 changes: 0 additions & 22 deletions lightly/openapi_generated/swagger_client/api/__init__.py-e

This file was deleted.

149 changes: 148 additions & 1 deletion lightly/openapi_generated/swagger_client/api/datasets_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictInt, conint, constr, validator
from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator

from typing import List, Optional

Expand Down Expand Up @@ -1026,6 +1026,153 @@ def get_datasets_enriched_with_http_info(self, shared : Annotated[Optional[Stric
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@validate_arguments
def get_datasets_enriched_query_by_ids(self, dataset_ids : conlist(StrictStr), **kwargs) -> List[DatasetDataEnriched]: # noqa: E501
"""get_datasets_enriched_query_by_ids # noqa: E501
Query for datasets enriched with additional information by their Ids. Includes team and shared datasets. Used for favorite resolving # 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_datasets_enriched_query_by_ids(dataset_ids, async_req=True)
>>> result = thread.get()
:param dataset_ids: (required)
:type dataset_ids: List[str]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
: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: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: List[DatasetDataEnriched]
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
raise ValueError("Error! Please call the get_datasets_enriched_query_by_ids_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.get_datasets_enriched_query_by_ids_with_http_info(dataset_ids, **kwargs) # noqa: E501

@validate_arguments
def get_datasets_enriched_query_by_ids_with_http_info(self, dataset_ids : conlist(StrictStr), **kwargs) -> ApiResponse: # noqa: E501
"""get_datasets_enriched_query_by_ids # noqa: E501
Query for datasets enriched with additional information by their Ids. Includes team and shared datasets. Used for favorite resolving # 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_datasets_enriched_query_by_ids_with_http_info(dataset_ids, async_req=True)
>>> result = thread.get()
:param dataset_ids: (required)
:type dataset_ids: List[str]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
be set to none and raw_data will store the
HTTP response body without reading/decoding.
Default is True.
:type _preload_content: bool, optional
:param _return_http_data_only: response data instead of ApiResponse
object with status code, headers, etc
:type _return_http_data_only: bool, optional
: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.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(List[DatasetDataEnriched], status_code(int), headers(HTTPHeaderDict))
"""

_params = locals()

_all_params = [
'dataset_ids'
]
_all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)

# validate the arguments
for _key, _val in _params['kwargs'].items():
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_datasets_enriched_query_by_ids" % _key
)
_params[_key] = _val
del _params['kwargs']

_collection_formats = {}

# process the path parameters
_path_params = {}

# process the query parameters
_query_params = []
if _params.get('dataset_ids') is not None: # noqa: E501
_query_params.append((
'datasetIds',
_params['dataset_ids'].value if hasattr(_params['dataset_ids'], 'value') else _params['dataset_ids']
))
_collection_formats['datasetIds'] = 'multi'

# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
_form_params = []
_files = {}
# process the body parameter
_body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# authentication setting
_auth_settings = ['auth0Bearer', 'ApiKeyAuth'] # noqa: E501

_response_types_map = {
'200': "List[DatasetDataEnriched]",
'400': "ApiErrorResponse",
'401': "ApiErrorResponse",
'403': "ApiErrorResponse",
'404': "ApiErrorResponse",
}

return self.api_client.call_api(
'/v1/datasets/enriched/query/ids', 'GET',
_path_params,
_query_params,
_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
response_types_map=_response_types_map,
auth_settings=_auth_settings,
async_req=_params.get('async_req'),
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
_preload_content=_params.get('_preload_content', True),
_request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@validate_arguments
def get_datasets_enriched_query_by_name(self, dataset_name : constr(strict=True, min_length=1), shared : Annotated[Optional[StrictBool], Field(description="if set, only returns the datasets which have been shared with the user")] = None, exact : Annotated[Optional[StrictBool], Field(description="if set, only returns the datasets which match the name exactly (not just by prefix)")] = None, get_assets_of_team : Annotated[Optional[StrictBool], Field(description="if this flag is true, we get the relevant asset of the team of the user rather than the assets of the user")] = None, get_assets_of_team_inclusive_self : Annotated[Optional[StrictBool], Field(description="if this flag is true, we get the relevant asset of the team of the user including the assets of the user")] = None, page_size : Annotated[Optional[conint(strict=True, ge=1)], Field(description="pagination size/limit of the number of samples to return")] = None, page_offset : Annotated[Optional[conint(strict=True, ge=0)], Field(description="pagination offset")] = None, **kwargs) -> List[DatasetDataEnriched]: # noqa: E501
"""get_datasets_enriched_query_by_name # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_create_request import DockerWorkerConfigV3CreateRequest
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_data import DockerWorkerConfigV3Data
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_datasource_input_expiration import DockerWorkerConfigV3DatasourceInputExpiration
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker import DockerWorkerConfigV3Docker
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_corruptness_check import DockerWorkerConfigV3DockerCorruptnessCheck
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_datasource import DockerWorkerConfigV3DockerDatasource
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_datasource_input_expiration import DockerWorkerConfigV3DockerDatasourceInputExpiration
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_training import DockerWorkerConfigV3DockerTraining
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly import DockerWorkerConfigV3Lightly
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_checkpoint_callback import DockerWorkerConfigV3LightlyCheckpointCallback
Expand Down
Loading

0 comments on commit 534cdf4

Please sign in to comment.