forked from googleapis/google-cloud-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAudienceExport.php
More file actions
473 lines (427 loc) · 16.8 KB
/
AudienceExport.php
File metadata and controls
473 lines (427 loc) · 16.8 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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/analytics/data/v1beta/analytics_data_api.proto
namespace Google\Analytics\Data\V1beta;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* An audience export is a list of users in an audience at the time of the
* list's creation. One audience may have multiple audience exports created for
* different days.
*
* Generated from protobuf message <code>google.analytics.data.v1beta.AudienceExport</code>
*/
class AudienceExport extends \Google\Protobuf\Internal\Message
{
/**
* Output only. Identifier. The audience export resource name assigned during
* creation. This resource name identifies this `AudienceExport`.
* Format: `properties/{property}/audienceExports/{audience_export}`
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $name = '';
/**
* Required. The audience resource name. This resource name identifies the
* audience being listed and is shared between the Analytics Data & Admin
* APIs.
* Format: `properties/{property}/audiences/{audience}`
*
* Generated from protobuf field <code>string audience = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private $audience = '';
/**
* Output only. The descriptive display name for this audience. For example,
* "Purchasers".
*
* Generated from protobuf field <code>string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $audience_display_name = '';
/**
* Required. The dimensions requested and displayed in the query response.
*
* Generated from protobuf field <code>repeated .google.analytics.data.v1beta.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private $dimensions;
/**
* Output only. The current state for this AudienceExport.
*
* Generated from protobuf field <code>optional .google.analytics.data.v1beta.AudienceExport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $state = null;
/**
* Output only. The time when CreateAudienceExport was called and the
* AudienceExport began the `CREATING` state.
*
* Generated from protobuf field <code>optional .google.protobuf.Timestamp begin_creating_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $begin_creating_time = null;
/**
* Output only. The total quota tokens charged during creation of the
* AudienceExport. Because this token count is based on activity from the
* `CREATING` state, this tokens charged will be fixed once an AudienceExport
* enters the `ACTIVE` or `FAILED` states.
*
* Generated from protobuf field <code>int32 creation_quota_tokens_charged = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $creation_quota_tokens_charged = 0;
/**
* Output only. The total number of rows in the AudienceExport result.
*
* Generated from protobuf field <code>optional int32 row_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $row_count = null;
/**
* Output only. Error message is populated when an audience export fails
* during creation. A common reason for such a failure is quota exhaustion.
*
* Generated from protobuf field <code>optional string error_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $error_message = null;
/**
* Output only. The percentage completed for this audience export ranging
* between 0 to 100.
*
* Generated from protobuf field <code>optional double percentage_completed = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $percentage_completed = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* Output only. Identifier. The audience export resource name assigned during
* creation. This resource name identifies this `AudienceExport`.
* Format: `properties/{property}/audienceExports/{audience_export}`
* @type string $audience
* Required. The audience resource name. This resource name identifies the
* audience being listed and is shared between the Analytics Data & Admin
* APIs.
* Format: `properties/{property}/audiences/{audience}`
* @type string $audience_display_name
* Output only. The descriptive display name for this audience. For example,
* "Purchasers".
* @type array<\Google\Analytics\Data\V1beta\AudienceDimension>|\Google\Protobuf\Internal\RepeatedField $dimensions
* Required. The dimensions requested and displayed in the query response.
* @type int $state
* Output only. The current state for this AudienceExport.
* @type \Google\Protobuf\Timestamp $begin_creating_time
* Output only. The time when CreateAudienceExport was called and the
* AudienceExport began the `CREATING` state.
* @type int $creation_quota_tokens_charged
* Output only. The total quota tokens charged during creation of the
* AudienceExport. Because this token count is based on activity from the
* `CREATING` state, this tokens charged will be fixed once an AudienceExport
* enters the `ACTIVE` or `FAILED` states.
* @type int $row_count
* Output only. The total number of rows in the AudienceExport result.
* @type string $error_message
* Output only. Error message is populated when an audience export fails
* during creation. A common reason for such a failure is quota exhaustion.
* @type float $percentage_completed
* Output only. The percentage completed for this audience export ranging
* between 0 to 100.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Analytics\Data\V1Beta\AnalyticsDataApi::initOnce();
parent::__construct($data);
}
/**
* Output only. Identifier. The audience export resource name assigned during
* creation. This resource name identifies this `AudienceExport`.
* Format: `properties/{property}/audienceExports/{audience_export}`
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Output only. Identifier. The audience export resource name assigned during
* creation. This resource name identifies this `AudienceExport`.
* Format: `properties/{property}/audienceExports/{audience_export}`
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Required. The audience resource name. This resource name identifies the
* audience being listed and is shared between the Analytics Data & Admin
* APIs.
* Format: `properties/{property}/audiences/{audience}`
*
* Generated from protobuf field <code>string audience = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return string
*/
public function getAudience()
{
return $this->audience;
}
/**
* Required. The audience resource name. This resource name identifies the
* audience being listed and is shared between the Analytics Data & Admin
* APIs.
* Format: `properties/{property}/audiences/{audience}`
*
* Generated from protobuf field <code>string audience = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @param string $var
* @return $this
*/
public function setAudience($var)
{
GPBUtil::checkString($var, True);
$this->audience = $var;
return $this;
}
/**
* Output only. The descriptive display name for this audience. For example,
* "Purchasers".
*
* Generated from protobuf field <code>string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getAudienceDisplayName()
{
return $this->audience_display_name;
}
/**
* Output only. The descriptive display name for this audience. For example,
* "Purchasers".
*
* Generated from protobuf field <code>string audience_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setAudienceDisplayName($var)
{
GPBUtil::checkString($var, True);
$this->audience_display_name = $var;
return $this;
}
/**
* Required. The dimensions requested and displayed in the query response.
*
* Generated from protobuf field <code>repeated .google.analytics.data.v1beta.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getDimensions()
{
return $this->dimensions;
}
/**
* Required. The dimensions requested and displayed in the query response.
*
* Generated from protobuf field <code>repeated .google.analytics.data.v1beta.AudienceDimension dimensions = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @param array<\Google\Analytics\Data\V1beta\AudienceDimension>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setDimensions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1beta\AudienceDimension::class);
$this->dimensions = $arr;
return $this;
}
/**
* Output only. The current state for this AudienceExport.
*
* Generated from protobuf field <code>optional .google.analytics.data.v1beta.AudienceExport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return int
*/
public function getState()
{
return isset($this->state) ? $this->state : 0;
}
public function hasState()
{
return isset($this->state);
}
public function clearState()
{
unset($this->state);
}
/**
* Output only. The current state for this AudienceExport.
*
* Generated from protobuf field <code>optional .google.analytics.data.v1beta.AudienceExport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int $var
* @return $this
*/
public function setState($var)
{
GPBUtil::checkEnum($var, \Google\Analytics\Data\V1beta\AudienceExport\State::class);
$this->state = $var;
return $this;
}
/**
* Output only. The time when CreateAudienceExport was called and the
* AudienceExport began the `CREATING` state.
*
* Generated from protobuf field <code>optional .google.protobuf.Timestamp begin_creating_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getBeginCreatingTime()
{
return $this->begin_creating_time;
}
public function hasBeginCreatingTime()
{
return isset($this->begin_creating_time);
}
public function clearBeginCreatingTime()
{
unset($this->begin_creating_time);
}
/**
* Output only. The time when CreateAudienceExport was called and the
* AudienceExport began the `CREATING` state.
*
* Generated from protobuf field <code>optional .google.protobuf.Timestamp begin_creating_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setBeginCreatingTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->begin_creating_time = $var;
return $this;
}
/**
* Output only. The total quota tokens charged during creation of the
* AudienceExport. Because this token count is based on activity from the
* `CREATING` state, this tokens charged will be fixed once an AudienceExport
* enters the `ACTIVE` or `FAILED` states.
*
* Generated from protobuf field <code>int32 creation_quota_tokens_charged = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return int
*/
public function getCreationQuotaTokensCharged()
{
return $this->creation_quota_tokens_charged;
}
/**
* Output only. The total quota tokens charged during creation of the
* AudienceExport. Because this token count is based on activity from the
* `CREATING` state, this tokens charged will be fixed once an AudienceExport
* enters the `ACTIVE` or `FAILED` states.
*
* Generated from protobuf field <code>int32 creation_quota_tokens_charged = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int $var
* @return $this
*/
public function setCreationQuotaTokensCharged($var)
{
GPBUtil::checkInt32($var);
$this->creation_quota_tokens_charged = $var;
return $this;
}
/**
* Output only. The total number of rows in the AudienceExport result.
*
* Generated from protobuf field <code>optional int32 row_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return int
*/
public function getRowCount()
{
return isset($this->row_count) ? $this->row_count : 0;
}
public function hasRowCount()
{
return isset($this->row_count);
}
public function clearRowCount()
{
unset($this->row_count);
}
/**
* Output only. The total number of rows in the AudienceExport result.
*
* Generated from protobuf field <code>optional int32 row_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int $var
* @return $this
*/
public function setRowCount($var)
{
GPBUtil::checkInt32($var);
$this->row_count = $var;
return $this;
}
/**
* Output only. Error message is populated when an audience export fails
* during creation. A common reason for such a failure is quota exhaustion.
*
* Generated from protobuf field <code>optional string error_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getErrorMessage()
{
return isset($this->error_message) ? $this->error_message : '';
}
public function hasErrorMessage()
{
return isset($this->error_message);
}
public function clearErrorMessage()
{
unset($this->error_message);
}
/**
* Output only. Error message is populated when an audience export fails
* during creation. A common reason for such a failure is quota exhaustion.
*
* Generated from protobuf field <code>optional string error_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setErrorMessage($var)
{
GPBUtil::checkString($var, True);
$this->error_message = $var;
return $this;
}
/**
* Output only. The percentage completed for this audience export ranging
* between 0 to 100.
*
* Generated from protobuf field <code>optional double percentage_completed = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return float
*/
public function getPercentageCompleted()
{
return isset($this->percentage_completed) ? $this->percentage_completed : 0.0;
}
public function hasPercentageCompleted()
{
return isset($this->percentage_completed);
}
public function clearPercentageCompleted()
{
unset($this->percentage_completed);
}
/**
* Output only. The percentage completed for this audience export ranging
* between 0 to 100.
*
* Generated from protobuf field <code>optional double percentage_completed = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param float $var
* @return $this
*/
public function setPercentageCompleted($var)
{
GPBUtil::checkDouble($var);
$this->percentage_completed = $var;
return $this;
}
}