-
Notifications
You must be signed in to change notification settings - Fork 460
Expand file tree
/
Copy pathInputConfig.php
More file actions
281 lines (250 loc) · 9.82 KB
/
InputConfig.php
File metadata and controls
281 lines (250 loc) · 9.82 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/datalabeling/v1beta1/dataset.proto
namespace Google\Cloud\DataLabeling\V1beta1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* The configuration of input data, including data type, location, etc.
*
* Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.InputConfig</code>
*/
class InputConfig extends \Google\Protobuf\Internal\Message
{
/**
* Required. Data type must be specifed when user tries to import data.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.DataType data_type = 1;</code>
*/
protected $data_type = 0;
/**
* Optional. The type of annotation to be performed on this data. You must
* specify this field if you are using this InputConfig in an
* [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 3;</code>
*/
protected $annotation_type = 0;
/**
* Optional. Metadata about annotations for the input. You must specify this
* field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] for a
* model version that performs classification.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ClassificationMetadata classification_metadata = 4;</code>
*/
protected $classification_metadata = null;
protected $data_type_metadata;
protected $source;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Google\Cloud\DataLabeling\V1beta1\TextMetadata $text_metadata
* Required for text import, as language code must be specified.
* @type \Google\Cloud\DataLabeling\V1beta1\GcsSource $gcs_source
* Source located in Cloud Storage.
* @type \Google\Cloud\DataLabeling\V1beta1\BigQuerySource $bigquery_source
* Source located in BigQuery. You must specify this field if you are using
* this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].
* @type int $data_type
* Required. Data type must be specifed when user tries to import data.
* @type int $annotation_type
* Optional. The type of annotation to be performed on this data. You must
* specify this field if you are using this InputConfig in an
* [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].
* @type \Google\Cloud\DataLabeling\V1beta1\ClassificationMetadata $classification_metadata
* Optional. Metadata about annotations for the input. You must specify this
* field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] for a
* model version that performs classification.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Dataset::initOnce();
parent::__construct($data);
}
/**
* Required for text import, as language code must be specified.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TextMetadata text_metadata = 6;</code>
* @return \Google\Cloud\DataLabeling\V1beta1\TextMetadata|null
*/
public function getTextMetadata()
{
return $this->readOneof(6);
}
public function hasTextMetadata()
{
return $this->hasOneof(6);
}
/**
* Required for text import, as language code must be specified.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TextMetadata text_metadata = 6;</code>
* @param \Google\Cloud\DataLabeling\V1beta1\TextMetadata $var
* @return $this
*/
public function setTextMetadata($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\TextMetadata::class);
$this->writeOneof(6, $var);
return $this;
}
/**
* Source located in Cloud Storage.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2;</code>
* @return \Google\Cloud\DataLabeling\V1beta1\GcsSource|null
*/
public function getGcsSource()
{
return $this->readOneof(2);
}
public function hasGcsSource()
{
return $this->hasOneof(2);
}
/**
* Source located in Cloud Storage.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2;</code>
* @param \Google\Cloud\DataLabeling\V1beta1\GcsSource $var
* @return $this
*/
public function setGcsSource($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\GcsSource::class);
$this->writeOneof(2, $var);
return $this;
}
/**
* Source located in BigQuery. You must specify this field if you are using
* this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.BigQuerySource bigquery_source = 5;</code>
* @return \Google\Cloud\DataLabeling\V1beta1\BigQuerySource|null
*/
public function getBigquerySource()
{
return $this->readOneof(5);
}
public function hasBigquerySource()
{
return $this->hasOneof(5);
}
/**
* Source located in BigQuery. You must specify this field if you are using
* this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.BigQuerySource bigquery_source = 5;</code>
* @param \Google\Cloud\DataLabeling\V1beta1\BigQuerySource $var
* @return $this
*/
public function setBigquerySource($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\BigQuerySource::class);
$this->writeOneof(5, $var);
return $this;
}
/**
* Required. Data type must be specifed when user tries to import data.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.DataType data_type = 1;</code>
* @return int
*/
public function getDataType()
{
return $this->data_type;
}
/**
* Required. Data type must be specifed when user tries to import data.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.DataType data_type = 1;</code>
* @param int $var
* @return $this
*/
public function setDataType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\DataLabeling\V1beta1\DataType::class);
$this->data_type = $var;
return $this;
}
/**
* Optional. The type of annotation to be performed on this data. You must
* specify this field if you are using this InputConfig in an
* [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 3;</code>
* @return int
*/
public function getAnnotationType()
{
return $this->annotation_type;
}
/**
* Optional. The type of annotation to be performed on this data. You must
* specify this field if you are using this InputConfig in an
* [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 3;</code>
* @param int $var
* @return $this
*/
public function setAnnotationType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\DataLabeling\V1beta1\AnnotationType::class);
$this->annotation_type = $var;
return $this;
}
/**
* Optional. Metadata about annotations for the input. You must specify this
* field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] for a
* model version that performs classification.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ClassificationMetadata classification_metadata = 4;</code>
* @return \Google\Cloud\DataLabeling\V1beta1\ClassificationMetadata|null
*/
public function getClassificationMetadata()
{
return $this->classification_metadata;
}
public function hasClassificationMetadata()
{
return isset($this->classification_metadata);
}
public function clearClassificationMetadata()
{
unset($this->classification_metadata);
}
/**
* Optional. Metadata about annotations for the input. You must specify this
* field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] for a
* model version that performs classification.
*
* Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ClassificationMetadata classification_metadata = 4;</code>
* @param \Google\Cloud\DataLabeling\V1beta1\ClassificationMetadata $var
* @return $this
*/
public function setClassificationMetadata($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\ClassificationMetadata::class);
$this->classification_metadata = $var;
return $this;
}
/**
* @return string
*/
public function getDataTypeMetadata()
{
return $this->whichOneof("data_type_metadata");
}
/**
* @return string
*/
public function getSource()
{
return $this->whichOneof("source");
}
}