Skip to content

Commit

Permalink
feat: update generation
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsheep committed Oct 26, 2023
1 parent a56aa35 commit af5ceba
Show file tree
Hide file tree
Showing 84 changed files with 1,380 additions and 1,370 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,21 @@ def unmarshal_ServerType(data: Any) -> ServerType:

args: Dict[str, Any] = {}

field = data.get("name", None)
args["name"] = field

field = data.get("stock", None)
args["stock"] = field

field = data.get("cpu", None)
args["cpu"] = unmarshal_ServerTypeCPU(field)

field = data.get("disk", None)
args["disk"] = unmarshal_ServerTypeDisk(field)

field = data.get("name", None)
args["name"] = field

field = data.get("memory", None)
args["memory"] = unmarshal_ServerTypeMemory(field)

field = data.get("stock", None)
args["stock"] = field

field = data.get("minimum_lease_duration", None)
args["minimum_lease_duration"] = field

Expand Down
20 changes: 10 additions & 10 deletions scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,29 +100,29 @@ class OS:

@dataclass
class ServerType:
cpu: ServerTypeCPU
name: str
"""
CPU description.
Name of the type.
"""

disk: ServerTypeDisk
stock: ServerTypeStock
"""
Size of the local disk of the server.
Current stock.
"""

name: str
cpu: Optional[ServerTypeCPU]
"""
Name of the type.
CPU description.
"""

memory: ServerTypeMemory
disk: Optional[ServerTypeDisk]
"""
Size of memory available.
Size of the local disk of the server.
"""

stock: ServerTypeStock
memory: Optional[ServerTypeMemory]
"""
Current stock.
Size of memory available.
"""

minimum_lease_duration: Optional[str]
Expand Down
24 changes: 12 additions & 12 deletions scaleway-async/scaleway_async/baremetal/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ def unmarshal_OS(data: Any) -> OS:
field = data.get("logo_url", None)
args["logo_url"] = field

field = data.get("enabled", None)
args["enabled"] = field

field = data.get("license_required", None)
args["license_required"] = field

field = data.get("allowed", None)
args["allowed"] = field

field = data.get("ssh", None)
args["ssh"] = unmarshal_OSOSField(field)

Expand All @@ -141,15 +150,6 @@ def unmarshal_OS(data: Any) -> OS:
field = data.get("service_password", None)
args["service_password"] = unmarshal_OSOSField(field)

field = data.get("enabled", None)
args["enabled"] = field

field = data.get("license_required", None)
args["license_required"] = field

field = data.get("allowed", None)
args["allowed"] = field

return OS(**args)


Expand Down Expand Up @@ -556,9 +556,6 @@ def unmarshal_Server(data: Any) -> Server:
field = data.get("zone", None)
args["zone"] = field

field = data.get("install", None)
args["install"] = unmarshal_ServerInstall(field)

field = data.get("ping_status", None)
args["ping_status"] = field

Expand All @@ -567,6 +564,9 @@ def unmarshal_Server(data: Any) -> Server:
[unmarshal_ServerOption(v) for v in field] if field is not None else None
)

field = data.get("install", None)
args["install"] = unmarshal_ServerInstall(field)

field = data.get("rescue_server", None)
args["rescue_server"] = unmarshal_ServerRescueServer(field)

Expand Down
44 changes: 22 additions & 22 deletions scaleway-async/scaleway_async/baremetal/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,44 +474,44 @@ class OS:
URL of this OS's logo.
"""

ssh: OSOSField
enabled: bool
"""
Object defining the SSH requirements to install the OS.
Defines if the operating system is enabled or not.
"""

user: OSOSField
license_required: bool
"""
Object defining the username requirements to install the OS.
License required (check server options for pricing details).
"""

password: OSOSField
allowed: bool
"""
Object defining the password requirements to install the OS.
Defines if a specific Organization is allowed to install this OS type.
"""

service_user: OSOSField
ssh: Optional[OSOSField]
"""
Object defining the username requirements to install the service.
Object defining the SSH requirements to install the OS.
"""

service_password: OSOSField
user: Optional[OSOSField]
"""
Object defining the password requirements to install the service.
Object defining the username requirements to install the OS.
"""

enabled: bool
password: Optional[OSOSField]
"""
Defines if the operating system is enabled or not.
Object defining the password requirements to install the OS.
"""

license_required: bool
service_user: Optional[OSOSField]
"""
License required (check server options for pricing details).
Object defining the username requirements to install the service.
"""

allowed: bool
service_password: Optional[OSOSField]
"""
Defines if a specific Organization is allowed to install this OS type.
Object defining the password requirements to install the service.
"""


Expand Down Expand Up @@ -789,11 +789,6 @@ class Server:
Zone in which is the server located.
"""

install: ServerInstall
"""
Configuration of the installation.
"""

ping_status: ServerPingStatus
"""
Status of server ping.
Expand All @@ -804,7 +799,12 @@ class Server:
Options enabled on the server.
"""

rescue_server: ServerRescueServer
install: Optional[ServerInstall]
"""
Configuration of the installation.
"""

rescue_server: Optional[ServerRescueServer]
"""
Configuration of rescue boot.
"""
Expand Down
18 changes: 9 additions & 9 deletions scaleway-async/scaleway_async/block/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ def unmarshal_SnapshotSummary(data: Any) -> SnapshotSummary:
field = data.get("name", None)
args["name"] = field

field = data.get("parent_volume", None)
args["parent_volume"] = unmarshal_SnapshotParentVolume(field)

field = data.get("size", None)
args["size"] = field

Expand All @@ -189,6 +186,9 @@ def unmarshal_SnapshotSummary(data: Any) -> SnapshotSummary:
field = data.get("class_", None)
args["class_"] = field

field = data.get("parent_volume", None)
args["parent_volume"] = unmarshal_SnapshotParentVolume(field)

field = data.get("created_at", None)
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field

Expand Down Expand Up @@ -228,15 +228,15 @@ def unmarshal_VolumeType(data: Any) -> VolumeType:
field = data.get("type_", None)
args["type_"] = field

field = data.get("specs", None)
args["specs"] = unmarshal_VolumeSpecifications(field)

field = data.get("pricing", None)
args["pricing"] = unmarshal_Money(field)

field = data.get("snapshot_pricing", None)
args["snapshot_pricing"] = unmarshal_Money(field)

field = data.get("specs", None)
args["specs"] = unmarshal_VolumeSpecifications(field)

return VolumeType(**args)


Expand Down Expand Up @@ -292,9 +292,6 @@ def unmarshal_Snapshot(data: Any) -> Snapshot:
field = data.get("name", None)
args["name"] = field

field = data.get("parent_volume", None)
args["parent_volume"] = unmarshal_SnapshotParentVolume(field)

field = data.get("size", None)
args["size"] = field

Expand All @@ -318,6 +315,9 @@ def unmarshal_Snapshot(data: Any) -> Snapshot:
field = data.get("class_", None)
args["class_"] = field

field = data.get("parent_volume", None)
args["parent_volume"] = unmarshal_SnapshotParentVolume(field)

field = data.get("created_at", None)
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field

Expand Down
32 changes: 16 additions & 16 deletions scaleway-async/scaleway_async/block/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,6 @@ class SnapshotSummary:
Name of the snapshot.
"""

parent_volume: SnapshotParentVolume
"""
If the parent volume has been deleted, value is null.
"""

size: int
"""
Size of the snapshot in bytes.
Expand Down Expand Up @@ -237,6 +232,11 @@ class SnapshotSummary:
Storage class of the snapshot.
"""

parent_volume: Optional[SnapshotParentVolume]
"""
If the parent volume has been deleted, value is null.
"""

created_at: Optional[datetime]
"""
Creation date of the snapshot.
Expand All @@ -255,11 +255,6 @@ class VolumeType:
Volume type.
"""

specs: VolumeSpecifications
"""
Volume specifications of the volume type.
"""

pricing: Optional[Money]
"""
Price of the volume billed in GB/hour.
Expand All @@ -270,6 +265,11 @@ class VolumeType:
Price of the snapshot billed in GB/hour.
"""

specs: Optional[VolumeSpecifications]
"""
Volume specifications of the volume type.
"""


@dataclass
class Volume:
Expand Down Expand Up @@ -333,7 +333,7 @@ class Volume:
Volume zone.
"""

specs: VolumeSpecifications
specs: Optional[VolumeSpecifications]
"""
Specifications of the volume.
"""
Expand Down Expand Up @@ -611,11 +611,6 @@ class Snapshot:
Name of the snapshot.
"""

parent_volume: SnapshotParentVolume
"""
If the parent volume was deleted, value is null.
"""

size: int
"""
Size in bytes of the snapshot.
Expand Down Expand Up @@ -651,6 +646,11 @@ class Snapshot:
Storage class of the snapshot.
"""

parent_volume: Optional[SnapshotParentVolume]
"""
If the parent volume was deleted, value is null.
"""

created_at: Optional[datetime]
"""
Creation date of the snapshot.
Expand Down
18 changes: 9 additions & 9 deletions scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ def unmarshal_Token(data: Any) -> Token:
field = data.get("name", None)
args["name"] = field

field = data.get("scopes", None)
args["scopes"] = unmarshal_TokenScopes(field)

field = data.get("created_at", None)
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field

field = data.get("updated_at", None)
args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field

field = data.get("scopes", None)
args["scopes"] = unmarshal_TokenScopes(field)

field = data.get("secret_key", None)
args["secret_key"] = field

Expand Down Expand Up @@ -290,24 +290,24 @@ def unmarshal_Cockpit(data: Any) -> Cockpit:
field = data.get("project_id", None)
args["project_id"] = field

field = data.get("endpoints", None)
args["endpoints"] = unmarshal_CockpitEndpoints(field)

field = data.get("status", None)
args["status"] = field

field = data.get("managed_alerts_enabled", None)
args["managed_alerts_enabled"] = field

field = data.get("plan", None)
args["plan"] = unmarshal_Plan(field)

field = data.get("created_at", None)
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field

field = data.get("updated_at", None)
args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field

field = data.get("endpoints", None)
args["endpoints"] = unmarshal_CockpitEndpoints(field)

field = data.get("plan", None)
args["plan"] = unmarshal_Plan(field)

return Cockpit(**args)


Expand Down
Loading

0 comments on commit af5ceba

Please sign in to comment.