here.platform.utils.protobuf

Source code for here.platform.utils.protobuf

Copyright (C) 2020-2022 HERE Global B.V. and its affiliate(s).

All rights reserved.

This software and other materials contain proprietary information

controlled by HERE and are protected by applicable copyright legislation.

Any use and utilization of this software and other materials and

disclosure to any third parties is conditional upon having a separate

agreement with HERE for the access, use, utilization or disclosure of this

software. In the absence of such agreement, the use of the software is not

allowed.

"""
This module contains generic utility functions for protobuf message handling.
"""

from google.protobuf.message import Message

[docs]
def merge_message(message1: Message, message2: Message):
"""
Merges the contents of the specified message2 into current message1.

:param message1: current parsed message.
:param message2: parsed message to merge into the current message.

:return: Merged Message.
"""

return message1.MergeFrom(message2)