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
Quota.php
153 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 | * Quota configuration helps to achieve fairness and budgeting in service |
| 13 | * usage. |
| 14 | * The quota configuration works this way: |
| 15 | * - The service configuration defines a set of metrics. |
| 16 | * - For API calls, the quota.metric_rules maps methods to metrics with |
| 17 | * corresponding costs. |
| 18 | * - The quota.limits defines limits on the metrics, which will be used for |
| 19 | * quota checks at runtime. |
| 20 | * An example quota configuration in yaml format: |
| 21 | * quota: |
| 22 | * limits: |
| 23 | * - name: apiWriteQpsPerProject |
| 24 | * metric: library.googleapis.com/write_calls |
| 25 | * unit: "1/min/{project}" # rate limit for consumer projects |
| 26 | * values: |
| 27 | * STANDARD: 10000 |
| 28 | * # The metric rules bind all methods to the read_calls metric, |
| 29 | * # except for the UpdateBook and DeleteBook methods. These two methods |
| 30 | * # are mapped to the write_calls metric, with the UpdateBook method |
| 31 | * # consuming at twice rate as the DeleteBook method. |
| 32 | * metric_rules: |
| 33 | * - selector: "*" |
| 34 | * metric_costs: |
| 35 | * library.googleapis.com/read_calls: 1 |
| 36 | * - selector: google.example.library.v1.LibraryService.UpdateBook |
| 37 | * metric_costs: |
| 38 | * library.googleapis.com/write_calls: 2 |
| 39 | * - selector: google.example.library.v1.LibraryService.DeleteBook |
| 40 | * metric_costs: |
| 41 | * library.googleapis.com/write_calls: 1 |
| 42 | * Corresponding Metric definition: |
| 43 | * metrics: |
| 44 | * - name: library.googleapis.com/read_calls |
| 45 | * display_name: Read requests |
| 46 | * metric_kind: DELTA |
| 47 | * value_type: INT64 |
| 48 | * - name: library.googleapis.com/write_calls |
| 49 | * display_name: Write requests |
| 50 | * metric_kind: DELTA |
| 51 | * value_type: INT64 |
| 52 | * |
| 53 | * Generated from protobuf message <code>google.api.Quota</code> |
| 54 | */ |
| 55 | class Quota extends \Google\Protobuf\Internal\Message |
| 56 | { |
| 57 | /** |
| 58 | * List of `QuotaLimit` definitions for the service. |
| 59 | * Used by metric-based quotas only. |
| 60 | * |
| 61 | * Generated from protobuf field <code>repeated .google.api.QuotaLimit limits = 3;</code> |
| 62 | */ |
| 63 | private $limits; |
| 64 | /** |
| 65 | * List of `MetricRule` definitions, each one mapping a selected method to one |
| 66 | * or more metrics. |
| 67 | * Used by metric-based quotas only. |
| 68 | * |
| 69 | * Generated from protobuf field <code>repeated .google.api.MetricRule metric_rules = 4;</code> |
| 70 | */ |
| 71 | private $metric_rules; |
| 72 | |
| 73 | /** |
| 74 | * Constructor. |
| 75 | * |
| 76 | * @param array $data { |
| 77 | * Optional. Data for populating the Message object. |
| 78 | * |
| 79 | * @type \Google\Api\QuotaLimit[]|\Google\Protobuf\Internal\RepeatedField $limits |
| 80 | * List of `QuotaLimit` definitions for the service. |
| 81 | * Used by metric-based quotas only. |
| 82 | * @type \Google\Api\MetricRule[]|\Google\Protobuf\Internal\RepeatedField $metric_rules |
| 83 | * List of `MetricRule` definitions, each one mapping a selected method to one |
| 84 | * or more metrics. |
| 85 | * Used by metric-based quotas only. |
| 86 | * } |
| 87 | */ |
| 88 | public function __construct($data = NULL) { |
| 89 | \GPBMetadata\Google\Api\Quota::initOnce(); |
| 90 | parent::__construct($data); |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * List of `QuotaLimit` definitions for the service. |
| 95 | * Used by metric-based quotas only. |
| 96 | * |
| 97 | * Generated from protobuf field <code>repeated .google.api.QuotaLimit limits = 3;</code> |
| 98 | * @return \Google\Protobuf\Internal\RepeatedField |
| 99 | */ |
| 100 | public function getLimits() |
| 101 | { |
| 102 | return $this->limits; |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * List of `QuotaLimit` definitions for the service. |
| 107 | * Used by metric-based quotas only. |
| 108 | * |
| 109 | * Generated from protobuf field <code>repeated .google.api.QuotaLimit limits = 3;</code> |
| 110 | * @param \Google\Api\QuotaLimit[]|\Google\Protobuf\Internal\RepeatedField $var |
| 111 | * @return $this |
| 112 | */ |
| 113 | public function setLimits($var) |
| 114 | { |
| 115 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\QuotaLimit::class); |
| 116 | $this->limits = $arr; |
| 117 | |
| 118 | return $this; |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * List of `MetricRule` definitions, each one mapping a selected method to one |
| 123 | * or more metrics. |
| 124 | * Used by metric-based quotas only. |
| 125 | * |
| 126 | * Generated from protobuf field <code>repeated .google.api.MetricRule metric_rules = 4;</code> |
| 127 | * @return \Google\Protobuf\Internal\RepeatedField |
| 128 | */ |
| 129 | public function getMetricRules() |
| 130 | { |
| 131 | return $this->metric_rules; |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * List of `MetricRule` definitions, each one mapping a selected method to one |
| 136 | * or more metrics. |
| 137 | * Used by metric-based quotas only. |
| 138 | * |
| 139 | * Generated from protobuf field <code>repeated .google.api.MetricRule metric_rules = 4;</code> |
| 140 | * @param \Google\Api\MetricRule[]|\Google\Protobuf\Internal\RepeatedField $var |
| 141 | * @return $this |
| 142 | */ |
| 143 | public function setMetricRules($var) |
| 144 | { |
| 145 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MetricRule::class); |
| 146 | $this->metric_rules = $arr; |
| 147 | |
| 148 | return $this; |
| 149 | } |
| 150 | |
| 151 | } |
| 152 | |
| 153 |