Skip to content

Generator: Update SDK /services/kms #1217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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
6 changes: 4 additions & 2 deletions services/kms/src/stackit/kms/models/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ class Key(BaseModel):
@field_validator("state")
def state_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(["active", "version_not_ready", "deleted"]):
raise ValueError("must be one of enum values ('active', 'version_not_ready', 'deleted')")
if value not in set(["active", "deleted", "not_available", "errors_exist", "no_version"]):
raise ValueError(
"must be one of enum values ('active', 'deleted', 'not_available', 'errors_exist', 'no_version')"
)
return value

model_config = ConfigDict(
Expand Down
13 changes: 11 additions & 2 deletions services/kms/src/stackit/kms/models/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,18 @@ class Version(BaseModel):
@field_validator("state")
def state_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(["active", "key_material_not_ready", "key_material_invalid", "disabled", "destroyed"]):
if value not in set(
[
"active",
"key_material_not_ready",
"key_material_invalid",
"key_material_unavailable",
"disabled",
"destroyed",
]
):
raise ValueError(
"must be one of enum values ('active', 'key_material_not_ready', 'key_material_invalid', 'disabled', 'destroyed')"
"must be one of enum values ('active', 'key_material_not_ready', 'key_material_invalid', 'key_material_unavailable', 'disabled', 'destroyed')"
)
return value

Expand Down
6 changes: 4 additions & 2 deletions services/kms/src/stackit/kms/models/wrapping_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ class WrappingKey(BaseModel):
@field_validator("state")
def state_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(["active", "key_material_not_ready", "expired", "deleting"]):
raise ValueError("must be one of enum values ('active', 'key_material_not_ready', 'expired', 'deleting')")
if value not in set(["active", "key_material_not_ready", "expired", "deleting", "key_material_unavailable"]):
raise ValueError(
"must be one of enum values ('active', 'key_material_not_ready', 'expired', 'deleting', 'key_material_unavailable')"
)
return value

model_config = ConfigDict(
Expand Down
Loading