Class EntityRef.Builder

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

public static final class EntityRef.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<EntityRef,EntityRef.Builder> implements EntityRefOrBuilder
 A reference to an Entity.
 Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs.

 Status: [Development]
 
Protobuf type opentelemetry.proto.common.v1.EntityRef
  • Method Details

    • getSchemaUrl

      public String getSchemaUrl()
       The Schema URL, if known. This is the identifier of the Schema that the entity data
       is recorded in. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
      
       This schema_url applies to the data in this message and to the Resource attributes
       referenced by id_keys and description_keys.
       TODO: discuss if we are happy with this somewhat complicated definition of what
       the schema_url applies to.
      
       This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.
       
      string schema_url = 1 [json_name = "schemaUrl"];
      Specified by:
      getSchemaUrl in interface EntityRefOrBuilder
      Returns:
      The schemaUrl.
    • getSchemaUrlBytes

      public com.google.protobuf.ByteString getSchemaUrlBytes()
       The Schema URL, if known. This is the identifier of the Schema that the entity data
       is recorded in. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
      
       This schema_url applies to the data in this message and to the Resource attributes
       referenced by id_keys and description_keys.
       TODO: discuss if we are happy with this somewhat complicated definition of what
       the schema_url applies to.
      
       This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.
       
      string schema_url = 1 [json_name = "schemaUrl"];
      Specified by:
      getSchemaUrlBytes in interface EntityRefOrBuilder
      Returns:
      The bytes for schemaUrl.
    • setSchemaUrl

      public EntityRef.Builder setSchemaUrl(String value)
       The Schema URL, if known. This is the identifier of the Schema that the entity data
       is recorded in. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
      
       This schema_url applies to the data in this message and to the Resource attributes
       referenced by id_keys and description_keys.
       TODO: discuss if we are happy with this somewhat complicated definition of what
       the schema_url applies to.
      
       This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.
       
      string schema_url = 1 [json_name = "schemaUrl"];
      Parameters:
      value - The schemaUrl to set.
      Returns:
      This builder for chaining.
    • clearSchemaUrl

      public EntityRef.Builder clearSchemaUrl()
       The Schema URL, if known. This is the identifier of the Schema that the entity data
       is recorded in. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
      
       This schema_url applies to the data in this message and to the Resource attributes
       referenced by id_keys and description_keys.
       TODO: discuss if we are happy with this somewhat complicated definition of what
       the schema_url applies to.
      
       This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.
       
      string schema_url = 1 [json_name = "schemaUrl"];
      Returns:
      This builder for chaining.
    • setSchemaUrlBytes

      public EntityRef.Builder setSchemaUrlBytes(com.google.protobuf.ByteString value)
       The Schema URL, if known. This is the identifier of the Schema that the entity data
       is recorded in. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
      
       This schema_url applies to the data in this message and to the Resource attributes
       referenced by id_keys and description_keys.
       TODO: discuss if we are happy with this somewhat complicated definition of what
       the schema_url applies to.
      
       This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.
       
      string schema_url = 1 [json_name = "schemaUrl"];
      Parameters:
      value - The bytes for schemaUrl to set.
      Returns:
      This builder for chaining.
    • getType

      public String getType()
       Defines the type of the entity. MUST not change during the lifetime of the entity.
       For example: "service" or "host". This field is required and MUST not be empty
       for valid entities.
       
      string type = 2 [json_name = "type"];
      Specified by:
      getType in interface EntityRefOrBuilder
      Returns:
      The type.
    • getTypeBytes

      public com.google.protobuf.ByteString getTypeBytes()
       Defines the type of the entity. MUST not change during the lifetime of the entity.
       For example: "service" or "host". This field is required and MUST not be empty
       for valid entities.
       
      string type = 2 [json_name = "type"];
      Specified by:
      getTypeBytes in interface EntityRefOrBuilder
      Returns:
      The bytes for type.
    • setType

      public EntityRef.Builder setType(String value)
       Defines the type of the entity. MUST not change during the lifetime of the entity.
       For example: "service" or "host". This field is required and MUST not be empty
       for valid entities.
       
      string type = 2 [json_name = "type"];
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public EntityRef.Builder clearType()
       Defines the type of the entity. MUST not change during the lifetime of the entity.
       For example: "service" or "host". This field is required and MUST not be empty
       for valid entities.
       
      string type = 2 [json_name = "type"];
      Returns:
      This builder for chaining.
    • setTypeBytes

      public EntityRef.Builder setTypeBytes(com.google.protobuf.ByteString value)
       Defines the type of the entity. MUST not change during the lifetime of the entity.
       For example: "service" or "host". This field is required and MUST not be empty
       for valid entities.
       
      string type = 2 [json_name = "type"];
      Parameters:
      value - The bytes for type to set.
      Returns:
      This builder for chaining.
    • getIdKeysList

      public List<String> getIdKeysList()
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Specified by:
      getIdKeysList in interface EntityRefOrBuilder
      Returns:
      A list containing the idKeys.
    • getIdKeysCount

      public int getIdKeysCount()
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Specified by:
      getIdKeysCount in interface EntityRefOrBuilder
      Returns:
      The count of idKeys.
    • getIdKeys

      public String getIdKeys(int index)
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Specified by:
      getIdKeys in interface EntityRefOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The idKeys at the given index.
    • getIdKeysBytes

      public com.google.protobuf.ByteString getIdKeysBytes(int index)
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Specified by:
      getIdKeysBytes in interface EntityRefOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the idKeys at the given index.
    • setIdKeys

      public EntityRef.Builder setIdKeys(int index, String value)
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Parameters:
      index - The index to set the value at.
      value - The idKeys to set.
      Returns:
      This builder for chaining.
    • addIdKeys

      public EntityRef.Builder addIdKeys(String value)
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Parameters:
      value - The idKeys to add.
      Returns:
      This builder for chaining.
    • addAllIdKeys

      public EntityRef.Builder addAllIdKeys(Iterable<String> values)
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Parameters:
      values - The idKeys to add.
      Returns:
      This builder for chaining.
    • clearIdKeys

      public EntityRef.Builder clearIdKeys()
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Returns:
      This builder for chaining.
    • addIdKeysBytes

      public EntityRef.Builder addIdKeysBytes(com.google.protobuf.ByteString value)
       Attribute Keys that identify the entity.
       MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string id_keys = 3 [json_name = "idKeys"];
      Parameters:
      value - The bytes of the idKeys to add.
      Returns:
      This builder for chaining.
    • getDescriptionKeysList

      public List<String> getDescriptionKeysList()
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Specified by:
      getDescriptionKeysList in interface EntityRefOrBuilder
      Returns:
      A list containing the descriptionKeys.
    • getDescriptionKeysCount

      public int getDescriptionKeysCount()
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Specified by:
      getDescriptionKeysCount in interface EntityRefOrBuilder
      Returns:
      The count of descriptionKeys.
    • getDescriptionKeys

      public String getDescriptionKeys(int index)
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Specified by:
      getDescriptionKeys in interface EntityRefOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The descriptionKeys at the given index.
    • getDescriptionKeysBytes

      public com.google.protobuf.ByteString getDescriptionKeysBytes(int index)
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Specified by:
      getDescriptionKeysBytes in interface EntityRefOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the descriptionKeys at the given index.
    • setDescriptionKeys

      public EntityRef.Builder setDescriptionKeys(int index, String value)
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Parameters:
      index - The index to set the value at.
      value - The descriptionKeys to set.
      Returns:
      This builder for chaining.
    • addDescriptionKeys

      public EntityRef.Builder addDescriptionKeys(String value)
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Parameters:
      value - The descriptionKeys to add.
      Returns:
      This builder for chaining.
    • addAllDescriptionKeys

      public EntityRef.Builder addAllDescriptionKeys(Iterable<String> values)
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Parameters:
      values - The descriptionKeys to add.
      Returns:
      This builder for chaining.
    • clearDescriptionKeys

      public EntityRef.Builder clearDescriptionKeys()
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Returns:
      This builder for chaining.
    • addDescriptionKeysBytes

      public EntityRef.Builder addDescriptionKeysBytes(com.google.protobuf.ByteString value)
       Descriptive (non-identifying) attribute keys of the entity.
       MAY change over the lifetime of the entity. MAY be empty.
       These attribute keys are not part of entity's identity.
       These keys MUST exist in the containing {message}.attributes.
       
      repeated string description_keys = 4 [json_name = "descriptionKeys"];
      Parameters:
      value - The bytes of the descriptionKeys to add.
      Returns:
      This builder for chaining.