Class Type (6.74.1)

  public 
  
 final 
  
 class 
 Type 
  
 extends 
  
 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

Implements

TypeOrBuilder

Static Fields

ARRAY_ELEMENT_TYPE_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 ARRAY_ELEMENT_TYPE_FIELD_NUMBER 
 
Field Value
Type
Description
int

CODE_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 CODE_FIELD_NUMBER 
 
Field Value
Type
Description
int

PROTO_TYPE_FQN_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 PROTO_TYPE_FQN_FIELD_NUMBER 
 
Field Value
Type
Description
int

STRUCT_TYPE_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 STRUCT_TYPE_FIELD_NUMBER 
 
Field Value
Type
Description
int

TYPE_ANNOTATION_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 TYPE_ANNOTATION_FIELD_NUMBER 
 
Field Value
Type
Description
int

Static Methods

getDefaultInstance()

  public 
  
 static 
  
 Type 
  
 getDefaultInstance 
 () 
 
Returns
Type
Description

getDescriptor()

  public 
  
 static 
  
 final 
  
 Descriptors 
 . 
 Descriptor 
  
 getDescriptor 
 () 
 
Returns
Type
Description

newBuilder()

  public 
  
 static 
  
 Type 
 . 
 Builder 
  
 newBuilder 
 () 
 
Returns
Type
Description

newBuilder(Type prototype)

  public 
  
 static 
  
 Type 
 . 
 Builder 
  
 newBuilder 
 ( 
 Type 
  
 prototype 
 ) 
 
Parameter
Name
Description
prototype
Returns
Type
Description

parseDelimitedFrom(InputStream input)

  public 
  
 static 
  
 Type 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Type 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 ) 
 
Parameter
Name
Description
data
byte []
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
byte []
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Type 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parser()

  public 
  
 static 
  
 Parser<Type> 
  
 parser 
 () 
 
Returns
Type
Description
Parser < Type >

Methods

equals(Object obj)

  public 
  
 boolean 
  
 equals 
 ( 
 Object 
  
 obj 
 ) 
 
Parameter
Name
Description
obj
Returns
Type
Description
Overrides

getArrayElementType()

  public 
  
 Type 
  
 getArrayElementType 
 () 
 

If code == ARRAY , then array_element_type is the type of the array elements.

.google.spanner.v1.Type array_element_type = 2;

Returns
Type
Description

The arrayElementType.

getArrayElementTypeOrBuilder()

  public 
  
 TypeOrBuilder 
  
 getArrayElementTypeOrBuilder 
 () 
 

If code == ARRAY , then array_element_type is the type of the array elements.

.google.spanner.v1.Type array_element_type = 2;

Returns
Type
Description

getCode()

  public 
  
 TypeCode 
  
 getCode 
 () 
 

Required. The TypeCode for this type.

.google.spanner.v1.TypeCode code = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type
Description

The code.

getCodeValue()

  public 
  
 int 
  
 getCodeValue 
 () 
 

Required. The TypeCode for this type.

.google.spanner.v1.TypeCode code = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type
Description
int

The enum numeric value on the wire for code.

getDefaultInstanceForType()

  public 
  
 Type 
  
 getDefaultInstanceForType 
 () 
 
Returns
Type
Description

getParserForType()

  public 
  
 Parser<Type> 
  
 getParserForType 
 () 
 
Returns
Type
Description
Parser < Type >
Overrides

getProtoTypeFqn()

  public 
  
 String 
  
 getProtoTypeFqn 
 () 
 

If code == PROTO or code == ENUM , then proto_type_fqn is the fully qualified name of the proto type representing the proto/enum definition.

string proto_type_fqn = 5;

Returns
Type
Description

The protoTypeFqn.

getProtoTypeFqnBytes()

  public 
  
 ByteString 
  
 getProtoTypeFqnBytes 
 () 
 

If code == PROTO or code == ENUM , then proto_type_fqn is the fully qualified name of the proto type representing the proto/enum definition.

string proto_type_fqn = 5;

Returns
Type
Description

The bytes for protoTypeFqn.

getSerializedSize()

  public 
  
 int 
  
 getSerializedSize 
 () 
 
Returns
Type
Description
int
Overrides

getStructType()

  public 
  
 StructType 
  
 getStructType 
 () 
 

If code == STRUCT , then struct_type provides type information for the struct's fields.

.google.spanner.v1.StructType struct_type = 3;

Returns
Type
Description

The structType.

getStructTypeOrBuilder()

  public 
  
 StructTypeOrBuilder 
  
 getStructTypeOrBuilder 
 () 
 

If code == STRUCT , then struct_type provides type information for the struct's fields.

.google.spanner.v1.StructType struct_type = 3;

Returns
Type
Description

getTypeAnnotation()

  public 
  
 TypeAnnotationCode 
  
 getTypeAnnotation 
 () 
 

The 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 can be mapped to different SQL types depending on the SQL dialect. 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;

Returns
Type
Description

The typeAnnotation.

getTypeAnnotationValue()

  public 
  
 int 
  
 getTypeAnnotationValue 
 () 
 

The 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 can be mapped to different SQL types depending on the SQL dialect. 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;

Returns
Type
Description
int

The enum numeric value on the wire for typeAnnotation.

hasArrayElementType()

  public 
  
 boolean 
  
 hasArrayElementType 
 () 
 

If code == ARRAY , then array_element_type is the type of the array elements.

.google.spanner.v1.Type array_element_type = 2;

Returns
Type
Description

Whether the arrayElementType field is set.

hasStructType()

  public 
  
 boolean 
  
 hasStructType 
 () 
 

If code == STRUCT , then struct_type provides type information for the struct's fields.

.google.spanner.v1.StructType struct_type = 3;

Returns
Type
Description

Whether the structType field is set.

hashCode()

  public 
  
 int 
  
 hashCode 
 () 
 
Returns
Type
Description
int
Overrides

internalGetFieldAccessorTable()

  protected 
  
 GeneratedMessageV3 
 . 
 FieldAccessorTable 
  
 internalGetFieldAccessorTable 
 () 
 
Returns
Type
Description
Overrides

isInitialized()

  public 
  
 final 
  
 boolean 
  
 isInitialized 
 () 
 
Returns
Type
Description
Overrides

newBuilderForType()

  public 
  
 Type 
 . 
 Builder 
  
 newBuilderForType 
 () 
 
Returns
Type
Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

  protected 
  
 Type 
 . 
 Builder 
  
 newBuilderForType 
 ( 
 GeneratedMessageV3 
 . 
 BuilderParent 
  
 parent 
 ) 
 
Parameter
Name
Description
parent
Returns
Type
Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

  protected 
  
 Object 
  
 newInstance 
 ( 
 GeneratedMessageV3 
 . 
 UnusedPrivateParameter 
  
 unused 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Overrides

toBuilder()

  public 
  
 Type 
 . 
 Builder 
  
 toBuilder 
 () 
 
Returns
Type
Description

writeTo(CodedOutputStream output)

  public 
  
 void 
  
 writeTo 
 ( 
 CodedOutputStream 
  
 output 
 ) 
 
Parameter
Name
Description
Overrides
Exceptions
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: