summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php
blob: bdf9ea2fab94df48e127ded809ccb021b4f65520 (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;

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

/**
 * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigRequest</code>
 */
class MetricConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource for which configuration should be returned.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
     */
    protected $resource = null;
    /**
     * Optional. The value of MetricConfigResponse.fingerprint for the last
     * configuration that the caller received and successfully applied.
     *
     * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
     */
    protected $last_known_fingerprint = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Opentelemetry\Proto\Resource\V1\Resource $resource
     *           Required. The resource for which configuration should be returned.
     *     @type string $last_known_fingerprint
     *           Optional. The value of MetricConfigResponse.fingerprint for the last
     *           configuration that the caller received and successfully applied.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource for which configuration should be returned.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
     * @return \Opentelemetry\Proto\Resource\V1\Resource
     */
    public function getResource()
    {
        return isset($this->resource) ? $this->resource : null;
    }

    public function hasResource()
    {
        return isset($this->resource);
    }

    public function clearResource()
    {
        unset($this->resource);
    }

    /**
     * Required. The resource for which configuration should be returned.
     *
     * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
     * @param \Opentelemetry\Proto\Resource\V1\Resource $var
     * @return $this
     */
    public function setResource($var)
    {
        GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
        $this->resource = $var;

        return $this;
    }

    /**
     * Optional. The value of MetricConfigResponse.fingerprint for the last
     * configuration that the caller received and successfully applied.
     *
     * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
     * @return string
     */
    public function getLastKnownFingerprint()
    {
        return $this->last_known_fingerprint;
    }

    /**
     * Optional. The value of MetricConfigResponse.fingerprint for the last
     * configuration that the caller received and successfully applied.
     *
     * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setLastKnownFingerprint($var)
    {
        GPBUtil::checkString($var, False);
        $this->last_known_fingerprint = $var;

        return $this;
    }

}