Class Resource.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Resource,Resource.Builder>
io.opentelemetry.proto.resource.v1.Resource.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, ResourceOrBuilder, Cloneable
Enclosing class:
Resource

public static final class Resource.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Resource,Resource.Builder> implements ResourceOrBuilder
 Resource information.
 
Protobuf type opentelemetry.proto.resource.v1.Resource
  • Method Details

    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
      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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
      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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
      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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • 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).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1 [json_name = "attributes"];
    • getDroppedAttributesCount

      public int getDroppedAttributesCount()
       The number of dropped attributes. If the value is 0, then
       no attributes were dropped.
       
      uint32 dropped_attributes_count = 2 [json_name = "droppedAttributesCount"];
      Specified by:
      getDroppedAttributesCount in interface ResourceOrBuilder
      Returns:
      The droppedAttributesCount.
    • setDroppedAttributesCount

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

      public Resource.Builder clearDroppedAttributesCount()
       The number of dropped attributes. If the value is 0, then
       no attributes were dropped.
       
      uint32 dropped_attributes_count = 2 [json_name = "droppedAttributesCount"];
      Returns:
      This builder for chaining.
    • getEntityRefsList

      public List<EntityRef> getEntityRefsList()
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
      Specified by:
      getEntityRefsList in interface ResourceOrBuilder
    • getEntityRefsCount

      public int getEntityRefsCount()
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
      Specified by:
      getEntityRefsCount in interface ResourceOrBuilder
    • getEntityRefs

      public EntityRef getEntityRefs(int index)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
      Specified by:
      getEntityRefs in interface ResourceOrBuilder
    • setEntityRefs

      public Resource.Builder setEntityRefs(int index, EntityRef value)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
    • setEntityRefs

      public Resource.Builder setEntityRefs(int index, EntityRef.Builder builderForValue)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
    • addEntityRefs

      public Resource.Builder addEntityRefs(EntityRef value)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
    • addEntityRefs

      public Resource.Builder addEntityRefs(int index, EntityRef value)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
    • addEntityRefs

      public Resource.Builder addEntityRefs(EntityRef.Builder builderForValue)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
    • addEntityRefs

      public Resource.Builder addEntityRefs(int index, EntityRef.Builder builderForValue)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
    • addAllEntityRefs

      public Resource.Builder addAllEntityRefs(Iterable<? extends EntityRef> values)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
    • clearEntityRefs

      public Resource.Builder clearEntityRefs()
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];
    • removeEntityRefs

      public Resource.Builder removeEntityRefs(int index)
       Set of entities that participate in this Resource.
      
       Note: keys in the references MUST exist in attributes of this message.
      
       Status: [Development]
       
      repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3 [json_name = "entityRefs"];