PluginProbe
Media Cloud Sync / 1.1.0
Media Cloud Sync v1.1.0
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
media-cloud-sync / includes / sdk / google / google / common-protos / src / Api / MetricRule.php

MetricRule.php in Media Cloud Sync 1.1.0, at includes/sdk/google/google/common-protos/src/Api/MetricRule.php

118 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 # Generated by the protocol buffer compiler. DO NOT EDIT!
4 # source: google/api/quota.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 * Bind API methods to metrics. Binding a method to a metric causes that
12 * metric's configured quota behaviors to apply to the method call.
13 *
14 * Generated from protobuf message <code>google.api.MetricRule</code>
15 */
16 class MetricRule extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message
17 {
18 /**
19 * Selects the methods to which this rule applies.
20 * Refer to [selector][google.api.DocumentationRule.selector] for syntax
21 * details.
22 *
23 * Generated from protobuf field <code>string selector = 1;</code>
24 */
25 protected $selector = '';
26 /**
27 * Metrics to update when the selected methods are called, and the associated
28 * cost applied to each metric.
29 * The key of the map is the metric name, and the values are the amount
30 * increased for the metric against which the quota limits are defined.
31 * The value must not be negative.
32 *
33 * Generated from protobuf field <code>map<string, int64> metric_costs = 2;</code>
34 */
35 private $metric_costs;
36 /**
37 * Constructor.
38 *
39 * @param array $data {
40 * Optional. Data for populating the Message object.
41 *
42 * @type string $selector
43 * Selects the methods to which this rule applies.
44 * Refer to [selector][google.api.DocumentationRule.selector] for syntax
45 * details.
46 * @type array|\Google\Protobuf\Internal\MapField $metric_costs
47 * Metrics to update when the selected methods are called, and the associated
48 * cost applied to each metric.
49 * The key of the map is the metric name, and the values are the amount
50 * increased for the metric against which the quota limits are defined.
51 * The value must not be negative.
52 * }
53 */
54 public function __construct($data = NULL)
55 {
56 \Dudlewebs\WPMCS\GPBMetadata\Google\Api\Quota::initOnce();
57 parent::__construct($data);
58 }
59 /**
60 * Selects the methods to which this rule applies.
61 * Refer to [selector][google.api.DocumentationRule.selector] for syntax
62 * details.
63 *
64 * Generated from protobuf field <code>string selector = 1;</code>
65 * @return string
66 */
67 public function getSelector()
68 {
69 return $this->selector;
70 }
71 /**
72 * Selects the methods to which this rule applies.
73 * Refer to [selector][google.api.DocumentationRule.selector] for syntax
74 * details.
75 *
76 * Generated from protobuf field <code>string selector = 1;</code>
77 * @param string $var
78 * @return $this
79 */
80 public function setSelector($var)
81 {
82 GPBUtil::checkString($var, True);
83 $this->selector = $var;
84 return $this;
85 }
86 /**
87 * Metrics to update when the selected methods are called, and the associated
88 * cost applied to each metric.
89 * The key of the map is the metric name, and the values are the amount
90 * increased for the metric against which the quota limits are defined.
91 * The value must not be negative.
92 *
93 * Generated from protobuf field <code>map<string, int64> metric_costs = 2;</code>
94 * @return \Google\Protobuf\Internal\MapField
95 */
96 public function getMetricCosts()
97 {
98 return $this->metric_costs;
99 }
100 /**
101 * Metrics to update when the selected methods are called, and the associated
102 * cost applied to each metric.
103 * The key of the map is the metric name, and the values are the amount
104 * increased for the metric against which the quota limits are defined.
105 * The value must not be negative.
106 *
107 * Generated from protobuf field <code>map<string, int64> metric_costs = 2;</code>
108 * @param array|\Google\Protobuf\Internal\MapField $var
109 * @return $this
110 */
111 public function setMetricCosts($var)
112 {
113 $arr = GPBUtil::checkMapField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::STRING, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::INT64);
114 $this->metric_costs = $arr;
115 return $this;
116 }
117 }
118