Class TypeReference (2.46.0)

public final class TypeReference extends GeneratedMessageV3 implements TypeReferenceOrBuilder

A reference to a message type, for use in FieldInfo.

Protobuf type google.api.TypeReference

Static Fields

TYPE_NAME_FIELD_NUMBER

public static final int TYPE_NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static TypeReference getDefaultInstance()
Returns
Type Description
TypeReference

getDescriptor()

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

newBuilder()

public static TypeReference.Builder newBuilder()
Returns
Type Description
TypeReference.Builder

newBuilder(TypeReference prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public TypeReference getDefaultInstanceForType()
Returns
Type Description
TypeReference

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTypeName()

public String getTypeName()

The name of the type that the annotated, generic field may represent. If the type is in the same protobuf package, the value can be the simple message name e.g., "MyMessage". Otherwise, the value must be the fully-qualified message name e.g., "google.library.v1.Book".

If the type(s) are unknown to the service (e.g. the field accepts generic user input), use the wildcard "*" to denote this behavior.

See AIP-202 for more details.

string type_name = 1;

Returns
Type Description
String

The typeName.

getTypeNameBytes()

public ByteString getTypeNameBytes()

The name of the type that the annotated, generic field may represent. If the type is in the same protobuf package, the value can be the simple message name e.g., "MyMessage". Otherwise, the value must be the fully-qualified message name e.g., "google.library.v1.Book".

If the type(s) are unknown to the service (e.g. the field accepts generic user input), use the wildcard "*" to denote this behavior.

See AIP-202 for more details.

string type_name = 1;

Returns
Type Description
ByteString

The bytes for typeName.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public TypeReference.Builder newBuilderForType()
Returns
Type Description
TypeReference.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public TypeReference.Builder toBuilder()
Returns
Type Description
TypeReference.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException