Class ValueConverter (3.54.0)

public class ValueConverter

Exposes utility methods for converting AI Platform messages to and from {Value } objects.

Inheritance

java.lang.Object > ValueConverter

Static Fields

EMPTY_VALUE

public static final Value EMPTY_VALUE

An 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 Builder

a builder for the message type

value Value

the 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 Message

the message to convert

Returns
Type Description
Value

the message as a {Value }

Exceptions
Type Description
InvalidProtocolBufferException

Constructors

ValueConverter()

public ValueConverter()