Class Resource.Builder

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

public static final class Resource.Builder extends com.google.protobuf.GeneratedMessage.Builder<Resource.Builder> implements ResourceOrBuilder
 Resource information.
 
Protobuf type opentelemetry.proto.resource.v1.Resource
  • 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<Resource.Builder>
    • clear

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

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

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

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

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

      public Resource.Builder mergeFrom(Resource other)
    • isInitialized

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

      public Resource.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<Resource.Builder>
      Throws:
      IOException
    • getAttributesList

      public List<KeyValue> getAttributesList()
       Set of attributes that describe the resource.
       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 = 1;
      Specified by:
      getAttributesList in interface ResourceOrBuilder
    • getAttributesCount

      public int getAttributesCount()
       Set of attributes that describe the resource.
       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 = 1;
      Specified by:
      getAttributesCount in interface ResourceOrBuilder
    • getAttributes

      public KeyValue getAttributes(int index)
       Set of attributes that describe the resource.
       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 = 1;
      Specified by:
      getAttributes in interface ResourceOrBuilder
    • setAttributes

      public Resource.Builder setAttributes(int index, KeyValue value)
       Set of attributes that describe the resource.
       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 = 1;
    • setAttributes

      public Resource.Builder setAttributes(int index, KeyValue.Builder builderForValue)
       Set of attributes that describe the resource.
       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 = 1;
    • addAttributes

      public Resource.Builder addAttributes(KeyValue value)
       Set of attributes that describe the resource.
       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 = 1;
    • addAttributes

      public Resource.Builder addAttributes(int index, KeyValue value)
       Set of attributes that describe the resource.
       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 = 1;
    • addAttributes

      public Resource.Builder addAttributes(KeyValue.Builder builderForValue)
       Set of attributes that describe the resource.
       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 = 1;
    • addAttributes

      public Resource.Builder addAttributes(int index, KeyValue.Builder builderForValue)
       Set of attributes that describe the resource.
       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 = 1;
    • addAllAttributes

      public Resource.Builder addAllAttributes(Iterable<? extends KeyValue> values)
       Set of attributes that describe the resource.
       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 = 1;
    • clearAttributes

      public Resource.Builder clearAttributes()
       Set of attributes that describe the resource.
       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 = 1;
    • removeAttributes

      public Resource.Builder removeAttributes(int index)
       Set of attributes that describe the resource.
       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 = 1;
    • getAttributesBuilder

      public KeyValue.Builder getAttributesBuilder(int index)
       Set of attributes that describe the resource.
       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 = 1;
    • getAttributesOrBuilder

      public KeyValueOrBuilder getAttributesOrBuilder(int index)
       Set of attributes that describe the resource.
       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 = 1;
      Specified by:
      getAttributesOrBuilder in interface ResourceOrBuilder
    • getAttributesOrBuilderList

      public List<? extends KeyValueOrBuilder> getAttributesOrBuilderList()
       Set of attributes that describe the resource.
       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 = 1;
      Specified by:
      getAttributesOrBuilderList in interface ResourceOrBuilder
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder()
       Set of attributes that describe the resource.
       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 = 1;
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder(int index)
       Set of attributes that describe the resource.
       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 = 1;
    • getAttributesBuilderList

      public List<KeyValue.Builder> getAttributesBuilderList()
       Set of attributes that describe the resource.
       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 = 1;
    • 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 = 2;
      Specified by:
      getDroppedAttributesCount in interface ResourceOrBuilder
      Returns:
      The droppedAttributesCount.
    • setDroppedAttributesCount

      public Resource.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 = 2;
      Parameters:
      value - The droppedAttributesCount to set.
      Returns:
      This builder for chaining.
    • clearDroppedAttributesCount

      public Resource.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 = 2;
      Returns:
      This builder for chaining.