From 9c3aca9706c21d6d2f00fa25becb36189e4a96f0 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 21 Jan 2026 14:25:46 +0000 Subject: [PATCH] Generate modelserving --- .../src/stackit/modelserving/__init__.py | 1 - .../stackit/modelserving/api/default_api.py | 121 +++++++++--------- .../stackit/modelserving/models/__init__.py | 1 - .../modelserving/models/chat_model_details.py | 3 +- .../models/embedding_model_details.py | 3 +- .../src/stackit/modelserving/models/model.py | 3 +- .../src/stackit/modelserving/models/token.py | 3 +- .../modelserving/models/token_created.py | 3 +- 8 files changed, 71 insertions(+), 67 deletions(-) diff --git a/services/modelserving/src/stackit/modelserving/__init__.py b/services/modelserving/src/stackit/modelserving/__init__.py index c6876cb35..6798b4e5e 100644 --- a/services/modelserving/src/stackit/modelserving/__init__.py +++ b/services/modelserving/src/stackit/modelserving/__init__.py @@ -14,7 +14,6 @@ Do not edit the class manually. """ # noqa: E501 - __version__ = "1.0.0" # Define package exports diff --git a/services/modelserving/src/stackit/modelserving/api/default_api.py b/services/modelserving/src/stackit/modelserving/api/default_api.py index a40d5c659..c0b4a9e41 100644 --- a/services/modelserving/src/stackit/modelserving/api/default_api.py +++ b/services/modelserving/src/stackit/modelserving/api/default_api.py @@ -13,6 +13,7 @@ """ # noqa: E501 from typing import Any, Dict, List, Optional, Tuple, Union +from uuid import UUID from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call from stackit.core.configuration import Configuration @@ -52,7 +53,7 @@ def __init__(self, configuration: Configuration = None) -> None: def create_token( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], + project_id: Annotated[UUID, Field(description="portal project id")], create_token_payload: Optional[CreateTokenPayload] = None, _request_timeout: Union[ None, @@ -71,7 +72,7 @@ def create_token( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param create_token_payload: :type create_token_payload: CreateTokenPayload :param _request_timeout: timeout setting for this request. If one @@ -124,7 +125,7 @@ def create_token( def create_token_with_http_info( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], + project_id: Annotated[UUID, Field(description="portal project id")], create_token_payload: Optional[CreateTokenPayload] = None, _request_timeout: Union[ None, @@ -143,7 +144,7 @@ def create_token_with_http_info( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param create_token_payload: :type create_token_payload: CreateTokenPayload :param _request_timeout: timeout setting for this request. If one @@ -196,7 +197,7 @@ def create_token_with_http_info( def create_token_without_preload_content( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], + project_id: Annotated[UUID, Field(description="portal project id")], create_token_payload: Optional[CreateTokenPayload] = None, _request_timeout: Union[ None, @@ -215,7 +216,7 @@ def create_token_without_preload_content( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param create_token_payload: :type create_token_payload: CreateTokenPayload :param _request_timeout: timeout setting for this request. If one @@ -328,8 +329,8 @@ def _create_token_serialize( def delete_token( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -347,9 +348,9 @@ def delete_token( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :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 @@ -400,8 +401,8 @@ def delete_token( def delete_token_with_http_info( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -419,9 +420,9 @@ def delete_token_with_http_info( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :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 @@ -472,8 +473,8 @@ def delete_token_with_http_info( def delete_token_without_preload_content( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -491,9 +492,9 @@ def delete_token_without_preload_content( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :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 @@ -596,7 +597,7 @@ def _delete_token_serialize( def get_chat_model( self, region_id: Annotated[StrictStr, Field(description="region name")], - model_id: Annotated[StrictStr, Field(description="model id")], + model_id: Annotated[UUID, Field(description="model id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -614,7 +615,7 @@ def get_chat_model( :param region_id: region name (required) :type region_id: str :param model_id: model id (required) - :type model_id: str + :type model_id: UUID :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 @@ -663,7 +664,7 @@ def get_chat_model( def get_chat_model_with_http_info( self, region_id: Annotated[StrictStr, Field(description="region name")], - model_id: Annotated[StrictStr, Field(description="model id")], + model_id: Annotated[UUID, Field(description="model id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -681,7 +682,7 @@ def get_chat_model_with_http_info( :param region_id: region name (required) :type region_id: str :param model_id: model id (required) - :type model_id: str + :type model_id: UUID :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 @@ -730,7 +731,7 @@ def get_chat_model_with_http_info( def get_chat_model_without_preload_content( self, region_id: Annotated[StrictStr, Field(description="region name")], - model_id: Annotated[StrictStr, Field(description="model id")], + model_id: Annotated[UUID, Field(description="model id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -748,7 +749,7 @@ def get_chat_model_without_preload_content( :param region_id: region name (required) :type region_id: str :param model_id: model id (required) - :type model_id: str + :type model_id: UUID :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 @@ -846,7 +847,7 @@ def _get_chat_model_serialize( def get_embedding_model( self, region_id: Annotated[StrictStr, Field(description="region name")], - model_id: Annotated[StrictStr, Field(description="model id")], + model_id: Annotated[UUID, Field(description="model id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -864,7 +865,7 @@ def get_embedding_model( :param region_id: region name (required) :type region_id: str :param model_id: model id (required) - :type model_id: str + :type model_id: UUID :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 @@ -913,7 +914,7 @@ def get_embedding_model( def get_embedding_model_with_http_info( self, region_id: Annotated[StrictStr, Field(description="region name")], - model_id: Annotated[StrictStr, Field(description="model id")], + model_id: Annotated[UUID, Field(description="model id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -931,7 +932,7 @@ def get_embedding_model_with_http_info( :param region_id: region name (required) :type region_id: str :param model_id: model id (required) - :type model_id: str + :type model_id: UUID :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 @@ -980,7 +981,7 @@ def get_embedding_model_with_http_info( def get_embedding_model_without_preload_content( self, region_id: Annotated[StrictStr, Field(description="region name")], - model_id: Annotated[StrictStr, Field(description="model id")], + model_id: Annotated[UUID, Field(description="model id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -998,7 +999,7 @@ def get_embedding_model_without_preload_content( :param region_id: region name (required) :type region_id: str :param model_id: model id (required) - :type model_id: str + :type model_id: UUID :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 @@ -1096,8 +1097,8 @@ def _get_embedding_model_serialize( def get_token( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1115,9 +1116,9 @@ def get_token( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :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 @@ -1168,8 +1169,8 @@ def get_token( def get_token_with_http_info( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1187,9 +1188,9 @@ def get_token_with_http_info( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :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 @@ -1240,8 +1241,8 @@ def get_token_with_http_info( def get_token_without_preload_content( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1259,9 +1260,9 @@ def get_token_without_preload_content( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :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 @@ -1599,7 +1600,7 @@ def _list_models_serialize( def list_tokens( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], + project_id: Annotated[UUID, Field(description="portal project id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1617,7 +1618,7 @@ def list_tokens( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :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 @@ -1666,7 +1667,7 @@ def list_tokens( def list_tokens_with_http_info( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], + project_id: Annotated[UUID, Field(description="portal project id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1684,7 +1685,7 @@ def list_tokens_with_http_info( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :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 @@ -1733,7 +1734,7 @@ def list_tokens_with_http_info( def list_tokens_without_preload_content( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], + project_id: Annotated[UUID, Field(description="portal project id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1751,7 +1752,7 @@ def list_tokens_without_preload_content( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :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 @@ -1849,8 +1850,8 @@ def _list_tokens_serialize( def partial_update_token( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], partial_update_token_payload: Optional[PartialUpdateTokenPayload] = None, _request_timeout: Union[ None, @@ -1869,9 +1870,9 @@ def partial_update_token( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :param partial_update_token_payload: :type partial_update_token_payload: PartialUpdateTokenPayload :param _request_timeout: timeout setting for this request. If one @@ -1925,8 +1926,8 @@ def partial_update_token( def partial_update_token_with_http_info( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], partial_update_token_payload: Optional[PartialUpdateTokenPayload] = None, _request_timeout: Union[ None, @@ -1945,9 +1946,9 @@ def partial_update_token_with_http_info( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :param partial_update_token_payload: :type partial_update_token_payload: PartialUpdateTokenPayload :param _request_timeout: timeout setting for this request. If one @@ -2001,8 +2002,8 @@ def partial_update_token_with_http_info( def partial_update_token_without_preload_content( self, region_id: Annotated[StrictStr, Field(description="region name")], - project_id: Annotated[StrictStr, Field(description="portal project id")], - t_id: Annotated[StrictStr, Field(description="token id")], + project_id: Annotated[UUID, Field(description="portal project id")], + t_id: Annotated[UUID, Field(description="token id")], partial_update_token_payload: Optional[PartialUpdateTokenPayload] = None, _request_timeout: Union[ None, @@ -2021,9 +2022,9 @@ def partial_update_token_without_preload_content( :param region_id: region name (required) :type region_id: str :param project_id: portal project id (required) - :type project_id: str + :type project_id: UUID :param t_id: token id (required) - :type t_id: str + :type t_id: UUID :param partial_update_token_payload: :type partial_update_token_payload: PartialUpdateTokenPayload :param _request_timeout: timeout setting for this request. If one diff --git a/services/modelserving/src/stackit/modelserving/models/__init__.py b/services/modelserving/src/stackit/modelserving/models/__init__.py index 16af77f25..180e0962a 100644 --- a/services/modelserving/src/stackit/modelserving/models/__init__.py +++ b/services/modelserving/src/stackit/modelserving/models/__init__.py @@ -13,7 +13,6 @@ Do not edit the class manually. """ # noqa: E501 - # import models into model package from stackit.modelserving.models.chat_model_details import ChatModelDetails from stackit.modelserving.models.create_token_payload import CreateTokenPayload diff --git a/services/modelserving/src/stackit/modelserving/models/chat_model_details.py b/services/modelserving/src/stackit/modelserving/models/chat_model_details.py index f61c56c9e..daf12d5f5 100644 --- a/services/modelserving/src/stackit/modelserving/models/chat_model_details.py +++ b/services/modelserving/src/stackit/modelserving/models/chat_model_details.py @@ -18,6 +18,7 @@ import pprint import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing_extensions import Annotated, Self @@ -35,7 +36,7 @@ class ChatModelDetails(BaseModel): context_length: StrictInt = Field(alias="contextLength") description: Annotated[str, Field(strict=True, max_length=2000)] displayed_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="displayedName") - id: StrictStr = Field(description="generated uuid to identify a model") + id: UUID = Field(description="generated uuid to identify a model") name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="huggingface name") quantization_method: Optional[StrictStr] = Field(default=None, alias="quantizationMethod") region: StrictStr diff --git a/services/modelserving/src/stackit/modelserving/models/embedding_model_details.py b/services/modelserving/src/stackit/modelserving/models/embedding_model_details.py index 5a83919e9..9f631c7ce 100644 --- a/services/modelserving/src/stackit/modelserving/models/embedding_model_details.py +++ b/services/modelserving/src/stackit/modelserving/models/embedding_model_details.py @@ -18,6 +18,7 @@ import pprint import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing_extensions import Annotated, Self @@ -33,7 +34,7 @@ class EmbeddingModelDetails(BaseModel): category: StrictStr description: Annotated[str, Field(strict=True, max_length=2000)] displayed_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="displayedName") - id: StrictStr = Field(description="generated uuid to identify a model") + id: UUID = Field(description="generated uuid to identify a model") name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="huggingface name") output_dimension: StrictInt = Field(alias="outputDimension") region: StrictStr diff --git a/services/modelserving/src/stackit/modelserving/models/model.py b/services/modelserving/src/stackit/modelserving/models/model.py index e72a91f77..3f7172397 100644 --- a/services/modelserving/src/stackit/modelserving/models/model.py +++ b/services/modelserving/src/stackit/modelserving/models/model.py @@ -18,6 +18,7 @@ import pprint import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Annotated, Self @@ -33,7 +34,7 @@ class Model(BaseModel): category: StrictStr description: Annotated[str, Field(strict=True, max_length=2000)] displayed_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="displayedName") - id: StrictStr = Field(description="generated uuid to identify a model") + id: UUID = Field(description="generated uuid to identify a model") name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="huggingface name") region: StrictStr skus: List[SKU] diff --git a/services/modelserving/src/stackit/modelserving/models/token.py b/services/modelserving/src/stackit/modelserving/models/token.py index af54ee7f5..62b055753 100644 --- a/services/modelserving/src/stackit/modelserving/models/token.py +++ b/services/modelserving/src/stackit/modelserving/models/token.py @@ -19,6 +19,7 @@ import re # noqa: F401 from datetime import datetime from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Annotated, Self @@ -30,7 +31,7 @@ class Token(BaseModel): """ # noqa: E501 description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None - id: StrictStr + id: UUID name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] region: StrictStr state: StrictStr diff --git a/services/modelserving/src/stackit/modelserving/models/token_created.py b/services/modelserving/src/stackit/modelserving/models/token_created.py index e043eb1fe..3984b297b 100644 --- a/services/modelserving/src/stackit/modelserving/models/token_created.py +++ b/services/modelserving/src/stackit/modelserving/models/token_created.py @@ -19,6 +19,7 @@ import re # noqa: F401 from datetime import datetime from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Annotated, Self @@ -31,7 +32,7 @@ class TokenCreated(BaseModel): content: Annotated[str, Field(min_length=1, strict=True, max_length=200)] description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None - id: StrictStr + id: UUID name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] region: StrictStr state: StrictStr