summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php
blob: 0251ecd9f7fe447688a6d0b0e6eeae85ad2d50b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: opentelemetry/proto/metrics/v1/metrics.proto

namespace Opentelemetry\Proto\Metrics\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Sum represents the type of a scalar metric that is calculated as a sum of all
 * reported measurements over a time interval.
 *
 * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Sum</code>
 */
class Sum extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
     */
    private $data_points;
    /**
     * aggregation_temporality describes if the aggregator reports delta changes
     * since last report time, or cumulative changes since a fixed start time.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
     */
    protected $aggregation_temporality = 0;
    /**
     * If "true" means that the sum is monotonic.
     *
     * Generated from protobuf field <code>bool is_monotonic = 3;</code>
     */
    protected $is_monotonic = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
     *     @type int $aggregation_temporality
     *           aggregation_temporality describes if the aggregator reports delta changes
     *           since last report time, or cumulative changes since a fixed start time.
     *     @type bool $is_monotonic
     *           If "true" means that the sum is monotonic.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDataPoints()
    {
        return $this->data_points;
    }

    /**
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
     * @param \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDataPoints($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\NumberDataPoint::class);
        $this->data_points = $arr;

        return $this;
    }

    /**
     * aggregation_temporality describes if the aggregator reports delta changes
     * since last report time, or cumulative changes since a fixed start time.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
     * @return int
     */
    public function getAggregationTemporality()
    {
        return $this->aggregation_temporality;
    }

    /**
     * aggregation_temporality describes if the aggregator reports delta changes
     * since last report time, or cumulative changes since a fixed start time.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setAggregationTemporality($var)
    {
        GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
        $this->aggregation_temporality = $var;

        return $this;
    }

    /**
     * If "true" means that the sum is monotonic.
     *
     * Generated from protobuf field <code>bool is_monotonic = 3;</code>
     * @return bool
     */
    public function getIsMonotonic()
    {
        return $this->is_monotonic;
    }

    /**
     * If "true" means that the sum is monotonic.
     *
     * Generated from protobuf field <code>bool is_monotonic = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsMonotonic($var)
    {
        GPBUtil::checkBool($var);
        $this->is_monotonic = $var;

        return $this;
    }

}