Skip to content

Commit

Permalink
feat: update generated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored and Codelax committed Dec 26, 2023
1 parent 5b98b20 commit 93f74d0
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 86 deletions.
4 changes: 2 additions & 2 deletions scaleway-async/scaleway_async/secret/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .types import SecretVersionStatus
from .types import AccessSecretVersionResponse
from .types import EphemeralPolicy
from .types import EphemeralStatus
from .types import EphemeralProperties
from .types import Folder
from .types import ListFoldersResponse
from .types import ListSecretVersionsResponse
Expand All @@ -30,7 +30,7 @@
"SecretVersionStatus",
"AccessSecretVersionResponse",
"EphemeralPolicy",
"EphemeralStatus",
"EphemeralProperties",
"Folder",
"ListFoldersResponse",
"ListSecretVersionsResponse",
Expand Down
22 changes: 11 additions & 11 deletions scaleway-async/scaleway_async/secret/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
SecretVersionStatus,
AccessSecretVersionResponse,
EphemeralPolicy,
EphemeralStatus,
EphemeralProperties,
Folder,
ListFoldersResponse,
ListSecretVersionsResponse,
Expand Down Expand Up @@ -73,7 +73,7 @@ async def create_secret(
tags: Optional[List[str]] = None,
description: Optional[str] = None,
path: Optional[str] = None,
ephemeral_policy_template: Optional[EphemeralPolicy] = None,
ephemeral_policy: Optional[EphemeralPolicy] = None,
) -> Secret:
"""
Create a secret.
Expand All @@ -87,7 +87,7 @@ async def create_secret(
(Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
:param path: Path of the secret.
(Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
:param ephemeral_policy_template: Ephemeral policy of the secret.
:param ephemeral_policy: Ephemeral policy of the secret.
(Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
:return: :class:`Secret <Secret>`
Expand Down Expand Up @@ -116,7 +116,7 @@ async def create_secret(
tags=tags,
description=description,
path=path,
ephemeral_policy_template=ephemeral_policy_template,
ephemeral_policy=ephemeral_policy,
),
self.client,
),
Expand Down Expand Up @@ -253,7 +253,7 @@ async def update_secret(
tags: Optional[List[str]] = None,
description: Optional[str] = None,
path: Optional[str] = None,
ephemeral_policy_template: Optional[EphemeralPolicy] = None,
ephemeral_policy: Optional[EphemeralPolicy] = None,
) -> Secret:
"""
Update metadata of a secret.
Expand All @@ -265,7 +265,7 @@ async def update_secret(
:param description: Description of the secret.
:param path: Path of the folder.
(Optional.) Location of the folder in the directory structure. If not specified, the path is `/`.
:param ephemeral_policy_template: Ephemeral policy of the secret.
:param ephemeral_policy: Ephemeral policy of the secret.
(Optional.) Policy that defines whether/when a secret's versions expire.
:return: :class:`Secret <Secret>`
Expand All @@ -291,7 +291,7 @@ async def update_secret(
tags=tags,
description=description,
path=path,
ephemeral_policy_template=ephemeral_policy_template,
ephemeral_policy=ephemeral_policy,
),
self.client,
),
Expand Down Expand Up @@ -905,7 +905,7 @@ async def update_secret_version(
revision: str,
region: Optional[Region] = None,
description: Optional[str] = None,
ephemeral_status: Optional[EphemeralStatus] = None,
ephemeral_properties: Optional[EphemeralProperties] = None,
) -> SecretVersion:
"""
Update metadata of a version.
Expand All @@ -918,8 +918,8 @@ async def update_secret_version(
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
:param description: Description of the version.
:param ephemeral_status: Ephemeral status of the version.
(Optional.) Status that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
:param ephemeral_properties: Ephemeral properties of the version.
(Optional.) Properties that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
:return: :class:`SecretVersion <SecretVersion>`
Usage:
Expand All @@ -946,7 +946,7 @@ async def update_secret_version(
revision=revision,
region=region,
description=description,
ephemeral_status=ephemeral_status,
ephemeral_properties=ephemeral_properties,
),
self.client,
),
Expand Down
40 changes: 20 additions & 20 deletions scaleway-async/scaleway_async/secret/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
SecretType,
AccessSecretVersionResponse,
EphemeralPolicy,
EphemeralStatus,
EphemeralProperties,
Folder,
ListFoldersResponse,
ListSecretVersionsResponse,
Expand Down Expand Up @@ -54,10 +54,10 @@ def unmarshal_EphemeralPolicy(data: Any) -> EphemeralPolicy:
return EphemeralPolicy(**args)


def unmarshal_EphemeralStatus(data: Any) -> EphemeralStatus:
def unmarshal_EphemeralProperties(data: Any) -> EphemeralProperties:
if type(data) is not dict:
raise TypeError(
f"Unmarshalling the type 'EphemeralStatus' failed as data isn't a dictionary."
f"Unmarshalling the type 'EphemeralProperties' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand All @@ -71,7 +71,7 @@ def unmarshal_EphemeralStatus(data: Any) -> EphemeralStatus:
field = data.get("expires_once_accessed", None)
args["expires_once_accessed"] = field

return EphemeralStatus(**args)
return EphemeralProperties(**args)


def unmarshal_Folder(data: Any) -> Folder:
Expand Down Expand Up @@ -117,8 +117,8 @@ def unmarshal_Secret(data: Any) -> Secret:
field = data.get("description", None)
args["description"] = field

field = data.get("ephemeral_policy_template", None)
args["ephemeral_policy_template"] = (
field = data.get("ephemeral_policy", None)
args["ephemeral_policy"] = (
unmarshal_EphemeralPolicy(field) if field is not None else None
)

Expand Down Expand Up @@ -175,9 +175,9 @@ def unmarshal_SecretVersion(data: Any) -> SecretVersion:
field = data.get("description", None)
args["description"] = field

field = data.get("ephemeral_status", None)
args["ephemeral_status"] = (
unmarshal_EphemeralStatus(field) if field is not None else None
field = data.get("ephemeral_properties", None)
args["ephemeral_properties"] = (
unmarshal_EphemeralProperties(field) if field is not None else None
)

field = data.get("is_latest", None)
Expand Down Expand Up @@ -313,8 +313,8 @@ def marshal_EphemeralPolicy(
return output


def marshal_EphemeralStatus(
request: EphemeralStatus,
def marshal_EphemeralProperties(
request: EphemeralProperties,
defaults: ProfileDefaults,
) -> Dict[str, Any]:
output: Dict[str, Any] = {}
Expand Down Expand Up @@ -397,9 +397,9 @@ def marshal_CreateSecretRequest(
if request.description is not None:
output["description"] = request.description

if request.ephemeral_policy_template is not None:
output["ephemeral_policy_template"] = marshal_EphemeralPolicy(
request.ephemeral_policy_template, defaults
if request.ephemeral_policy is not None:
output["ephemeral_policy"] = marshal_EphemeralPolicy(
request.ephemeral_policy, defaults
)

if request.name is not None:
Expand Down Expand Up @@ -494,9 +494,9 @@ def marshal_UpdateSecretRequest(
if request.description is not None:
output["description"] = request.description

if request.ephemeral_policy_template is not None:
output["ephemeral_policy_template"] = marshal_EphemeralPolicy(
request.ephemeral_policy_template, defaults
if request.ephemeral_policy is not None:
output["ephemeral_policy"] = marshal_EphemeralPolicy(
request.ephemeral_policy, defaults
)

if request.name is not None:
Expand All @@ -520,9 +520,9 @@ def marshal_UpdateSecretVersionRequest(
if request.description is not None:
output["description"] = request.description

if request.ephemeral_status is not None:
output["ephemeral_status"] = marshal_EphemeralStatus(
request.ephemeral_status, defaults
if request.ephemeral_properties is not None:
output["ephemeral_properties"] = marshal_EphemeralProperties(
request.ephemeral_properties, defaults
)

return output
20 changes: 10 additions & 10 deletions scaleway-async/scaleway_async/secret/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ class EphemeralPolicy:


@dataclass
class EphemeralStatus:
class EphemeralProperties:
"""
Ephemeral status.
Ephemeral properties.
"""

expires_at: Optional[datetime]
Expand Down Expand Up @@ -372,7 +372,7 @@ class Secret:
Location of the secret in the directory structure.
"""

ephemeral_policy_template: Optional[EphemeralPolicy]
ephemeral_policy: Optional[EphemeralPolicy]
"""
Ephemeral policy of the secret.
(Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
Expand Down Expand Up @@ -430,9 +430,9 @@ class SecretVersion:
Returns `true` if the version is the latest.
"""

ephemeral_status: Optional[EphemeralStatus]
ephemeral_properties: Optional[EphemeralProperties]
"""
Status of the ephemeral version.
Properties of the ephemeral version.
Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
"""

Expand Down Expand Up @@ -476,7 +476,7 @@ class CreateSecretRequest:
(Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
"""

ephemeral_policy_template: Optional[EphemeralPolicy]
ephemeral_policy: Optional[EphemeralPolicy]
"""
Ephemeral policy of the secret.
(Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
Expand Down Expand Up @@ -572,7 +572,7 @@ class UpdateSecretRequest:
(Optional.) Location of the folder in the directory structure. If not specified, the path is `/`.
"""

ephemeral_policy_template: Optional[EphemeralPolicy]
ephemeral_policy: Optional[EphemeralPolicy]
"""
Ephemeral policy of the secret.
(Optional.) Policy that defines whether/when a secret's versions expire.
Expand Down Expand Up @@ -898,10 +898,10 @@ class UpdateSecretVersionRequest:
Description of the version.
"""

ephemeral_status: Optional[EphemeralStatus]
ephemeral_properties: Optional[EphemeralProperties]
"""
Ephemeral status of the version.
(Optional.) Status that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
Ephemeral properties of the version.
(Optional.) Properties that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
"""


Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/secret/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .types import SecretVersionStatus
from .types import AccessSecretVersionResponse
from .types import EphemeralPolicy
from .types import EphemeralStatus
from .types import EphemeralProperties
from .types import Folder
from .types import ListFoldersResponse
from .types import ListSecretVersionsResponse
Expand All @@ -30,7 +30,7 @@
"SecretVersionStatus",
"AccessSecretVersionResponse",
"EphemeralPolicy",
"EphemeralStatus",
"EphemeralProperties",
"Folder",
"ListFoldersResponse",
"ListSecretVersionsResponse",
Expand Down
22 changes: 11 additions & 11 deletions scaleway/scaleway/secret/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
SecretVersionStatus,
AccessSecretVersionResponse,
EphemeralPolicy,
EphemeralStatus,
EphemeralProperties,
Folder,
ListFoldersResponse,
ListSecretVersionsResponse,
Expand Down Expand Up @@ -73,7 +73,7 @@ def create_secret(
tags: Optional[List[str]] = None,
description: Optional[str] = None,
path: Optional[str] = None,
ephemeral_policy_template: Optional[EphemeralPolicy] = None,
ephemeral_policy: Optional[EphemeralPolicy] = None,
) -> Secret:
"""
Create a secret.
Expand All @@ -87,7 +87,7 @@ def create_secret(
(Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
:param path: Path of the secret.
(Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
:param ephemeral_policy_template: Ephemeral policy of the secret.
:param ephemeral_policy: Ephemeral policy of the secret.
(Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
:return: :class:`Secret <Secret>`
Expand Down Expand Up @@ -116,7 +116,7 @@ def create_secret(
tags=tags,
description=description,
path=path,
ephemeral_policy_template=ephemeral_policy_template,
ephemeral_policy=ephemeral_policy,
),
self.client,
),
Expand Down Expand Up @@ -253,7 +253,7 @@ def update_secret(
tags: Optional[List[str]] = None,
description: Optional[str] = None,
path: Optional[str] = None,
ephemeral_policy_template: Optional[EphemeralPolicy] = None,
ephemeral_policy: Optional[EphemeralPolicy] = None,
) -> Secret:
"""
Update metadata of a secret.
Expand All @@ -265,7 +265,7 @@ def update_secret(
:param description: Description of the secret.
:param path: Path of the folder.
(Optional.) Location of the folder in the directory structure. If not specified, the path is `/`.
:param ephemeral_policy_template: Ephemeral policy of the secret.
:param ephemeral_policy: Ephemeral policy of the secret.
(Optional.) Policy that defines whether/when a secret's versions expire.
:return: :class:`Secret <Secret>`
Expand All @@ -291,7 +291,7 @@ def update_secret(
tags=tags,
description=description,
path=path,
ephemeral_policy_template=ephemeral_policy_template,
ephemeral_policy=ephemeral_policy,
),
self.client,
),
Expand Down Expand Up @@ -905,7 +905,7 @@ def update_secret_version(
revision: str,
region: Optional[Region] = None,
description: Optional[str] = None,
ephemeral_status: Optional[EphemeralStatus] = None,
ephemeral_properties: Optional[EphemeralProperties] = None,
) -> SecretVersion:
"""
Update metadata of a version.
Expand All @@ -918,8 +918,8 @@ def update_secret_version(
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
:param description: Description of the version.
:param ephemeral_status: Ephemeral status of the version.
(Optional.) Status that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
:param ephemeral_properties: Ephemeral properties of the version.
(Optional.) Properties that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
:return: :class:`SecretVersion <SecretVersion>`
Usage:
Expand All @@ -946,7 +946,7 @@ def update_secret_version(
revision=revision,
region=region,
description=description,
ephemeral_status=ephemeral_status,
ephemeral_properties=ephemeral_properties,
),
self.client,
),
Expand Down
Loading

0 comments on commit 93f74d0

Please sign in to comment.