TargetReference.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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\DriveActivity;
  18. class TargetReference extends \Google\Model
  19. {
  20. protected $driveType = DriveReference::class;
  21. protected $driveDataType = '';
  22. protected $driveItemType = DriveItemReference::class;
  23. protected $driveItemDataType = '';
  24. protected $teamDriveType = TeamDriveReference::class;
  25. protected $teamDriveDataType = '';
  26. /**
  27. * The target is a shared drive.
  28. *
  29. * @param DriveReference $drive
  30. */
  31. public function setDrive(DriveReference $drive)
  32. {
  33. $this->drive = $drive;
  34. }
  35. /**
  36. * @return DriveReference
  37. */
  38. public function getDrive()
  39. {
  40. return $this->drive;
  41. }
  42. /**
  43. * The target is a Drive item.
  44. *
  45. * @param DriveItemReference $driveItem
  46. */
  47. public function setDriveItem(DriveItemReference $driveItem)
  48. {
  49. $this->driveItem = $driveItem;
  50. }
  51. /**
  52. * @return DriveItemReference
  53. */
  54. public function getDriveItem()
  55. {
  56. return $this->driveItem;
  57. }
  58. /**
  59. * This field is deprecated; please use the `drive` field instead.
  60. *
  61. * @deprecated
  62. * @param TeamDriveReference $teamDrive
  63. */
  64. public function setTeamDrive(TeamDriveReference $teamDrive)
  65. {
  66. $this->teamDrive = $teamDrive;
  67. }
  68. /**
  69. * @deprecated
  70. * @return TeamDriveReference
  71. */
  72. public function getTeamDrive()
  73. {
  74. return $this->teamDrive;
  75. }
  76. }
  77. // Adding a class alias for backwards compatibility with the previous class name.
  78. class_alias(TargetReference::class, 'Google_Service_DriveActivity_TargetReference');