Class ValueConverter

java.lang.Object
com.google.cloud.aiplatform.util.ValueConverter

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

    Fields
    Modifier and Type
    Field
    Description
    static final com.google.protobuf.Value
    An empty message.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.protobuf.Message
    fromValue(com.google.protobuf.Message.Builder messageBuilder, com.google.protobuf.Value value)
    Converts a to a of the provided .
    static com.google.protobuf.Value
    toValue(com.google.protobuf.Message message)
    Converts a message type to a .

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EMPTY_VALUE

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

    • ValueConverter

      public ValueConverter()
  • Method Details

    • 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