Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@


def unmarshal_ServerTypeCPU(data: Any) -> ServerTypeCPU:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'ServerTypeCPU' failed as data isn't a dictionary."
f"Unmarshalling the type 'ServerTypeCPU' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand All @@ -38,9 +38,9 @@ def unmarshal_ServerTypeCPU(data: Any) -> ServerTypeCPU:


def unmarshal_ServerTypeDisk(data: Any) -> ServerTypeDisk:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'ServerTypeDisk' failed as data isn't a dictionary."
f"Unmarshalling the type 'ServerTypeDisk' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand All @@ -55,9 +55,9 @@ def unmarshal_ServerTypeDisk(data: Any) -> ServerTypeDisk:


def unmarshal_ServerTypeMemory(data: Any) -> ServerTypeMemory:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'ServerTypeMemory' failed as data isn't a dictionary."
f"Unmarshalling the type 'ServerTypeMemory' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand All @@ -72,9 +72,9 @@ def unmarshal_ServerTypeMemory(data: Any) -> ServerTypeMemory:


def unmarshal_OS(data: Any) -> OS:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'OS' failed as data isn't a dictionary."
f"Unmarshalling the type 'OS' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand All @@ -98,18 +98,18 @@ def unmarshal_OS(data: Any) -> OS:


def unmarshal_Server(data: Any) -> Server:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'Server' failed as data isn't a dictionary."
f"Unmarshalling the type 'Server' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}

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

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

field = data.get("id", None)
args["id"] = field
Expand All @@ -133,7 +133,7 @@ def unmarshal_Server(data: Any) -> Server:
args["type_"] = field

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

field = data.get("vnc_url", None)
args["vnc_url"] = field
Expand All @@ -145,9 +145,9 @@ def unmarshal_Server(data: Any) -> Server:


def unmarshal_ServerType(data: Any) -> ServerType:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'ServerType' failed as data isn't a dictionary."
f"Unmarshalling the type 'ServerType' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand All @@ -174,9 +174,9 @@ def unmarshal_ServerType(data: Any) -> ServerType:


def unmarshal_ListOSResponse(data: Any) -> ListOSResponse:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary."
f"Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand All @@ -191,9 +191,9 @@ def unmarshal_ListOSResponse(data: Any) -> ListOSResponse:


def unmarshal_ListServerTypesResponse(data: Any) -> ListServerTypesResponse:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'ListServerTypesResponse' failed as data isn't a dictionary."
f"Unmarshalling the type 'ListServerTypesResponse' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand All @@ -207,9 +207,9 @@ def unmarshal_ListServerTypesResponse(data: Any) -> ListServerTypesResponse:


def unmarshal_ListServersResponse(data: Any) -> ListServersResponse:
if not isinstance(data, dict):
if type(data) is not dict:
raise TypeError(
"Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary."
f"Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}
Expand Down
Loading