[f9c482b] | 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\Batch;
|
---|
| 19 |
|
---|
| 20 | class TaskSpec extends \Google\Collection
|
---|
| 21 | {
|
---|
| 22 | protected $collection_key = 'volumes';
|
---|
| 23 | protected $computeResourceType = ComputeResource::class;
|
---|
| 24 | protected $computeResourceDataType = '';
|
---|
| 25 | protected $environmentType = Environment::class;
|
---|
| 26 | protected $environmentDataType = '';
|
---|
| 27 | /**
|
---|
| 28 | * @var string[]
|
---|
| 29 | */
|
---|
| 30 | public $environments;
|
---|
| 31 | protected $lifecyclePoliciesType = LifecyclePolicy::class;
|
---|
| 32 | protected $lifecyclePoliciesDataType = 'array';
|
---|
| 33 | /**
|
---|
| 34 | * @var int
|
---|
| 35 | */
|
---|
| 36 | public $maxRetryCount;
|
---|
| 37 | /**
|
---|
| 38 | * @var string
|
---|
| 39 | */
|
---|
| 40 | public $maxRunDuration;
|
---|
| 41 | protected $runnablesType = Runnable::class;
|
---|
| 42 | protected $runnablesDataType = 'array';
|
---|
| 43 | protected $volumesType = Volume::class;
|
---|
| 44 | protected $volumesDataType = 'array';
|
---|
| 45 |
|
---|
| 46 | /**
|
---|
| 47 | * @param ComputeResource
|
---|
| 48 | */
|
---|
| 49 | public function setComputeResource(ComputeResource $computeResource)
|
---|
| 50 | {
|
---|
| 51 | $this->computeResource = $computeResource;
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * @return ComputeResource
|
---|
| 55 | */
|
---|
| 56 | public function getComputeResource()
|
---|
| 57 | {
|
---|
| 58 | return $this->computeResource;
|
---|
| 59 | }
|
---|
| 60 | /**
|
---|
| 61 | * @param Environment
|
---|
| 62 | */
|
---|
| 63 | public function setEnvironment(Environment $environment)
|
---|
| 64 | {
|
---|
| 65 | $this->environment = $environment;
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * @return Environment
|
---|
| 69 | */
|
---|
| 70 | public function getEnvironment()
|
---|
| 71 | {
|
---|
| 72 | return $this->environment;
|
---|
| 73 | }
|
---|
| 74 | /**
|
---|
| 75 | * @param string[]
|
---|
| 76 | */
|
---|
| 77 | public function setEnvironments($environments)
|
---|
| 78 | {
|
---|
| 79 | $this->environments = $environments;
|
---|
| 80 | }
|
---|
| 81 | /**
|
---|
| 82 | * @return string[]
|
---|
| 83 | */
|
---|
| 84 | public function getEnvironments()
|
---|
| 85 | {
|
---|
| 86 | return $this->environments;
|
---|
| 87 | }
|
---|
| 88 | /**
|
---|
| 89 | * @param LifecyclePolicy[]
|
---|
| 90 | */
|
---|
| 91 | public function setLifecyclePolicies($lifecyclePolicies)
|
---|
| 92 | {
|
---|
| 93 | $this->lifecyclePolicies = $lifecyclePolicies;
|
---|
| 94 | }
|
---|
| 95 | /**
|
---|
| 96 | * @return LifecyclePolicy[]
|
---|
| 97 | */
|
---|
| 98 | public function getLifecyclePolicies()
|
---|
| 99 | {
|
---|
| 100 | return $this->lifecyclePolicies;
|
---|
| 101 | }
|
---|
| 102 | /**
|
---|
| 103 | * @param int
|
---|
| 104 | */
|
---|
| 105 | public function setMaxRetryCount($maxRetryCount)
|
---|
| 106 | {
|
---|
| 107 | $this->maxRetryCount = $maxRetryCount;
|
---|
| 108 | }
|
---|
| 109 | /**
|
---|
| 110 | * @return int
|
---|
| 111 | */
|
---|
| 112 | public function getMaxRetryCount()
|
---|
| 113 | {
|
---|
| 114 | return $this->maxRetryCount;
|
---|
| 115 | }
|
---|
| 116 | /**
|
---|
| 117 | * @param string
|
---|
| 118 | */
|
---|
| 119 | public function setMaxRunDuration($maxRunDuration)
|
---|
| 120 | {
|
---|
| 121 | $this->maxRunDuration = $maxRunDuration;
|
---|
| 122 | }
|
---|
| 123 | /**
|
---|
| 124 | * @return string
|
---|
| 125 | */
|
---|
| 126 | public function getMaxRunDuration()
|
---|
| 127 | {
|
---|
| 128 | return $this->maxRunDuration;
|
---|
| 129 | }
|
---|
| 130 | /**
|
---|
| 131 | * @param Runnable[]
|
---|
| 132 | */
|
---|
| 133 | public function setRunnables($runnables)
|
---|
| 134 | {
|
---|
| 135 | $this->runnables = $runnables;
|
---|
| 136 | }
|
---|
| 137 | /**
|
---|
| 138 | * @return Runnable[]
|
---|
| 139 | */
|
---|
| 140 | public function getRunnables()
|
---|
| 141 | {
|
---|
| 142 | return $this->runnables;
|
---|
| 143 | }
|
---|
| 144 | /**
|
---|
| 145 | * @param Volume[]
|
---|
| 146 | */
|
---|
| 147 | public function setVolumes($volumes)
|
---|
| 148 | {
|
---|
| 149 | $this->volumes = $volumes;
|
---|
| 150 | }
|
---|
| 151 | /**
|
---|
| 152 | * @return Volume[]
|
---|
| 153 | */
|
---|
| 154 | public function getVolumes()
|
---|
| 155 | {
|
---|
| 156 | return $this->volumes;
|
---|
| 157 | }
|
---|
| 158 | }
|
---|
| 159 |
|
---|
| 160 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 161 | class_alias(TaskSpec::class, 'Google_Service_Batch_TaskSpec');
|
---|