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
Modifier and Type | Class and Description |
---|---|
static class |
TruncatableString.Builder
Represents a string that might be shortened to a specified length.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable
Modifier and Type | Field and Description |
---|---|
static int |
TRUNCATED_BYTE_COUNT_FIELD_NUMBER |
static int |
VALUE_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int VALUE_FIELD_NUMBER
public static final int TRUNCATED_BYTE_COUNT_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public java.lang.String getValue()
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;
getValue
in interface TruncatableStringOrBuilder
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;
getValueBytes
in interface TruncatableStringOrBuilder
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;
getTruncatedByteCount
in interface TruncatableStringOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static TruncatableString parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static TruncatableString parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static TruncatableString parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static TruncatableString parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static TruncatableString parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static TruncatableString parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static TruncatableString parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static TruncatableString parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static TruncatableString parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static TruncatableString parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static TruncatableString parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static TruncatableString parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public TruncatableString.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static TruncatableString.Builder newBuilder()
public static TruncatableString.Builder newBuilder(TruncatableString prototype)
public TruncatableString.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected TruncatableString.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static TruncatableString getDefaultInstance()
public static Parser<TruncatableString> parser()
public Parser<TruncatableString> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public TruncatableString getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder