Class Span.Attributes.Builder

  • All Implemented Interfaces:
    Span.AttributesOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Span.Attributes

    public static final class Span.Attributes.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
    implements Span.AttributesOrBuilder
     A set of attributes as key-value pairs.
     
    Protobuf type google.devtools.cloudtrace.v2.Span.Attributes
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

        public Span.Attributes.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<Span.Attributes.Builder>
      • isInitialized

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

        public Span.Attributes.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<Span.Attributes.Builder>
        Throws:
        IOException
      • getAttributeMapCount

        public int getAttributeMapCount()
        Description copied from interface: Span.AttributesOrBuilder
         A set of attributes. Each attribute's key can be up to 128 bytes
         long. The value can be a string up to 256 bytes, a signed 64-bit integer,
         or the boolean values `true` or `false`. For example:
        
             "/instance_id": { "string_value": { "value": "my-instance" } }
             "/http/request_bytes": { "int_value": 300 }
             "abc.com/myattribute": { "bool_value": false }
         
        map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
        Specified by:
        getAttributeMapCount in interface Span.AttributesOrBuilder
      • containsAttributeMap

        public boolean containsAttributeMap​(String key)
         A set of attributes. Each attribute's key can be up to 128 bytes
         long. The value can be a string up to 256 bytes, a signed 64-bit integer,
         or the boolean values `true` or `false`. For example:
        
             "/instance_id": { "string_value": { "value": "my-instance" } }
             "/http/request_bytes": { "int_value": 300 }
             "abc.com/myattribute": { "bool_value": false }
         
        map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
        Specified by:
        containsAttributeMap in interface Span.AttributesOrBuilder
      • getAttributeMapMap

        public Map<String,​AttributeValue> getAttributeMapMap()
         A set of attributes. Each attribute's key can be up to 128 bytes
         long. The value can be a string up to 256 bytes, a signed 64-bit integer,
         or the boolean values `true` or `false`. For example:
        
             "/instance_id": { "string_value": { "value": "my-instance" } }
             "/http/request_bytes": { "int_value": 300 }
             "abc.com/myattribute": { "bool_value": false }
         
        map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
        Specified by:
        getAttributeMapMap in interface Span.AttributesOrBuilder
      • getAttributeMapOrDefault

        public AttributeValue getAttributeMapOrDefault​(String key,
                                                       AttributeValue defaultValue)
         A set of attributes. Each attribute's key can be up to 128 bytes
         long. The value can be a string up to 256 bytes, a signed 64-bit integer,
         or the boolean values `true` or `false`. For example:
        
             "/instance_id": { "string_value": { "value": "my-instance" } }
             "/http/request_bytes": { "int_value": 300 }
             "abc.com/myattribute": { "bool_value": false }
         
        map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
        Specified by:
        getAttributeMapOrDefault in interface Span.AttributesOrBuilder
      • getAttributeMapOrThrow

        public AttributeValue getAttributeMapOrThrow​(String key)
         A set of attributes. Each attribute's key can be up to 128 bytes
         long. The value can be a string up to 256 bytes, a signed 64-bit integer,
         or the boolean values `true` or `false`. For example:
        
             "/instance_id": { "string_value": { "value": "my-instance" } }
             "/http/request_bytes": { "int_value": 300 }
             "abc.com/myattribute": { "bool_value": false }
         
        map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
        Specified by:
        getAttributeMapOrThrow in interface Span.AttributesOrBuilder
      • removeAttributeMap

        public Span.Attributes.Builder removeAttributeMap​(String key)
         A set of attributes. Each attribute's key can be up to 128 bytes
         long. The value can be a string up to 256 bytes, a signed 64-bit integer,
         or the boolean values `true` or `false`. For example:
        
             "/instance_id": { "string_value": { "value": "my-instance" } }
             "/http/request_bytes": { "int_value": 300 }
             "abc.com/myattribute": { "bool_value": false }
         
        map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
      • putAttributeMap

        public Span.Attributes.Builder putAttributeMap​(String key,
                                                       AttributeValue value)
         A set of attributes. Each attribute's key can be up to 128 bytes
         long. The value can be a string up to 256 bytes, a signed 64-bit integer,
         or the boolean values `true` or `false`. For example:
        
             "/instance_id": { "string_value": { "value": "my-instance" } }
             "/http/request_bytes": { "int_value": 300 }
             "abc.com/myattribute": { "bool_value": false }
         
        map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
      • putAllAttributeMap

        public Span.Attributes.Builder putAllAttributeMap​(Map<String,​AttributeValue> values)
         A set of attributes. Each attribute's key can be up to 128 bytes
         long. The value can be a string up to 256 bytes, a signed 64-bit integer,
         or the boolean values `true` or `false`. For example:
        
             "/instance_id": { "string_value": { "value": "my-instance" } }
             "/http/request_bytes": { "int_value": 300 }
             "abc.com/myattribute": { "bool_value": false }
         
        map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
      • getDroppedAttributesCount

        public int getDroppedAttributesCount()
         The number of attributes that were discarded. Attributes can be discarded
         because their keys are too long or because there are too many attributes.
         If this value is 0 then all attributes are valid.
         
        int32 dropped_attributes_count = 2;
        Specified by:
        getDroppedAttributesCount in interface Span.AttributesOrBuilder
        Returns:
        The droppedAttributesCount.
      • setDroppedAttributesCount

        public Span.Attributes.Builder setDroppedAttributesCount​(int value)
         The number of attributes that were discarded. Attributes can be discarded
         because their keys are too long or because there are too many attributes.
         If this value is 0 then all attributes are valid.
         
        int32 dropped_attributes_count = 2;
        Parameters:
        value - The droppedAttributesCount to set.
        Returns:
        This builder for chaining.
      • clearDroppedAttributesCount

        public Span.Attributes.Builder clearDroppedAttributesCount()
         The number of attributes that were discarded. Attributes can be discarded
         because their keys are too long or because there are too many attributes.
         If this value is 0 then all attributes are valid.
         
        int32 dropped_attributes_count = 2;
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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