Class TruncatableString.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
- com.google.devtools.cloudtrace.v2.TruncatableString.Builder
-
- All Implemented Interfaces:
TruncatableStringOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- TruncatableString
public static final class TruncatableString.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder> implements TruncatableStringOrBuilder
Represents a string that might be shortened to a specified length.
Protobuf typegoogle.devtools.cloudtrace.v2.TruncatableString
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TruncatableString.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TruncatableString
build()
TruncatableString
buildPartial()
TruncatableString.Builder
clear()
TruncatableString.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
TruncatableString.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
TruncatableString.Builder
clearTruncatedByteCount()
The number of bytes removed from the original string.TruncatableString.Builder
clearValue()
The shortened string.TruncatableString.Builder
clone()
TruncatableString
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
int
getTruncatedByteCount()
The number of bytes removed from the original string.String
getValue()
The shortened string.com.google.protobuf.ByteString
getValueBytes()
The shortened string.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
TruncatableString.Builder
mergeFrom(TruncatableString other)
TruncatableString.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
TruncatableString.Builder
mergeFrom(com.google.protobuf.Message other)
TruncatableString.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
TruncatableString.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TruncatableString.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
TruncatableString.Builder
setTruncatedByteCount(int value)
The number of bytes removed from the original string.TruncatableString.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
TruncatableString.Builder
setValue(String value)
The shortened string.TruncatableString.Builder
setValueBytes(com.google.protobuf.ByteString value)
The shortened string.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
clear
public TruncatableString.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
getDefaultInstanceForType
public TruncatableString getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public TruncatableString build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TruncatableString buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TruncatableString.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
setField
public TruncatableString.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
clearField
public TruncatableString.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
clearOneof
public TruncatableString.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
setRepeatedField
public TruncatableString.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
addRepeatedField
public TruncatableString.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
mergeFrom
public TruncatableString.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TruncatableString.Builder>
-
mergeFrom
public TruncatableString.Builder mergeFrom(TruncatableString other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
mergeFrom
public TruncatableString.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TruncatableString.Builder>
- Throws:
IOException
-
getValue
public 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;
- Specified by:
getValue
in interfaceTruncatableStringOrBuilder
- Returns:
- The value.
-
getValueBytes
public com.google.protobuf.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;
- Specified by:
getValueBytes
in interfaceTruncatableStringOrBuilder
- Returns:
- The bytes for value.
-
setValue
public TruncatableString.Builder setValue(String value)
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;
- Parameters:
value
- The value to set.- Returns:
- This builder for chaining.
-
clearValue
public TruncatableString.Builder clearValue()
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:
- This builder for chaining.
-
setValueBytes
public TruncatableString.Builder setValueBytes(com.google.protobuf.ByteString value)
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;
- Parameters:
value
- The bytes for value to set.- Returns:
- This builder for chaining.
-
getTruncatedByteCount
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;
- Specified by:
getTruncatedByteCount
in interfaceTruncatableStringOrBuilder
- Returns:
- The truncatedByteCount.
-
setTruncatedByteCount
public TruncatableString.Builder setTruncatedByteCount(int value)
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;
- Parameters:
value
- The truncatedByteCount to set.- Returns:
- This builder for chaining.
-
clearTruncatedByteCount
public TruncatableString.Builder clearTruncatedByteCount()
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:
- This builder for chaining.
-
setUnknownFields
public final TruncatableString.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
mergeUnknownFields
public final TruncatableString.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
-