Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/modelserving/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4437823ea19bd04c638f5de3d6fa40b866aa144c
c4128703f9d3ed3951e55d042b5a6ecc57011f2e
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,7 @@ def list_tokens(
self,
region_id: Annotated[StrictStr, Field(description="region name")],
project_id: Annotated[UUID, Field(description="portal project id")],
label_selector: Annotated[Optional[StrictStr], Field(description="Filter token resource by labels")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -1619,6 +1620,8 @@ def list_tokens(
:type region_id: str
:param project_id: portal project id (required)
:type project_id: UUID
:param label_selector: Filter token resource by labels
:type label_selector: str
: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
Expand All @@ -1644,6 +1647,7 @@ def list_tokens(
_param = self._list_tokens_serialize(
region_id=region_id,
project_id=project_id,
label_selector=label_selector,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -1668,6 +1672,7 @@ def list_tokens_with_http_info(
self,
region_id: Annotated[StrictStr, Field(description="region name")],
project_id: Annotated[UUID, Field(description="portal project id")],
label_selector: Annotated[Optional[StrictStr], Field(description="Filter token resource by labels")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -1686,6 +1691,8 @@ def list_tokens_with_http_info(
:type region_id: str
:param project_id: portal project id (required)
:type project_id: UUID
:param label_selector: Filter token resource by labels
:type label_selector: str
: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
Expand All @@ -1711,6 +1718,7 @@ def list_tokens_with_http_info(
_param = self._list_tokens_serialize(
region_id=region_id,
project_id=project_id,
label_selector=label_selector,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -1735,6 +1743,7 @@ def list_tokens_without_preload_content(
self,
region_id: Annotated[StrictStr, Field(description="region name")],
project_id: Annotated[UUID, Field(description="portal project id")],
label_selector: Annotated[Optional[StrictStr], Field(description="Filter token resource by labels")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -1753,6 +1762,8 @@ def list_tokens_without_preload_content(
:type region_id: str
:param project_id: portal project id (required)
:type project_id: UUID
:param label_selector: Filter token resource by labels
:type label_selector: str
: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
Expand All @@ -1778,6 +1789,7 @@ def list_tokens_without_preload_content(
_param = self._list_tokens_serialize(
region_id=region_id,
project_id=project_id,
label_selector=label_selector,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -1797,6 +1809,7 @@ def _list_tokens_serialize(
self,
region_id,
project_id,
label_selector,
_request_auth,
_content_type,
_headers,
Expand All @@ -1820,6 +1833,10 @@ def _list_tokens_serialize(
if project_id is not None:
_path_params["projectId"] = project_id
# process the query parameters
if label_selector is not None:

_query_params.append(("label_selector", label_selector))

# process the header parameters
# process the form parameters
# process the body parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None) ->
full_msg = msg
if path_to_item:
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
super(ApiTypeError, self).__init__(full_msg)
super(ApiTypeError, self).__init__(full_msg, path_to_item, valid_classes, key_type)


class ApiValueError(OpenApiException, ValueError):
Expand All @@ -64,7 +64,7 @@ def __init__(self, msg, path_to_item=None) -> None:
full_msg = msg
if path_to_item:
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
super(ApiValueError, self).__init__(full_msg)
super(ApiValueError, self).__init__(full_msg, path_to_item)


class ApiAttributeError(OpenApiException, AttributeError):
Expand All @@ -83,7 +83,7 @@ def __init__(self, msg, path_to_item=None) -> None:
full_msg = msg
if path_to_item:
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
super(ApiAttributeError, self).__init__(full_msg)
super(ApiAttributeError, self).__init__(full_msg, path_to_item)


class ApiKeyError(OpenApiException, KeyError):
Expand All @@ -100,7 +100,7 @@ def __init__(self, msg, path_to_item=None) -> None:
full_msg = msg
if path_to_item:
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
super(ApiKeyError, self).__init__(full_msg)
super(ApiKeyError, self).__init__(full_msg, path_to_item)


class ApiException(OpenApiException):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ class CreateTokenPayload(BaseModel):
""" # noqa: E501

description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None
labels: Optional[Dict[str, Annotated[str, Field(strict=True)]]] = Field(
default=None,
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.",
)
name: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
ttl_duration: Optional[StrictStr] = Field(
default=None,
description="time to live duration. Must be valid duration string. If not set the token will never expire.",
alias="ttlDuration",
)
__properties: ClassVar[List[str]] = ["description", "name", "ttlDuration"]
__properties: ClassVar[List[str]] = ["description", "labels", "name", "ttlDuration"]

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

_obj = cls.model_validate(
{"description": obj.get("description"), "name": obj.get("name"), "ttlDuration": obj.get("ttlDuration")}
{
"description": obj.get("description"),
"labels": obj.get("labels"),
"name": obj.get("name"),
"ttlDuration": obj.get("ttlDuration"),
}
)
return _obj
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ class PartialUpdateTokenPayload(BaseModel):
""" # noqa: E501

description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None
labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True)]]]] = Field(
default=None,
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.",
)
name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None
__properties: ClassVar[List[str]] = ["description", "name"]
__properties: ClassVar[List[str]] = ["description", "labels", "name"]

@field_validator("description")
def description_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -107,5 +111,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({"description": obj.get("description"), "name": obj.get("name")})
_obj = cls.model_validate(
{"description": obj.get("description"), "labels": obj.get("labels"), "name": obj.get("name")}
)
return _obj
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ class Token(BaseModel):

description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None
id: UUID
labels: Optional[Dict[str, Annotated[str, Field(strict=True)]]] = Field(
default=None,
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.",
)
name: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
region: StrictStr
state: StrictStr
valid_until: datetime = Field(alias="validUntil")
__properties: ClassVar[List[str]] = ["description", "id", "name", "region", "state", "validUntil"]
__properties: ClassVar[List[str]] = ["description", "id", "labels", "name", "region", "state", "validUntil"]

@field_validator("description")
def description_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -134,6 +138,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"description": obj.get("description"),
"id": obj.get("id"),
"labels": obj.get("labels"),
"name": obj.get("name"),
"region": obj.get("region"),
"state": obj.get("state"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,24 @@ 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: UUID
labels: Optional[Dict[str, Annotated[str, Field(strict=True)]]] = Field(
default=None,
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.",
)
name: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
region: StrictStr
state: StrictStr
valid_until: datetime = Field(alias="validUntil")
__properties: ClassVar[List[str]] = ["content", "description", "id", "name", "region", "state", "validUntil"]
__properties: ClassVar[List[str]] = [
"content",
"description",
"id",
"labels",
"name",
"region",
"state",
"validUntil",
]

@field_validator("content")
def content_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -146,6 +159,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"content": obj.get("content"),
"description": obj.get("description"),
"id": obj.get("id"),
"labels": obj.get("labels"),
"name": obj.get("name"),
"region": obj.get("region"),
"state": obj.get("state"),
Expand Down
Loading