Skip to content
Closed
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
8 changes: 4 additions & 4 deletions services/kms/src/stackit/kms/models/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ class Key(BaseModel):
description="This date is set when a key is pending deletion and refers to the scheduled date of deletion",
alias="deletionDate",
)
description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
default=None, description="A user chosen description to distinguish multiple keys."
description: Annotated[str, Field(strict=True, max_length=256)] = Field(
description="A user chosen description to distinguish multiple keys."
)
display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
description="The display name to distinguish multiple keys.", alias="displayName"
)
id: StrictStr = Field(description="A auto generated unique id which identifies the keys.")
import_only: Optional[StrictBool] = Field(
default=False, description="States whether versions can be created or only imported.", alias="importOnly"
import_only: StrictBool = Field(
description="States whether versions can be created or only imported.", alias="importOnly"
)
key_ring_id: StrictStr = Field(
description="The unique id of the key ring this key is assigned to.", alias="keyRingId"
Expand Down
4 changes: 2 additions & 2 deletions services/kms/src/stackit/kms/models/key_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class KeyRing(BaseModel):
created_at: datetime = Field(
description="The date and time the creation of the key ring was triggered.", alias="createdAt"
)
description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
default=None, description="A user chosen description to distinguish multiple key rings."
description: Annotated[str, Field(strict=True, max_length=256)] = Field(
description="A user chosen description to distinguish multiple key rings."
)
display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
description="The display name to distinguish multiple key rings.", alias="displayName"
Expand Down
2 changes: 1 addition & 1 deletion services/kms/src/stackit/kms/models/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Version(BaseModel):
description="The scheduled date when a version's key material will be erased completely from the backend",
alias="destroyDate",
)
disabled: Optional[StrictBool] = Field(default=False, description="States whether versions is enabled or disabled.")
disabled: StrictBool = Field(description="States whether versions is enabled or disabled.")
key_id: StrictStr = Field(description="The unique id of the key this version is assigned to.", alias="keyId")
key_ring_id: StrictStr = Field(
description="The unique id of the key ring the key of this version is assigned to.", alias="keyRingId"
Expand Down
15 changes: 9 additions & 6 deletions services/kms/src/stackit/kms/models/wrapping_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class WrappingKey(BaseModel):
created_at: datetime = Field(
description="The date and time the creation of the wrapping key was triggered.", alias="createdAt"
)
description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
default=None, description="A user chosen description to distinguish multiple wrapping keys."
description: Annotated[str, Field(strict=True, max_length=256)] = Field(
description="A user chosen description to distinguish multiple wrapping keys."
)
display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
description="The display name to distinguish multiple wrapping keys.", alias="displayName"
Expand All @@ -50,9 +50,7 @@ class WrappingKey(BaseModel):
description="The unique id of the key ring this wrapping key is assigned to.", alias="keyRingId"
)
protection: Protection
public_key: Optional[StrictStr] = Field(
default=None, description="The public key of the wrapping key.", alias="publicKey"
)
public_key: StrictStr = Field(description="The public key of the wrapping key.", alias="publicKey")
purpose: WrappingPurpose
state: StrictStr = Field(description="The current state of the wrapping key.")
__properties: ClassVar[List[str]] = [
Expand Down Expand Up @@ -134,8 +132,13 @@ def to_dict(self) -> Dict[str, Any]:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([])
excluded_fields: Set[str] = set(
[
"public_key",
]
)

_dict = self.model_dump(
by_alias=True,
Expand Down