Class 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:
    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
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • 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 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 Detail

      • 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 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.
      • 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​(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
      • 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