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\ShoppingContent;
|
---|
19 |
|
---|
20 | class Action extends \Google\Collection
|
---|
21 | {
|
---|
22 | protected $collection_key = 'reasons';
|
---|
23 | protected $builtinSimpleActionType = BuiltInSimpleAction::class;
|
---|
24 | protected $builtinSimpleActionDataType = '';
|
---|
25 | protected $builtinUserInputActionType = BuiltInUserInputAction::class;
|
---|
26 | protected $builtinUserInputActionDataType = '';
|
---|
27 | /**
|
---|
28 | * @var string
|
---|
29 | */
|
---|
30 | public $buttonLabel;
|
---|
31 | protected $externalActionType = ExternalAction::class;
|
---|
32 | protected $externalActionDataType = '';
|
---|
33 | /**
|
---|
34 | * @var bool
|
---|
35 | */
|
---|
36 | public $isAvailable;
|
---|
37 | protected $reasonsType = ActionReason::class;
|
---|
38 | protected $reasonsDataType = 'array';
|
---|
39 |
|
---|
40 | /**
|
---|
41 | * @param BuiltInSimpleAction
|
---|
42 | */
|
---|
43 | public function setBuiltinSimpleAction(BuiltInSimpleAction $builtinSimpleAction)
|
---|
44 | {
|
---|
45 | $this->builtinSimpleAction = $builtinSimpleAction;
|
---|
46 | }
|
---|
47 | /**
|
---|
48 | * @return BuiltInSimpleAction
|
---|
49 | */
|
---|
50 | public function getBuiltinSimpleAction()
|
---|
51 | {
|
---|
52 | return $this->builtinSimpleAction;
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * @param BuiltInUserInputAction
|
---|
56 | */
|
---|
57 | public function setBuiltinUserInputAction(BuiltInUserInputAction $builtinUserInputAction)
|
---|
58 | {
|
---|
59 | $this->builtinUserInputAction = $builtinUserInputAction;
|
---|
60 | }
|
---|
61 | /**
|
---|
62 | * @return BuiltInUserInputAction
|
---|
63 | */
|
---|
64 | public function getBuiltinUserInputAction()
|
---|
65 | {
|
---|
66 | return $this->builtinUserInputAction;
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * @param string
|
---|
70 | */
|
---|
71 | public function setButtonLabel($buttonLabel)
|
---|
72 | {
|
---|
73 | $this->buttonLabel = $buttonLabel;
|
---|
74 | }
|
---|
75 | /**
|
---|
76 | * @return string
|
---|
77 | */
|
---|
78 | public function getButtonLabel()
|
---|
79 | {
|
---|
80 | return $this->buttonLabel;
|
---|
81 | }
|
---|
82 | /**
|
---|
83 | * @param ExternalAction
|
---|
84 | */
|
---|
85 | public function setExternalAction(ExternalAction $externalAction)
|
---|
86 | {
|
---|
87 | $this->externalAction = $externalAction;
|
---|
88 | }
|
---|
89 | /**
|
---|
90 | * @return ExternalAction
|
---|
91 | */
|
---|
92 | public function getExternalAction()
|
---|
93 | {
|
---|
94 | return $this->externalAction;
|
---|
95 | }
|
---|
96 | /**
|
---|
97 | * @param bool
|
---|
98 | */
|
---|
99 | public function setIsAvailable($isAvailable)
|
---|
100 | {
|
---|
101 | $this->isAvailable = $isAvailable;
|
---|
102 | }
|
---|
103 | /**
|
---|
104 | * @return bool
|
---|
105 | */
|
---|
106 | public function getIsAvailable()
|
---|
107 | {
|
---|
108 | return $this->isAvailable;
|
---|
109 | }
|
---|
110 | /**
|
---|
111 | * @param ActionReason[]
|
---|
112 | */
|
---|
113 | public function setReasons($reasons)
|
---|
114 | {
|
---|
115 | $this->reasons = $reasons;
|
---|
116 | }
|
---|
117 | /**
|
---|
118 | * @return ActionReason[]
|
---|
119 | */
|
---|
120 | public function getReasons()
|
---|
121 | {
|
---|
122 | return $this->reasons;
|
---|
123 | }
|
---|
124 | }
|
---|
125 |
|
---|
126 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
127 | class_alias(Action::class, 'Google_Service_ShoppingContent_Action');
|
---|