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 AgentTaskSpec extends \Google\Collection
|
---|
21 | {
|
---|
22 | protected $collection_key = 'runnables';
|
---|
23 | protected $environmentType = AgentEnvironment::class;
|
---|
24 | protected $environmentDataType = '';
|
---|
25 | protected $loggingOptionType = AgentTaskLoggingOption::class;
|
---|
26 | protected $loggingOptionDataType = '';
|
---|
27 | /**
|
---|
28 | * @var string
|
---|
29 | */
|
---|
30 | public $maxRunDuration;
|
---|
31 | protected $runnablesType = AgentTaskRunnable::class;
|
---|
32 | protected $runnablesDataType = 'array';
|
---|
33 | protected $userAccountType = AgentTaskUserAccount::class;
|
---|
34 | protected $userAccountDataType = '';
|
---|
35 |
|
---|
36 | /**
|
---|
37 | * @param AgentEnvironment
|
---|
38 | */
|
---|
39 | public function setEnvironment(AgentEnvironment $environment)
|
---|
40 | {
|
---|
41 | $this->environment = $environment;
|
---|
42 | }
|
---|
43 | /**
|
---|
44 | * @return AgentEnvironment
|
---|
45 | */
|
---|
46 | public function getEnvironment()
|
---|
47 | {
|
---|
48 | return $this->environment;
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * @param AgentTaskLoggingOption
|
---|
52 | */
|
---|
53 | public function setLoggingOption(AgentTaskLoggingOption $loggingOption)
|
---|
54 | {
|
---|
55 | $this->loggingOption = $loggingOption;
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * @return AgentTaskLoggingOption
|
---|
59 | */
|
---|
60 | public function getLoggingOption()
|
---|
61 | {
|
---|
62 | return $this->loggingOption;
|
---|
63 | }
|
---|
64 | /**
|
---|
65 | * @param string
|
---|
66 | */
|
---|
67 | public function setMaxRunDuration($maxRunDuration)
|
---|
68 | {
|
---|
69 | $this->maxRunDuration = $maxRunDuration;
|
---|
70 | }
|
---|
71 | /**
|
---|
72 | * @return string
|
---|
73 | */
|
---|
74 | public function getMaxRunDuration()
|
---|
75 | {
|
---|
76 | return $this->maxRunDuration;
|
---|
77 | }
|
---|
78 | /**
|
---|
79 | * @param AgentTaskRunnable[]
|
---|
80 | */
|
---|
81 | public function setRunnables($runnables)
|
---|
82 | {
|
---|
83 | $this->runnables = $runnables;
|
---|
84 | }
|
---|
85 | /**
|
---|
86 | * @return AgentTaskRunnable[]
|
---|
87 | */
|
---|
88 | public function getRunnables()
|
---|
89 | {
|
---|
90 | return $this->runnables;
|
---|
91 | }
|
---|
92 | /**
|
---|
93 | * @param AgentTaskUserAccount
|
---|
94 | */
|
---|
95 | public function setUserAccount(AgentTaskUserAccount $userAccount)
|
---|
96 | {
|
---|
97 | $this->userAccount = $userAccount;
|
---|
98 | }
|
---|
99 | /**
|
---|
100 | * @return AgentTaskUserAccount
|
---|
101 | */
|
---|
102 | public function getUserAccount()
|
---|
103 | {
|
---|
104 | return $this->userAccount;
|
---|
105 | }
|
---|
106 | }
|
---|
107 |
|
---|
108 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
109 | class_alias(AgentTaskSpec::class, 'Google_Service_Batch_AgentTaskSpec');
|
---|