Package com.google.cloud.aiplatform.util
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 com.google.protobuf.Value
EMPTY_VALUE
An empty message.
-
Constructor Summary
Constructors Constructor Description ValueConverter()
-
Method Summary
All Methods Static Methods Concrete Methods 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 .
-
-
-
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 typevalue
- the Value to convert to a message- Returns:
- the value as a message
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
-