summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php
blob: 07091928dd3aef1e6f760c2b7109d73a258e825b (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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto

namespace Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse;

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

/**
 * A Schedule is used to apply a particular scheduling configuration to
 * a metric. If a metric name matches a schedule's patterns, then the metric
 * adopts the configuration specified by the schedule.
 *
 * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule</code>
 */
class Schedule extends \Google\Protobuf\Internal\Message
{
    /**
     * Metrics with names that match a rule in the inclusion_patterns are
     * targeted by this schedule. Metrics that match the exclusion_patterns
     * are not targeted for this schedule, even if they match an inclusion
     * pattern.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
     */
    private $exclusion_patterns;
    /**
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
     */
    private $inclusion_patterns;
    /**
     * Describes the collection period for each metric in seconds.
     * A period of 0 means to not export.
     *
     * Generated from protobuf field <code>int32 period_sec = 3;</code>
     */
    protected $period_sec = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $exclusion_patterns
     *           Metrics with names that match a rule in the inclusion_patterns are
     *           targeted by this schedule. Metrics that match the exclusion_patterns
     *           are not targeted for this schedule, even if they match an inclusion
     *           pattern.
     *     @type \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $inclusion_patterns
     *     @type int $period_sec
     *           Describes the collection period for each metric in seconds.
     *           A period of 0 means to not export.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
        parent::__construct($data);
    }

    /**
     * Metrics with names that match a rule in the inclusion_patterns are
     * targeted by this schedule. Metrics that match the exclusion_patterns
     * are not targeted for this schedule, even if they match an inclusion
     * pattern.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getExclusionPatterns()
    {
        return $this->exclusion_patterns;
    }

    /**
     * Metrics with names that match a rule in the inclusion_patterns are
     * targeted by this schedule. Metrics that match the exclusion_patterns
     * are not targeted for this schedule, even if they match an inclusion
     * pattern.
     *
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
     * @param \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setExclusionPatterns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern::class);
        $this->exclusion_patterns = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInclusionPatterns()
    {
        return $this->inclusion_patterns;
    }

    /**
     * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
     * @param \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInclusionPatterns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern::class);
        $this->inclusion_patterns = $arr;

        return $this;
    }

    /**
     * Describes the collection period for each metric in seconds.
     * A period of 0 means to not export.
     *
     * Generated from protobuf field <code>int32 period_sec = 3;</code>
     * @return int
     */
    public function getPeriodSec()
    {
        return $this->period_sec;
    }

    /**
     * Describes the collection period for each metric in seconds.
     * A period of 0 means to not export.
     *
     * Generated from protobuf field <code>int32 period_sec = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPeriodSec($var)
    {
        GPBUtil::checkInt32($var);
        $this->period_sec = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Schedule::class, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule::class);