Class Schema (1.23.0)

public final class Schema extends GeneratedMessageV3 implements SchemaOrBuilder

Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed.

Protobuf type google.cloud.vertexai.v1.Schema

Implements

SchemaOrBuilder

Static Fields

ANY_OF_FIELD_NUMBER

public static final int ANY_OF_FIELD_NUMBER
Field Value
TypeDescription
int

DEFAULT_FIELD_NUMBER

public static final int DEFAULT_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ENUM_FIELD_NUMBER

public static final int ENUM_FIELD_NUMBER
Field Value
TypeDescription
int

EXAMPLE_FIELD_NUMBER

public static final int EXAMPLE_FIELD_NUMBER
Field Value
TypeDescription
int

FORMAT_FIELD_NUMBER

public static final int FORMAT_FIELD_NUMBER
Field Value
TypeDescription
int

ITEMS_FIELD_NUMBER

public static final int ITEMS_FIELD_NUMBER
Field Value
TypeDescription
int

MAXIMUM_FIELD_NUMBER

public static final int MAXIMUM_FIELD_NUMBER
Field Value
TypeDescription
int

MAX_ITEMS_FIELD_NUMBER

public static final int MAX_ITEMS_FIELD_NUMBER
Field Value
TypeDescription
int

MAX_LENGTH_FIELD_NUMBER

public static final int MAX_LENGTH_FIELD_NUMBER
Field Value
TypeDescription
int

MAX_PROPERTIES_FIELD_NUMBER

public static final int MAX_PROPERTIES_FIELD_NUMBER
Field Value
TypeDescription
int

MINIMUM_FIELD_NUMBER

public static final int MINIMUM_FIELD_NUMBER
Field Value
TypeDescription
int

MIN_ITEMS_FIELD_NUMBER

public static final int MIN_ITEMS_FIELD_NUMBER
Field Value
TypeDescription
int

MIN_LENGTH_FIELD_NUMBER

public static final int MIN_LENGTH_FIELD_NUMBER
Field Value
TypeDescription
int

MIN_PROPERTIES_FIELD_NUMBER

public static final int MIN_PROPERTIES_FIELD_NUMBER
Field Value
TypeDescription
int

NULLABLE_FIELD_NUMBER

public static final int NULLABLE_FIELD_NUMBER
Field Value
TypeDescription
int

PATTERN_FIELD_NUMBER

public static final int PATTERN_FIELD_NUMBER
Field Value
TypeDescription
int

PROPERTIES_FIELD_NUMBER

public static final int PROPERTIES_FIELD_NUMBER
Field Value
TypeDescription
int

PROPERTY_ORDERING_FIELD_NUMBER

public static final int PROPERTY_ORDERING_FIELD_NUMBER
Field Value
TypeDescription
int

REQUIRED_FIELD_NUMBER

public static final int REQUIRED_FIELD_NUMBER
Field Value
TypeDescription
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
TypeDescription
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Schema getDefaultInstance()
Returns
TypeDescription
Schema

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Schema.Builder newBuilder()
Returns
TypeDescription
Schema.Builder

newBuilder(Schema )

public static Schema.Builder newBuilder(Schema )
Parameter
NameDescription
Schema
Returns
TypeDescription
Schema.Builder

parseDelimitedFrom(InputStream input)

public static Schema parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Schema
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Schema parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Schema
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Schema parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Schema
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Schema parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Schema
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Schema parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Schema
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Schema parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Schema
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Schema parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Schema
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Schema parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Schema
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Schema parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Schema
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Schema parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Schema
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Schema parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Schema
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Schema parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Schema
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Schema> parser()
Returns
TypeDescription
Parser<Schema>

Methods

containsProperties(String key)

public boolean containsProperties(String key)

Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.

map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAnyOf(int index)

public Schema getAnyOf(int index)

Optional. The value should be validated against any (one or more) of the subschemas in the list.

repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
Schema

getAnyOfCount()

public int getAnyOfCount()

Optional. The value should be validated against any (one or more) of the subschemas in the list.

repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getAnyOfList()

public List<Schema> getAnyOfList()

Optional. The value should be validated against any (one or more) of the subschemas in the list.

repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<Schema>

getAnyOfOrBuilder(int index)

public SchemaOrBuilder getAnyOfOrBuilder(int index)

Optional. The value should be validated against any (one or more) of the subschemas in the list.

repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
SchemaOrBuilder

getAnyOfOrBuilderList()

public List<? extends SchemaOrBuilder> getAnyOfOrBuilderList()

Optional. The value should be validated against any (one or more) of the subschemas in the list.

repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<? extends com.google.cloud.vertexai.api.SchemaOrBuilder>

getDefault()

public Value getDefault()

Optional. Default value of the data.

.google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Value

The default.

getDefaultInstanceForType()

public Schema getDefaultInstanceForType()
Returns
TypeDescription
Schema

getDefaultOrBuilder()

public ValueOrBuilder getDefaultOrBuilder()

Optional. Default value of the data.

.google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ValueOrBuilder

getDescription()

public String getDescription()

Optional. The description of the data.

string description = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The description of the data.

string description = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for description.

getEnum(int index)

public String getEnum(int index)

Optional. Possible values of the element of primitive type with enum format. Examples:

  1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
  2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}

repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The enum at the given index.

getEnumBytes(int index)

public ByteString getEnumBytes(int index)

Optional. Possible values of the element of primitive type with enum format. Examples:

  1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
  2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}

repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the enum at the given index.

getEnumCount()

public int getEnumCount()

Optional. Possible values of the element of primitive type with enum format. Examples:

  1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
  2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}

repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of enum.

getEnumList()

public ProtocolStringList getEnumList()

Optional. Possible values of the element of primitive type with enum format. Examples:

  1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
  2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}

repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the enum.

getExample()

public Value getExample()

Optional. Example of the object. Will only populated when the object is the root.

.google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Value

The example.

getExampleOrBuilder()

public ValueOrBuilder getExampleOrBuilder()

Optional. Example of the object. Will only populated when the object is the root.

.google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ValueOrBuilder

getFormat()

public String getFormat()

Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc

string format = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The format.

getFormatBytes()

public ByteString getFormatBytes()

Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc

string format = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for format.

getItems()

public Schema getItems()

Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY.

.google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Schema

The items.

getItemsOrBuilder()

public SchemaOrBuilder getItemsOrBuilder()

Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY.

.google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SchemaOrBuilder

getMaxItems()

public long getMaxItems()

Optional. Maximum number of the elements for Type.ARRAY.

int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
long

The maxItems.

getMaxLength()

public long getMaxLength()

Optional. Maximum length of the Type.STRING

int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
long

The maxLength.

getMaxProperties()

public long getMaxProperties()

Optional. Maximum number of the properties for Type.OBJECT.

int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
long

The maxProperties.

getMaximum()

public double getMaximum()

Optional. Maximum value of the Type.INTEGER and Type.NUMBER

double maximum = 17 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
double

The maximum.

getMinItems()

public long getMinItems()

Optional. Minimum number of the elements for Type.ARRAY.

int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
long

The minItems.

getMinLength()

public long getMinLength()

Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING

int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
long

The minLength.

getMinProperties()

public long getMinProperties()

Optional. Minimum number of the properties for Type.OBJECT.

int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
long

The minProperties.

getMinimum()

public double getMinimum()

Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER

double minimum = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
double

The minimum.

getNullable()

public boolean getNullable()

Optional. Indicates if the value may be null.

bool nullable = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The nullable.

getParserForType()

public Parser<Schema> getParserForType()
Returns
TypeDescription
Parser<Schema>
Overrides

getPattern()

public String getPattern()

Optional. Pattern of the Type.STRING to restrict a string to a regular expression.

string pattern = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The pattern.

getPatternBytes()

public ByteString getPatternBytes()

Optional. Pattern of the Type.STRING to restrict a string to a regular expression.

string pattern = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for pattern.

getProperties() (deprecated)

public Map<String,Schema> getProperties()

Use #getPropertiesMap() instead.

Returns
TypeDescription
Map<String,Schema>

getPropertiesCount()

public int getPropertiesCount()

Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.

map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getPropertiesMap()

public Map<String,Schema> getPropertiesMap()

Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.

map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Map<String,Schema>

getPropertiesOrDefault(String key, Schema defaultValue)

public Schema getPropertiesOrDefault(String key, Schema defaultValue)

Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.

map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
keyString
defaultValueSchema
Returns
TypeDescription
Schema

getPropertiesOrThrow(String key)

public Schema getPropertiesOrThrow(String key)

Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.

map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
Schema

getPropertyOrdering(int index)

public String getPropertyOrdering(int index)

Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.

repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The propertyOrdering at the given index.

getPropertyOrderingBytes(int index)

public ByteString getPropertyOrderingBytes(int index)

Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.

repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the propertyOrdering at the given index.

getPropertyOrderingCount()

public int getPropertyOrderingCount()

Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.

repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of propertyOrdering.

getPropertyOrderingList()

public ProtocolStringList getPropertyOrderingList()

Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.

repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the propertyOrdering.

getRequired(int index)

public String getRequired(int index)

Optional. Required properties of Type.OBJECT.

repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The required at the given index.

getRequiredBytes(int index)

public ByteString getRequiredBytes(int index)

Optional. Required properties of Type.OBJECT.

repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the required at the given index.

getRequiredCount()

public int getRequiredCount()

Optional. Required properties of Type.OBJECT.

repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of required.

getRequiredList()

public ProtocolStringList getRequiredList()

Optional. Required properties of Type.OBJECT.

repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the required.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTitle()

public String getTitle()

Optional. The title of the Schema.

string title = 24 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Optional. The title of the Schema.

string title = 24 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for title.

getType()

public Type getType()

Optional. The type of the data.

.google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Type

The type.

getTypeValue()

public int getTypeValue()

Optional. The type of the data.

.google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for type.

hasDefault()

public boolean hasDefault()

Optional. Default value of the data.

.google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the default field is set.

hasExample()

public boolean hasExample()

Optional. Example of the object. Will only populated when the object is the root.

.google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the example field is set.

hasItems()

public boolean hasItems()

Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY.

.google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the items field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Schema.Builder newBuilderForType()
Returns
TypeDescription
Schema.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Schema.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Schema.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Schema.Builder toBuilder()
Returns
TypeDescription
Schema.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException