@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
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; }
@java.lang.Override public com.google.devtools.cloudtrace.v2.TruncatableString buildPartial() { com.google.devtools.cloudtrace.v2.TruncatableString result = new com.google.devtools.cloudtrace.v2.TruncatableString(this); result.value_ = value_; result.truncatedByteCount_ = truncatedByteCount_; onBuilt(); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.devtools.cloudtrace.v2.TruncatableString)) { return super.equals(obj); } com.google.devtools.cloudtrace.v2.TruncatableString other = (com.google.devtools.cloudtrace.v2.TruncatableString) obj; boolean result = true; result = result && getValue().equals(other.getValue()); result = result && (getTruncatedByteCount() == other.getTruncatedByteCount()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + TRUNCATED_BYTE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getTruncatedByteCount(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <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; } /**
if (stringValueBuilder_ == null) { if (valueCase_ == 1 && value_ != com.google.devtools.cloudtrace.v2.TruncatableString.getDefaultInstance()) { value_ = com.google.devtools.cloudtrace.v2.TruncatableString.newBuilder( (com.google.devtools.cloudtrace.v2.TruncatableString) value_) .mergeFrom(value)
@java.lang.Override public com.google.devtools.cloudtrace.v2.TruncatableString getDefaultInstanceForType() { return com.google.devtools.cloudtrace.v2.TruncatableString.getDefaultInstance(); }
@Test public void generateSpanName_ForServer() { SpanData spanData = SpanData.create( spanContext, parentSpanId, /* hasRemoteParent= */ true, SPAN_NAME, Kind.SERVER, startTimestamp, attributes, annotations, messageEvents, links, CHILD_SPAN_COUNT, status, endTimestamp); assertThat( handler .generateSpan( spanData, EMPTY_RESOURCE_LABELS, Collections.<String, AttributeValue>emptyMap()) .getDisplayName() .getValue()) .isEqualTo("Recv." + SPAN_NAME); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.devtools.cloudtrace.v2.Module)) { return super.equals(obj); } com.google.devtools.cloudtrace.v2.Module other = (com.google.devtools.cloudtrace.v2.Module) obj; boolean result = true; result = result && (hasModule() == other.hasModule()); if (hasModule()) { result = result && getModule().equals(other.getModule()); } result = result && (hasBuildId() == other.hasBuildId()); if (hasBuildId()) { result = result && getBuildId().equals(other.getBuildId()); } result = result && unknownFields.equals(other.unknownFields); return result; }
if (stringValueBuilder_ == null) { if (valueCase_ == 1 && value_ != com.google.devtools.cloudtrace.v2.TruncatableString.getDefaultInstance()) { value_ = com.google.devtools.cloudtrace.v2.TruncatableString.newBuilder( (com.google.devtools.cloudtrace.v2.TruncatableString) value_) .mergeFrom(value)
/** * * * <pre> * A string up to 256 bytes long. * </pre> * * <code>.google.devtools.cloudtrace.v2.TruncatableString string_value = 1;</code> */ public com.google.devtools.cloudtrace.v2.TruncatableStringOrBuilder getStringValueOrBuilder() { if (valueCase_ == 1) { return (com.google.devtools.cloudtrace.v2.TruncatableString) value_; } return com.google.devtools.cloudtrace.v2.TruncatableString.getDefaultInstance(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + TRUNCATED_BYTE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getTruncatedByteCount(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.devtools.cloudtrace.v2.TruncatableString)) { return super.equals(obj); } com.google.devtools.cloudtrace.v2.TruncatableString other = (com.google.devtools.cloudtrace.v2.TruncatableString) obj; boolean result = true; result = result && getValue().equals(other.getValue()); result = result && (getTruncatedByteCount() == other.getTruncatedByteCount()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <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; } /**
@Test public void generateSpanName_ForClientWithSent() { SpanData spanData = SpanData.create( spanContext, parentSpanId, /* hasRemoteParent= */ true, "Sent." + SPAN_NAME, Kind.CLIENT, startTimestamp, attributes, annotations, messageEvents, links, CHILD_SPAN_COUNT, status, endTimestamp); assertThat( handler .generateSpan( spanData, EMPTY_RESOURCE_LABELS, Collections.<String, AttributeValue>emptyMap()) .getDisplayName() .getValue()) .isEqualTo("Sent." + SPAN_NAME); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.devtools.cloudtrace.v2.AttributeValue)) { return super.equals(obj); } com.google.devtools.cloudtrace.v2.AttributeValue other = (com.google.devtools.cloudtrace.v2.AttributeValue) obj; boolean result = true; result = result && getValueCase().equals(other.getValueCase()); if (!result) return false; switch (valueCase_) { case 1: result = result && getStringValue().equals(other.getStringValue()); break; case 2: result = result && (getIntValue() == other.getIntValue()); break; case 3: result = result && (getBoolValue() == other.getBoolValue()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The version of the deployed source code (up to 128 bytes). * </pre> * * <code>.google.devtools.cloudtrace.v2.TruncatableString source_version = 7;</code> */ public Builder mergeSourceVersion(com.google.devtools.cloudtrace.v2.TruncatableString value) { if (sourceVersionBuilder_ == null) { if (sourceVersion_ != null) { sourceVersion_ = com.google.devtools.cloudtrace.v2.TruncatableString.newBuilder(sourceVersion_) .mergeFrom(value) .buildPartial(); } else { sourceVersion_ = value; } onChanged(); } else { sourceVersionBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * The version of the deployed source code (up to 128 bytes). * </pre> * * <code>.google.devtools.cloudtrace.v2.TruncatableString source_version = 7;</code> */ public com.google.devtools.cloudtrace.v2.TruncatableString getSourceVersion() { return sourceVersion_ == null ? com.google.devtools.cloudtrace.v2.TruncatableString.getDefaultInstance() : sourceVersion_; } /**
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; }