Class Type.Builder (6.60.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Type.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Type.Builder
Overrides

build()

public Type build()
Returns
TypeDescription
Type

buildPartial()

public Type buildPartial()
Returns
TypeDescription
Type

clear()

public Type.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Type.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Type.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Type.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Type.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Type.Builder

This builder for chaining.

clone()

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

getCode()

public TypeCode getCode()

Required. The TypeCode for this type.

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

Returns
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for code.

getDefaultInstanceForType()

public Type getDefaultInstanceForType()
Returns
TypeDescription
Type

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the structType field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueType
Returns
TypeDescription
Type.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Type.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Type.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Type.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Type.Builder
Overrides

mergeFrom(Type other)

public Type.Builder mergeFrom(Type other)
Parameter
NameDescription
otherType
Returns
TypeDescription
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
NameDescription
valueStructType
Returns
TypeDescription
Type.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Type.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueType
Returns
TypeDescription
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
NameDescription
builderForValueType.Builder
Returns
TypeDescription
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
NameDescription
valueTypeCode

The code to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
Type.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Type.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The protoTypeFqn to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for protoTypeFqn to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueStructType
Returns
TypeDescription
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
NameDescription
builderForValueStructType.Builder
Returns
TypeDescription
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
NameDescription
valueTypeAnnotationCode

The typeAnnotation to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
Type.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Type.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Type.Builder
Overrides