DeleteTextRequest.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 DeleteTextRequest extends \Google\Model
  19. {
  20. protected $cellLocationType = TableCellLocation::class;
  21. protected $cellLocationDataType = '';
  22. /**
  23. * The object ID of the shape or table from which the text will be deleted.
  24. *
  25. * @var string
  26. */
  27. public $objectId;
  28. protected $textRangeType = Range::class;
  29. protected $textRangeDataType = '';
  30. /**
  31. * The optional table cell location if the text is to be deleted from a table
  32. * cell. If present, the object_id must refer to a table.
  33. *
  34. * @param TableCellLocation $cellLocation
  35. */
  36. public function setCellLocation(TableCellLocation $cellLocation)
  37. {
  38. $this->cellLocation = $cellLocation;
  39. }
  40. /**
  41. * @return TableCellLocation
  42. */
  43. public function getCellLocation()
  44. {
  45. return $this->cellLocation;
  46. }
  47. /**
  48. * The object ID of the shape or table from which the text will be deleted.
  49. *
  50. * @param string $objectId
  51. */
  52. public function setObjectId($objectId)
  53. {
  54. $this->objectId = $objectId;
  55. }
  56. /**
  57. * @return string
  58. */
  59. public function getObjectId()
  60. {
  61. return $this->objectId;
  62. }
  63. /**
  64. * The range of text to delete, based on TextElement indexes. There is always
  65. * an implicit newline character at the end of a shape's or table cell's text
  66. * that cannot be deleted. `Range.Type.ALL` will use the correct bounds, but
  67. * care must be taken when specifying explicit bounds for range types
  68. * `FROM_START_INDEX` and `FIXED_RANGE`. For example, if the text is "ABC",
  69. * followed by an implicit newline, then the maximum value is 2 for
  70. * `text_range.start_index` and 3 for `text_range.end_index`. Deleting text
  71. * that crosses a paragraph boundary may result in changes to paragraph styles
  72. * and lists as the two paragraphs are merged. Ranges that include only one
  73. * code unit of a surrogate pair are expanded to include both code units.
  74. *
  75. * @param Range $textRange
  76. */
  77. public function setTextRange(Range $textRange)
  78. {
  79. $this->textRange = $textRange;
  80. }
  81. /**
  82. * @return Range
  83. */
  84. public function getTextRange()
  85. {
  86. return $this->textRange;
  87. }
  88. }
  89. // Adding a class alias for backwards compatibility with the previous class name.
  90. class_alias(DeleteTextRequest::class, 'Google_Service_Slides_DeleteTextRequest');