Class SchemaMaker (1.9.0)

public final class SchemaMaker

Helper class to create com.google.cloud.vertexai.api.Schema

Inheritance

java.lang.Object > SchemaMaker

Static Methods

fromJsonObject(JsonObject jsonObject)

public static Schema fromJsonObject(JsonObject jsonObject)

Creates a Schema from a JsonObject

Parameter
Name Description
jsonObject com.google.gson.JsonObject

A valid JSON object that can be parsed to a Schema object.

Returns
Type Description
Schema

a com.google.cloud.vertexai.api.Schema by parsing the input JSON object.

Exceptions
Type Description
InvalidProtocolBufferException

if the jsonObject can't be parsed into a Schema proto.

fromJsonString(String jsonString)

public static Schema fromJsonString(String jsonString)

Creates a Schema from a JsonString

Parameter
Name Description
jsonString String

A valid Json String that can be parsed to a Schema object.

Returns
Type Description
Schema

a com.google.cloud.vertexai.api.Schema by parsing the input JSON string.

Exceptions
Type Description
InvalidProtocolBufferException

if the String can't be parsed into a Schema proto.