Video.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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 Video extends \Google\Model
  19. {
  20. /**
  21. * The video source is unspecified.
  22. */
  23. public const SOURCE_SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED';
  24. /**
  25. * The video source is YouTube.
  26. */
  27. public const SOURCE_YOUTUBE = 'YOUTUBE';
  28. /**
  29. * The video source is Google Drive.
  30. */
  31. public const SOURCE_DRIVE = 'DRIVE';
  32. /**
  33. * The video source's unique identifier for this video.
  34. *
  35. * @var string
  36. */
  37. public $id;
  38. /**
  39. * The video source.
  40. *
  41. * @var string
  42. */
  43. public $source;
  44. /**
  45. * An URL to a video. The URL is valid as long as the source video exists and
  46. * sharing settings do not change.
  47. *
  48. * @var string
  49. */
  50. public $url;
  51. protected $videoPropertiesType = VideoProperties::class;
  52. protected $videoPropertiesDataType = '';
  53. /**
  54. * The video source's unique identifier for this video.
  55. *
  56. * @param string $id
  57. */
  58. public function setId($id)
  59. {
  60. $this->id = $id;
  61. }
  62. /**
  63. * @return string
  64. */
  65. public function getId()
  66. {
  67. return $this->id;
  68. }
  69. /**
  70. * The video source.
  71. *
  72. * Accepted values: SOURCE_UNSPECIFIED, YOUTUBE, DRIVE
  73. *
  74. * @param self::SOURCE_* $source
  75. */
  76. public function setSource($source)
  77. {
  78. $this->source = $source;
  79. }
  80. /**
  81. * @return self::SOURCE_*
  82. */
  83. public function getSource()
  84. {
  85. return $this->source;
  86. }
  87. /**
  88. * An URL to a video. The URL is valid as long as the source video exists and
  89. * sharing settings do not change.
  90. *
  91. * @param string $url
  92. */
  93. public function setUrl($url)
  94. {
  95. $this->url = $url;
  96. }
  97. /**
  98. * @return string
  99. */
  100. public function getUrl()
  101. {
  102. return $this->url;
  103. }
  104. /**
  105. * The properties of the video.
  106. *
  107. * @param VideoProperties $videoProperties
  108. */
  109. public function setVideoProperties(VideoProperties $videoProperties)
  110. {
  111. $this->videoProperties = $videoProperties;
  112. }
  113. /**
  114. * @return VideoProperties
  115. */
  116. public function getVideoProperties()
  117. {
  118. return $this->videoProperties;
  119. }
  120. }
  121. // Adding a class alias for backwards compatibility with the previous class name.
  122. class_alias(Video::class, 'Google_Service_Slides_Video');