Class Span.Event.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
io.opentelemetry.proto.trace.v1.Span.Event.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Span.EventOrBuilder, Cloneable
Enclosing class:
Span.Event

public static final class Span.Event.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder> implements Span.EventOrBuilder
 Event is a time-stamped annotation of the span, consisting of user-supplied
 text description and key-value pairs.
 
Protobuf type opentelemetry.proto.trace.v1.Span.Event
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • clear

      public Span.Event.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • getDefaultInstanceForType

      public Span.Event getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Span.Event build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Span.Event buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Span.Event.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • setField

      public Span.Event.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • clearField

      public Span.Event.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • clearOneof

      public Span.Event.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • setRepeatedField

      public Span.Event.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • addRepeatedField

      public Span.Event.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • mergeFrom

      public Span.Event.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Span.Event.Builder>
    • mergeFrom

      public Span.Event.Builder mergeFrom(Span.Event other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • mergeFrom

      public Span.Event.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Span.Event.Builder>
      Throws:
      IOException
    • getTimeUnixNano

      public long getTimeUnixNano()
       time_unix_nano is the time the event occurred.
       
      fixed64 time_unix_nano = 1;
      Specified by:
      getTimeUnixNano in interface Span.EventOrBuilder
      Returns:
      The timeUnixNano.
    • setTimeUnixNano

      public Span.Event.Builder setTimeUnixNano(long value)
       time_unix_nano is the time the event occurred.
       
      fixed64 time_unix_nano = 1;
      Parameters:
      value - The timeUnixNano to set.
      Returns:
      This builder for chaining.
    • clearTimeUnixNano

      public Span.Event.Builder clearTimeUnixNano()
       time_unix_nano is the time the event occurred.
       
      fixed64 time_unix_nano = 1;
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2;
      Specified by:
      getName in interface Span.EventOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2;
      Specified by:
      getNameBytes in interface Span.EventOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Span.Event.Builder setName(String value)
       name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Span.Event.Builder clearName()
       name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Span.Event.Builder setNameBytes(com.google.protobuf.ByteString value)
       name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getAttributesList

      public List<KeyValue> getAttributesList()
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributesList in interface Span.EventOrBuilder
    • getAttributesCount

      public int getAttributesCount()
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributesCount in interface Span.EventOrBuilder
    • getAttributes

      public KeyValue getAttributes(int index)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributes in interface Span.EventOrBuilder
    • setAttributes

      public Span.Event.Builder setAttributes(int index, KeyValue value)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • setAttributes

      public Span.Event.Builder setAttributes(int index, KeyValue.Builder builderForValue)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributes

      public Span.Event.Builder addAttributes(KeyValue value)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributes

      public Span.Event.Builder addAttributes(int index, KeyValue value)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributes

      public Span.Event.Builder addAttributes(KeyValue.Builder builderForValue)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributes

      public Span.Event.Builder addAttributes(int index, KeyValue.Builder builderForValue)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAllAttributes

      public Span.Event.Builder addAllAttributes(Iterable<? extends KeyValue> values)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • clearAttributes

      public Span.Event.Builder clearAttributes()
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • removeAttributes

      public Span.Event.Builder removeAttributes(int index)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • getAttributesBuilder

      public KeyValue.Builder getAttributesBuilder(int index)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • getAttributesOrBuilder

      public KeyValueOrBuilder getAttributesOrBuilder(int index)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributesOrBuilder in interface Span.EventOrBuilder
    • getAttributesOrBuilderList

      public List<? extends KeyValueOrBuilder> getAttributesOrBuilderList()
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributesOrBuilderList in interface Span.EventOrBuilder
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder()
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder(int index)
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • getAttributesBuilderList

      public List<KeyValue.Builder> getAttributesBuilderList()
       attributes is a collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • getDroppedAttributesCount

      public int getDroppedAttributesCount()
       dropped_attributes_count is the number of dropped attributes. If the value is 0,
       then no attributes were dropped.
       
      uint32 dropped_attributes_count = 4;
      Specified by:
      getDroppedAttributesCount in interface Span.EventOrBuilder
      Returns:
      The droppedAttributesCount.
    • setDroppedAttributesCount

      public Span.Event.Builder setDroppedAttributesCount(int value)
       dropped_attributes_count is the number of dropped attributes. If the value is 0,
       then no attributes were dropped.
       
      uint32 dropped_attributes_count = 4;
      Parameters:
      value - The droppedAttributesCount to set.
      Returns:
      This builder for chaining.
    • clearDroppedAttributesCount

      public Span.Event.Builder clearDroppedAttributesCount()
       dropped_attributes_count is the number of dropped attributes. If the value is 0,
       then no attributes were dropped.
       
      uint32 dropped_attributes_count = 4;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Span.Event.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>
    • mergeUnknownFields

      public final Span.Event.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Event.Builder>