media-cloud-sync
/
includes
/
sdk
/
google
/
google
/
common-protos
/
src
/
Api
/
MonitoredResource.php
MonitoredResource.php in Media Cloud Sync 1.1.0, at includes/sdk/google/google/common-protos/src/Api/MonitoredResource.php
| 1 | <?php |
| 2 | |
| 3 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 | # source: google/api/monitored_resource.proto |
| 5 | namespace Dudlewebs\WPMCS\Google\Api; |
| 6 | |
| 7 | use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType; |
| 8 | use Dudlewebs\WPMCS\Google\Protobuf\Internal\RepeatedField; |
| 9 | use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBUtil; |
| 10 | /** |
| 11 | * An object representing a resource that can be used for monitoring, logging, |
| 12 | * billing, or other purposes. Examples include virtual machine instances, |
| 13 | * databases, and storage devices such as disks. The `type` field identifies a |
| 14 | * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object |
| 15 | * that describes the resource's schema. Information in the `labels` field |
| 16 | * identifies the actual resource and its attributes according to the schema. |
| 17 | * For example, a particular Compute Engine VM instance could be represented by |
| 18 | * the following object, because the |
| 19 | * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for |
| 20 | * `"gce_instance"` has labels |
| 21 | * `"project_id"`, `"instance_id"` and `"zone"`: |
| 22 | * { "type": "gce_instance", |
| 23 | * "labels": { "project_id": "my-project", |
| 24 | * "instance_id": "12345678901234", |
| 25 | * "zone": "us-central1-a" }} |
| 26 | * |
| 27 | * Generated from protobuf message <code>google.api.MonitoredResource</code> |
| 28 | */ |
| 29 | class MonitoredResource extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 30 | { |
| 31 | /** |
| 32 | * Required. The monitored resource type. This field must match |
| 33 | * the `type` field of a |
| 34 | * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] |
| 35 | * object. For example, the type of a Compute Engine VM instance is |
| 36 | * `gce_instance`. Some descriptors include the service name in the type; for |
| 37 | * example, the type of a Datastream stream is |
| 38 | * `datastream.googleapis.com/Stream`. |
| 39 | * |
| 40 | * Generated from protobuf field <code>string type = 1;</code> |
| 41 | */ |
| 42 | protected $type = ''; |
| 43 | /** |
| 44 | * Required. Values for all of the labels listed in the associated monitored |
| 45 | * resource descriptor. For example, Compute Engine VM instances use the |
| 46 | * labels `"project_id"`, `"instance_id"`, and `"zone"`. |
| 47 | * |
| 48 | * Generated from protobuf field <code>map<string, string> labels = 2;</code> |
| 49 | */ |
| 50 | private $labels; |
| 51 | /** |
| 52 | * Constructor. |
| 53 | * |
| 54 | * @param array $data { |
| 55 | * Optional. Data for populating the Message object. |
| 56 | * |
| 57 | * @type string $type |
| 58 | * Required. The monitored resource type. This field must match |
| 59 | * the `type` field of a |
| 60 | * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] |
| 61 | * object. For example, the type of a Compute Engine VM instance is |
| 62 | * `gce_instance`. Some descriptors include the service name in the type; for |
| 63 | * example, the type of a Datastream stream is |
| 64 | * `datastream.googleapis.com/Stream`. |
| 65 | * @type array|\Google\Protobuf\Internal\MapField $labels |
| 66 | * Required. Values for all of the labels listed in the associated monitored |
| 67 | * resource descriptor. For example, Compute Engine VM instances use the |
| 68 | * labels `"project_id"`, `"instance_id"`, and `"zone"`. |
| 69 | * } |
| 70 | */ |
| 71 | public function __construct($data = NULL) |
| 72 | { |
| 73 | \Dudlewebs\WPMCS\GPBMetadata\Google\Api\MonitoredResource::initOnce(); |
| 74 | parent::__construct($data); |
| 75 | } |
| 76 | /** |
| 77 | * Required. The monitored resource type. This field must match |
| 78 | * the `type` field of a |
| 79 | * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] |
| 80 | * object. For example, the type of a Compute Engine VM instance is |
| 81 | * `gce_instance`. Some descriptors include the service name in the type; for |
| 82 | * example, the type of a Datastream stream is |
| 83 | * `datastream.googleapis.com/Stream`. |
| 84 | * |
| 85 | * Generated from protobuf field <code>string type = 1;</code> |
| 86 | * @return string |
| 87 | */ |
| 88 | public function getType() |
| 89 | { |
| 90 | return $this->type; |
| 91 | } |
| 92 | /** |
| 93 | * Required. The monitored resource type. This field must match |
| 94 | * the `type` field of a |
| 95 | * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] |
| 96 | * object. For example, the type of a Compute Engine VM instance is |
| 97 | * `gce_instance`. Some descriptors include the service name in the type; for |
| 98 | * example, the type of a Datastream stream is |
| 99 | * `datastream.googleapis.com/Stream`. |
| 100 | * |
| 101 | * Generated from protobuf field <code>string type = 1;</code> |
| 102 | * @param string $var |
| 103 | * @return $this |
| 104 | */ |
| 105 | public function setType($var) |
| 106 | { |
| 107 | GPBUtil::checkString($var, True); |
| 108 | $this->type = $var; |
| 109 | return $this; |
| 110 | } |
| 111 | /** |
| 112 | * Required. Values for all of the labels listed in the associated monitored |
| 113 | * resource descriptor. For example, Compute Engine VM instances use the |
| 114 | * labels `"project_id"`, `"instance_id"`, and `"zone"`. |
| 115 | * |
| 116 | * Generated from protobuf field <code>map<string, string> labels = 2;</code> |
| 117 | * @return \Google\Protobuf\Internal\MapField |
| 118 | */ |
| 119 | public function getLabels() |
| 120 | { |
| 121 | return $this->labels; |
| 122 | } |
| 123 | /** |
| 124 | * Required. Values for all of the labels listed in the associated monitored |
| 125 | * resource descriptor. For example, Compute Engine VM instances use the |
| 126 | * labels `"project_id"`, `"instance_id"`, and `"zone"`. |
| 127 | * |
| 128 | * Generated from protobuf field <code>map<string, string> labels = 2;</code> |
| 129 | * @param array|\Google\Protobuf\Internal\MapField $var |
| 130 | * @return $this |
| 131 | */ |
| 132 | public function setLabels($var) |
| 133 | { |
| 134 | $arr = GPBUtil::checkMapField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::STRING, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::STRING); |
| 135 | $this->labels = $arr; |
| 136 | return $this; |
| 137 | } |
| 138 | } |
| 139 |