@@ -23,7 +23,7 @@ def __init__(self) -> None:
2323 self ._responses : List [BatchResponseContent ] = []
2424
2525 def add_response (self , response : BatchResponseContent ) -> None :
26- """
26+ """
2727 Adds a response to the collection.
2828 Args:
2929 keys: The keys of the response to add.
@@ -32,7 +32,7 @@ def add_response(self, response: BatchResponseContent) -> None:
3232 self ._responses .append (response )
3333
3434 def get_responses (self ):
35- """
35+ """
3636 Gets the responses in the collection.
3737 Returns:
3838 List[Tuple[str, BatchResponseContent]]: The responses in the collection.
@@ -50,15 +50,15 @@ async def responses_status_codes(self) -> Dict[str, int]:
5050 for response in self ._responses :
5151 if isinstance (response , BatchResponseItem ):
5252 if response .id is not None :
53- status_codes [response .id ] = response .status_code
53+ status_codes [response .id ] = response .status
5454 else :
5555 raise ValueError ("Response ID cannot be None" )
5656 else :
5757 raise TypeError ("Invalid type: Collection must be of type BatchResponseContent" )
5858 return status_codes
5959
6060 def get_field_deserializers (self ) -> Dict [str , Callable [[ParseNode ], None ]]:
61- """
61+ """
6262 Gets the deserialization information for this object.
6363 :return: The deserialization information for this object where each entry is a property key
6464 with its deserialization callback.
@@ -68,8 +68,7 @@ def get_field_deserializers(self) -> Dict[str, Callable[[ParseNode], None]]:
6868 'responses' :
6969 lambda n : setattr (
7070 self , "_responses" ,
71- n .
72- get_collection_of_object_values (BatchResponseItem .create_from_discriminator_value )
71+ n .get_collection_of_object_values (BatchResponseItem )
7372 )
7473 }
7574
0 commit comments