google.api.MonitoredResourceMetadata
*/
class MonitoredResourceMetadata extends \Google\Protobuf\Internal\Message
{
/**
* Output only. Values for predefined system metadata labels.
* System labels are a kind of metadata extracted by Google Stackdriver.
* Stackdriver determines what system labels are useful and how to obtain
* their values. Some examples: "machine_image", "vpc", "subnet_id",
* "security_group", "name", etc.
* System label values can be only strings, Boolean values, or a list of
* strings. For example:
* { "name": "my-test-instance",
* "security_group": ["a", "b", "c"],
* "spot_instance": false }
*
* Generated from protobuf field .google.protobuf.Struct system_labels = 1;
*/
private $system_labels = null;
/**
* Output only. A map of user-defined metadata labels.
*
* Generated from protobuf field map user_labels = 2;
*/
private $user_labels;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Google\Protobuf\Struct $system_labels
* Output only. Values for predefined system metadata labels.
* System labels are a kind of metadata extracted by Google Stackdriver.
* Stackdriver determines what system labels are useful and how to obtain
* their values. Some examples: "machine_image", "vpc", "subnet_id",
* "security_group", "name", etc.
* System label values can be only strings, Boolean values, or a list of
* strings. For example:
* { "name": "my-test-instance",
* "security_group": ["a", "b", "c"],
* "spot_instance": false }
* @type array|\Google\Protobuf\Internal\MapField $user_labels
* Output only. A map of user-defined metadata labels.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Api\MonitoredResource::initOnce();
parent::__construct($data);
}
/**
* Output only. Values for predefined system metadata labels.
* System labels are a kind of metadata extracted by Google Stackdriver.
* Stackdriver determines what system labels are useful and how to obtain
* their values. Some examples: "machine_image", "vpc", "subnet_id",
* "security_group", "name", etc.
* System label values can be only strings, Boolean values, or a list of
* strings. For example:
* { "name": "my-test-instance",
* "security_group": ["a", "b", "c"],
* "spot_instance": false }
*
* Generated from protobuf field .google.protobuf.Struct system_labels = 1;
* @return \Google\Protobuf\Struct
*/
public function getSystemLabels()
{
return $this->system_labels;
}
/**
* Output only. Values for predefined system metadata labels.
* System labels are a kind of metadata extracted by Google Stackdriver.
* Stackdriver determines what system labels are useful and how to obtain
* their values. Some examples: "machine_image", "vpc", "subnet_id",
* "security_group", "name", etc.
* System label values can be only strings, Boolean values, or a list of
* strings. For example:
* { "name": "my-test-instance",
* "security_group": ["a", "b", "c"],
* "spot_instance": false }
*
* Generated from protobuf field .google.protobuf.Struct system_labels = 1;
* @param \Google\Protobuf\Struct $var
* @return $this
*/
public function setSystemLabels($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
$this->system_labels = $var;
return $this;
}
/**
* Output only. A map of user-defined metadata labels.
*
* Generated from protobuf field map user_labels = 2;
* @return \Google\Protobuf\Internal\MapField
*/
public function getUserLabels()
{
return $this->user_labels;
}
/**
* Output only. A map of user-defined metadata labels.
*
* Generated from protobuf field map user_labels = 2;
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setUserLabels($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->user_labels = $arr;
return $this;
}
}