Class KeyValue.Builder

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

public static final class KeyValue.Builder extends com.google.protobuf.GeneratedMessage.Builder<KeyValue.Builder> implements KeyValueOrBuilder
 Represents a key-value pair that is used to store Span attributes, Link
 attributes, etc.
 
Protobuf type opentelemetry.proto.common.v1.KeyValue
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    The key name of the pair.
    Reference to the string key in ProfilesDictionary.string_table.
    The value of the pair.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The key name of the pair.
    com.google.protobuf.ByteString
    The key name of the pair.
    int
    Reference to the string key in ProfilesDictionary.string_table.
    The value of the pair.
    The value of the pair.
    The value of the pair.
    boolean
    The value of the pair.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    The value of the pair.
    setKey(String value)
    The key name of the pair.
    setKeyBytes(com.google.protobuf.ByteString value)
    The key name of the pair.
    setKeyStrindex(int value)
    Reference to the string key in ProfilesDictionary.string_table.
    The value of the pair.
    setValue(AnyValue.Builder builderForValue)
    The value of the pair.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<KeyValue.Builder>
    • clear

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

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

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

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

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

      public KeyValue.Builder mergeFrom(KeyValue other)
    • isInitialized

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

      public KeyValue.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<KeyValue.Builder>
      Throws:
      IOException
    • getKey

      public String getKey()
       The key name of the pair.
       key_ref MUST NOT be set if key is used.
       
      string key = 1;
      Specified by:
      getKey in interface KeyValueOrBuilder
      Returns:
      The key.
    • getKeyBytes

      public com.google.protobuf.ByteString getKeyBytes()
       The key name of the pair.
       key_ref MUST NOT be set if key is used.
       
      string key = 1;
      Specified by:
      getKeyBytes in interface KeyValueOrBuilder
      Returns:
      The bytes for key.
    • setKey

      public KeyValue.Builder setKey(String value)
       The key name of the pair.
       key_ref MUST NOT be set if key is used.
       
      string key = 1;
      Parameters:
      value - The key to set.
      Returns:
      This builder for chaining.
    • clearKey

      public KeyValue.Builder clearKey()
       The key name of the pair.
       key_ref MUST NOT be set if key is used.
       
      string key = 1;
      Returns:
      This builder for chaining.
    • setKeyBytes

      public KeyValue.Builder setKeyBytes(com.google.protobuf.ByteString value)
       The key name of the pair.
       key_ref MUST NOT be set if key is used.
       
      string key = 1;
      Parameters:
      value - The bytes for key to set.
      Returns:
      This builder for chaining.
    • hasValue

      public boolean hasValue()
       The value of the pair.
       
      .opentelemetry.proto.common.v1.AnyValue value = 2;
      Specified by:
      hasValue in interface KeyValueOrBuilder
      Returns:
      Whether the value field is set.
    • getValue

      public AnyValue getValue()
       The value of the pair.
       
      .opentelemetry.proto.common.v1.AnyValue value = 2;
      Specified by:
      getValue in interface KeyValueOrBuilder
      Returns:
      The value.
    • setValue

      public KeyValue.Builder setValue(AnyValue value)
       The value of the pair.
       
      .opentelemetry.proto.common.v1.AnyValue value = 2;
    • setValue

      public KeyValue.Builder setValue(AnyValue.Builder builderForValue)
       The value of the pair.
       
      .opentelemetry.proto.common.v1.AnyValue value = 2;
    • mergeValue

      public KeyValue.Builder mergeValue(AnyValue value)
       The value of the pair.
       
      .opentelemetry.proto.common.v1.AnyValue value = 2;
    • clearValue

      public KeyValue.Builder clearValue()
       The value of the pair.
       
      .opentelemetry.proto.common.v1.AnyValue value = 2;
    • getValueBuilder

      public AnyValue.Builder getValueBuilder()
       The value of the pair.
       
      .opentelemetry.proto.common.v1.AnyValue value = 2;
    • getValueOrBuilder

      public AnyValueOrBuilder getValueOrBuilder()
       The value of the pair.
       
      .opentelemetry.proto.common.v1.AnyValue value = 2;
      Specified by:
      getValueOrBuilder in interface KeyValueOrBuilder
    • getKeyStrindex

      public int getKeyStrindex()
       Reference to the string key in ProfilesDictionary.string_table.
       key MUST NOT be set if key_strindex is used.
      
       Note: This is currently used exclusively in the Profiling signal.
       Implementers of OTLP receivers for signals other than Profiling should
       treat the presence of this key as a non-fatal issue.
       Log an error or warning indicating an unexpected field intended for the
       Profiling signal and process the data as if this value were absent or
       empty, ignoring its semantic content for the non-Profiling signal.
      
       Status: [Development]
       
      int32 key_strindex = 3;
      Specified by:
      getKeyStrindex in interface KeyValueOrBuilder
      Returns:
      The keyStrindex.
    • setKeyStrindex

      public KeyValue.Builder setKeyStrindex(int value)
       Reference to the string key in ProfilesDictionary.string_table.
       key MUST NOT be set if key_strindex is used.
      
       Note: This is currently used exclusively in the Profiling signal.
       Implementers of OTLP receivers for signals other than Profiling should
       treat the presence of this key as a non-fatal issue.
       Log an error or warning indicating an unexpected field intended for the
       Profiling signal and process the data as if this value were absent or
       empty, ignoring its semantic content for the non-Profiling signal.
      
       Status: [Development]
       
      int32 key_strindex = 3;
      Parameters:
      value - The keyStrindex to set.
      Returns:
      This builder for chaining.
    • clearKeyStrindex

      public KeyValue.Builder clearKeyStrindex()
       Reference to the string key in ProfilesDictionary.string_table.
       key MUST NOT be set if key_strindex is used.
      
       Note: This is currently used exclusively in the Profiling signal.
       Implementers of OTLP receivers for signals other than Profiling should
       treat the presence of this key as a non-fatal issue.
       Log an error or warning indicating an unexpected field intended for the
       Profiling signal and process the data as if this value were absent or
       empty, ignoring its semantic content for the non-Profiling signal.
      
       Status: [Development]
       
      int32 key_strindex = 3;
      Returns:
      This builder for chaining.