summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php
blob: 839c097fb0b32ffd847b9447a829806b5381a8a2 (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
<?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\Schedule;

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

/**
 * A light-weight pattern that can match 1 or more
 * metrics, for which this schedule will apply. The string is used to
 * match against metric names. It should not exceed 100k characters.
 *
 * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern</code>
 */
class Pattern extends \Google\Protobuf\Internal\Message
{
    protected $match;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $equals
     *           matches the metric name exactly
     *     @type string $starts_with
     *           prefix-matches the metric name
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
        parent::__construct($data);
    }

    /**
     * matches the metric name exactly
     *
     * Generated from protobuf field <code>string equals = 1;</code>
     * @return string
     */
    public function getEquals()
    {
        return $this->readOneof(1);
    }

    public function hasEquals()
    {
        return $this->hasOneof(1);
    }

    /**
     * matches the metric name exactly
     *
     * Generated from protobuf field <code>string equals = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setEquals($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * prefix-matches the metric name
     *
     * Generated from protobuf field <code>string starts_with = 2;</code>
     * @return string
     */
    public function getStartsWith()
    {
        return $this->readOneof(2);
    }

    public function hasStartsWith()
    {
        return $this->hasOneof(2);
    }

    /**
     * prefix-matches the metric name
     *
     * Generated from protobuf field <code>string starts_with = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setStartsWith($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getMatch()
    {
        return $this->whichOneof("match");
    }

}

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