|
| 1 | +<?php |
| 2 | +/* |
| 3 | + * Copyright 2014 Google Inc. |
| 4 | + * |
| 5 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 6 | + * use this file except in compliance with the License. You may obtain a copy of |
| 7 | + * the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 14 | + * License for the specific language governing permissions and limitations under |
| 15 | + * the License. |
| 16 | + */ |
| 17 | + |
| 18 | +namespace Google\Service\CustomerEngagementSuite; |
| 19 | + |
| 20 | +class ExperimentConfigVersionRelease extends \Google\Collection |
| 21 | +{ |
| 22 | + /** |
| 23 | + * Unspecified state. |
| 24 | + */ |
| 25 | + public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'; |
| 26 | + /** |
| 27 | + * Pending state. Experiment is pending and not valid. |
| 28 | + */ |
| 29 | + public const STATE_PENDING = 'PENDING'; |
| 30 | + /** |
| 31 | + * Running state. Experiment is running and valid. |
| 32 | + */ |
| 33 | + public const STATE_RUNNING = 'RUNNING'; |
| 34 | + /** |
| 35 | + * Done state. Experiment is done and no longer valid. |
| 36 | + */ |
| 37 | + public const STATE_DONE = 'DONE'; |
| 38 | + /** |
| 39 | + * Expired state. Experiment is expired and no longer valid. |
| 40 | + */ |
| 41 | + public const STATE_EXPIRED = 'EXPIRED'; |
| 42 | + protected $collection_key = 'trafficAllocations'; |
| 43 | + /** |
| 44 | + * Optional. State of the version release. |
| 45 | + * |
| 46 | + * @var string |
| 47 | + */ |
| 48 | + public $state; |
| 49 | + protected $trafficAllocationsType = ExperimentConfigVersionReleaseTrafficAllocation::class; |
| 50 | + protected $trafficAllocationsDataType = 'array'; |
| 51 | + |
| 52 | + /** |
| 53 | + * Optional. State of the version release. |
| 54 | + * |
| 55 | + * Accepted values: STATE_UNSPECIFIED, PENDING, RUNNING, DONE, EXPIRED |
| 56 | + * |
| 57 | + * @param self::STATE_* $state |
| 58 | + */ |
| 59 | + public function setState($state) |
| 60 | + { |
| 61 | + $this->state = $state; |
| 62 | + } |
| 63 | + /** |
| 64 | + * @return self::STATE_* |
| 65 | + */ |
| 66 | + public function getState() |
| 67 | + { |
| 68 | + return $this->state; |
| 69 | + } |
| 70 | + /** |
| 71 | + * Optional. Traffic allocations for the version release. |
| 72 | + * |
| 73 | + * @param ExperimentConfigVersionReleaseTrafficAllocation[] $trafficAllocations |
| 74 | + */ |
| 75 | + public function setTrafficAllocations($trafficAllocations) |
| 76 | + { |
| 77 | + $this->trafficAllocations = $trafficAllocations; |
| 78 | + } |
| 79 | + /** |
| 80 | + * @return ExperimentConfigVersionReleaseTrafficAllocation[] |
| 81 | + */ |
| 82 | + public function getTrafficAllocations() |
| 83 | + { |
| 84 | + return $this->trafficAllocations; |
| 85 | + } |
| 86 | +} |
| 87 | + |
| 88 | +// Adding a class alias for backwards compatibility with the previous class name. |
| 89 | +class_alias(ExperimentConfigVersionRelease::class, 'Google_Service_CustomerEngagementSuite_ExperimentConfigVersionRelease'); |
0 commit comments