def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_collection_of_object_values("granularMailboxRestoreArtifacts", self.granular_mailbox_restore_artifacts)
        writer.write_collection_of_object_values("mailboxRestoreArtifacts", self.mailbox_restore_artifacts)
        writer.write_collection_of_object_values("mailboxRestoreArtifactsBulkAdditionRequests", self.mailbox_restore_artifacts_bulk_addition_requests)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/exchange_restore_session.py