Package com.google.spanner.v1
Class Type
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.spanner.v1.Type
-
- All Implemented Interfaces:
com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,TypeOrBuilder
,Serializable
public final class Type extends com.google.protobuf.GeneratedMessageV3 implements TypeOrBuilder
`Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query.
Protobuf typegoogle.spanner.v1.Type
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Type.Builder
`Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
ARRAY_ELEMENT_TYPE_FIELD_NUMBER
static int
CODE_FIELD_NUMBER
static int
STRUCT_TYPE_FIELD_NUMBER
static int
TYPE_ANNOTATION_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Type
getArrayElementType()
If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the type of the array elements.TypeOrBuilder
getArrayElementTypeOrBuilder()
If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the type of the array elements.TypeCode
getCode()
Required.int
getCodeValue()
Required.static Type
getDefaultInstance()
Type
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Parser<Type>
getParserForType()
int
getSerializedSize()
StructType
getStructType()
If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides type information for the struct's fields.StructTypeOrBuilder
getStructTypeOrBuilder()
If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides type information for the struct's fields.TypeAnnotationCode
getTypeAnnotation()
The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will use to represent values of this type during query processing.int
getTypeAnnotationValue()
The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will use to represent values of this type during query processing.boolean
hasArrayElementType()
If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the type of the array elements.int
hashCode()
boolean
hasStructType()
If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides type information for the struct's fields.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Type.Builder
newBuilder()
static Type.Builder
newBuilder(Type prototype)
Type.Builder
newBuilderForType()
protected Type.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Type
parseDelimitedFrom(InputStream input)
static Type
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Type
parseFrom(byte[] data)
static Type
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Type
parseFrom(com.google.protobuf.ByteString data)
static Type
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Type
parseFrom(com.google.protobuf.CodedInputStream input)
static Type
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Type
parseFrom(InputStream input)
static Type
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Type
parseFrom(ByteBuffer data)
static Type
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Type>
parser()
Type.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
CODE_FIELD_NUMBER
public static final int CODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ARRAY_ELEMENT_TYPE_FIELD_NUMBER
public static final int ARRAY_ELEMENT_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STRUCT_TYPE_FIELD_NUMBER
public static final int STRUCT_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TYPE_ANNOTATION_FIELD_NUMBER
public static final int TYPE_ANNOTATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getCodeValue
public int getCodeValue()
Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.
.google.spanner.v1.TypeCode code = 1 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getCodeValue
in interfaceTypeOrBuilder
- Returns:
- The enum numeric value on the wire for code.
-
getCode
public TypeCode getCode()
Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.
.google.spanner.v1.TypeCode code = 1 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getCode
in interfaceTypeOrBuilder
- Returns:
- The code.
-
hasArrayElementType
public boolean hasArrayElementType()
If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the type of the array elements.
.google.spanner.v1.Type array_element_type = 2;
- Specified by:
hasArrayElementType
in interfaceTypeOrBuilder
- Returns:
- Whether the arrayElementType field is set.
-
getArrayElementType
public Type getArrayElementType()
If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the type of the array elements.
.google.spanner.v1.Type array_element_type = 2;
- Specified by:
getArrayElementType
in interfaceTypeOrBuilder
- Returns:
- The arrayElementType.
-
getArrayElementTypeOrBuilder
public TypeOrBuilder getArrayElementTypeOrBuilder()
If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the type of the array elements.
.google.spanner.v1.Type array_element_type = 2;
- Specified by:
getArrayElementTypeOrBuilder
in interfaceTypeOrBuilder
-
hasStructType
public boolean hasStructType()
If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides type information for the struct's fields.
.google.spanner.v1.StructType struct_type = 3;
- Specified by:
hasStructType
in interfaceTypeOrBuilder
- Returns:
- Whether the structType field is set.
-
getStructType
public StructType getStructType()
If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides type information for the struct's fields.
.google.spanner.v1.StructType struct_type = 3;
- Specified by:
getStructType
in interfaceTypeOrBuilder
- Returns:
- The structType.
-
getStructTypeOrBuilder
public StructTypeOrBuilder getStructTypeOrBuilder()
If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides type information for the struct's fields.
.google.spanner.v1.StructType struct_type = 3;
- Specified by:
getStructTypeOrBuilder
in interfaceTypeOrBuilder
-
getTypeAnnotationValue
public int getTypeAnnotationValue()
The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single [TypeCode][google.spanner.v1.TypeCode] can be mapped to different SQL types depending on the SQL dialect. [type_annotation][google.spanner.v1.Type.type_annotation] typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path.
.google.spanner.v1.TypeAnnotationCode type_annotation = 4;
- Specified by:
getTypeAnnotationValue
in interfaceTypeOrBuilder
- Returns:
- The enum numeric value on the wire for typeAnnotation.
-
getTypeAnnotation
public TypeAnnotationCode getTypeAnnotation()
The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single [TypeCode][google.spanner.v1.TypeCode] can be mapped to different SQL types depending on the SQL dialect. [type_annotation][google.spanner.v1.Type.type_annotation] typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path.
.google.spanner.v1.TypeAnnotationCode type_annotation = 4;
- Specified by:
getTypeAnnotation
in interfaceTypeOrBuilder
- Returns:
- The typeAnnotation.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Type parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Type parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Type parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Type parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Type parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Type parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Type parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Type.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Type.Builder newBuilder()
-
newBuilder
public static Type.Builder newBuilder(Type prototype)
-
toBuilder
public Type.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Type.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Type getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Type> parser()
-
getParserForType
public com.google.protobuf.Parser<Type> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Type getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-