/** * * * <pre> * 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. * </pre> * * <code>string value = 1;</code> */ public Builder setValue(java.lang.String value) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); return this; } /**
/** * * * <pre> * 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. * </pre> * * <code>string value = 1;</code> */ public Builder setValueBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); value_ = value; onChanged(); return this; }
public Builder mergeFrom(com.google.devtools.cloudtrace.v2.TruncatableString other) { if (other == com.google.devtools.cloudtrace.v2.TruncatableString.getDefaultInstance()) return this; if (!other.getValue().isEmpty()) { value_ = other.value_; onChanged(); } if (other.getTruncatedByteCount() != 0) { setTruncatedByteCount(other.getTruncatedByteCount()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * 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. * </pre> * * <code>string value = 1;</code> */ public Builder setValueBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); value_ = value; onChanged(); return this; }
/** * * * <pre> * 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. * </pre> * * <code>string value = 1;</code> */ public Builder setValue(java.lang.String value) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); return this; } /**
/** * * * <pre> * 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. * </pre> * * <code>string value = 1;</code> */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; } /**
/** * * * <pre> * The number of bytes removed from the original string. If this * value is 0, then the string was not shortened. * </pre> * * <code>int32 truncated_byte_count = 2;</code> */ public Builder setTruncatedByteCount(int value) { truncatedByteCount_ = value; onChanged(); return this; } /**
public Builder mergeFrom(com.google.devtools.cloudtrace.v2.TruncatableString other) { if (other == com.google.devtools.cloudtrace.v2.TruncatableString.getDefaultInstance()) return this; if (!other.getValue().isEmpty()) { value_ = other.value_; onChanged(); } if (other.getTruncatedByteCount() != 0) { setTruncatedByteCount(other.getTruncatedByteCount()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The number of bytes removed from the original string. If this * value is 0, then the string was not shortened. * </pre> * * <code>int32 truncated_byte_count = 2;</code> */ public Builder clearTruncatedByteCount() { truncatedByteCount_ = 0; onChanged(); return this; }
/** * * * <pre> * 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. * </pre> * * <code>string value = 1;</code> */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; } /**
/** * * * <pre> * The number of bytes removed from the original string. If this * value is 0, then the string was not shortened. * </pre> * * <code>int32 truncated_byte_count = 2;</code> */ public Builder setTruncatedByteCount(int value) { truncatedByteCount_ = value; onChanged(); return this; } /**
/** * * * <pre> * The number of bytes removed from the original string. If this * value is 0, then the string was not shortened. * </pre> * * <code>int32 truncated_byte_count = 2;</code> */ public Builder clearTruncatedByteCount() { truncatedByteCount_ = 0; onChanged(); return this; }