Class ValueConverter


  • public class ValueConverter
    extends Object
    Exposes utility methods for converting AI Platform messages to and from objects.
    • Field Detail

      • EMPTY_VALUE

        public static final com.google.protobuf.Value EMPTY_VALUE
        An empty message.
    • Constructor Detail

      • ValueConverter

        public ValueConverter()
    • Method Detail

      • toValue

        public static com.google.protobuf.Value toValue​(com.google.protobuf.Message message)
                                                 throws com.google.protobuf.InvalidProtocolBufferException
        Converts a message type to a .
        Parameters:
        message - the message to convert
        Returns:
        the message as a
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • fromValue

        public static com.google.protobuf.Message fromValue​(com.google.protobuf.Message.Builder messageBuilder,
                                                            com.google.protobuf.Value value)
                                                     throws com.google.protobuf.InvalidProtocolBufferException
        Converts a to a of the provided .
        Parameters:
        messageBuilder - a builder for the message type
        value - the Value to convert to a message
        Returns:
        the value as a message
        Throws:
        com.google.protobuf.InvalidProtocolBufferException