Repository navigation
Expand file tree
/
Copy pathMetricStructuredName.php
More file actions
156 lines (141 loc) · 5.13 KB
/
Copy pathMetricStructuredName.php
File metadata and controls
156 lines (141 loc) · 5.13 KB
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
150
151
152
153
154
155
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/dataflow/v1beta3/metrics.proto
namespace Google\Cloud\Dataflow\V1beta3;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Identifies a metric, by describing the source which generated the
* metric.
*
* Generated from protobuf message <code>google.dataflow.v1beta3.MetricStructuredName</code>
*/
class MetricStructuredName extends \Google\Protobuf\Internal\Message
{
/**
* Origin (namespace) of metric name. May be blank for user-define metrics;
* will be "dataflow" for metrics defined by the Dataflow service or SDK.
*
* Generated from protobuf field <code>string origin = 1;</code>
*/
private $origin = '';
/**
* Worker-defined metric name.
*
* Generated from protobuf field <code>string name = 2;</code>
*/
private $name = '';
/**
* Zero or more labeled fields which identify the part of the job this
* metric is associated with, such as the name of a step or collection.
* For example, built-in counters associated with steps will have
* context['step'] = <step-name>. Counters associated with PCollections
* in the SDK will have context['pcollection'] = <pcollection-name>.
*
* Generated from protobuf field <code>map<string, string> context = 3;</code>
*/
private $context;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $origin
* Origin (namespace) of metric name. May be blank for user-define metrics;
* will be "dataflow" for metrics defined by the Dataflow service or SDK.
* @type string $name
* Worker-defined metric name.
* @type array|\Google\Protobuf\Internal\MapField $context
* Zero or more labeled fields which identify the part of the job this
* metric is associated with, such as the name of a step or collection.
* For example, built-in counters associated with steps will have
* context['step'] = <step-name>. Counters associated with PCollections
* in the SDK will have context['pcollection'] = <pcollection-name>.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Dataflow\V1Beta3\Metrics::initOnce();
parent::__construct($data);
}
/**
* Origin (namespace) of metric name. May be blank for user-define metrics;
* will be "dataflow" for metrics defined by the Dataflow service or SDK.
*
* Generated from protobuf field <code>string origin = 1;</code>
* @return string
*/
public function getOrigin()
{
return $this->origin;
}
/**
* Origin (namespace) of metric name. May be blank for user-define metrics;
* will be "dataflow" for metrics defined by the Dataflow service or SDK.
*
* Generated from protobuf field <code>string origin = 1;</code>
* @param string $var
* @return $this
*/
public function setOrigin($var)
{
GPBUtil::checkString($var, True);
$this->origin = $var;
return $this;
}
/**
* Worker-defined metric name.
*
* Generated from protobuf field <code>string name = 2;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Worker-defined metric name.
*
* Generated from protobuf field <code>string name = 2;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Zero or more labeled fields which identify the part of the job this
* metric is associated with, such as the name of a step or collection.
* For example, built-in counters associated with steps will have
* context['step'] = <step-name>. Counters associated with PCollections
* in the SDK will have context['pcollection'] = <pcollection-name>.
*
* Generated from protobuf field <code>map<string, string> context = 3;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getContext()
{
return $this->context;
}
/**
* Zero or more labeled fields which identify the part of the job this
* metric is associated with, such as the name of a step or collection.
* For example, built-in counters associated with steps will have
* context['step'] = <step-name>. Counters associated with PCollections
* in the SDK will have context['pcollection'] = <pcollection-name>.
*
* Generated from protobuf field <code>map<string, string> context = 3;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setContext($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->context = $arr;
return $this;
}
}