apache_beam.utils.proto_utils module

For internal use only; no backwards-compatibility guarantees.


Creates a protobuf Any with msg as its content.

Returns None if msg is None.

apache_beam.utils.proto_utils.unpack_Any(any_msg, msg_class)[source]

Unpacks any_msg into msg_class.

Returns None if msg_class is None.

apache_beam.utils.proto_utils.parse_Bytes(serialized_bytes, msg_class)[source]

Parses the String of bytes into msg_class.

Returns the input bytes if msg_class is None.


Returns a struct containing the values indicated by kwargs.

apache_beam.utils.proto_utils.from_micros(cls, micros)[source]

Convert a float returned by time.time() to a Timestamp.


Convert a Timestamp to a float expressed as seconds since the epoch.