googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Api
/
Distribution
/
BucketOptions.php
googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Api
/
Distribution
Last commit date
BucketOptions
3 years ago
BucketOptions.php
3 years ago
Exemplar.php
3 years ago
Range.php
3 years ago
BucketOptions.php
143 lines
| 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/api/distribution.proto |
| 4 | |
| 5 | namespace Google\Api\Distribution; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\RepeatedField; |
| 9 | use Google\Protobuf\Internal\GPBUtil; |
| 10 | |
| 11 | /** |
| 12 | * `BucketOptions` describes the bucket boundaries used to create a histogram |
| 13 | * for the distribution. The buckets can be in a linear sequence, an |
| 14 | * exponential sequence, or each bucket can be specified explicitly. |
| 15 | * `BucketOptions` does not include the number of values in each bucket. |
| 16 | * A bucket has an inclusive lower bound and exclusive upper bound for the |
| 17 | * values that are counted for that bucket. The upper bound of a bucket must |
| 18 | * be strictly greater than the lower bound. The sequence of N buckets for a |
| 19 | * distribution consists of an underflow bucket (number 0), zero or more |
| 20 | * finite buckets (number 1 through N - 2) and an overflow bucket (number N - |
| 21 | * 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the |
| 22 | * same as the upper bound of bucket i - 1. The buckets span the whole range |
| 23 | * of finite values: lower bound of the underflow bucket is -infinity and the |
| 24 | * upper bound of the overflow bucket is +infinity. The finite buckets are |
| 25 | * so-called because both bounds are finite. |
| 26 | * |
| 27 | * Generated from protobuf message <code>google.api.Distribution.BucketOptions</code> |
| 28 | */ |
| 29 | class BucketOptions extends \Google\Protobuf\Internal\Message |
| 30 | { |
| 31 | protected $options; |
| 32 | |
| 33 | /** |
| 34 | * Constructor. |
| 35 | * |
| 36 | * @param array $data { |
| 37 | * Optional. Data for populating the Message object. |
| 38 | * |
| 39 | * @type \Google\Api\Distribution\BucketOptions\Linear $linear_buckets |
| 40 | * The linear bucket. |
| 41 | * @type \Google\Api\Distribution\BucketOptions\Exponential $exponential_buckets |
| 42 | * The exponential buckets. |
| 43 | * @type \Google\Api\Distribution\BucketOptions\Explicit $explicit_buckets |
| 44 | * The explicit buckets. |
| 45 | * } |
| 46 | */ |
| 47 | public function __construct($data = NULL) { |
| 48 | \GPBMetadata\Google\Api\Distribution::initOnce(); |
| 49 | parent::__construct($data); |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * The linear bucket. |
| 54 | * |
| 55 | * Generated from protobuf field <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code> |
| 56 | * @return \Google\Api\Distribution\BucketOptions\Linear |
| 57 | */ |
| 58 | public function getLinearBuckets() |
| 59 | { |
| 60 | return $this->readOneof(1); |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * The linear bucket. |
| 65 | * |
| 66 | * Generated from protobuf field <code>.google.api.Distribution.BucketOptions.Linear linear_buckets = 1;</code> |
| 67 | * @param \Google\Api\Distribution\BucketOptions\Linear $var |
| 68 | * @return $this |
| 69 | */ |
| 70 | public function setLinearBuckets($var) |
| 71 | { |
| 72 | GPBUtil::checkMessage($var, \Google\Api\Distribution_BucketOptions_Linear::class); |
| 73 | $this->writeOneof(1, $var); |
| 74 | |
| 75 | return $this; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * The exponential buckets. |
| 80 | * |
| 81 | * Generated from protobuf field <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code> |
| 82 | * @return \Google\Api\Distribution\BucketOptions\Exponential |
| 83 | */ |
| 84 | public function getExponentialBuckets() |
| 85 | { |
| 86 | return $this->readOneof(2); |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * The exponential buckets. |
| 91 | * |
| 92 | * Generated from protobuf field <code>.google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2;</code> |
| 93 | * @param \Google\Api\Distribution\BucketOptions\Exponential $var |
| 94 | * @return $this |
| 95 | */ |
| 96 | public function setExponentialBuckets($var) |
| 97 | { |
| 98 | GPBUtil::checkMessage($var, \Google\Api\Distribution_BucketOptions_Exponential::class); |
| 99 | $this->writeOneof(2, $var); |
| 100 | |
| 101 | return $this; |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * The explicit buckets. |
| 106 | * |
| 107 | * Generated from protobuf field <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code> |
| 108 | * @return \Google\Api\Distribution\BucketOptions\Explicit |
| 109 | */ |
| 110 | public function getExplicitBuckets() |
| 111 | { |
| 112 | return $this->readOneof(3); |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * The explicit buckets. |
| 117 | * |
| 118 | * Generated from protobuf field <code>.google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;</code> |
| 119 | * @param \Google\Api\Distribution\BucketOptions\Explicit $var |
| 120 | * @return $this |
| 121 | */ |
| 122 | public function setExplicitBuckets($var) |
| 123 | { |
| 124 | GPBUtil::checkMessage($var, \Google\Api\Distribution_BucketOptions_Explicit::class); |
| 125 | $this->writeOneof(3, $var); |
| 126 | |
| 127 | return $this; |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * @return string |
| 132 | */ |
| 133 | public function getOptions() |
| 134 | { |
| 135 | return $this->whichOneof("options"); |
| 136 | } |
| 137 | |
| 138 | } |
| 139 | |
| 140 | // Adding a class alias for backwards compatibility with the previous class name. |
| 141 | class_alias(BucketOptions::class, \Google\Api\Distribution_BucketOptions::class); |
| 142 | |
| 143 |