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 type google.spanner.v1.Type
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    `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

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageV3

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the type of the array elements.
    If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the type of the array elements.
    Required.
    int
    Required.
    static Type
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Parser<Type>
     
    If [code][google.spanner.v1.Type.code] == [PROTO][google.spanner.v1.TypeCode.PROTO] or [code][google.spanner.v1.Type.code] == [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully qualified name of the proto type representing the proto/enum definition.
    com.google.protobuf.ByteString
    If [code][google.spanner.v1.Type.code] == [PROTO][google.spanner.v1.TypeCode.PROTO] or [code][google.spanner.v1.Type.code] == [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully qualified name of the proto type representing the proto/enum definition.
    int
     
    If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides type information for the struct's fields.
    If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides type information for the struct's fields.
    The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will use to represent values of this type during query processing.
    int
    The [TypeAnnotationCode][google.spanner.v1.TypeAnnotationCode] that disambiguates SQL type that Spanner will use to represent values of this type during query processing.
    boolean
    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
     
    boolean
    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
     
    final boolean
     
     
    newBuilder(Type prototype)
     
     
    protected Type.Builder
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
    static Type
     
    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
     
    static Type
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Type
     
    static Type
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Type>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessageV3

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, 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

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • CODE_FIELD_NUMBER

      public static final int CODE_FIELD_NUMBER
      See Also:
    • ARRAY_ELEMENT_TYPE_FIELD_NUMBER

      public static final int ARRAY_ELEMENT_TYPE_FIELD_NUMBER
      See Also:
    • STRUCT_TYPE_FIELD_NUMBER

      public static final int STRUCT_TYPE_FIELD_NUMBER
      See Also:
    • TYPE_ANNOTATION_FIELD_NUMBER

      public static final int TYPE_ANNOTATION_FIELD_NUMBER
      See Also:
    • PROTO_TYPE_FQN_FIELD_NUMBER

      public static final int PROTO_TYPE_FQN_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.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 class com.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 interface TypeOrBuilder
      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 interface TypeOrBuilder
      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 interface TypeOrBuilder
      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 interface TypeOrBuilder
      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 interface TypeOrBuilder
    • 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 interface TypeOrBuilder
      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 interface TypeOrBuilder
      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 interface TypeOrBuilder
    • 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 interface TypeOrBuilder
      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 interface TypeOrBuilder
      Returns:
      The typeAnnotation.
    • getProtoTypeFqn

      public String getProtoTypeFqn()
       If [code][google.spanner.v1.Type.code] ==
       [PROTO][google.spanner.v1.TypeCode.PROTO] or
       [code][google.spanner.v1.Type.code] ==
       [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully
       qualified name of the proto type representing the proto/enum definition.
       
      string proto_type_fqn = 5;
      Specified by:
      getProtoTypeFqn in interface TypeOrBuilder
      Returns:
      The protoTypeFqn.
    • getProtoTypeFqnBytes

      public com.google.protobuf.ByteString getProtoTypeFqnBytes()
       If [code][google.spanner.v1.Type.code] ==
       [PROTO][google.spanner.v1.TypeCode.PROTO] or
       [code][google.spanner.v1.Type.code] ==
       [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully
       qualified name of the proto type representing the proto/enum definition.
       
      string proto_type_fqn = 5;
      Specified by:
      getProtoTypeFqnBytes in interface TypeOrBuilder
      Returns:
      The bytes for protoTypeFqn.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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 interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.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 interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Type.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.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 interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public Type getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder