googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Api
/
MetricRule.php
googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Api
Last commit date
BackendRule
3 years ago
Billing
3 years ago
Distribution
3 years ago
Expr
3 years ago
LabelDescriptor
3 years ago
Logging
3 years ago
MetricDescriptor
3 years ago
Monitoring
3 years ago
Property
3 years ago
ResourceDescriptor
3 years ago
Advice.php
3 years ago
AuthProvider.php
3 years ago
AuthRequirement.php
3 years ago
Authentication.php
3 years ago
AuthenticationRule.php
3 years ago
Backend.php
3 years ago
BackendRule.php
3 years ago
BackendRule_PathTranslation.php
3 years ago
Billing.php
3 years ago
Billing_BillingDestination.php
3 years ago
ChangeType.php
3 years ago
ConfigChange.php
3 years ago
Context.php
3 years ago
ContextRule.php
3 years ago
Control.php
3 years ago
CustomHttpPattern.php
3 years ago
Distribution.php
3 years ago
Distribution_BucketOptions.php
3 years ago
Distribution_BucketOptions_Explicit.php
3 years ago
Distribution_BucketOptions_Exponential.php
3 years ago
Distribution_BucketOptions_Linear.php
3 years ago
Distribution_Exemplar.php
3 years ago
Distribution_Range.php
3 years ago
Documentation.php
3 years ago
DocumentationRule.php
3 years ago
Endpoint.php
3 years ago
FieldBehavior.php
3 years ago
Http.php
3 years ago
HttpBody.php
3 years ago
HttpRule.php
3 years ago
LabelDescriptor.php
3 years ago
LabelDescriptor_ValueType.php
3 years ago
LaunchStage.php
3 years ago
LogDescriptor.php
3 years ago
Logging.php
3 years ago
Logging_LoggingDestination.php
3 years ago
Metric.php
3 years ago
MetricDescriptor.php
3 years ago
MetricDescriptor_MetricDescriptorMetadata.php
3 years ago
MetricDescriptor_MetricKind.php
3 years ago
MetricDescriptor_ValueType.php
3 years ago
MetricRule.php
3 years ago
MonitoredResource.php
3 years ago
MonitoredResourceDescriptor.php
3 years ago
MonitoredResourceMetadata.php
3 years ago
Monitoring.php
3 years ago
Monitoring_MonitoringDestination.php
3 years ago
OAuthRequirements.php
3 years ago
Page.php
3 years ago
ProjectProperties.php
3 years ago
Property.php
3 years ago
Property_PropertyType.php
3 years ago
Quota.php
3 years ago
QuotaLimit.php
3 years ago
ResourceDescriptor.php
3 years ago
ResourceDescriptor_History.php
3 years ago
ResourceReference.php
3 years ago
RoutingParameter.php
3 years ago
RoutingRule.php
3 years ago
Service.php
3 years ago
SourceInfo.php
3 years ago
SystemParameter.php
3 years ago
SystemParameterRule.php
3 years ago
SystemParameters.php
3 years ago
Usage.php
3 years ago
UsageRule.php
3 years ago
MetricRule.php
125 lines
| 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/api/quota.proto |
| 4 | |
| 5 | namespace Google\Api; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\RepeatedField; |
| 9 | use Google\Protobuf\Internal\GPBUtil; |
| 10 | |
| 11 | /** |
| 12 | * Bind API methods to metrics. Binding a method to a metric causes that |
| 13 | * metric's configured quota, billing, and monitoring behaviors to apply to the |
| 14 | * method call. |
| 15 | * Used by metric-based quotas only. |
| 16 | * |
| 17 | * Generated from protobuf message <code>google.api.MetricRule</code> |
| 18 | */ |
| 19 | class MetricRule extends \Google\Protobuf\Internal\Message |
| 20 | { |
| 21 | /** |
| 22 | * Selects the methods to which this rule applies. |
| 23 | * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. |
| 24 | * |
| 25 | * Generated from protobuf field <code>string selector = 1;</code> |
| 26 | */ |
| 27 | private $selector = ''; |
| 28 | /** |
| 29 | * Metrics to update when the selected methods are called, and the associated |
| 30 | * cost applied to each metric. |
| 31 | * The key of the map is the metric name, and the values are the amount |
| 32 | * increased for the metric against which the quota limits are defined. |
| 33 | * The value must not be negative. |
| 34 | * |
| 35 | * Generated from protobuf field <code>map<string, int64> metric_costs = 2;</code> |
| 36 | */ |
| 37 | private $metric_costs; |
| 38 | |
| 39 | /** |
| 40 | * Constructor. |
| 41 | * |
| 42 | * @param array $data { |
| 43 | * Optional. Data for populating the Message object. |
| 44 | * |
| 45 | * @type string $selector |
| 46 | * Selects the methods to which this rule applies. |
| 47 | * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. |
| 48 | * @type array|\Google\Protobuf\Internal\MapField $metric_costs |
| 49 | * Metrics to update when the selected methods are called, and the associated |
| 50 | * cost applied to each metric. |
| 51 | * The key of the map is the metric name, and the values are the amount |
| 52 | * increased for the metric against which the quota limits are defined. |
| 53 | * The value must not be negative. |
| 54 | * } |
| 55 | */ |
| 56 | public function __construct($data = NULL) { |
| 57 | \GPBMetadata\Google\Api\Quota::initOnce(); |
| 58 | parent::__construct($data); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Selects the methods to which this rule applies. |
| 63 | * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. |
| 64 | * |
| 65 | * Generated from protobuf field <code>string selector = 1;</code> |
| 66 | * @return string |
| 67 | */ |
| 68 | public function getSelector() |
| 69 | { |
| 70 | return $this->selector; |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Selects the methods to which this rule applies. |
| 75 | * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. |
| 76 | * |
| 77 | * Generated from protobuf field <code>string selector = 1;</code> |
| 78 | * @param string $var |
| 79 | * @return $this |
| 80 | */ |
| 81 | public function setSelector($var) |
| 82 | { |
| 83 | GPBUtil::checkString($var, True); |
| 84 | $this->selector = $var; |
| 85 | |
| 86 | return $this; |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * Metrics to update when the selected methods are called, and the associated |
| 91 | * cost applied to each metric. |
| 92 | * The key of the map is the metric name, and the values are the amount |
| 93 | * increased for the metric against which the quota limits are defined. |
| 94 | * The value must not be negative. |
| 95 | * |
| 96 | * Generated from protobuf field <code>map<string, int64> metric_costs = 2;</code> |
| 97 | * @return \Google\Protobuf\Internal\MapField |
| 98 | */ |
| 99 | public function getMetricCosts() |
| 100 | { |
| 101 | return $this->metric_costs; |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Metrics to update when the selected methods are called, and the associated |
| 106 | * cost applied to each metric. |
| 107 | * The key of the map is the metric name, and the values are the amount |
| 108 | * increased for the metric against which the quota limits are defined. |
| 109 | * The value must not be negative. |
| 110 | * |
| 111 | * Generated from protobuf field <code>map<string, int64> metric_costs = 2;</code> |
| 112 | * @param array|\Google\Protobuf\Internal\MapField $var |
| 113 | * @return $this |
| 114 | */ |
| 115 | public function setMetricCosts($var) |
| 116 | { |
| 117 | $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); |
| 118 | $this->metric_costs = $arr; |
| 119 | |
| 120 | return $this; |
| 121 | } |
| 122 | |
| 123 | } |
| 124 | |
| 125 |