public static class ValueConverterReference documentation and code samples for the Vertex AI v1 API class ValueConverter.
Namespace
Google.Cloud.AIPlatform.V1Assembly
Google.Cloud.AIPlatform.V1.dll
Methods
ToMessage<T>(Struct)
public static T ToMessage<T>(Struct structValue) where T : IMessage, new()Converts a Struct value to the specified message type.
| Parameter | |
|---|---|
| Name | Description |
structValue |
StructThe Struct to convert. Must not be null. |
| Returns | |
|---|---|
| Type | Description |
T |
The message representation of the Struct. |
| Type Parameter | |
|---|---|
| Name | Description |
T |
The message type to convert the struct to. |
ToMessage<T>(Value)
public static T ToMessage<T>(Value structValue) where T : IMessage, new()Converts a Value value, which must represent a Struct, to the specified message type.
| Parameter | |
|---|---|
| Name | Description |
structValue |
ValueThe Struct to convert. Must not be null. |
| Returns | |
|---|---|
| Type | Description |
T |
The message representation of the Struct. |
| Type Parameter | |
|---|---|
| Name | Description |
T |
The message type to convert the struct to. |
ToStruct(IMessage)
public static Struct ToStruct(IMessage message)Converts a protobuf message to a Struct.
| Parameter | |
|---|---|
| Name | Description |
message |
IMessageThe message to convert. Must not be null. |
| Returns | |
|---|---|
| Type | Description |
Struct |
The Struct representation of the message. |
ToValue(IMessage)
public static Value ToValue(IMessage message)Converts a protobuf message to a Value.
| Parameter | |
|---|---|
| Name | Description |
message |
IMessageThe message to convert. Must not be null. |
| Returns | |
|---|---|
| Type | Description |
Value |
The Struct representation of the message. |