Class Type.Builder (6.77.0)

public static final class Type.Builder extends GeneratedMessageV3.Builder<Type.Builder> 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 Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Type.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Type.Builder
Overrides

build()

public Type build()
Returns
Type Description
Type

buildPartial()

public Type buildPartial()
Returns
Type Description
Type

clear()

public Type.Builder clear()
Returns
Type Description
Type.Builder
Overrides

clearArrayElementType()

public Type.Builder clearArrayElementType()

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
Type.Builder

clearCode()

public Type.Builder clearCode()

Required. The TypeCode for this type.

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

Returns
Type Description
Type.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Type.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Type.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Type.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Type.Builder
Overrides

clearProtoTypeFqn()

public Type.Builder clearProtoTypeFqn()

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
Type.Builder

This builder for chaining.

clearStructType()

public Type.Builder clearStructType()

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

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

Returns
Type Description
Type.Builder

clearTypeAnnotation()

public Type.Builder clearTypeAnnotation()

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
Type.Builder

This builder for chaining.

clone()

public Type.Builder clone()
Returns
Type Description
Type.Builder
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
Type

The arrayElementType.

getArrayElementTypeBuilder()

public Type.Builder getArrayElementTypeBuilder()

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
Type.Builder

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
TypeOrBuilder

getCode()

public TypeCode getCode()

Required. The TypeCode for this type.

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

Returns
Type Description
TypeCode

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
Type

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
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
String

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
ByteString

The bytes for protoTypeFqn.

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
StructType

The structType.

getStructTypeBuilder()

public StructType.Builder getStructTypeBuilder()

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

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

Returns
Type Description
StructType.Builder

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
StructTypeOrBuilder

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
TypeAnnotationCode

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
boolean

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
boolean

Whether the structType field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeArrayElementType(Type value)

public Type.Builder mergeArrayElementType(Type value)

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

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

Parameter
Name Description
value Type
Returns
Type Description
Type.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Type.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Type.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Type.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Type.Builder
Overrides

mergeFrom(Type other)

public Type.Builder mergeFrom(Type other)
Parameter
Name Description
other Type
Returns
Type Description
Type.Builder

mergeStructType(StructType value)

public Type.Builder mergeStructType(StructType value)

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

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

Parameter
Name Description
value StructType
Returns
Type Description
Type.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Type.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Type.Builder
Overrides

setArrayElementType(Type value)

public Type.Builder setArrayElementType(Type value)

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

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

Parameter
Name Description
value Type
Returns
Type Description
Type.Builder

setArrayElementType(Type.Builder builderForValue)

public Type.Builder setArrayElementType(Type.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue Type.Builder
Returns
Type Description
Type.Builder

setCode(TypeCode value)

public Type.Builder setCode(TypeCode value)

Required. The TypeCode for this type.

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

Parameter
Name Description
value TypeCode

The code to set.

Returns
Type Description
Type.Builder

This builder for chaining.

setCodeValue(int value)

public Type.Builder setCodeValue(int value)

Required. The TypeCode for this type.

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

Parameter
Name Description
value int

The enum numeric value on the wire for code to set.

Returns
Type Description
Type.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Type.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Type.Builder
Overrides

setProtoTypeFqn(String value)

public Type.Builder setProtoTypeFqn(String value)

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;

Parameter
Name Description
value String

The protoTypeFqn to set.

Returns
Type Description
Type.Builder

This builder for chaining.

setProtoTypeFqnBytes(ByteString value)

public Type.Builder setProtoTypeFqnBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for protoTypeFqn to set.

Returns
Type Description
Type.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Type.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Type.Builder
Overrides

setStructType(StructType value)

public Type.Builder setStructType(StructType value)

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

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

Parameter
Name Description
value StructType
Returns
Type Description
Type.Builder

setStructType(StructType.Builder builderForValue)

public Type.Builder setStructType(StructType.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue StructType.Builder
Returns
Type Description
Type.Builder

setTypeAnnotation(TypeAnnotationCode value)

public Type.Builder setTypeAnnotation(TypeAnnotationCode value)

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;

Parameter
Name Description
value TypeAnnotationCode

The typeAnnotation to set.

Returns
Type Description
Type.Builder

This builder for chaining.

setTypeAnnotationValue(int value)

public Type.Builder setTypeAnnotationValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for typeAnnotation to set.

Returns
Type Description
Type.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Type.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Type.Builder
Overrides