forked from google/gdata-java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExperimentEntry.java
More file actions
593 lines (534 loc) · 15.6 KB
/
Copy pathExperimentEntry.java
File metadata and controls
593 lines (534 loc) · 15.6 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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
/* Copyright (c) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gdata.data.analytics;
import com.google.gdata.data.BaseEntry;
import com.google.gdata.data.ExtensionProfile;
/**
* Entry element for experiment feed.
*
*
*/
public class ExperimentEntry extends BaseEntry<ExperimentEntry> {
/**
* Default mutable constructor.
*/
public ExperimentEntry() {
super();
}
/**
* Constructs a new instance by doing a shallow copy of data from an existing
* {@link BaseEntry} instance.
*
* @param sourceEntry source entry
*/
public ExperimentEntry(BaseEntry<?> sourceEntry) {
super(sourceEntry);
}
@Override
public void declareExtensions(ExtensionProfile extProfile) {
if (extProfile.isDeclared(ExperimentEntry.class)) {
return;
}
super.declareExtensions(extProfile);
extProfile.declare(ExperimentEntry.class, GwoAnalyticsAccountId.class);
extProfile.declare(ExperimentEntry.class, GwoAutoPruneMode.class);
extProfile.declare(ExperimentEntry.class, GwoControlScript.class);
extProfile.declare(ExperimentEntry.class, GwoConversionScript.class);
extProfile.declare(ExperimentEntry.class, GwoCoverage.class);
extProfile.declare(ExperimentEntry.class, GwoExperimentId.class);
extProfile.declare(ExperimentEntry.class, GwoExperimentNotes.class);
extProfile.declare(ExperimentEntry.class, GwoExperimentType.class);
extProfile.declare(ExperimentEntry.class, GwoNumAbPageVariations.class);
extProfile.declare(ExperimentEntry.class, GwoNumCombinations.class);
extProfile.declare(ExperimentEntry.class, GwoNumSections.class);
extProfile.declare(ExperimentEntry.class, GwoSourceExperimentId.class);
extProfile.declare(ExperimentEntry.class, GwoStatus.class);
extProfile.declare(ExperimentEntry.class, GwoTrackingScript.class);
extProfile.declare(ExperimentEntry.class, GwoVerificationCombo.class);
extProfile.declare(ExperimentEntry.class,
GwoVerificationComboCoverage.class);
}
/**
* Returns the Analytics account ID.
*
* @return Analytics account ID
*/
public GwoAnalyticsAccountId getAnalyticsAccountId() {
return getExtension(GwoAnalyticsAccountId.class);
}
/**
* Sets the Analytics account ID.
*
* @param analyticsAccountId Analytics account ID or <code>null</code> to
* reset
*/
public void setAnalyticsAccountId(GwoAnalyticsAccountId analyticsAccountId) {
if (analyticsAccountId == null) {
removeExtension(GwoAnalyticsAccountId.class);
} else {
setExtension(analyticsAccountId);
}
}
/**
* Returns whether it has the Analytics account ID.
*
* @return whether it has the Analytics account ID
*/
public boolean hasAnalyticsAccountId() {
return hasExtension(GwoAnalyticsAccountId.class);
}
/**
* Returns the auto-prune mode.
*
* @return auto-prune mode
*/
public GwoAutoPruneMode getAutoPruneMode() {
return getExtension(GwoAutoPruneMode.class);
}
/**
* Sets the auto-prune mode.
*
* @param autoPruneMode auto-prune mode or <code>null</code> to reset
*/
public void setAutoPruneMode(GwoAutoPruneMode autoPruneMode) {
if (autoPruneMode == null) {
removeExtension(GwoAutoPruneMode.class);
} else {
setExtension(autoPruneMode);
}
}
/**
* Returns whether it has the auto-prune mode.
*
* @return whether it has the auto-prune mode
*/
public boolean hasAutoPruneMode() {
return hasExtension(GwoAutoPruneMode.class);
}
/**
* Returns the script to control the experiment.
*
* @return script to control the experiment
*/
public GwoControlScript getControlScript() {
return getExtension(GwoControlScript.class);
}
/**
* Sets the script to control the experiment.
*
* @param controlScript script to control the experiment or <code>null</code>
* to reset
*/
public void setControlScript(GwoControlScript controlScript) {
if (controlScript == null) {
removeExtension(GwoControlScript.class);
} else {
setExtension(controlScript);
}
}
/**
* Returns whether it has the script to control the experiment.
*
* @return whether it has the script to control the experiment
*/
public boolean hasControlScript() {
return hasExtension(GwoControlScript.class);
}
/**
* Returns the script to record conversions.
*
* @return script to record conversions
*/
public GwoConversionScript getConversionScript() {
return getExtension(GwoConversionScript.class);
}
/**
* Sets the script to record conversions.
*
* @param conversionScript script to record conversions or <code>null</code>
* to reset
*/
public void setConversionScript(GwoConversionScript conversionScript) {
if (conversionScript == null) {
removeExtension(GwoConversionScript.class);
} else {
setExtension(conversionScript);
}
}
/**
* Returns whether it has the script to record conversions.
*
* @return whether it has the script to record conversions
*/
public boolean hasConversionScript() {
return hasExtension(GwoConversionScript.class);
}
/**
* Returns the percentage of traffic to send to the experiment.
*
* @return percentage of traffic to send to the experiment
*/
public GwoCoverage getCoverage() {
return getExtension(GwoCoverage.class);
}
/**
* Sets the percentage of traffic to send to the experiment.
*
* @param coverage percentage of traffic to send to the experiment or
* <code>null</code> to reset
*/
public void setCoverage(GwoCoverage coverage) {
if (coverage == null) {
removeExtension(GwoCoverage.class);
} else {
setExtension(coverage);
}
}
/**
* Returns whether it has the percentage of traffic to send to the experiment.
*
* @return whether it has the percentage of traffic to send to the experiment
*/
public boolean hasCoverage() {
return hasExtension(GwoCoverage.class);
}
/**
* Returns the experiment ID.
*
* @return experiment ID
*/
public GwoExperimentId getExperimentId() {
return getExtension(GwoExperimentId.class);
}
/**
* Sets the experiment ID.
*
* @param experimentId experiment ID or <code>null</code> to reset
*/
public void setExperimentId(GwoExperimentId experimentId) {
if (experimentId == null) {
removeExtension(GwoExperimentId.class);
} else {
setExtension(experimentId);
}
}
/**
* Returns whether it has the experiment ID.
*
* @return whether it has the experiment ID
*/
public boolean hasExperimentId() {
return hasExtension(GwoExperimentId.class);
}
/**
* Returns the experiment's notes.
*
* @return experiment's notes
*/
public GwoExperimentNotes getExperimentNotes() {
return getExtension(GwoExperimentNotes.class);
}
/**
* Sets the experiment's notes.
*
* @param experimentNotes experiment's notes or <code>null</code> to reset
*/
public void setExperimentNotes(GwoExperimentNotes experimentNotes) {
if (experimentNotes == null) {
removeExtension(GwoExperimentNotes.class);
} else {
setExtension(experimentNotes);
}
}
/**
* Returns whether it has the experiment's notes.
*
* @return whether it has the experiment's notes
*/
public boolean hasExperimentNotes() {
return hasExtension(GwoExperimentNotes.class);
}
/**
* Returns the experiment type.
*
* @return experiment type
*/
public GwoExperimentType getExperimentType() {
return getExtension(GwoExperimentType.class);
}
/**
* Sets the experiment type.
*
* @param experimentType experiment type or <code>null</code> to reset
*/
public void setExperimentType(GwoExperimentType experimentType) {
if (experimentType == null) {
removeExtension(GwoExperimentType.class);
} else {
setExtension(experimentType);
}
}
/**
* Returns whether it has the experiment type.
*
* @return whether it has the experiment type
*/
public boolean hasExperimentType() {
return hasExtension(GwoExperimentType.class);
}
/**
* Returns the number of page variations in an A/B experiment.
*
* @return number of page variations in an A/B experiment
*/
public GwoNumAbPageVariations getNumAbPageVariations() {
return getExtension(GwoNumAbPageVariations.class);
}
/**
* Sets the number of page variations in an A/B experiment.
*
* @param numAbPageVariations number of page variations in an A/B experiment
* or <code>null</code> to reset
*/
public void setNumAbPageVariations(GwoNumAbPageVariations numAbPageVariations)
{
if (numAbPageVariations == null) {
removeExtension(GwoNumAbPageVariations.class);
} else {
setExtension(numAbPageVariations);
}
}
/**
* Returns whether it has the number of page variations in an A/B experiment.
*
* @return whether it has the number of page variations in an A/B experiment
*/
public boolean hasNumAbPageVariations() {
return hasExtension(GwoNumAbPageVariations.class);
}
/**
* Returns the number of combinations.
*
* @return number of combinations
*/
public GwoNumCombinations getNumCombinations() {
return getExtension(GwoNumCombinations.class);
}
/**
* Sets the number of combinations.
*
* @param numCombinations number of combinations or <code>null</code> to reset
*/
public void setNumCombinations(GwoNumCombinations numCombinations) {
if (numCombinations == null) {
removeExtension(GwoNumCombinations.class);
} else {
setExtension(numCombinations);
}
}
/**
* Returns whether it has the number of combinations.
*
* @return whether it has the number of combinations
*/
public boolean hasNumCombinations() {
return hasExtension(GwoNumCombinations.class);
}
/**
* Returns the number of sections in a multivariate experiment.
*
* @return number of sections in a multivariate experiment
*/
public GwoNumSections getNumSections() {
return getExtension(GwoNumSections.class);
}
/**
* Sets the number of sections in a multivariate experiment.
*
* @param numSections number of sections in a multivariate experiment or
* <code>null</code> to reset
*/
public void setNumSections(GwoNumSections numSections) {
if (numSections == null) {
removeExtension(GwoNumSections.class);
} else {
setExtension(numSections);
}
}
/**
* Returns whether it has the number of sections in a multivariate experiment.
*
* @return whether it has the number of sections in a multivariate experiment
*/
public boolean hasNumSections() {
return hasExtension(GwoNumSections.class);
}
/**
* Returns the experiment ID that identifies the source experiment.
*
* @return experiment ID that identifies the source experiment
*/
public GwoSourceExperimentId getSourceExperimentId() {
return getExtension(GwoSourceExperimentId.class);
}
/**
* Sets the experiment ID that identifies the source experiment.
*
* @param sourceExperimentId experiment ID that identifies the source
* experiment or <code>null</code> to reset
*/
public void setSourceExperimentId(GwoSourceExperimentId sourceExperimentId) {
if (sourceExperimentId == null) {
removeExtension(GwoSourceExperimentId.class);
} else {
setExtension(sourceExperimentId);
}
}
/**
* Returns whether it has the experiment ID that identifies the source
* experiment.
*
* @return whether it has the experiment ID that identifies the source
* experiment
*/
public boolean hasSourceExperimentId() {
return hasExtension(GwoSourceExperimentId.class);
}
/**
* Returns the experiment status.
*
* @return experiment status
*/
public GwoStatus getStatus() {
return getExtension(GwoStatus.class);
}
/**
* Sets the experiment status.
*
* @param status experiment status or <code>null</code> to reset
*/
public void setStatus(GwoStatus status) {
if (status == null) {
removeExtension(GwoStatus.class);
} else {
setExtension(status);
}
}
/**
* Returns whether it has the experiment status.
*
* @return whether it has the experiment status
*/
public boolean hasStatus() {
return hasExtension(GwoStatus.class);
}
/**
* Returns the script to track this experiment.
*
* @return script to track this experiment
*/
public GwoTrackingScript getTrackingScript() {
return getExtension(GwoTrackingScript.class);
}
/**
* Sets the script to track this experiment.
*
* @param trackingScript script to track this experiment or <code>null</code>
* to reset
*/
public void setTrackingScript(GwoTrackingScript trackingScript) {
if (trackingScript == null) {
removeExtension(GwoTrackingScript.class);
} else {
setExtension(trackingScript);
}
}
/**
* Returns whether it has the script to track this experiment.
*
* @return whether it has the script to track this experiment
*/
public boolean hasTrackingScript() {
return hasExtension(GwoTrackingScript.class);
}
/**
* Returns the verification combination index.
*
* @return verification combination index
*/
public GwoVerificationCombo getVerificationCombo() {
return getExtension(GwoVerificationCombo.class);
}
/**
* Sets the verification combination index.
*
* @param verificationCombo verification combination index or
* <code>null</code> to reset
*/
public void setVerificationCombo(GwoVerificationCombo verificationCombo) {
if (verificationCombo == null) {
removeExtension(GwoVerificationCombo.class);
} else {
setExtension(verificationCombo);
}
}
/**
* Returns whether it has the verification combination index.
*
* @return whether it has the verification combination index
*/
public boolean hasVerificationCombo() {
return hasExtension(GwoVerificationCombo.class);
}
/**
* Returns the percentage of traffic to send to the verify combo.
*
* @return percentage of traffic to send to the verify combo
*/
public GwoVerificationComboCoverage getVerificationComboCoverage() {
return getExtension(GwoVerificationComboCoverage.class);
}
/**
* Sets the percentage of traffic to send to the verify combo.
*
* @param verificationComboCoverage percentage of traffic to send to the
* verify combo or <code>null</code> to reset
*/
public void setVerificationComboCoverage(GwoVerificationComboCoverage
verificationComboCoverage) {
if (verificationComboCoverage == null) {
removeExtension(GwoVerificationComboCoverage.class);
} else {
setExtension(verificationComboCoverage);
}
}
/**
* Returns whether it has the percentage of traffic to send to the verify
* combo.
*
* @return whether it has the percentage of traffic to send to the verify
* combo
*/
public boolean hasVerificationComboCoverage() {
return hasExtension(GwoVerificationComboCoverage.class);
}
@Override
protected void validate() {
}
@Override
public String toString() {
return "{ExperimentEntry " + super.toString() + "}";
}
}