Photo.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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\StreetViewPublish;
  18. class Photo extends \Google\Collection
  19. {
  20. /**
  21. * The status of the photo is unknown.
  22. */
  23. public const MAPS_PUBLISH_STATUS_UNSPECIFIED_MAPS_PUBLISH_STATUS = 'UNSPECIFIED_MAPS_PUBLISH_STATUS';
  24. /**
  25. * The photo is published to the public through Google Maps.
  26. */
  27. public const MAPS_PUBLISH_STATUS_PUBLISHED = 'PUBLISHED';
  28. /**
  29. * The photo has been rejected for an unknown reason.
  30. */
  31. public const MAPS_PUBLISH_STATUS_REJECTED_UNKNOWN = 'REJECTED_UNKNOWN';
  32. /**
  33. * The status of this transfer is unspecified.
  34. */
  35. public const TRANSFER_STATUS_TRANSFER_STATUS_UNKNOWN = 'TRANSFER_STATUS_UNKNOWN';
  36. /**
  37. * This photo has never been in a transfer.
  38. */
  39. public const TRANSFER_STATUS_NEVER_TRANSFERRED = 'NEVER_TRANSFERRED';
  40. /**
  41. * This photo transfer has been initiated, but the receiver has not yet
  42. * responded.
  43. */
  44. public const TRANSFER_STATUS_PENDING = 'PENDING';
  45. /**
  46. * The photo transfer has been completed, and this photo has been transferred
  47. * to the recipient.
  48. */
  49. public const TRANSFER_STATUS_COMPLETED = 'COMPLETED';
  50. /**
  51. * The recipient rejected this photo transfer.
  52. */
  53. public const TRANSFER_STATUS_REJECTED = 'REJECTED';
  54. /**
  55. * The photo transfer expired before the recipient took any action.
  56. */
  57. public const TRANSFER_STATUS_EXPIRED = 'EXPIRED';
  58. /**
  59. * The sender cancelled this photo transfer.
  60. */
  61. public const TRANSFER_STATUS_CANCELLED = 'CANCELLED';
  62. /**
  63. * The recipient owns this photo due to a rights transfer.
  64. */
  65. public const TRANSFER_STATUS_RECEIVED_VIA_TRANSFER = 'RECEIVED_VIA_TRANSFER';
  66. protected $collection_key = 'places';
  67. /**
  68. * Optional. Absolute time when the photo was captured. When the photo has no
  69. * exif timestamp, this is used to set a timestamp in the photo metadata.
  70. *
  71. * @var string
  72. */
  73. public $captureTime;
  74. protected $connectionsType = Connection::class;
  75. protected $connectionsDataType = 'array';
  76. /**
  77. * Output only. The download URL for the photo bytes. This field is set only
  78. * when GetPhotoRequest.view is set to PhotoView.INCLUDE_DOWNLOAD_URL.
  79. *
  80. * @var string
  81. */
  82. public $downloadUrl;
  83. /**
  84. * Output only. Status in Google Maps, whether this photo was published or
  85. * rejected.
  86. *
  87. * @var string
  88. */
  89. public $mapsPublishStatus;
  90. protected $photoIdType = PhotoId::class;
  91. protected $photoIdDataType = '';
  92. protected $placesType = Place::class;
  93. protected $placesDataType = 'array';
  94. protected $poseType = Pose::class;
  95. protected $poseDataType = '';
  96. /**
  97. * Output only. The share link for the photo.
  98. *
  99. * @var string
  100. */
  101. public $shareLink;
  102. /**
  103. * Output only. The thumbnail URL for showing a preview of the given photo.
  104. *
  105. * @var string
  106. */
  107. public $thumbnailUrl;
  108. /**
  109. * Output only. Status of rights transfer on this photo.
  110. *
  111. * @var string
  112. */
  113. public $transferStatus;
  114. protected $uploadReferenceType = UploadRef::class;
  115. protected $uploadReferenceDataType = '';
  116. /**
  117. * Output only. Time when the image was uploaded.
  118. *
  119. * @var string
  120. */
  121. public $uploadTime;
  122. /**
  123. * Output only. View count of the photo.
  124. *
  125. * @var string
  126. */
  127. public $viewCount;
  128. /**
  129. * Optional. Absolute time when the photo was captured. When the photo has no
  130. * exif timestamp, this is used to set a timestamp in the photo metadata.
  131. *
  132. * @param string $captureTime
  133. */
  134. public function setCaptureTime($captureTime)
  135. {
  136. $this->captureTime = $captureTime;
  137. }
  138. /**
  139. * @return string
  140. */
  141. public function getCaptureTime()
  142. {
  143. return $this->captureTime;
  144. }
  145. /**
  146. * Optional. Connections to other photos. A connection represents the link
  147. * from this photo to another photo.
  148. *
  149. * @param Connection[] $connections
  150. */
  151. public function setConnections($connections)
  152. {
  153. $this->connections = $connections;
  154. }
  155. /**
  156. * @return Connection[]
  157. */
  158. public function getConnections()
  159. {
  160. return $this->connections;
  161. }
  162. /**
  163. * Output only. The download URL for the photo bytes. This field is set only
  164. * when GetPhotoRequest.view is set to PhotoView.INCLUDE_DOWNLOAD_URL.
  165. *
  166. * @param string $downloadUrl
  167. */
  168. public function setDownloadUrl($downloadUrl)
  169. {
  170. $this->downloadUrl = $downloadUrl;
  171. }
  172. /**
  173. * @return string
  174. */
  175. public function getDownloadUrl()
  176. {
  177. return $this->downloadUrl;
  178. }
  179. /**
  180. * Output only. Status in Google Maps, whether this photo was published or
  181. * rejected.
  182. *
  183. * Accepted values: UNSPECIFIED_MAPS_PUBLISH_STATUS, PUBLISHED,
  184. * REJECTED_UNKNOWN
  185. *
  186. * @param self::MAPS_PUBLISH_STATUS_* $mapsPublishStatus
  187. */
  188. public function setMapsPublishStatus($mapsPublishStatus)
  189. {
  190. $this->mapsPublishStatus = $mapsPublishStatus;
  191. }
  192. /**
  193. * @return self::MAPS_PUBLISH_STATUS_*
  194. */
  195. public function getMapsPublishStatus()
  196. {
  197. return $this->mapsPublishStatus;
  198. }
  199. /**
  200. * Required. Output only. Required when updating a photo. Output only when
  201. * creating a photo. Identifier for the photo, which is unique among all
  202. * photos in Google.
  203. *
  204. * @param PhotoId $photoId
  205. */
  206. public function setPhotoId(PhotoId $photoId)
  207. {
  208. $this->photoId = $photoId;
  209. }
  210. /**
  211. * @return PhotoId
  212. */
  213. public function getPhotoId()
  214. {
  215. return $this->photoId;
  216. }
  217. /**
  218. * Optional. Places where this photo belongs.
  219. *
  220. * @param Place[] $places
  221. */
  222. public function setPlaces($places)
  223. {
  224. $this->places = $places;
  225. }
  226. /**
  227. * @return Place[]
  228. */
  229. public function getPlaces()
  230. {
  231. return $this->places;
  232. }
  233. /**
  234. * Optional. Pose of the photo.
  235. *
  236. * @param Pose $pose
  237. */
  238. public function setPose(Pose $pose)
  239. {
  240. $this->pose = $pose;
  241. }
  242. /**
  243. * @return Pose
  244. */
  245. public function getPose()
  246. {
  247. return $this->pose;
  248. }
  249. /**
  250. * Output only. The share link for the photo.
  251. *
  252. * @param string $shareLink
  253. */
  254. public function setShareLink($shareLink)
  255. {
  256. $this->shareLink = $shareLink;
  257. }
  258. /**
  259. * @return string
  260. */
  261. public function getShareLink()
  262. {
  263. return $this->shareLink;
  264. }
  265. /**
  266. * Output only. The thumbnail URL for showing a preview of the given photo.
  267. *
  268. * @param string $thumbnailUrl
  269. */
  270. public function setThumbnailUrl($thumbnailUrl)
  271. {
  272. $this->thumbnailUrl = $thumbnailUrl;
  273. }
  274. /**
  275. * @return string
  276. */
  277. public function getThumbnailUrl()
  278. {
  279. return $this->thumbnailUrl;
  280. }
  281. /**
  282. * Output only. Status of rights transfer on this photo.
  283. *
  284. * Accepted values: TRANSFER_STATUS_UNKNOWN, NEVER_TRANSFERRED, PENDING,
  285. * COMPLETED, REJECTED, EXPIRED, CANCELLED, RECEIVED_VIA_TRANSFER
  286. *
  287. * @param self::TRANSFER_STATUS_* $transferStatus
  288. */
  289. public function setTransferStatus($transferStatus)
  290. {
  291. $this->transferStatus = $transferStatus;
  292. }
  293. /**
  294. * @return self::TRANSFER_STATUS_*
  295. */
  296. public function getTransferStatus()
  297. {
  298. return $this->transferStatus;
  299. }
  300. /**
  301. * Input only. Required when creating a photo. Input only. The resource URL
  302. * where the photo bytes are uploaded to.
  303. *
  304. * @param UploadRef $uploadReference
  305. */
  306. public function setUploadReference(UploadRef $uploadReference)
  307. {
  308. $this->uploadReference = $uploadReference;
  309. }
  310. /**
  311. * @return UploadRef
  312. */
  313. public function getUploadReference()
  314. {
  315. return $this->uploadReference;
  316. }
  317. /**
  318. * Output only. Time when the image was uploaded.
  319. *
  320. * @param string $uploadTime
  321. */
  322. public function setUploadTime($uploadTime)
  323. {
  324. $this->uploadTime = $uploadTime;
  325. }
  326. /**
  327. * @return string
  328. */
  329. public function getUploadTime()
  330. {
  331. return $this->uploadTime;
  332. }
  333. /**
  334. * Output only. View count of the photo.
  335. *
  336. * @param string $viewCount
  337. */
  338. public function setViewCount($viewCount)
  339. {
  340. $this->viewCount = $viewCount;
  341. }
  342. /**
  343. * @return string
  344. */
  345. public function getViewCount()
  346. {
  347. return $this->viewCount;
  348. }
  349. }
  350. // Adding a class alias for backwards compatibility with the previous class name.
  351. class_alias(Photo::class, 'Google_Service_StreetViewPublish_Photo');