Class KeyValueList.Builder

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

public static final class KeyValueList.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<KeyValueList.Builder> implements KeyValueListOrBuilder
 KeyValueList is a list of KeyValue messages. We need KeyValueList as a message
 since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need
 a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to
 avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches
 are semantically equivalent.
 
Protobuf type opentelemetry.proto.common.v1.KeyValueList
  • 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<KeyValueList.Builder>
    • clear

      public KeyValueList.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<KeyValueList.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<KeyValueList.Builder>
    • getDefaultInstanceForType

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

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

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

      public KeyValueList.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<KeyValueList.Builder>
    • setField

      public KeyValueList.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<KeyValueList.Builder>
    • clearField

      public KeyValueList.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<KeyValueList.Builder>
    • clearOneof

      public KeyValueList.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<KeyValueList.Builder>
    • setRepeatedField

      public KeyValueList.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<KeyValueList.Builder>
    • addRepeatedField

      public KeyValueList.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<KeyValueList.Builder>
    • mergeFrom

      public KeyValueList.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<KeyValueList.Builder>
    • mergeFrom

      public KeyValueList.Builder mergeFrom(KeyValueList other)
    • isInitialized

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

      public KeyValueList.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<KeyValueList.Builder>
      Throws:
      IOException
    • getValuesList

      public List<KeyValue> getValuesList()
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
      Specified by:
      getValuesList in interface KeyValueListOrBuilder
    • getValuesCount

      public int getValuesCount()
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
      Specified by:
      getValuesCount in interface KeyValueListOrBuilder
    • getValues

      public KeyValue getValues(int index)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
      Specified by:
      getValues in interface KeyValueListOrBuilder
    • setValues

      public KeyValueList.Builder setValues(int index, KeyValue value)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • setValues

      public KeyValueList.Builder setValues(int index, KeyValue.Builder builderForValue)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • addValues

      public KeyValueList.Builder addValues(KeyValue value)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • addValues

      public KeyValueList.Builder addValues(int index, KeyValue value)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • addValues

      public KeyValueList.Builder addValues(KeyValue.Builder builderForValue)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • addValues

      public KeyValueList.Builder addValues(int index, KeyValue.Builder builderForValue)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • addAllValues

      public KeyValueList.Builder addAllValues(Iterable<? extends KeyValue> values)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • clearValues

      public KeyValueList.Builder clearValues()
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • removeValues

      public KeyValueList.Builder removeValues(int index)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • getValuesBuilder

      public KeyValue.Builder getValuesBuilder(int index)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • getValuesOrBuilder

      public KeyValueOrBuilder getValuesOrBuilder(int index)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
      Specified by:
      getValuesOrBuilder in interface KeyValueListOrBuilder
    • getValuesOrBuilderList

      public List<? extends KeyValueOrBuilder> getValuesOrBuilderList()
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
      Specified by:
      getValuesOrBuilderList in interface KeyValueListOrBuilder
    • addValuesBuilder

      public KeyValue.Builder addValuesBuilder()
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • addValuesBuilder

      public KeyValue.Builder addValuesBuilder(int index)
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • getValuesBuilderList

      public List<KeyValue.Builder> getValuesBuilderList()
       A collection of key/value pairs of key-value pairs. The list may be empty (may
       contain 0 elements).
      
       The keys MUST be unique (it is not allowed to have more than one
       value with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue values = 1;
    • setUnknownFields

      public final KeyValueList.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<KeyValueList.Builder>
    • mergeUnknownFields

      public final KeyValueList.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<KeyValueList.Builder>