21
21
22
22
23
23
def unmarshal_ServerTypeCPU (data : Any ) -> ServerTypeCPU :
24
- if not isinstance (data , dict ) :
24
+ if type (data ) is not dict :
25
25
raise TypeError (
26
- "Unmarshalling the type 'ServerTypeCPU' failed as data isn't a dictionary."
26
+ f "Unmarshalling the type 'ServerTypeCPU' failed as data isn't a dictionary."
27
27
)
28
28
29
29
args : Dict [str , Any ] = {}
@@ -38,9 +38,9 @@ def unmarshal_ServerTypeCPU(data: Any) -> ServerTypeCPU:
38
38
39
39
40
40
def unmarshal_ServerTypeDisk (data : Any ) -> ServerTypeDisk :
41
- if not isinstance (data , dict ) :
41
+ if type (data ) is not dict :
42
42
raise TypeError (
43
- "Unmarshalling the type 'ServerTypeDisk' failed as data isn't a dictionary."
43
+ f "Unmarshalling the type 'ServerTypeDisk' failed as data isn't a dictionary."
44
44
)
45
45
46
46
args : Dict [str , Any ] = {}
@@ -55,9 +55,9 @@ def unmarshal_ServerTypeDisk(data: Any) -> ServerTypeDisk:
55
55
56
56
57
57
def unmarshal_ServerTypeMemory (data : Any ) -> ServerTypeMemory :
58
- if not isinstance (data , dict ) :
58
+ if type (data ) is not dict :
59
59
raise TypeError (
60
- "Unmarshalling the type 'ServerTypeMemory' failed as data isn't a dictionary."
60
+ f "Unmarshalling the type 'ServerTypeMemory' failed as data isn't a dictionary."
61
61
)
62
62
63
63
args : Dict [str , Any ] = {}
@@ -72,9 +72,9 @@ def unmarshal_ServerTypeMemory(data: Any) -> ServerTypeMemory:
72
72
73
73
74
74
def unmarshal_OS (data : Any ) -> OS :
75
- if not isinstance (data , dict ) :
75
+ if type (data ) is not dict :
76
76
raise TypeError (
77
- "Unmarshalling the type 'OS' failed as data isn't a dictionary."
77
+ f "Unmarshalling the type 'OS' failed as data isn't a dictionary."
78
78
)
79
79
80
80
args : Dict [str , Any ] = {}
@@ -98,18 +98,18 @@ def unmarshal_OS(data: Any) -> OS:
98
98
99
99
100
100
def unmarshal_Server (data : Any ) -> Server :
101
- if not isinstance (data , dict ) :
101
+ if type (data ) is not dict :
102
102
raise TypeError (
103
- "Unmarshalling the type 'Server' failed as data isn't a dictionary."
103
+ f "Unmarshalling the type 'Server' failed as data isn't a dictionary."
104
104
)
105
105
106
106
args : Dict [str , Any ] = {}
107
107
108
108
field = data .get ("created_at" , None )
109
- args ["created_at" ] = parser .isoparse (field ) if isinstance (field , str ) else field
109
+ args ["created_at" ] = parser .isoparse (field ) if type (field ) is str else field
110
110
111
111
field = data .get ("deletable_at" , None )
112
- args ["deletable_at" ] = parser .isoparse (field ) if isinstance (field , str ) else field
112
+ args ["deletable_at" ] = parser .isoparse (field ) if type (field ) is str else field
113
113
114
114
field = data .get ("id" , None )
115
115
args ["id" ] = field
@@ -133,7 +133,7 @@ def unmarshal_Server(data: Any) -> Server:
133
133
args ["type_" ] = field
134
134
135
135
field = data .get ("updated_at" , None )
136
- args ["updated_at" ] = parser .isoparse (field ) if isinstance (field , str ) else field
136
+ args ["updated_at" ] = parser .isoparse (field ) if type (field ) is str else field
137
137
138
138
field = data .get ("vnc_url" , None )
139
139
args ["vnc_url" ] = field
@@ -145,9 +145,9 @@ def unmarshal_Server(data: Any) -> Server:
145
145
146
146
147
147
def unmarshal_ServerType (data : Any ) -> ServerType :
148
- if not isinstance (data , dict ) :
148
+ if type (data ) is not dict :
149
149
raise TypeError (
150
- "Unmarshalling the type 'ServerType' failed as data isn't a dictionary."
150
+ f "Unmarshalling the type 'ServerType' failed as data isn't a dictionary."
151
151
)
152
152
153
153
args : Dict [str , Any ] = {}
@@ -174,9 +174,9 @@ def unmarshal_ServerType(data: Any) -> ServerType:
174
174
175
175
176
176
def unmarshal_ListOSResponse (data : Any ) -> ListOSResponse :
177
- if not isinstance (data , dict ) :
177
+ if type (data ) is not dict :
178
178
raise TypeError (
179
- "Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary."
179
+ f "Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary."
180
180
)
181
181
182
182
args : Dict [str , Any ] = {}
@@ -191,9 +191,9 @@ def unmarshal_ListOSResponse(data: Any) -> ListOSResponse:
191
191
192
192
193
193
def unmarshal_ListServerTypesResponse (data : Any ) -> ListServerTypesResponse :
194
- if not isinstance (data , dict ) :
194
+ if type (data ) is not dict :
195
195
raise TypeError (
196
- "Unmarshalling the type 'ListServerTypesResponse' failed as data isn't a dictionary."
196
+ f "Unmarshalling the type 'ListServerTypesResponse' failed as data isn't a dictionary."
197
197
)
198
198
199
199
args : Dict [str , Any ] = {}
@@ -207,9 +207,9 @@ def unmarshal_ListServerTypesResponse(data: Any) -> ListServerTypesResponse:
207
207
208
208
209
209
def unmarshal_ListServersResponse (data : Any ) -> ListServersResponse :
210
- if not isinstance (data , dict ) :
210
+ if type (data ) is not dict :
211
211
raise TypeError (
212
- "Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary."
212
+ f "Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary."
213
213
)
214
214
215
215
args : Dict [str , Any ] = {}
0 commit comments