SharedDriveFile.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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\Classroom;
  18. class SharedDriveFile extends \Google\Model
  19. {
  20. /**
  21. * No sharing mode specified. This should never be returned.
  22. */
  23. public const SHARE_MODE_UNKNOWN_SHARE_MODE = 'UNKNOWN_SHARE_MODE';
  24. /**
  25. * Students can view the shared file.
  26. */
  27. public const SHARE_MODE_VIEW = 'VIEW';
  28. /**
  29. * Students can edit the shared file.
  30. */
  31. public const SHARE_MODE_EDIT = 'EDIT';
  32. /**
  33. * Students have a personal copy of the shared file.
  34. */
  35. public const SHARE_MODE_STUDENT_COPY = 'STUDENT_COPY';
  36. protected $driveFileType = DriveFile::class;
  37. protected $driveFileDataType = '';
  38. /**
  39. * Mechanism by which students access the Drive item.
  40. *
  41. * @var string
  42. */
  43. public $shareMode;
  44. /**
  45. * Drive file details.
  46. *
  47. * @param DriveFile $driveFile
  48. */
  49. public function setDriveFile(DriveFile $driveFile)
  50. {
  51. $this->driveFile = $driveFile;
  52. }
  53. /**
  54. * @return DriveFile
  55. */
  56. public function getDriveFile()
  57. {
  58. return $this->driveFile;
  59. }
  60. /**
  61. * Mechanism by which students access the Drive item.
  62. *
  63. * Accepted values: UNKNOWN_SHARE_MODE, VIEW, EDIT, STUDENT_COPY
  64. *
  65. * @param self::SHARE_MODE_* $shareMode
  66. */
  67. public function setShareMode($shareMode)
  68. {
  69. $this->shareMode = $shareMode;
  70. }
  71. /**
  72. * @return self::SHARE_MODE_*
  73. */
  74. public function getShareMode()
  75. {
  76. return $this->shareMode;
  77. }
  78. }
  79. // Adding a class alias for backwards compatibility with the previous class name.
  80. class_alias(SharedDriveFile::class, 'Google_Service_Classroom_SharedDriveFile');