diff --git a/services/serviceaccount/src/stackit/serviceaccount/__init__.py b/services/serviceaccount/src/stackit/serviceaccount/__init__.py index ebb803453..2218ad39f 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/__init__.py +++ b/services/serviceaccount/src/stackit/serviceaccount/__init__.py @@ -13,7 +13,6 @@ Do not edit the class manually. """ # noqa: E501 - __version__ = "1.0.0" # Define package exports diff --git a/services/serviceaccount/src/stackit/serviceaccount/api/default_api.py b/services/serviceaccount/src/stackit/serviceaccount/api/default_api.py index 6a9f95810..25869e765 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/api/default_api.py +++ b/services/serviceaccount/src/stackit/serviceaccount/api/default_api.py @@ -12,6 +12,7 @@ """ # noqa: E501 from typing import Any, Dict, List, Optional, Tuple, Union +from uuid import UUID from pydantic import ( Field, @@ -1231,7 +1232,7 @@ def delete_access_token( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The ID of the Service Account.")], - access_token_id: Annotated[StrictStr, Field(description="The ID of the Access Token.")], + access_token_id: Annotated[UUID, Field(description="The ID of the Access Token.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1251,7 +1252,7 @@ def delete_access_token( :param service_account_email: The ID of the Service Account. (required) :type service_account_email: str :param access_token_id: The ID of the Access Token. (required) - :type access_token_id: str + :type access_token_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 @@ -1304,7 +1305,7 @@ def delete_access_token_with_http_info( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The ID of the Service Account.")], - access_token_id: Annotated[StrictStr, Field(description="The ID of the Access Token.")], + access_token_id: Annotated[UUID, Field(description="The ID of the Access Token.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1324,7 +1325,7 @@ def delete_access_token_with_http_info( :param service_account_email: The ID of the Service Account. (required) :type service_account_email: str :param access_token_id: The ID of the Access Token. (required) - :type access_token_id: str + :type access_token_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 @@ -1377,7 +1378,7 @@ def delete_access_token_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The ID of the Service Account.")], - access_token_id: Annotated[StrictStr, Field(description="The ID of the Access Token.")], + access_token_id: Annotated[UUID, Field(description="The ID of the Access Token.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1397,7 +1398,7 @@ def delete_access_token_without_preload_content( :param service_account_email: The ID of the Service Account. (required) :type service_account_email: str :param access_token_id: The ID of the Access Token. (required) - :type access_token_id: str + :type access_token_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 @@ -1755,7 +1756,7 @@ def delete_service_account_key( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1775,7 +1776,7 @@ def delete_service_account_key( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_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 @@ -1826,7 +1827,7 @@ def delete_service_account_key_with_http_info( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1846,7 +1847,7 @@ def delete_service_account_key_with_http_info( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_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 @@ -1897,7 +1898,7 @@ def delete_service_account_key_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1917,7 +1918,7 @@ def delete_service_account_key_without_preload_content( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_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 @@ -2246,7 +2247,7 @@ def get_service_account_key( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], format: Annotated[Optional[StrictStr], Field(description="Requested format for the public key")] = None, _request_timeout: Union[ None, @@ -2267,7 +2268,7 @@ def get_service_account_key( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_id: UUID :param format: Requested format for the public key :type format: str :param _request_timeout: timeout setting for this request. If one @@ -2321,7 +2322,7 @@ def get_service_account_key_with_http_info( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], format: Annotated[Optional[StrictStr], Field(description="Requested format for the public key")] = None, _request_timeout: Union[ None, @@ -2342,7 +2343,7 @@ def get_service_account_key_with_http_info( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_id: UUID :param format: Requested format for the public key :type format: str :param _request_timeout: timeout setting for this request. If one @@ -2396,7 +2397,7 @@ def get_service_account_key_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], format: Annotated[Optional[StrictStr], Field(description="Requested format for the public key")] = None, _request_timeout: Union[ None, @@ -2417,7 +2418,7 @@ def get_service_account_key_without_preload_content( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_id: UUID :param format: Requested format for the public key :type format: str :param _request_timeout: timeout setting for this request. If one @@ -3266,7 +3267,7 @@ def partial_update_service_account_key( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], partial_update_service_account_key_payload: Annotated[ Optional[PartialUpdateServiceAccountKeyPayload], Field(description="Service account request") ] = None, @@ -3289,7 +3290,7 @@ def partial_update_service_account_key( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_id: UUID :param partial_update_service_account_key_payload: Service account request :type partial_update_service_account_key_payload: PartialUpdateServiceAccountKeyPayload :param _request_timeout: timeout setting for this request. If one @@ -3344,7 +3345,7 @@ def partial_update_service_account_key_with_http_info( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], partial_update_service_account_key_payload: Annotated[ Optional[PartialUpdateServiceAccountKeyPayload], Field(description="Service account request") ] = None, @@ -3367,7 +3368,7 @@ def partial_update_service_account_key_with_http_info( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_id: UUID :param partial_update_service_account_key_payload: Service account request :type partial_update_service_account_key_payload: PartialUpdateServiceAccountKeyPayload :param _request_timeout: timeout setting for this request. If one @@ -3422,7 +3423,7 @@ def partial_update_service_account_key_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="The ID of the project.")], service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")], - key_id: Annotated[StrictStr, Field(description="ID of the key.")], + key_id: Annotated[UUID, Field(description="ID of the key.")], partial_update_service_account_key_payload: Annotated[ Optional[PartialUpdateServiceAccountKeyPayload], Field(description="Service account request") ] = None, @@ -3445,7 +3446,7 @@ def partial_update_service_account_key_without_preload_content( :param service_account_email: The email of the service account. (required) :type service_account_email: str :param key_id: ID of the key. (required) - :type key_id: str + :type key_id: UUID :param partial_update_service_account_key_payload: Service account request :type partial_update_service_account_key_payload: PartialUpdateServiceAccountKeyPayload :param _request_timeout: timeout setting for this request. If one diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/__init__.py b/services/serviceaccount/src/stackit/serviceaccount/models/__init__.py index 5fff0f6a2..ee76622bb 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/__init__.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/__init__.py @@ -12,7 +12,6 @@ Do not edit the class manually. """ # noqa: E501 - # import models into model package from stackit.serviceaccount.models.access_token import AccessToken from stackit.serviceaccount.models.access_token_metadata import AccessTokenMetadata diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/access_token.py b/services/serviceaccount/src/stackit/serviceaccount/models/access_token.py index 7bb265cc6..92d239756 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/access_token.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/access_token.py @@ -18,6 +18,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, @@ -37,7 +38,7 @@ class AccessToken(BaseModel): active: StrictBool = Field(description="Newly created access tokens are valid, and can be revoked if needed.") created_at: datetime = Field(description="Creation time of the access token.", alias="createdAt") - id: StrictStr = Field(description="Unique ID of the access token. Also used as JTI field.") + id: UUID = Field(description="Unique ID of the access token. Also used as JTI field.") token: StrictStr = Field( description="The access token in JWT format. Use this with `Bearer` prefix for API calls. Store it, as it is not recoverable later." ) diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.py b/services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.py index b3bd0779b..a1f84fec2 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.py @@ -18,15 +18,9 @@ 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, - StrictBool, - StrictStr, - field_validator, -) +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator from typing_extensions import Self @@ -39,7 +33,7 @@ class AccessTokenMetadata(BaseModel): description="If true, access token can be used for authorized API calls, if false, the token is not usable anymore." ) created_at: datetime = Field(description="Creation time of the access token.", alias="createdAt") - id: StrictStr = Field(description="Unique ID of the access token. Also used as JTI field.") + id: UUID = Field(description="Unique ID of the access token. Also used as JTI field.") valid_until: datetime = Field( description="Approximate expiration time of the access token. Check the JWT for actual validity date.", alias="validUntil", diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response.py index 72b1998fd..721d3fcdd 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response.py @@ -18,6 +18,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, @@ -42,7 +43,7 @@ class CreateServiceAccountKeyResponse(BaseModel): active: StrictBool created_at: datetime = Field(description="Creation time of the key", alias="createdAt") credentials: CreateServiceAccountKeyResponseCredentials - id: StrictStr = Field(description="Unique ID of the key.") + id: UUID = Field(description="Unique ID of the key.") key_algorithm: StrictStr = Field(alias="keyAlgorithm") key_origin: StrictStr = Field(alias="keyOrigin") key_type: StrictStr = Field(alias="keyType") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py index 2d9b3c78e..c45f334f6 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py @@ -16,6 +16,7 @@ import json import pprint from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing_extensions import Self @@ -34,7 +35,7 @@ class CreateServiceAccountKeyResponseCredentials(BaseModel): description="Private key. Only present, if the service account API was generating the key. Not recoverable later.", alias="privateKey", ) - sub: StrictStr = Field(description="Service account id") + sub: UUID = Field(description="Service account id") __properties: ClassVar[List[str]] = ["aud", "iss", "kid", "privateKey", "sub"] model_config = ConfigDict( diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response.py index bcd33a0fc..75dbc0ccd 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response.py @@ -18,6 +18,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, @@ -42,7 +43,7 @@ class GetServiceAccountKeyResponse(BaseModel): active: StrictBool created_at: datetime = Field(description="Creation time of the key", alias="createdAt") credentials: GetServiceAccountKeyResponseCredentials - id: StrictStr = Field(description="Unique ID of the key.") + id: UUID = Field(description="Unique ID of the key.") key_algorithm: StrictStr = Field(alias="keyAlgorithm") key_origin: StrictStr = Field(alias="keyOrigin") key_type: StrictStr = Field(alias="keyType") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py b/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py index 7748c5d02..d91e3a27d 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py @@ -16,6 +16,7 @@ import json import pprint from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing_extensions import Self @@ -29,7 +30,7 @@ class GetServiceAccountKeyResponseCredentials(BaseModel): aud: StrictStr = Field(description="Audience - service account API URL") iss: StrictStr = Field(description="Service account email") kid: StrictStr = Field(description="Key id to use") - sub: StrictStr = Field(description="Service account id") + sub: UUID = Field(description="Service account id") __properties: ClassVar[List[str]] = ["aud", "iss", "kid", "sub"] model_config = ConfigDict( diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_response.py index cf6c64f6f..4404e3ccf 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_response.py @@ -18,6 +18,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, @@ -37,7 +38,7 @@ class PartialUpdateServiceAccountKeyResponse(BaseModel): active: StrictBool created_at: datetime = Field(description="Creation time of the key", alias="createdAt") - id: StrictStr = Field(description="Unique ID of the key.") + id: UUID = Field(description="Unique ID of the key.") key_algorithm: StrictStr = Field(alias="keyAlgorithm") key_origin: StrictStr = Field(alias="keyOrigin") key_type: StrictStr = Field(alias="keyType") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/service_account.py b/services/serviceaccount/src/stackit/serviceaccount/models/service_account.py index ee257b1bd..7cb10be48 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/service_account.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/service_account.py @@ -16,6 +16,7 @@ import json import pprint from typing import Any, ClassVar, Dict, List, Optional, Set +from uuid import UUID from pydantic import ( BaseModel, @@ -35,7 +36,7 @@ class ServiceAccount(BaseModel): email: StrictStr = Field( description="Unique identifier of the service account in format of an email address generated by the service containing the prefix provided by the user during creation." ) - id: StrictStr = Field( + id: UUID = Field( description="Unique ID of the service account. It is also used in the 'sub' field of the service accounts access tokens." ) internal: StrictBool = Field(description="Flag indicating internal service accounts") diff --git a/services/serviceaccount/src/stackit/serviceaccount/models/service_account_key_list_response.py b/services/serviceaccount/src/stackit/serviceaccount/models/service_account_key_list_response.py index 257d6b483..bec11a19a 100644 --- a/services/serviceaccount/src/stackit/serviceaccount/models/service_account_key_list_response.py +++ b/services/serviceaccount/src/stackit/serviceaccount/models/service_account_key_list_response.py @@ -18,6 +18,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, @@ -37,7 +38,7 @@ class ServiceAccountKeyListResponse(BaseModel): active: StrictBool created_at: datetime = Field(description="Creation time of the key", alias="createdAt") - id: StrictStr = Field(description="Unique ID of the key.") + id: UUID = Field(description="Unique ID of the key.") key_algorithm: StrictStr = Field(alias="keyAlgorithm") key_origin: StrictStr = Field(alias="keyOrigin") key_type: StrictStr = Field(alias="keyType")