public class ValueConverterExposes utility methods for converting AI Platform messages to and from {Value } objects.
Static Fields
EMPTY_VALUE
public static final Value EMPTY_VALUEAn empty {Value } message.
| Field Value | |
|---|---|
| Type | Description |
Value |
|
Static Methods
fromValue(Message.Builder messageBuilder, Value value)
public static Message fromValue(Message.Builder messageBuilder, Value value)Converts a {Value } to a {Message } of the provided {Message.Builder }.
| Parameters | |
|---|---|
| Name | Description |
messageBuilder |
Buildera builder for the message type |
value |
Valuethe Value to convert to a message |
| Returns | |
|---|---|
| Type | Description |
Message |
the value as a message |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
toValue(Message message)
public static Value toValue(Message message)Converts a message type to a {Value }.
| Parameter | |
|---|---|
| Name | Description |
message |
Messagethe message to convert |
| Returns | |
|---|---|
| Type | Description |
Value |
the message as a {Value } |
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
Constructors
ValueConverter()
public ValueConverter()