Skip to content

Commit 071b2de

Browse files
Generate modelserving
1 parent d14550d commit 071b2de

26 files changed

Lines changed: 207 additions & 151 deletions

services/modelserving/oas_commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4437823ea19bd04c638f5de3d6fa40b866aa144c
1+
876a48fb56473c7c844baa697906d461c0675f47

services/modelserving/src/stackit/modelserving/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
# flake8: noqa
44

55
"""
6-
STACKIT Model Serving API
6+
STACKIT Model Serving API
77
8-
This API provides endpoints for the model serving api
8+
This API provides endpoints for the model serving api
99
10-
The version of the OpenAPI document: 1.0.0
11-
Contact: stackit-model-serving@digits.schwarz
12-
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
The version of the OpenAPI document: 1.0.0
11+
Contact: stackit-model-serving@digits.schwarz
12+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
14-
Do not edit the class manually.
14+
Do not edit the class manually.
1515
""" # noqa: E501
1616

17+
1718
__version__ = "1.0.0"
1819

1920
# Define package exports

services/modelserving/src/stackit/modelserving/api/default_api.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# coding: utf-8
22

33
"""
4-
STACKIT Model Serving API
4+
STACKIT Model Serving API
55
6-
This API provides endpoints for the model serving api
6+
This API provides endpoints for the model serving api
77
8-
The version of the OpenAPI document: 1.0.0
9-
Contact: stackit-model-serving@digits.schwarz
10-
Generated by OpenAPI Generator (https://openapi-generator.tech)
8+
The version of the OpenAPI document: 1.0.0
9+
Contact: stackit-model-serving@digits.schwarz
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
12-
Do not edit the class manually.
12+
Do not edit the class manually.
1313
""" # noqa: E501
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
@@ -1601,6 +1601,7 @@ def list_tokens(
16011601
self,
16021602
region_id: Annotated[StrictStr, Field(description="region name")],
16031603
project_id: Annotated[UUID, Field(description="portal project id")],
1604+
label_selector: Annotated[Optional[StrictStr], Field(description="Filter token resource by labels")] = None,
16041605
_request_timeout: Union[
16051606
None,
16061607
Annotated[StrictFloat, Field(gt=0)],
@@ -1619,6 +1620,8 @@ def list_tokens(
16191620
:type region_id: str
16201621
:param project_id: portal project id (required)
16211622
:type project_id: UUID
1623+
:param label_selector: Filter token resource by labels
1624+
:type label_selector: str
16221625
:param _request_timeout: timeout setting for this request. If one
16231626
number provided, it will be total request
16241627
timeout. It can also be a pair (tuple) of
@@ -1644,6 +1647,7 @@ def list_tokens(
16441647
_param = self._list_tokens_serialize(
16451648
region_id=region_id,
16461649
project_id=project_id,
1650+
label_selector=label_selector,
16471651
_request_auth=_request_auth,
16481652
_content_type=_content_type,
16491653
_headers=_headers,
@@ -1668,6 +1672,7 @@ def list_tokens_with_http_info(
16681672
self,
16691673
region_id: Annotated[StrictStr, Field(description="region name")],
16701674
project_id: Annotated[UUID, Field(description="portal project id")],
1675+
label_selector: Annotated[Optional[StrictStr], Field(description="Filter token resource by labels")] = None,
16711676
_request_timeout: Union[
16721677
None,
16731678
Annotated[StrictFloat, Field(gt=0)],
@@ -1686,6 +1691,8 @@ def list_tokens_with_http_info(
16861691
:type region_id: str
16871692
:param project_id: portal project id (required)
16881693
:type project_id: UUID
1694+
:param label_selector: Filter token resource by labels
1695+
:type label_selector: str
16891696
:param _request_timeout: timeout setting for this request. If one
16901697
number provided, it will be total request
16911698
timeout. It can also be a pair (tuple) of
@@ -1711,6 +1718,7 @@ def list_tokens_with_http_info(
17111718
_param = self._list_tokens_serialize(
17121719
region_id=region_id,
17131720
project_id=project_id,
1721+
label_selector=label_selector,
17141722
_request_auth=_request_auth,
17151723
_content_type=_content_type,
17161724
_headers=_headers,
@@ -1735,6 +1743,7 @@ def list_tokens_without_preload_content(
17351743
self,
17361744
region_id: Annotated[StrictStr, Field(description="region name")],
17371745
project_id: Annotated[UUID, Field(description="portal project id")],
1746+
label_selector: Annotated[Optional[StrictStr], Field(description="Filter token resource by labels")] = None,
17381747
_request_timeout: Union[
17391748
None,
17401749
Annotated[StrictFloat, Field(gt=0)],
@@ -1753,6 +1762,8 @@ def list_tokens_without_preload_content(
17531762
:type region_id: str
17541763
:param project_id: portal project id (required)
17551764
:type project_id: UUID
1765+
:param label_selector: Filter token resource by labels
1766+
:type label_selector: str
17561767
:param _request_timeout: timeout setting for this request. If one
17571768
number provided, it will be total request
17581769
timeout. It can also be a pair (tuple) of
@@ -1778,6 +1789,7 @@ def list_tokens_without_preload_content(
17781789
_param = self._list_tokens_serialize(
17791790
region_id=region_id,
17801791
project_id=project_id,
1792+
label_selector=label_selector,
17811793
_request_auth=_request_auth,
17821794
_content_type=_content_type,
17831795
_headers=_headers,
@@ -1797,6 +1809,7 @@ def _list_tokens_serialize(
17971809
self,
17981810
region_id,
17991811
project_id,
1812+
label_selector,
18001813
_request_auth,
18011814
_content_type,
18021815
_headers,
@@ -1820,6 +1833,10 @@ def _list_tokens_serialize(
18201833
if project_id is not None:
18211834
_path_params["projectId"] = project_id
18221835
# process the query parameters
1836+
if label_selector is not None:
1837+
1838+
_query_params.append(("label_selector", label_selector))
1839+
18231840
# process the header parameters
18241841
# process the form parameters
18251842
# process the body parameter

services/modelserving/src/stackit/modelserving/api_client.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# coding: utf-8
22

33
"""
4-
STACKIT Model Serving API
4+
STACKIT Model Serving API
55
6-
This API provides endpoints for the model serving api
6+
This API provides endpoints for the model serving api
77
8-
The version of the OpenAPI document: 1.0.0
9-
Contact: stackit-model-serving@digits.schwarz
10-
Generated by OpenAPI Generator (https://openapi-generator.tech)
8+
The version of the OpenAPI document: 1.0.0
9+
Contact: stackit-model-serving@digits.schwarz
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
12-
Do not edit the class manually.
12+
Do not edit the class manually.
1313
""" # noqa: E501
1414

1515
import datetime
@@ -37,6 +37,7 @@
3737
ApiException,
3838
)
3939

40+
4041
RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]]
4142

4243

services/modelserving/src/stackit/modelserving/api_response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from pydantic import BaseModel, Field, StrictBytes, StrictInt
88

9+
910
T = TypeVar("T")
1011

1112

services/modelserving/src/stackit/modelserving/configuration.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# coding: utf-8
22

33
"""
4-
STACKIT Model Serving API
4+
STACKIT Model Serving API
55
6-
This API provides endpoints for the model serving api
6+
This API provides endpoints for the model serving api
77
8-
The version of the OpenAPI document: 1.0.0
9-
Contact: stackit-model-serving@digits.schwarz
10-
Generated by OpenAPI Generator (https://openapi-generator.tech)
8+
The version of the OpenAPI document: 1.0.0
9+
Contact: stackit-model-serving@digits.schwarz
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
12-
Do not edit the class manually.
12+
Do not edit the class manually.
1313
""" # noqa: E501
1414

1515
import sys
@@ -19,6 +19,7 @@
1919

2020
import os
2121

22+
2223
ServerVariablesT = Dict[str, str]
2324

2425

services/modelserving/src/stackit/modelserving/exceptions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# coding: utf-8
22

33
"""
4-
STACKIT Model Serving API
4+
STACKIT Model Serving API
55
6-
This API provides endpoints for the model serving api
6+
This API provides endpoints for the model serving api
77
8-
The version of the OpenAPI document: 1.0.0
9-
Contact: stackit-model-serving@digits.schwarz
10-
Generated by OpenAPI Generator (https://openapi-generator.tech)
8+
The version of the OpenAPI document: 1.0.0
9+
Contact: stackit-model-serving@digits.schwarz
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
12-
Do not edit the class manually.
12+
Do not edit the class manually.
1313
""" # noqa: E501
1414

1515
from typing import Any, Optional

services/modelserving/src/stackit/modelserving/models/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
# flake8: noqa
44
"""
5-
STACKIT Model Serving API
5+
STACKIT Model Serving API
66
7-
This API provides endpoints for the model serving api
7+
This API provides endpoints for the model serving api
88
9-
The version of the OpenAPI document: 1.0.0
10-
Contact: stackit-model-serving@digits.schwarz
11-
Generated by OpenAPI Generator (https://openapi-generator.tech)
9+
The version of the OpenAPI document: 1.0.0
10+
Contact: stackit-model-serving@digits.schwarz
11+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1212
13-
Do not edit the class manually.
13+
Do not edit the class manually.
1414
""" # noqa: E501
1515

1616
# import models into model package

services/modelserving/src/stackit/modelserving/models/chat_model_details.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# coding: utf-8
22

33
"""
4-
STACKIT Model Serving API
4+
STACKIT Model Serving API
55
6-
This API provides endpoints for the model serving api
6+
This API provides endpoints for the model serving api
77
8-
The version of the OpenAPI document: 1.0.0
9-
Contact: stackit-model-serving@digits.schwarz
10-
Generated by OpenAPI Generator (https://openapi-generator.tech)
8+
The version of the OpenAPI document: 1.0.0
9+
Contact: stackit-model-serving@digits.schwarz
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
12-
Do not edit the class manually.
12+
Do not edit the class manually.
1313
""" # noqa: E501
1414

1515
from __future__ import annotations

services/modelserving/src/stackit/modelserving/models/create_token_payload.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# coding: utf-8
22

33
"""
4-
STACKIT Model Serving API
4+
STACKIT Model Serving API
55
6-
This API provides endpoints for the model serving api
6+
This API provides endpoints for the model serving api
77
8-
The version of the OpenAPI document: 1.0.0
9-
Contact: stackit-model-serving@digits.schwarz
10-
Generated by OpenAPI Generator (https://openapi-generator.tech)
8+
The version of the OpenAPI document: 1.0.0
9+
Contact: stackit-model-serving@digits.schwarz
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
12-
Do not edit the class manually.
12+
Do not edit the class manually.
1313
""" # noqa: E501
1414

1515
from __future__ import annotations
@@ -30,13 +30,17 @@ class CreateTokenPayload(BaseModel):
3030
""" # noqa: E501
3131

3232
description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None
33+
labels: Optional[Dict[str, Annotated[str, Field(strict=True)]]] = Field(
34+
default=None,
35+
description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. Send empty object {} to remove all labels. The `stackit` prefix is reserved and cannot be used for Keys.",
36+
)
3337
name: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
3438
ttl_duration: Optional[StrictStr] = Field(
3539
default=None,
3640
description="time to live duration. Must be valid duration string. If not set the token will never expire.",
3741
alias="ttlDuration",
3842
)
39-
__properties: ClassVar[List[str]] = ["description", "name", "ttlDuration"]
43+
__properties: ClassVar[List[str]] = ["description", "labels", "name", "ttlDuration"]
4044

4145
@field_validator("description")
4246
def description_validate_regular_expression(cls, value):
@@ -110,6 +114,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
110114
return cls.model_validate(obj)
111115

112116
_obj = cls.model_validate(
113-
{"description": obj.get("description"), "name": obj.get("name"), "ttlDuration": obj.get("ttlDuration")}
117+
{
118+
"description": obj.get("description"),
119+
"labels": obj.get("labels"),
120+
"name": obj.get("name"),
121+
"ttlDuration": obj.get("ttlDuration"),
122+
}
114123
)
115124
return _obj

0 commit comments

Comments
 (0)