Package io.opencensus.proto.trace.v1
Class TruncatableString.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
- io.opencensus.proto.trace.v1.TruncatableString.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TruncatableStringOrBuilder,Cloneable
- Enclosing class:
- TruncatableString
public static final class TruncatableString.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder> implements TruncatableStringOrBuilder
A string that might be shortened to a specified length.
Protobuf typeopencensus.proto.trace.v1.TruncatableString
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TruncatableString.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)TruncatableStringbuild()TruncatableStringbuildPartial()TruncatableString.Builderclear()TruncatableString.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)TruncatableString.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)TruncatableString.BuilderclearTruncatedByteCount()The number of bytes removed from the original string.TruncatableString.BuilderclearValue()The shortened string.TruncatableString.Builderclone()TruncatableStringgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()intgetTruncatedByteCount()The number of bytes removed from the original string.StringgetValue()The shortened string.com.google.protobuf.ByteStringgetValueBytes()The shortened string.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()TruncatableString.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)TruncatableString.BuildermergeFrom(com.google.protobuf.Message other)TruncatableString.BuildermergeFrom(TruncatableString other)TruncatableString.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)TruncatableString.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)TruncatableString.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)TruncatableString.BuildersetTruncatedByteCount(int value)The number of bytes removed from the original string.TruncatableString.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)TruncatableString.BuildersetValue(String value)The shortened string.TruncatableString.BuildersetValueBytes(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, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, 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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
clear
public TruncatableString.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
getDefaultInstanceForType
public TruncatableString getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public TruncatableString build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TruncatableString buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TruncatableString.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
setField
public TruncatableString.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
clearField
public TruncatableString.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
clearOneof
public TruncatableString.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
setRepeatedField
public TruncatableString.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
addRepeatedField
public TruncatableString.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
mergeFrom
public TruncatableString.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TruncatableString.Builder>
-
mergeFrom
public TruncatableString.Builder mergeFrom(TruncatableString other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TruncatableString.Builder>- Throws:
IOException
-
getValue
public String getValue()
The shortened string. For example, if the original string was 500 bytes long and the limit of the string was 128 bytes, then this value contains the first 128 bytes of the 500-byte string. Note that truncation always happens on a character boundary, to ensure that a truncated string is still valid UTF-8. Because it may contain multi-byte characters, the size of the truncated string may be less than the truncation limit.
string value = 1;- Specified by:
getValuein interfaceTruncatableStringOrBuilder- Returns:
- The value.
-
getValueBytes
public com.google.protobuf.ByteString getValueBytes()
The shortened string. For example, if the original string was 500 bytes long and the limit of the string was 128 bytes, then this value contains the first 128 bytes of the 500-byte string. Note that truncation always happens on a character boundary, to ensure that a truncated string is still valid UTF-8. Because it may contain multi-byte characters, the size of the truncated string may be less than the truncation limit.
string value = 1;- Specified by:
getValueBytesin interfaceTruncatableStringOrBuilder- Returns:
- The bytes for value.
-
setValue
public TruncatableString.Builder setValue(String value)
The shortened string. For example, if the original string was 500 bytes long and the limit of the string was 128 bytes, then this value contains the first 128 bytes of the 500-byte string. Note that truncation always happens on a character boundary, to ensure that a truncated string is still valid UTF-8. Because it may contain multi-byte characters, the size of the truncated string may be less than the truncation 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 was 500 bytes long and the limit of the string was 128 bytes, then this value contains the first 128 bytes of the 500-byte string. Note that truncation always happens on a character boundary, to ensure that a truncated string is still valid UTF-8. Because it may contain multi-byte characters, the size of the truncated string may be less than the truncation 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 was 500 bytes long and the limit of the string was 128 bytes, then this value contains the first 128 bytes of the 500-byte string. Note that truncation always happens on a character boundary, to ensure that a truncated string is still valid UTF-8. Because it may contain multi-byte characters, the size of the truncated string may be less than the truncation 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:
getTruncatedByteCountin 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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
mergeUnknownFields
public final TruncatableString.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TruncatableString.Builder>
-
-