Class 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.GeneratedMessageV3.Builder<Resource.Builder>
    implements ResourceOrBuilder
     Resource information.
     
    Protobuf type opentelemetry.proto.resource.v1.Resource
    • Method Detail

      • 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<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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • setUnknownFields

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

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