GoogleCloudVideointelligenceV1p1beta1TextAnnotation.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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\CloudVideoIntelligence;
  18. class GoogleCloudVideointelligenceV1p1beta1TextAnnotation extends \Google\Collection
  19. {
  20. protected $collection_key = 'segments';
  21. protected $segmentsType = GoogleCloudVideointelligenceV1p1beta1TextSegment::class;
  22. protected $segmentsDataType = 'array';
  23. /**
  24. * The detected text.
  25. *
  26. * @var string
  27. */
  28. public $text;
  29. /**
  30. * Feature version.
  31. *
  32. * @var string
  33. */
  34. public $version;
  35. /**
  36. * All video segments where OCR detected text appears.
  37. *
  38. * @param GoogleCloudVideointelligenceV1p1beta1TextSegment[] $segments
  39. */
  40. public function setSegments($segments)
  41. {
  42. $this->segments = $segments;
  43. }
  44. /**
  45. * @return GoogleCloudVideointelligenceV1p1beta1TextSegment[]
  46. */
  47. public function getSegments()
  48. {
  49. return $this->segments;
  50. }
  51. /**
  52. * The detected text.
  53. *
  54. * @param string $text
  55. */
  56. public function setText($text)
  57. {
  58. $this->text = $text;
  59. }
  60. /**
  61. * @return string
  62. */
  63. public function getText()
  64. {
  65. return $this->text;
  66. }
  67. /**
  68. * Feature version.
  69. *
  70. * @param string $version
  71. */
  72. public function setVersion($version)
  73. {
  74. $this->version = $version;
  75. }
  76. /**
  77. * @return string
  78. */
  79. public function getVersion()
  80. {
  81. return $this->version;
  82. }
  83. }
  84. // Adding a class alias for backwards compatibility with the previous class name.
  85. class_alias(GoogleCloudVideointelligenceV1p1beta1TextAnnotation::class, 'Google_Service_CloudVideoIntelligence_GoogleCloudVideointelligenceV1p1beta1TextAnnotation');