Skip to content

Commit 81c3f47

Browse files
authored
feat(secret_manager): return type on AccessSecretVersion (#480)
1 parent e0a4cb5 commit 81c3f47

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

scaleway-async/scaleway_async/secret/v1beta1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async def create_secret(
7575
:param project_id: ID of the Project containing the secret.
7676
:param tags: List of the secret's tags.
7777
:param description: Description of the secret.
78-
:param type_: (Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
78+
:param type_: (Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`.
7979
:param path: (Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
8080
:param ephemeral_policy: (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
8181
:return: :class:`Secret <Secret>`

scaleway-async/scaleway_async/secret/v1beta1/marshalling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ def unmarshal_AccessSecretVersionResponse(data: Any) -> AccessSecretVersionRespo
206206
if field is not None:
207207
args["data"] = field
208208

209+
field = data.get("type_", None)
210+
if field is not None:
211+
args["type_"] = field
212+
209213
field = data.get("data_crc32", None)
210214
if field is not None:
211215
args["data_crc32"] = field

scaleway-async/scaleway_async/secret/v1beta1/types.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class Secret:
256256

257257
type_: SecretType
258258
"""
259-
See `Secret.Type` enum for description of values.
259+
See the `Secret.Type` enum for a description of values.
260260
"""
261261

262262
path: str
@@ -318,6 +318,11 @@ class AccessSecretVersionResponse:
318318
The base64-encoded secret payload of the version.
319319
"""
320320

321+
type_: SecretType
322+
"""
323+
See the `Secret.Type` enum for a description of values.
324+
"""
325+
321326
data_crc32: Optional[int]
322327
"""
323328
This field is only available if a CRC32 was supplied during the creation of the version.
@@ -423,7 +428,7 @@ class CreateSecretRequest:
423428

424429
type_: Optional[SecretType]
425430
"""
426-
(Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
431+
(Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`.
427432
"""
428433

429434
path: Optional[str]

scaleway/scaleway/secret/v1beta1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def create_secret(
7575
:param project_id: ID of the Project containing the secret.
7676
:param tags: List of the secret's tags.
7777
:param description: Description of the secret.
78-
:param type_: (Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
78+
:param type_: (Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`.
7979
:param path: (Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
8080
:param ephemeral_policy: (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
8181
:return: :class:`Secret <Secret>`

scaleway/scaleway/secret/v1beta1/marshalling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ def unmarshal_AccessSecretVersionResponse(data: Any) -> AccessSecretVersionRespo
206206
if field is not None:
207207
args["data"] = field
208208

209+
field = data.get("type_", None)
210+
if field is not None:
211+
args["type_"] = field
212+
209213
field = data.get("data_crc32", None)
210214
if field is not None:
211215
args["data_crc32"] = field

scaleway/scaleway/secret/v1beta1/types.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class Secret:
256256

257257
type_: SecretType
258258
"""
259-
See `Secret.Type` enum for description of values.
259+
See the `Secret.Type` enum for a description of values.
260260
"""
261261

262262
path: str
@@ -318,6 +318,11 @@ class AccessSecretVersionResponse:
318318
The base64-encoded secret payload of the version.
319319
"""
320320

321+
type_: SecretType
322+
"""
323+
See the `Secret.Type` enum for a description of values.
324+
"""
325+
321326
data_crc32: Optional[int]
322327
"""
323328
This field is only available if a CRC32 was supplied during the creation of the version.
@@ -423,7 +428,7 @@ class CreateSecretRequest:
423428

424429
type_: Optional[SecretType]
425430
"""
426-
(Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
431+
(Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`.
427432
"""
428433

429434
path: Optional[str]

0 commit comments

Comments
 (0)