/** * * * <pre> * Text annotation with a set of attributes. * </pre> * * <code>.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation annotation = 2;</code> */ public Builder setAnnotation( com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.Builder builderForValue) { if (annotationBuilder_ == null) { value_ = builderForValue.build(); onChanged(); } else { annotationBuilder_.setMessage(builderForValue.build()); } valueCase_ = 2; return this; } /**
/** * * * <pre> * Text annotation with a set of attributes. * </pre> * * <code>.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation annotation = 2;</code> */ public Builder setAnnotation( com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.Builder builderForValue) { if (annotationBuilder_ == null) { value_ = builderForValue.build(); onChanged(); } else { annotationBuilder_.setMessage(builderForValue.build()); } valueCase_ = 2; return this; } /**
TruncatableString.newBuilder().setValue(ANNOTATION_TEXT).build()) .setAttributes(Span.Attributes.newBuilder().build()) .build()) .setTime( com.google.protobuf.Timestamp.newBuilder() TruncatableString.newBuilder().setValue(ANNOTATION_TEXT).build()) .setAttributes(Span.Attributes.newBuilder().build()) .build()) .setTime( com.google.protobuf.Timestamp.newBuilder()
private static TimeEvent toTimeAnnotationProto(TimedEvent<Annotation> timedEvent) { TimeEvent.Builder timeEventBuilder = TimeEvent.newBuilder().setTime(toTimestampProto(timedEvent.getTimestamp())); Annotation annotation = timedEvent.getEvent(); timeEventBuilder.setAnnotation( TimeEvent.Annotation.newBuilder() .setDescription(toTruncatableStringProto(annotation.getDescription())) .setAttributes(toAttributesBuilderProto(annotation.getAttributes(), 0)) .build()); return timeEventBuilder.build(); }
private static TimeEvent toTimeAnnotationProto(TimedEvent<Annotation> timedEvent) { TimeEvent.Builder timeEventBuilder = TimeEvent.newBuilder().setTime(toTimestampProto(timedEvent.getTimestamp())); Annotation annotation = timedEvent.getEvent(); timeEventBuilder.setAnnotation( TimeEvent.Annotation.newBuilder() .setDescription(toTruncatableStringProto(annotation.getDescription())) .setAttributes(toAttributesBuilderProto(annotation.getAttributes(), 0)) .build()); return timeEventBuilder.build(); }