PageElement.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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. namespace Google\Service\Slides;
  18. class PageElement extends \Google\Model
  19. {
  20. /**
  21. * The description of the page element. Combined with title to display alt
  22. * text. The field is not supported for Group elements.
  23. *
  24. * @var string
  25. */
  26. public $description;
  27. protected $elementGroupType = Group::class;
  28. protected $elementGroupDataType = '';
  29. protected $imageType = Image::class;
  30. protected $imageDataType = '';
  31. protected $lineType = Line::class;
  32. protected $lineDataType = '';
  33. /**
  34. * The object ID for this page element. Object IDs used by
  35. * google.apps.slides.v1.Page and google.apps.slides.v1.PageElement share the
  36. * same namespace.
  37. *
  38. * @var string
  39. */
  40. public $objectId;
  41. protected $shapeType = Shape::class;
  42. protected $shapeDataType = '';
  43. protected $sheetsChartType = SheetsChart::class;
  44. protected $sheetsChartDataType = '';
  45. protected $sizeType = Size::class;
  46. protected $sizeDataType = '';
  47. protected $speakerSpotlightType = SpeakerSpotlight::class;
  48. protected $speakerSpotlightDataType = '';
  49. protected $tableType = Table::class;
  50. protected $tableDataType = '';
  51. /**
  52. * The title of the page element. Combined with description to display alt
  53. * text. The field is not supported for Group elements.
  54. *
  55. * @var string
  56. */
  57. public $title;
  58. protected $transformType = AffineTransform::class;
  59. protected $transformDataType = '';
  60. protected $videoType = Video::class;
  61. protected $videoDataType = '';
  62. protected $wordArtType = WordArt::class;
  63. protected $wordArtDataType = '';
  64. /**
  65. * The description of the page element. Combined with title to display alt
  66. * text. The field is not supported for Group elements.
  67. *
  68. * @param string $description
  69. */
  70. public function setDescription($description)
  71. {
  72. $this->description = $description;
  73. }
  74. /**
  75. * @return string
  76. */
  77. public function getDescription()
  78. {
  79. return $this->description;
  80. }
  81. /**
  82. * A collection of page elements joined as a single unit.
  83. *
  84. * @param Group $elementGroup
  85. */
  86. public function setElementGroup(Group $elementGroup)
  87. {
  88. $this->elementGroup = $elementGroup;
  89. }
  90. /**
  91. * @return Group
  92. */
  93. public function getElementGroup()
  94. {
  95. return $this->elementGroup;
  96. }
  97. /**
  98. * An image page element.
  99. *
  100. * @param Image $image
  101. */
  102. public function setImage(Image $image)
  103. {
  104. $this->image = $image;
  105. }
  106. /**
  107. * @return Image
  108. */
  109. public function getImage()
  110. {
  111. return $this->image;
  112. }
  113. /**
  114. * A line page element.
  115. *
  116. * @param Line $line
  117. */
  118. public function setLine(Line $line)
  119. {
  120. $this->line = $line;
  121. }
  122. /**
  123. * @return Line
  124. */
  125. public function getLine()
  126. {
  127. return $this->line;
  128. }
  129. /**
  130. * The object ID for this page element. Object IDs used by
  131. * google.apps.slides.v1.Page and google.apps.slides.v1.PageElement share the
  132. * same namespace.
  133. *
  134. * @param string $objectId
  135. */
  136. public function setObjectId($objectId)
  137. {
  138. $this->objectId = $objectId;
  139. }
  140. /**
  141. * @return string
  142. */
  143. public function getObjectId()
  144. {
  145. return $this->objectId;
  146. }
  147. /**
  148. * A generic shape.
  149. *
  150. * @param Shape $shape
  151. */
  152. public function setShape(Shape $shape)
  153. {
  154. $this->shape = $shape;
  155. }
  156. /**
  157. * @return Shape
  158. */
  159. public function getShape()
  160. {
  161. return $this->shape;
  162. }
  163. /**
  164. * A linked chart embedded from Google Sheets. Unlinked charts are represented
  165. * as images.
  166. *
  167. * @param SheetsChart $sheetsChart
  168. */
  169. public function setSheetsChart(SheetsChart $sheetsChart)
  170. {
  171. $this->sheetsChart = $sheetsChart;
  172. }
  173. /**
  174. * @return SheetsChart
  175. */
  176. public function getSheetsChart()
  177. {
  178. return $this->sheetsChart;
  179. }
  180. /**
  181. * The size of the page element.
  182. *
  183. * @param Size $size
  184. */
  185. public function setSize(Size $size)
  186. {
  187. $this->size = $size;
  188. }
  189. /**
  190. * @return Size
  191. */
  192. public function getSize()
  193. {
  194. return $this->size;
  195. }
  196. /**
  197. * A Speaker Spotlight.
  198. *
  199. * @param SpeakerSpotlight $speakerSpotlight
  200. */
  201. public function setSpeakerSpotlight(SpeakerSpotlight $speakerSpotlight)
  202. {
  203. $this->speakerSpotlight = $speakerSpotlight;
  204. }
  205. /**
  206. * @return SpeakerSpotlight
  207. */
  208. public function getSpeakerSpotlight()
  209. {
  210. return $this->speakerSpotlight;
  211. }
  212. /**
  213. * A table page element.
  214. *
  215. * @param Table $table
  216. */
  217. public function setTable(Table $table)
  218. {
  219. $this->table = $table;
  220. }
  221. /**
  222. * @return Table
  223. */
  224. public function getTable()
  225. {
  226. return $this->table;
  227. }
  228. /**
  229. * The title of the page element. Combined with description to display alt
  230. * text. The field is not supported for Group elements.
  231. *
  232. * @param string $title
  233. */
  234. public function setTitle($title)
  235. {
  236. $this->title = $title;
  237. }
  238. /**
  239. * @return string
  240. */
  241. public function getTitle()
  242. {
  243. return $this->title;
  244. }
  245. /**
  246. * The transform of the page element. The visual appearance of the page
  247. * element is determined by its absolute transform. To compute the absolute
  248. * transform, preconcatenate a page element's transform with the transforms of
  249. * all of its parent groups. If the page element is not in a group, its
  250. * absolute transform is the same as the value in this field. The initial
  251. * transform for the newly created Group is always the identity transform.
  252. *
  253. * @param AffineTransform $transform
  254. */
  255. public function setTransform(AffineTransform $transform)
  256. {
  257. $this->transform = $transform;
  258. }
  259. /**
  260. * @return AffineTransform
  261. */
  262. public function getTransform()
  263. {
  264. return $this->transform;
  265. }
  266. /**
  267. * A video page element.
  268. *
  269. * @param Video $video
  270. */
  271. public function setVideo(Video $video)
  272. {
  273. $this->video = $video;
  274. }
  275. /**
  276. * @return Video
  277. */
  278. public function getVideo()
  279. {
  280. return $this->video;
  281. }
  282. /**
  283. * A word art page element.
  284. *
  285. * @param WordArt $wordArt
  286. */
  287. public function setWordArt(WordArt $wordArt)
  288. {
  289. $this->wordArt = $wordArt;
  290. }
  291. /**
  292. * @return WordArt
  293. */
  294. public function getWordArt()
  295. {
  296. return $this->wordArt;
  297. }
  298. }
  299. // Adding a class alias for backwards compatibility with the previous class name.
  300. class_alias(PageElement::class, 'Google_Service_Slides_PageElement');