Package com.google.cloud.aiplatform.util
Class ValueConverter
java.lang.Object
com.google.cloud.aiplatform.util.ValueConverter
Exposes utility methods for converting AI Platform messages to and from
objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.protobuf.ValueAn empty message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.protobuf.MessagefromValue(com.google.protobuf.Message.Builder messageBuilder, com.google.protobuf.Value value) Converts a to a of the provided .static com.google.protobuf.ValuetoValue(com.google.protobuf.Message message) Converts a message type to a .
-
Field Details
-
EMPTY_VALUE
public static final com.google.protobuf.Value EMPTY_VALUEAn 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 typevalue- the Value to convert to a message- Returns:
- the value as a message
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-