Skip to content

Commit

Permalink
update specs for autoTasks (#1715)
Browse files Browse the repository at this point in the history
update specs for autoTasks
  • Loading branch information
japrescott authored Nov 1, 2024
1 parent c4551db commit 77c624c
Show file tree
Hide file tree
Showing 16 changed files with 1,070 additions and 9 deletions.
9 changes: 9 additions & 0 deletions lightly/openapi_generated/swagger_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,20 @@
from lightly.openapi_generated.swagger_client.models.api_error_code import ApiErrorCode
from lightly.openapi_generated.swagger_client.models.api_error_response import ApiErrorResponse
from lightly.openapi_generated.swagger_client.models.async_task_data import AsyncTaskData
from lightly.openapi_generated.swagger_client.models.auto_task import AutoTask
from lightly.openapi_generated.swagger_client.models.auto_task_base import AutoTaskBase
from lightly.openapi_generated.swagger_client.models.auto_task_crop import AutoTaskCrop
from lightly.openapi_generated.swagger_client.models.auto_task_crop_all_of import AutoTaskCropAllOf
from lightly.openapi_generated.swagger_client.models.auto_task_tiling import AutoTaskTiling
from lightly.openapi_generated.swagger_client.models.auto_task_tiling_all_of import AutoTaskTilingAllOf
from lightly.openapi_generated.swagger_client.models.categorical_distribution import CategoricalDistribution
from lightly.openapi_generated.swagger_client.models.categorical_distribution_metrics import CategoricalDistributionMetrics
from lightly.openapi_generated.swagger_client.models.categorical_distribution_per_set import CategoricalDistributionPerSet
from lightly.openapi_generated.swagger_client.models.configuration_data import ConfigurationData
from lightly.openapi_generated.swagger_client.models.configuration_entry import ConfigurationEntry
from lightly.openapi_generated.swagger_client.models.configuration_set_request import ConfigurationSetRequest
from lightly.openapi_generated.swagger_client.models.configuration_value_data_type import ConfigurationValueDataType
from lightly.openapi_generated.swagger_client.models.consent import Consent
from lightly.openapi_generated.swagger_client.models.create_cf_bucket_activity_request import CreateCFBucketActivityRequest
from lightly.openapi_generated.swagger_client.models.create_docker_worker_registry_entry_request import CreateDockerWorkerRegistryEntryRequest
from lightly.openapi_generated.swagger_client.models.create_entity_response import CreateEntityResponse
Expand Down Expand Up @@ -179,6 +186,7 @@
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_data import DockerWorkerConfigV4Data
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_data_all_of import DockerWorkerConfigV4DataAllOf
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_docker import DockerWorkerConfigV4Docker
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_docker_crops import DockerWorkerConfigV4DockerCrops
from lightly.openapi_generated.swagger_client.models.docker_worker_config_vx_data import DockerWorkerConfigVXData
from lightly.openapi_generated.swagger_client.models.docker_worker_config_vx_data_base import DockerWorkerConfigVXDataBase
from lightly.openapi_generated.swagger_client.models.docker_worker_registry_entry_data import DockerWorkerRegistryEntryData
Expand Down Expand Up @@ -321,6 +329,7 @@
from lightly.openapi_generated.swagger_client.models.trigger2d_embedding_job_request import Trigger2dEmbeddingJobRequest
from lightly.openapi_generated.swagger_client.models.update_docker_worker_registry_entry_request import UpdateDockerWorkerRegistryEntryRequest
from lightly.openapi_generated.swagger_client.models.update_team_membership_request import UpdateTeamMembershipRequest
from lightly.openapi_generated.swagger_client.models.usage import Usage
from lightly.openapi_generated.swagger_client.models.user_type import UserType
from lightly.openapi_generated.swagger_client.models.video_frame_data import VideoFrameData
from lightly.openapi_generated.swagger_client.models.worker_information import WorkerInformation
Expand Down
151 changes: 151 additions & 0 deletions lightly/openapi_generated/swagger_client/api/teams_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,157 @@ def get_team_members_by_id_with_http_info(self, team_id : Annotated[constr(stric
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@validate_arguments
def service_account_reset_token(self, team_id : Annotated[constr(strict=True), Field(..., description="id of the team")], service_account_id : Annotated[StrictStr, Field(..., description="id of the serviceAccount")], **kwargs) -> str: # noqa: E501
"""service_account_reset_token # noqa: E501
Reset token of service account and generate a new one. This is not ideal because the user does not have a transition time between the old and new token (e.g for this pipelines). Also, the token should be a JWT or similar. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.service_account_reset_token(team_id, service_account_id, async_req=True)
>>> result = thread.get()
:param team_id: id of the team (required)
:type team_id: str
:param service_account_id: id of the serviceAccount (required)
:type service_account_id: 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: str
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
raise ValueError("Error! Please call the service_account_reset_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
return self.service_account_reset_token_with_http_info(team_id, service_account_id, **kwargs) # noqa: E501

@validate_arguments
def service_account_reset_token_with_http_info(self, team_id : Annotated[constr(strict=True), Field(..., description="id of the team")], service_account_id : Annotated[StrictStr, Field(..., description="id of the serviceAccount")], **kwargs) -> ApiResponse: # noqa: E501
"""service_account_reset_token # noqa: E501
Reset token of service account and generate a new one. This is not ideal because the user does not have a transition time between the old and new token (e.g for this pipelines). Also, the token should be a JWT or similar. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.service_account_reset_token_with_http_info(team_id, service_account_id, async_req=True)
>>> result = thread.get()
:param team_id: id of the team (required)
:type team_id: str
:param service_account_id: id of the serviceAccount (required)
:type service_account_id: 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(str, status_code(int), headers(HTTPHeaderDict))
"""

_params = locals()

_all_params = [
'team_id',
'service_account_id'
]
_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 service_account_reset_token" % _key
)
_params[_key] = _val
del _params['kwargs']

_collection_formats = {}

# process the path parameters
_path_params = {}
if _params['team_id']:
_path_params['teamId'] = _params['team_id']

if _params['service_account_id']:
_path_params['serviceAccountId'] = _params['service_account_id']


# process the query parameters
_query_params = []
# 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': "str",
'400': "ApiErrorResponse",
'401': "ApiErrorResponse",
'403': "ApiErrorResponse",
'404': "ApiErrorResponse",
}

return self.api_client.call_api(
'/v1/teams/{teamId}/serviceaccounts/{serviceAccountId}/token', 'POST',
_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 update_team_member_by_id(self, team_id : Annotated[constr(strict=True), Field(..., description="id of the team")], user_id : Annotated[StrictStr, Field(..., description="id of the user")], update_team_membership_request : UpdateTeamMembershipRequest, **kwargs) -> None: # noqa: E501
"""update_team_member_by_id # noqa: E501
Expand Down
9 changes: 9 additions & 0 deletions lightly/openapi_generated/swagger_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,20 @@
from lightly.openapi_generated.swagger_client.models.api_error_code import ApiErrorCode
from lightly.openapi_generated.swagger_client.models.api_error_response import ApiErrorResponse
from lightly.openapi_generated.swagger_client.models.async_task_data import AsyncTaskData
from lightly.openapi_generated.swagger_client.models.auto_task import AutoTask
from lightly.openapi_generated.swagger_client.models.auto_task_base import AutoTaskBase
from lightly.openapi_generated.swagger_client.models.auto_task_crop import AutoTaskCrop
from lightly.openapi_generated.swagger_client.models.auto_task_crop_all_of import AutoTaskCropAllOf
from lightly.openapi_generated.swagger_client.models.auto_task_tiling import AutoTaskTiling
from lightly.openapi_generated.swagger_client.models.auto_task_tiling_all_of import AutoTaskTilingAllOf
from lightly.openapi_generated.swagger_client.models.categorical_distribution import CategoricalDistribution
from lightly.openapi_generated.swagger_client.models.categorical_distribution_metrics import CategoricalDistributionMetrics
from lightly.openapi_generated.swagger_client.models.categorical_distribution_per_set import CategoricalDistributionPerSet
from lightly.openapi_generated.swagger_client.models.configuration_data import ConfigurationData
from lightly.openapi_generated.swagger_client.models.configuration_entry import ConfigurationEntry
from lightly.openapi_generated.swagger_client.models.configuration_set_request import ConfigurationSetRequest
from lightly.openapi_generated.swagger_client.models.configuration_value_data_type import ConfigurationValueDataType
from lightly.openapi_generated.swagger_client.models.consent import Consent
from lightly.openapi_generated.swagger_client.models.create_cf_bucket_activity_request import CreateCFBucketActivityRequest
from lightly.openapi_generated.swagger_client.models.create_docker_worker_registry_entry_request import CreateDockerWorkerRegistryEntryRequest
from lightly.openapi_generated.swagger_client.models.create_entity_response import CreateEntityResponse
Expand Down Expand Up @@ -146,6 +153,7 @@
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_data import DockerWorkerConfigV4Data
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_data_all_of import DockerWorkerConfigV4DataAllOf
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_docker import DockerWorkerConfigV4Docker
from lightly.openapi_generated.swagger_client.models.docker_worker_config_v4_docker_crops import DockerWorkerConfigV4DockerCrops
from lightly.openapi_generated.swagger_client.models.docker_worker_config_vx_data import DockerWorkerConfigVXData
from lightly.openapi_generated.swagger_client.models.docker_worker_config_vx_data_base import DockerWorkerConfigVXDataBase
from lightly.openapi_generated.swagger_client.models.docker_worker_registry_entry_data import DockerWorkerRegistryEntryData
Expand Down Expand Up @@ -288,6 +296,7 @@
from lightly.openapi_generated.swagger_client.models.trigger2d_embedding_job_request import Trigger2dEmbeddingJobRequest
from lightly.openapi_generated.swagger_client.models.update_docker_worker_registry_entry_request import UpdateDockerWorkerRegistryEntryRequest
from lightly.openapi_generated.swagger_client.models.update_team_membership_request import UpdateTeamMembershipRequest
from lightly.openapi_generated.swagger_client.models.usage import Usage
from lightly.openapi_generated.swagger_client.models.user_type import UserType
from lightly.openapi_generated.swagger_client.models.video_frame_data import VideoFrameData
from lightly.openapi_generated.swagger_client.models.worker_information import WorkerInformation
Expand Down
Loading

0 comments on commit 77c624c

Please sign in to comment.