@@ -48,8 +48,8 @@ class AvailablePhoneNumber(_serialization.Model):
48
48
true, the phone number cannot be acquired unless the customer provides explicit agreement to
49
49
not resell it.
50
50
:vartype is_agreement_to_not_resell_required: bool
51
- :ivar error: The error detail .
52
- :vartype error: ~azure.communication.phonenumbers.models.ErrorDetail
51
+ :ivar error: The Communication Services error .
52
+ :vartype error: ~azure.communication.phonenumbers.models.CommunicationError
53
53
"""
54
54
55
55
_validation = {
@@ -74,7 +74,7 @@ class AvailablePhoneNumber(_serialization.Model):
74
74
"cost" : {"key" : "cost" , "type" : "PhoneNumberCost" },
75
75
"status" : {"key" : "status" , "type" : "str" },
76
76
"is_agreement_to_not_resell_required" : {"key" : "isAgreementToNotResellRequired" , "type" : "bool" },
77
- "error" : {"key" : "error" , "type" : "ErrorDetail " },
77
+ "error" : {"key" : "error" , "type" : "CommunicationError " },
78
78
}
79
79
80
80
def __init__ (
@@ -84,7 +84,7 @@ def __init__(
84
84
capabilities : "_models.PhoneNumberCapabilities" ,
85
85
phone_number_type : Union [str , "_models.PhoneNumberType" ],
86
86
assignment_type : Union [str , "_models.PhoneNumberAssignmentType" ],
87
- error : Optional ["_models.ErrorDetail " ] = None ,
87
+ error : Optional ["_models.CommunicationError " ] = None ,
88
88
** kwargs : Any
89
89
) -> None :
90
90
"""
@@ -99,8 +99,8 @@ def __init__(
99
99
case. Required. Known values are: "person" and "application".
100
100
:paramtype assignment_type: str or
101
101
~azure.communication.phonenumbers.models.PhoneNumberAssignmentType
102
- :keyword error: The error detail .
103
- :paramtype error: ~azure.communication.phonenumbers.models.ErrorDetail
102
+ :keyword error: The Communication Services error .
103
+ :paramtype error: ~azure.communication.phonenumbers.models.CommunicationError
104
104
"""
105
105
super ().__init__ (** kwargs )
106
106
self .id : Optional [str ] = None
@@ -221,98 +221,6 @@ def __init__(self, *, error: "_models.CommunicationError", **kwargs: Any) -> Non
221
221
self .error = error
222
222
223
223
224
- class ErrorAdditionalInfo (_serialization .Model ):
225
- """The resource management error additional info.
226
-
227
- Variables are only populated by the server, and will be ignored when sending a request.
228
-
229
- :ivar type: The additional info type.
230
- :vartype type: str
231
- :ivar info: The additional info.
232
- :vartype info: JSON
233
- """
234
-
235
- _validation = {
236
- "type" : {"readonly" : True },
237
- "info" : {"readonly" : True },
238
- }
239
-
240
- _attribute_map = {
241
- "type" : {"key" : "type" , "type" : "str" },
242
- "info" : {"key" : "info" , "type" : "object" },
243
- }
244
-
245
- def __init__ (self , ** kwargs : Any ) -> None :
246
- """ """
247
- super ().__init__ (** kwargs )
248
- self .type : Optional [str ] = None
249
- self .info : Optional [JSON ] = None
250
-
251
-
252
- class ErrorDetail (_serialization .Model ):
253
- """The error detail.
254
-
255
- Variables are only populated by the server, and will be ignored when sending a request.
256
-
257
- :ivar code: The error code.
258
- :vartype code: str
259
- :ivar message: The error message.
260
- :vartype message: str
261
- :ivar target: The error target.
262
- :vartype target: str
263
- :ivar details: The error details.
264
- :vartype details: list[~azure.communication.phonenumbers.models.ErrorDetail]
265
- :ivar additional_info: The error additional info.
266
- :vartype additional_info: list[~azure.communication.phonenumbers.models.ErrorAdditionalInfo]
267
- """
268
-
269
- _validation = {
270
- "code" : {"readonly" : True },
271
- "message" : {"readonly" : True },
272
- "target" : {"readonly" : True },
273
- "details" : {"readonly" : True },
274
- "additional_info" : {"readonly" : True },
275
- }
276
-
277
- _attribute_map = {
278
- "code" : {"key" : "code" , "type" : "str" },
279
- "message" : {"key" : "message" , "type" : "str" },
280
- "target" : {"key" : "target" , "type" : "str" },
281
- "details" : {"key" : "details" , "type" : "[ErrorDetail]" },
282
- "additional_info" : {"key" : "additionalInfo" , "type" : "[ErrorAdditionalInfo]" },
283
- }
284
-
285
- def __init__ (self , ** kwargs : Any ) -> None :
286
- """ """
287
- super ().__init__ (** kwargs )
288
- self .code : Optional [str ] = None
289
- self .message : Optional [str ] = None
290
- self .target : Optional [str ] = None
291
- self .details : Optional [List ["_models.ErrorDetail" ]] = None
292
- self .additional_info : Optional [List ["_models.ErrorAdditionalInfo" ]] = None
293
-
294
-
295
- class ErrorResponse (_serialization .Model ):
296
- """Common error response for all Azure Resource Manager APIs to return error details for failed
297
- operations. (This also follows the OData error response format.).
298
-
299
- :ivar error: The error object.
300
- :vartype error: ~azure.communication.phonenumbers.models.ErrorDetail
301
- """
302
-
303
- _attribute_map = {
304
- "error" : {"key" : "error" , "type" : "ErrorDetail" },
305
- }
306
-
307
- def __init__ (self , * , error : Optional ["_models.ErrorDetail" ] = None , ** kwargs : Any ) -> None :
308
- """
309
- :keyword error: The error object.
310
- :paramtype error: ~azure.communication.phonenumbers.models.ErrorDetail
311
- """
312
- super ().__init__ (** kwargs )
313
- self .error = error
314
-
315
-
316
224
class OfferingsResponse (_serialization .Model ):
317
225
"""Represents a wrapper around a list of offerings.
318
226
0 commit comments