public final class TruncatableString extends GeneratedMessageV3 implements TruncatableStringOrBuilder
Represents a string that might be shortened to a specified length.
Protobuf type google.devtools.cloudtrace.v2.TruncatableString
Static Fields
public static final int TRUNCATED_BYTE_COUNT_FIELD_NUMBER
Field Value
public static final int VALUE_FIELD_NUMBER
Field Value
Static Methods
public static TruncatableString getDefaultInstance()
Returns
public static final Descriptors.Descriptor getDescriptor()
Returns
public static TruncatableString.Builder newBuilder()
Returns
public static TruncatableString.Builder newBuilder(TruncatableString prototype)
Parameter
Returns
public static TruncatableString parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static TruncatableString parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static TruncatableString parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
public static TruncatableString parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static TruncatableString parseFrom(ByteString data)
Parameter
Returns
Exceptions
public static TruncatableString parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static TruncatableString parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static TruncatableString parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static TruncatableString parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static TruncatableString parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static TruncatableString parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
public static TruncatableString parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Parser<TruncatableString> parser()
Returns
Methods
public boolean equals(Object obj)
Parameter
Returns
Overrides
public TruncatableString getDefaultInstanceForType()
Returns
public Parser<TruncatableString> getParserForType()
Returns
Overrides
public int getSerializedSize()
Returns
Overrides
public int getTruncatedByteCount()
The number of bytes removed from the original string. If this
value is 0, then the string was not shortened.
int32 truncated_byte_count = 2;
Returns
Type | Description |
int | The truncatedByteCount.
|
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
The shortened string. For example, if the original string is 500
bytes long and the limit of the string is 128 bytes, then
value
contains the first 128 bytes of the 500-byte string.
Truncation always happens on a UTF8 character boundary. If there
are multi-byte characters in the string, then the length of the
shortened string might be less than the size limit.
string value = 1;
Returns
Type | Description |
String | The value.
|
public ByteString getValueBytes()
The shortened string. For example, if the original string is 500
bytes long and the limit of the string is 128 bytes, then
value
contains the first 128 bytes of the 500-byte string.
Truncation always happens on a UTF8 character boundary. If there
are multi-byte characters in the string, then the length of the
shortened string might be less than the size limit.
string value = 1;
Returns
Returns
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public TruncatableString.Builder newBuilderForType()
Returns
protected TruncatableString.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public TruncatableString.Builder toBuilder()
Returns
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions