-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathAppendRowsResponse.php
More file actions
279 lines (253 loc) · 10.2 KB
/
AppendRowsResponse.php
File metadata and controls
279 lines (253 loc) · 10.2 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
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/bigquery/storage/v1/storage.proto
namespace Google\Cloud\BigQuery\Storage\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* Response message for `AppendRows`.
*
* Generated from protobuf message <code>google.cloud.bigquery.storage.v1.AppendRowsResponse</code>
*/
class AppendRowsResponse extends \Google\Protobuf\Internal\Message
{
/**
* If backend detects a schema update, pass it to user so that user can
* use it to input new type of message. It will be empty when no schema
* updates have occurred.
*
* Generated from protobuf field <code>.google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3;</code>
*/
protected $updated_schema = null;
/**
* If a request failed due to corrupted rows, no rows in the batch will be
* appended. The API will return row level error info, so that the caller can
* remove the bad rows and retry the request.
*
* Generated from protobuf field <code>repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4;</code>
*/
private $row_errors;
/**
* The target of the append operation. Matches the write_stream in the
* corresponding request.
*
* Generated from protobuf field <code>string write_stream = 5;</code>
*/
protected $write_stream = '';
protected $response;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $append_result
* Result if the append is successful.
* @type \Google\Rpc\Status $error
* Error returned when problems were encountered. If present,
* it indicates rows were not accepted into the system.
* Users can retry or continue with other append requests within the
* same connection.
* Additional information about error signalling:
* ALREADY_EXISTS: Happens when an append specified an offset, and the
* backend already has received data at this offset. Typically encountered
* in retry scenarios, and can be ignored.
* OUT_OF_RANGE: Returned when the specified offset in the stream is beyond
* the current end of the stream.
* INVALID_ARGUMENT: Indicates a malformed request or data.
* ABORTED: Request processing is aborted because of prior failures. The
* request can be retried if previous failure is addressed.
* INTERNAL: Indicates server side error(s) that can be retried.
* @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $updated_schema
* If backend detects a schema update, pass it to user so that user can
* use it to input new type of message. It will be empty when no schema
* updates have occurred.
* @type \Google\Cloud\BigQuery\Storage\V1\RowError[] $row_errors
* If a request failed due to corrupted rows, no rows in the batch will be
* appended. The API will return row level error info, so that the caller can
* remove the bad rows and retry the request.
* @type string $write_stream
* The target of the append operation. Matches the write_stream in the
* corresponding request.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce();
parent::__construct($data);
}
/**
* Result if the append is successful.
*
* Generated from protobuf field <code>.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1;</code>
* @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult|null
*/
public function getAppendResult()
{
return $this->readOneof(1);
}
public function hasAppendResult()
{
return $this->hasOneof(1);
}
/**
* Result if the append is successful.
*
* Generated from protobuf field <code>.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1;</code>
* @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $var
* @return $this
*/
public function setAppendResult($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult::class);
$this->writeOneof(1, $var);
return $this;
}
/**
* Error returned when problems were encountered. If present,
* it indicates rows were not accepted into the system.
* Users can retry or continue with other append requests within the
* same connection.
* Additional information about error signalling:
* ALREADY_EXISTS: Happens when an append specified an offset, and the
* backend already has received data at this offset. Typically encountered
* in retry scenarios, and can be ignored.
* OUT_OF_RANGE: Returned when the specified offset in the stream is beyond
* the current end of the stream.
* INVALID_ARGUMENT: Indicates a malformed request or data.
* ABORTED: Request processing is aborted because of prior failures. The
* request can be retried if previous failure is addressed.
* INTERNAL: Indicates server side error(s) that can be retried.
*
* Generated from protobuf field <code>.google.rpc.Status error = 2;</code>
* @return \Google\Rpc\Status|null
*/
public function getError()
{
return $this->readOneof(2);
}
public function hasError()
{
return $this->hasOneof(2);
}
/**
* Error returned when problems were encountered. If present,
* it indicates rows were not accepted into the system.
* Users can retry or continue with other append requests within the
* same connection.
* Additional information about error signalling:
* ALREADY_EXISTS: Happens when an append specified an offset, and the
* backend already has received data at this offset. Typically encountered
* in retry scenarios, and can be ignored.
* OUT_OF_RANGE: Returned when the specified offset in the stream is beyond
* the current end of the stream.
* INVALID_ARGUMENT: Indicates a malformed request or data.
* ABORTED: Request processing is aborted because of prior failures. The
* request can be retried if previous failure is addressed.
* INTERNAL: Indicates server side error(s) that can be retried.
*
* Generated from protobuf field <code>.google.rpc.Status error = 2;</code>
* @param \Google\Rpc\Status $var
* @return $this
*/
public function setError($var)
{
GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
$this->writeOneof(2, $var);
return $this;
}
/**
* If backend detects a schema update, pass it to user so that user can
* use it to input new type of message. It will be empty when no schema
* updates have occurred.
*
* Generated from protobuf field <code>.google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3;</code>
* @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null
*/
public function getUpdatedSchema()
{
return $this->updated_schema;
}
public function hasUpdatedSchema()
{
return isset($this->updated_schema);
}
public function clearUpdatedSchema()
{
unset($this->updated_schema);
}
/**
* If backend detects a schema update, pass it to user so that user can
* use it to input new type of message. It will be empty when no schema
* updates have occurred.
*
* Generated from protobuf field <code>.google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3;</code>
* @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var
* @return $this
*/
public function setUpdatedSchema($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class);
$this->updated_schema = $var;
return $this;
}
/**
* If a request failed due to corrupted rows, no rows in the batch will be
* appended. The API will return row level error info, so that the caller can
* remove the bad rows and retry the request.
*
* Generated from protobuf field <code>repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4;</code>
* @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\RowError>
*/
public function getRowErrors()
{
return $this->row_errors;
}
/**
* If a request failed due to corrupted rows, no rows in the batch will be
* appended. The API will return row level error info, so that the caller can
* remove the bad rows and retry the request.
*
* Generated from protobuf field <code>repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4;</code>
* @param \Google\Cloud\BigQuery\Storage\V1\RowError[] $var
* @return $this
*/
public function setRowErrors($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\RowError::class);
$this->row_errors = $arr;
return $this;
}
/**
* The target of the append operation. Matches the write_stream in the
* corresponding request.
*
* Generated from protobuf field <code>string write_stream = 5;</code>
* @return string
*/
public function getWriteStream()
{
return $this->write_stream;
}
/**
* The target of the append operation. Matches the write_stream in the
* corresponding request.
*
* Generated from protobuf field <code>string write_stream = 5;</code>
* @param string $var
* @return $this
*/
public function setWriteStream($var)
{
GPBUtil::checkString($var, True);
$this->write_stream = $var;
return $this;
}
/**
* @return string
*/
public function getResponse()
{
return $this->whichOneof("response");
}
}