opentelemetry.proto.resource.v1.Resource
*/
class Resource extends \Google\Protobuf\Internal\Message
{
/**
* 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).
*
* Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;
*/
private $attributes;
/**
* dropped_attributes_count is the number of dropped attributes. If the value is 0, then
* no attributes were dropped.
*
* Generated from protobuf field uint32 dropped_attributes_count = 2;
*/
protected $dropped_attributes_count = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
* 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).
* @type int $dropped_attributes_count
* dropped_attributes_count is the number of dropped attributes. If the value is 0, then
* no attributes were dropped.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Opentelemetry\Proto\Resource\V1\Resource::initOnce();
parent::__construct($data);
}
/**
* 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).
*
* Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getAttributes()
{
return $this->attributes;
}
/**
* 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).
*
* Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;
* @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setAttributes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
$this->attributes = $arr;
return $this;
}
/**
* dropped_attributes_count is the number of dropped attributes. If the value is 0, then
* no attributes were dropped.
*
* Generated from protobuf field uint32 dropped_attributes_count = 2;
* @return int
*/
public function getDroppedAttributesCount()
{
return $this->dropped_attributes_count;
}
/**
* dropped_attributes_count is the number of dropped attributes. If the value is 0, then
* no attributes were dropped.
*
* Generated from protobuf field uint32 dropped_attributes_count = 2;
* @param int $var
* @return $this
*/
public function setDroppedAttributesCount($var)
{
GPBUtil::checkUint32($var);
$this->dropped_attributes_count = $var;
return $this;
}
}