googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Api
/
Billing
/
BillingDestination.php
googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Api
/
Billing
Last commit date
BillingDestination.php
3 years ago
BillingDestination.php
114 lines
| 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/api/billing.proto |
| 4 | |
| 5 | namespace Google\Api\Billing; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\RepeatedField; |
| 9 | use Google\Protobuf\Internal\GPBUtil; |
| 10 | |
| 11 | /** |
| 12 | * Configuration of a specific billing destination (Currently only support |
| 13 | * bill against consumer project). |
| 14 | * |
| 15 | * Generated from protobuf message <code>google.api.Billing.BillingDestination</code> |
| 16 | */ |
| 17 | class BillingDestination extends \Google\Protobuf\Internal\Message |
| 18 | { |
| 19 | /** |
| 20 | * The monitored resource type. The type must be defined in |
| 21 | * [Service.monitored_resources][google.api.Service.monitored_resources] section. |
| 22 | * |
| 23 | * Generated from protobuf field <code>string monitored_resource = 1;</code> |
| 24 | */ |
| 25 | private $monitored_resource = ''; |
| 26 | /** |
| 27 | * Names of the metrics to report to this billing destination. |
| 28 | * Each name must be defined in [Service.metrics][google.api.Service.metrics] section. |
| 29 | * |
| 30 | * Generated from protobuf field <code>repeated string metrics = 2;</code> |
| 31 | */ |
| 32 | private $metrics; |
| 33 | |
| 34 | /** |
| 35 | * Constructor. |
| 36 | * |
| 37 | * @param array $data { |
| 38 | * Optional. Data for populating the Message object. |
| 39 | * |
| 40 | * @type string $monitored_resource |
| 41 | * The monitored resource type. The type must be defined in |
| 42 | * [Service.monitored_resources][google.api.Service.monitored_resources] section. |
| 43 | * @type string[]|\Google\Protobuf\Internal\RepeatedField $metrics |
| 44 | * Names of the metrics to report to this billing destination. |
| 45 | * Each name must be defined in [Service.metrics][google.api.Service.metrics] section. |
| 46 | * } |
| 47 | */ |
| 48 | public function __construct($data = NULL) { |
| 49 | \GPBMetadata\Google\Api\Billing::initOnce(); |
| 50 | parent::__construct($data); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * The monitored resource type. The type must be defined in |
| 55 | * [Service.monitored_resources][google.api.Service.monitored_resources] section. |
| 56 | * |
| 57 | * Generated from protobuf field <code>string monitored_resource = 1;</code> |
| 58 | * @return string |
| 59 | */ |
| 60 | public function getMonitoredResource() |
| 61 | { |
| 62 | return $this->monitored_resource; |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * The monitored resource type. The type must be defined in |
| 67 | * [Service.monitored_resources][google.api.Service.monitored_resources] section. |
| 68 | * |
| 69 | * Generated from protobuf field <code>string monitored_resource = 1;</code> |
| 70 | * @param string $var |
| 71 | * @return $this |
| 72 | */ |
| 73 | public function setMonitoredResource($var) |
| 74 | { |
| 75 | GPBUtil::checkString($var, True); |
| 76 | $this->monitored_resource = $var; |
| 77 | |
| 78 | return $this; |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Names of the metrics to report to this billing destination. |
| 83 | * Each name must be defined in [Service.metrics][google.api.Service.metrics] section. |
| 84 | * |
| 85 | * Generated from protobuf field <code>repeated string metrics = 2;</code> |
| 86 | * @return \Google\Protobuf\Internal\RepeatedField |
| 87 | */ |
| 88 | public function getMetrics() |
| 89 | { |
| 90 | return $this->metrics; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Names of the metrics to report to this billing destination. |
| 95 | * Each name must be defined in [Service.metrics][google.api.Service.metrics] section. |
| 96 | * |
| 97 | * Generated from protobuf field <code>repeated string metrics = 2;</code> |
| 98 | * @param string[]|\Google\Protobuf\Internal\RepeatedField $var |
| 99 | * @return $this |
| 100 | */ |
| 101 | public function setMetrics($var) |
| 102 | { |
| 103 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); |
| 104 | $this->metrics = $arr; |
| 105 | |
| 106 | return $this; |
| 107 | } |
| 108 | |
| 109 | } |
| 110 | |
| 111 | // Adding a class alias for backwards compatibility with the previous class name. |
| 112 | class_alias(BillingDestination::class, \Google\Api\Billing_BillingDestination::class); |
| 113 | |
| 114 |