Skip to content

Commit b5deb8d

Browse files
Generate serviceaccount
1 parent d38df9f commit b5deb8d

12 files changed

+44
-43
lines changed

services/serviceaccount/src/stackit/serviceaccount/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
Do not edit the class manually.
1414
""" # noqa: E501
1515

16-
1716
__version__ = "1.0.0"
1817

1918
# Define package exports

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

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
""" # noqa: E501
1313

1414
from typing import Any, Dict, List, Optional, Tuple, Union
15+
from uuid import UUID
1516

1617
from pydantic import (
1718
Field,
@@ -1231,7 +1232,7 @@ def delete_access_token(
12311232
self,
12321233
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
12331234
service_account_email: Annotated[StrictStr, Field(description="The ID of the Service Account.")],
1234-
access_token_id: Annotated[StrictStr, Field(description="The ID of the Access Token.")],
1235+
access_token_id: Annotated[UUID, Field(description="The ID of the Access Token.")],
12351236
_request_timeout: Union[
12361237
None,
12371238
Annotated[StrictFloat, Field(gt=0)],
@@ -1251,7 +1252,7 @@ def delete_access_token(
12511252
:param service_account_email: The ID of the Service Account. (required)
12521253
:type service_account_email: str
12531254
:param access_token_id: The ID of the Access Token. (required)
1254-
:type access_token_id: str
1255+
:type access_token_id: UUID
12551256
:param _request_timeout: timeout setting for this request. If one
12561257
number provided, it will be total request
12571258
timeout. It can also be a pair (tuple) of
@@ -1304,7 +1305,7 @@ def delete_access_token_with_http_info(
13041305
self,
13051306
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
13061307
service_account_email: Annotated[StrictStr, Field(description="The ID of the Service Account.")],
1307-
access_token_id: Annotated[StrictStr, Field(description="The ID of the Access Token.")],
1308+
access_token_id: Annotated[UUID, Field(description="The ID of the Access Token.")],
13081309
_request_timeout: Union[
13091310
None,
13101311
Annotated[StrictFloat, Field(gt=0)],
@@ -1324,7 +1325,7 @@ def delete_access_token_with_http_info(
13241325
:param service_account_email: The ID of the Service Account. (required)
13251326
:type service_account_email: str
13261327
:param access_token_id: The ID of the Access Token. (required)
1327-
:type access_token_id: str
1328+
:type access_token_id: UUID
13281329
:param _request_timeout: timeout setting for this request. If one
13291330
number provided, it will be total request
13301331
timeout. It can also be a pair (tuple) of
@@ -1377,7 +1378,7 @@ def delete_access_token_without_preload_content(
13771378
self,
13781379
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
13791380
service_account_email: Annotated[StrictStr, Field(description="The ID of the Service Account.")],
1380-
access_token_id: Annotated[StrictStr, Field(description="The ID of the Access Token.")],
1381+
access_token_id: Annotated[UUID, Field(description="The ID of the Access Token.")],
13811382
_request_timeout: Union[
13821383
None,
13831384
Annotated[StrictFloat, Field(gt=0)],
@@ -1397,7 +1398,7 @@ def delete_access_token_without_preload_content(
13971398
:param service_account_email: The ID of the Service Account. (required)
13981399
:type service_account_email: str
13991400
:param access_token_id: The ID of the Access Token. (required)
1400-
:type access_token_id: str
1401+
:type access_token_id: UUID
14011402
:param _request_timeout: timeout setting for this request. If one
14021403
number provided, it will be total request
14031404
timeout. It can also be a pair (tuple) of
@@ -1755,7 +1756,7 @@ def delete_service_account_key(
17551756
self,
17561757
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
17571758
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
1758-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
1759+
key_id: Annotated[UUID, Field(description="ID of the key.")],
17591760
_request_timeout: Union[
17601761
None,
17611762
Annotated[StrictFloat, Field(gt=0)],
@@ -1775,7 +1776,7 @@ def delete_service_account_key(
17751776
:param service_account_email: The email of the service account. (required)
17761777
:type service_account_email: str
17771778
:param key_id: ID of the key. (required)
1778-
:type key_id: str
1779+
:type key_id: UUID
17791780
:param _request_timeout: timeout setting for this request. If one
17801781
number provided, it will be total request
17811782
timeout. It can also be a pair (tuple) of
@@ -1826,7 +1827,7 @@ def delete_service_account_key_with_http_info(
18261827
self,
18271828
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
18281829
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
1829-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
1830+
key_id: Annotated[UUID, Field(description="ID of the key.")],
18301831
_request_timeout: Union[
18311832
None,
18321833
Annotated[StrictFloat, Field(gt=0)],
@@ -1846,7 +1847,7 @@ def delete_service_account_key_with_http_info(
18461847
:param service_account_email: The email of the service account. (required)
18471848
:type service_account_email: str
18481849
:param key_id: ID of the key. (required)
1849-
:type key_id: str
1850+
:type key_id: UUID
18501851
:param _request_timeout: timeout setting for this request. If one
18511852
number provided, it will be total request
18521853
timeout. It can also be a pair (tuple) of
@@ -1897,7 +1898,7 @@ def delete_service_account_key_without_preload_content(
18971898
self,
18981899
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
18991900
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
1900-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
1901+
key_id: Annotated[UUID, Field(description="ID of the key.")],
19011902
_request_timeout: Union[
19021903
None,
19031904
Annotated[StrictFloat, Field(gt=0)],
@@ -1917,7 +1918,7 @@ def delete_service_account_key_without_preload_content(
19171918
:param service_account_email: The email of the service account. (required)
19181919
:type service_account_email: str
19191920
:param key_id: ID of the key. (required)
1920-
:type key_id: str
1921+
:type key_id: UUID
19211922
:param _request_timeout: timeout setting for this request. If one
19221923
number provided, it will be total request
19231924
timeout. It can also be a pair (tuple) of
@@ -2246,7 +2247,7 @@ def get_service_account_key(
22462247
self,
22472248
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
22482249
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
2249-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
2250+
key_id: Annotated[UUID, Field(description="ID of the key.")],
22502251
format: Annotated[Optional[StrictStr], Field(description="Requested format for the public key")] = None,
22512252
_request_timeout: Union[
22522253
None,
@@ -2267,7 +2268,7 @@ def get_service_account_key(
22672268
:param service_account_email: The email of the service account. (required)
22682269
:type service_account_email: str
22692270
:param key_id: ID of the key. (required)
2270-
:type key_id: str
2271+
:type key_id: UUID
22712272
:param format: Requested format for the public key
22722273
:type format: str
22732274
:param _request_timeout: timeout setting for this request. If one
@@ -2321,7 +2322,7 @@ def get_service_account_key_with_http_info(
23212322
self,
23222323
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
23232324
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
2324-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
2325+
key_id: Annotated[UUID, Field(description="ID of the key.")],
23252326
format: Annotated[Optional[StrictStr], Field(description="Requested format for the public key")] = None,
23262327
_request_timeout: Union[
23272328
None,
@@ -2342,7 +2343,7 @@ def get_service_account_key_with_http_info(
23422343
:param service_account_email: The email of the service account. (required)
23432344
:type service_account_email: str
23442345
:param key_id: ID of the key. (required)
2345-
:type key_id: str
2346+
:type key_id: UUID
23462347
:param format: Requested format for the public key
23472348
:type format: str
23482349
:param _request_timeout: timeout setting for this request. If one
@@ -2396,7 +2397,7 @@ def get_service_account_key_without_preload_content(
23962397
self,
23972398
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
23982399
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
2399-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
2400+
key_id: Annotated[UUID, Field(description="ID of the key.")],
24002401
format: Annotated[Optional[StrictStr], Field(description="Requested format for the public key")] = None,
24012402
_request_timeout: Union[
24022403
None,
@@ -2417,7 +2418,7 @@ def get_service_account_key_without_preload_content(
24172418
:param service_account_email: The email of the service account. (required)
24182419
:type service_account_email: str
24192420
:param key_id: ID of the key. (required)
2420-
:type key_id: str
2421+
:type key_id: UUID
24212422
:param format: Requested format for the public key
24222423
:type format: str
24232424
:param _request_timeout: timeout setting for this request. If one
@@ -3266,7 +3267,7 @@ def partial_update_service_account_key(
32663267
self,
32673268
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
32683269
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
3269-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
3270+
key_id: Annotated[UUID, Field(description="ID of the key.")],
32703271
partial_update_service_account_key_payload: Annotated[
32713272
Optional[PartialUpdateServiceAccountKeyPayload], Field(description="Service account request")
32723273
] = None,
@@ -3289,7 +3290,7 @@ def partial_update_service_account_key(
32893290
:param service_account_email: The email of the service account. (required)
32903291
:type service_account_email: str
32913292
:param key_id: ID of the key. (required)
3292-
:type key_id: str
3293+
:type key_id: UUID
32933294
:param partial_update_service_account_key_payload: Service account request
32943295
:type partial_update_service_account_key_payload: PartialUpdateServiceAccountKeyPayload
32953296
:param _request_timeout: timeout setting for this request. If one
@@ -3344,7 +3345,7 @@ def partial_update_service_account_key_with_http_info(
33443345
self,
33453346
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
33463347
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
3347-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
3348+
key_id: Annotated[UUID, Field(description="ID of the key.")],
33483349
partial_update_service_account_key_payload: Annotated[
33493350
Optional[PartialUpdateServiceAccountKeyPayload], Field(description="Service account request")
33503351
] = None,
@@ -3367,7 +3368,7 @@ def partial_update_service_account_key_with_http_info(
33673368
:param service_account_email: The email of the service account. (required)
33683369
:type service_account_email: str
33693370
:param key_id: ID of the key. (required)
3370-
:type key_id: str
3371+
:type key_id: UUID
33713372
:param partial_update_service_account_key_payload: Service account request
33723373
:type partial_update_service_account_key_payload: PartialUpdateServiceAccountKeyPayload
33733374
:param _request_timeout: timeout setting for this request. If one
@@ -3422,7 +3423,7 @@ def partial_update_service_account_key_without_preload_content(
34223423
self,
34233424
project_id: Annotated[StrictStr, Field(description="The ID of the project.")],
34243425
service_account_email: Annotated[StrictStr, Field(description="The email of the service account.")],
3425-
key_id: Annotated[StrictStr, Field(description="ID of the key.")],
3426+
key_id: Annotated[UUID, Field(description="ID of the key.")],
34263427
partial_update_service_account_key_payload: Annotated[
34273428
Optional[PartialUpdateServiceAccountKeyPayload], Field(description="Service account request")
34283429
] = None,
@@ -3445,7 +3446,7 @@ def partial_update_service_account_key_without_preload_content(
34453446
:param service_account_email: The email of the service account. (required)
34463447
:type service_account_email: str
34473448
:param key_id: ID of the key. (required)
3448-
:type key_id: str
3449+
:type key_id: UUID
34493450
:param partial_update_service_account_key_payload: Service account request
34503451
:type partial_update_service_account_key_payload: PartialUpdateServiceAccountKeyPayload
34513452
:param _request_timeout: timeout setting for this request. If one

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Do not edit the class manually.
1313
""" # noqa: E501
1414

15-
1615
# import models into model package
1716
from stackit.serviceaccount.models.access_token import AccessToken
1817
from stackit.serviceaccount.models.access_token_metadata import AccessTokenMetadata

services/serviceaccount/src/stackit/serviceaccount/models/access_token.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import re # noqa: F401
1919
from datetime import datetime
2020
from typing import Any, ClassVar, Dict, List, Optional, Set
21+
from uuid import UUID
2122

2223
from pydantic import (
2324
BaseModel,
@@ -37,7 +38,7 @@ class AccessToken(BaseModel):
3738

3839
active: StrictBool = Field(description="Newly created access tokens are valid, and can be revoked if needed.")
3940
created_at: datetime = Field(description="Creation time of the access token.", alias="createdAt")
40-
id: StrictStr = Field(description="Unique ID of the access token. Also used as JTI field.")
41+
id: UUID = Field(description="Unique ID of the access token. Also used as JTI field.")
4142
token: StrictStr = Field(
4243
description="The access token in JWT format. Use this with `Bearer` prefix for API calls. Store it, as it is not recoverable later."
4344
)

services/serviceaccount/src/stackit/serviceaccount/models/access_token_metadata.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,9 @@
1818
import re # noqa: F401
1919
from datetime import datetime
2020
from typing import Any, ClassVar, Dict, List, Optional, Set
21+
from uuid import UUID
2122

22-
from pydantic import (
23-
BaseModel,
24-
ConfigDict,
25-
Field,
26-
StrictBool,
27-
StrictStr,
28-
field_validator,
29-
)
23+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator
3024
from typing_extensions import Self
3125

3226

@@ -39,7 +33,7 @@ class AccessTokenMetadata(BaseModel):
3933
description="If true, access token can be used for authorized API calls, if false, the token is not usable anymore."
4034
)
4135
created_at: datetime = Field(description="Creation time of the access token.", alias="createdAt")
42-
id: StrictStr = Field(description="Unique ID of the access token. Also used as JTI field.")
36+
id: UUID = Field(description="Unique ID of the access token. Also used as JTI field.")
4337
valid_until: datetime = Field(
4438
description="Approximate expiration time of the access token. Check the JWT for actual validity date.",
4539
alias="validUntil",

services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import re # noqa: F401
1919
from datetime import datetime
2020
from typing import Any, ClassVar, Dict, List, Optional, Set
21+
from uuid import UUID
2122

2223
from pydantic import (
2324
BaseModel,
@@ -42,7 +43,7 @@ class CreateServiceAccountKeyResponse(BaseModel):
4243
active: StrictBool
4344
created_at: datetime = Field(description="Creation time of the key", alias="createdAt")
4445
credentials: CreateServiceAccountKeyResponseCredentials
45-
id: StrictStr = Field(description="Unique ID of the key.")
46+
id: UUID = Field(description="Unique ID of the key.")
4647
key_algorithm: StrictStr = Field(alias="keyAlgorithm")
4748
key_origin: StrictStr = Field(alias="keyOrigin")
4849
key_type: StrictStr = Field(alias="keyType")

services/serviceaccount/src/stackit/serviceaccount/models/create_service_account_key_response_credentials.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import json
1717
import pprint
1818
from typing import Any, ClassVar, Dict, List, Optional, Set
19+
from uuid import UUID
1920

2021
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2122
from typing_extensions import Self
@@ -34,7 +35,7 @@ class CreateServiceAccountKeyResponseCredentials(BaseModel):
3435
description="Private key. Only present, if the service account API was generating the key. Not recoverable later.",
3536
alias="privateKey",
3637
)
37-
sub: StrictStr = Field(description="Service account id")
38+
sub: UUID = Field(description="Service account id")
3839
__properties: ClassVar[List[str]] = ["aud", "iss", "kid", "privateKey", "sub"]
3940

4041
model_config = ConfigDict(

services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import re # noqa: F401
1919
from datetime import datetime
2020
from typing import Any, ClassVar, Dict, List, Optional, Set
21+
from uuid import UUID
2122

2223
from pydantic import (
2324
BaseModel,
@@ -42,7 +43,7 @@ class GetServiceAccountKeyResponse(BaseModel):
4243
active: StrictBool
4344
created_at: datetime = Field(description="Creation time of the key", alias="createdAt")
4445
credentials: GetServiceAccountKeyResponseCredentials
45-
id: StrictStr = Field(description="Unique ID of the key.")
46+
id: UUID = Field(description="Unique ID of the key.")
4647
key_algorithm: StrictStr = Field(alias="keyAlgorithm")
4748
key_origin: StrictStr = Field(alias="keyOrigin")
4849
key_type: StrictStr = Field(alias="keyType")

services/serviceaccount/src/stackit/serviceaccount/models/get_service_account_key_response_credentials.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import json
1717
import pprint
1818
from typing import Any, ClassVar, Dict, List, Optional, Set
19+
from uuid import UUID
1920

2021
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2122
from typing_extensions import Self
@@ -29,7 +30,7 @@ class GetServiceAccountKeyResponseCredentials(BaseModel):
2930
aud: StrictStr = Field(description="Audience - service account API URL")
3031
iss: StrictStr = Field(description="Service account email")
3132
kid: StrictStr = Field(description="Key id to use")
32-
sub: StrictStr = Field(description="Service account id")
33+
sub: UUID = Field(description="Service account id")
3334
__properties: ClassVar[List[str]] = ["aud", "iss", "kid", "sub"]
3435

3536
model_config = ConfigDict(

services/serviceaccount/src/stackit/serviceaccount/models/partial_update_service_account_key_response.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import re # noqa: F401
1919
from datetime import datetime
2020
from typing import Any, ClassVar, Dict, List, Optional, Set
21+
from uuid import UUID
2122

2223
from pydantic import (
2324
BaseModel,
@@ -37,7 +38,7 @@ class PartialUpdateServiceAccountKeyResponse(BaseModel):
3738

3839
active: StrictBool
3940
created_at: datetime = Field(description="Creation time of the key", alias="createdAt")
40-
id: StrictStr = Field(description="Unique ID of the key.")
41+
id: UUID = Field(description="Unique ID of the key.")
4142
key_algorithm: StrictStr = Field(alias="keyAlgorithm")
4243
key_origin: StrictStr = Field(alias="keyOrigin")
4344
key_type: StrictStr = Field(alias="keyType")

0 commit comments

Comments
 (0)