Skip to content

Commit 315629e

Browse files
Generator: Update SDK /services/kms (#2699)
1 parent 8b18a2d commit 315629e

File tree

7 files changed

+31
-16
lines changed

7 files changed

+31
-16
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
- **Feature:** Add `CreateIsolatedNetwork` functionality
66
- **Feature:** Add `ImageFromVolumePayload` functionality
77
- **Feature:** Add `SystemRoutes` to `UpdateRoutingTableOfAreaPayload`
8-
- `kms`: [v0.5.0](services/kms/CHANGELOG.md#v050)
9-
- **Feature:** Add regex field validator for `display_name` attribute in model classes `CreateKeyPayload`, `CreateKeyRingPayload`, `CreateWrappingKeyPayload`
8+
- `kms`:
9+
- [v0.6.0](services/kms/CHANGELOG.md#v060)
10+
- Set fields `description` and `import_only` to required in response struct `Key`
11+
- Set fields `description` and `public_key` to required in response struct `WrappingKey`
12+
- Set field `description` to required in response struct `KeyRing`
13+
- Set field `disabled` to required in response struct `Version`
14+
- [v0.5.0](services/kms/CHANGELOG.md#v050)
15+
- **Feature:** Add regex field validator for `display_name` attribute in model classes `CreateKeyPayload`, `CreateKeyRingPayload`, `CreateWrappingKeyPayload`
1016
- `sqlserverflex`: [v1.1.1](services/sqlserverflex/CHANGELOG.md#v111)
1117
- **Breaking change:** Add region parameter in `ListMetrics` method. Previously the method failed, because the region parameter was missing
1218
- `mongodbflex`: [v1.2.2](services/mongodbflex/CHANGELOG.md#v122)

services/kms/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v0.6.0
2+
- Set fields `description` and `import_only` to required in response struct `Key`
3+
- Set fields `description` and `public_key` to required in response struct `WrappingKey`
4+
- Set field `description` to required in response struct `KeyRing`
5+
- Set field `disabled` to required in response struct `Version`
6+
17
## v0.5.0
28
- **Feature:** Add regex field validator for `display_name` attribute in model classes `CreateKeyPayload`, `CreateKeyRingPayload`, `CreateWrappingKeyPayload`
39

services/kms/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-kms"
33

44
[tool.poetry]
55
name = "stackit-kms"
6-
version = "v0.5.0"
6+
version = "v0.6.0"
77
authors = [
88
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
99
]

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)