Skip to content

Commit 59d97a7

Browse files
Generate kms
1 parent ca1e877 commit 59d97a7

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

services/kms/src/stackit/kms/models/key.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ class Key(BaseModel):
5050
description="This date is set when a key is pending deletion and refers to the scheduled date of deletion",
5151
alias="deletionDate",
5252
)
53-
description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
54-
default=None, description="A user chosen description to distinguish multiple keys."
53+
description: Annotated[str, Field(strict=True, max_length=256)] = Field(
54+
description="A user chosen description to distinguish multiple keys."
5555
)
5656
display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
5757
description="The display name to distinguish multiple keys.", alias="displayName"
5858
)
5959
id: StrictStr = Field(description="A auto generated unique id which identifies the keys.")
60-
import_only: Optional[StrictBool] = Field(
61-
default=False, description="States whether versions can be created or only imported.", alias="importOnly"
60+
import_only: StrictBool = Field(
61+
description="States whether versions can be created or only imported.", alias="importOnly"
6262
)
6363
key_ring_id: StrictStr = Field(
6464
description="The unique id of the key ring this key is assigned to.", alias="keyRingId"

services/kms/src/stackit/kms/models/key_ring.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class KeyRing(BaseModel):
3131
created_at: datetime = Field(
3232
description="The date and time the creation of the key ring was triggered.", alias="createdAt"
3333
)
34-
description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
35-
default=None, description="A user chosen description to distinguish multiple key rings."
34+
description: Annotated[str, Field(strict=True, max_length=256)] = Field(
35+
description="A user chosen description to distinguish multiple key rings."
3636
)
3737
display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
3838
description="The display name to distinguish multiple key rings.", alias="displayName"

services/kms/src/stackit/kms/models/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Version(BaseModel):
4444
description="The scheduled date when a version's key material will be erased completely from the backend",
4545
alias="destroyDate",
4646
)
47-
disabled: Optional[StrictBool] = Field(default=False, description="States whether versions is enabled or disabled.")
47+
disabled: StrictBool = Field(description="States whether versions is enabled or disabled.")
4848
key_id: StrictStr = Field(description="The unique id of the key this version is assigned to.", alias="keyId")
4949
key_ring_id: StrictStr = Field(
5050
description="The unique id of the key ring the key of this version is assigned to.", alias="keyRingId"

services/kms/src/stackit/kms/models/wrapping_key.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class WrappingKey(BaseModel):
3838
created_at: datetime = Field(
3939
description="The date and time the creation of the wrapping key was triggered.", alias="createdAt"
4040
)
41-
description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
42-
default=None, description="A user chosen description to distinguish multiple wrapping keys."
41+
description: Annotated[str, Field(strict=True, max_length=256)] = Field(
42+
description="A user chosen description to distinguish multiple wrapping keys."
4343
)
4444
display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
4545
description="The display name to distinguish multiple wrapping keys.", alias="displayName"
@@ -50,9 +50,7 @@ class WrappingKey(BaseModel):
5050
description="The unique id of the key ring this wrapping key is assigned to.", alias="keyRingId"
5151
)
5252
protection: Protection
53-
public_key: Optional[StrictStr] = Field(
54-
default=None, description="The public key of the wrapping key.", alias="publicKey"
55-
)
53+
public_key: StrictStr = Field(description="The public key of the wrapping key.", alias="publicKey")
5654
purpose: WrappingPurpose
5755
state: StrictStr = Field(description="The current state of the wrapping key.")
5856
__properties: ClassVar[List[str]] = [
@@ -134,8 +132,13 @@ def to_dict(self) -> Dict[str, Any]:
134132
* `None` is only added to the output dict for nullable fields that
135133
were set at model initialization. Other fields with value `None`
136134
are ignored.
135+
* OpenAPI `readOnly` fields are excluded.
137136
"""
138-
excluded_fields: Set[str] = set([])
137+
excluded_fields: Set[str] = set(
138+
[
139+
"public_key",
140+
]
141+
)
139142

140143
_dict = self.model_dump(
141144
by_alias=True,

0 commit comments

Comments
 (0)