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 18namespace Google\Service\CloudNaturalLanguage; 19 20class AnnotateTextResponse extends \Google\Collection 21{ 22 protected $collection_key = 'tokens'; 23 protected $categoriesType = ClassificationCategory::class; 24 protected $categoriesDataType = 'array'; 25 protected $documentSentimentType = Sentiment::class; 26 protected $documentSentimentDataType = ''; 27 protected $entitiesType = Entity::class; 28 protected $entitiesDataType = 'array'; 29 /** 30 * @var string 31 */ 32 public $language; 33 protected $sentencesType = Sentence::class; 34 protected $sentencesDataType = 'array'; 35 protected $tokensType = Token::class; 36 protected $tokensDataType = 'array'; 37 38 /** 39 * @param ClassificationCategory[] 40 */ 41 public function setCategories($categories) 42 { 43 $this->categories = $categories; 44 } 45 /** 46 * @return ClassificationCategory[] 47 */ 48 public function getCategories() 49 { 50 return $this->categories; 51 } 52 /** 53 * @param Sentiment 54 */ 55 public function setDocumentSentiment(Sentiment $documentSentiment) 56 { 57 $this->documentSentiment = $documentSentiment; 58 } 59 /** 60 * @return Sentiment 61 */ 62 public function getDocumentSentiment() 63 { 64 return $this->documentSentiment; 65 } 66 /** 67 * @param Entity[] 68 */ 69 public function setEntities($entities) 70 { 71 $this->entities = $entities; 72 } 73 /** 74 * @return Entity[] 75 */ 76 public function getEntities() 77 { 78 return $this->entities; 79 } 80 /** 81 * @param string 82 */ 83 public function setLanguage($language) 84 { 85 $this->language = $language; 86 } 87 /** 88 * @return string 89 */ 90 public function getLanguage() 91 { 92 return $this->language; 93 } 94 /** 95 * @param Sentence[] 96 */ 97 public function setSentences($sentences) 98 { 99 $this->sentences = $sentences; 100 } 101 /** 102 * @return Sentence[] 103 */ 104 public function getSentences() 105 { 106 return $this->sentences; 107 } 108 /** 109 * @param Token[] 110 */ 111 public function setTokens($tokens) 112 { 113 $this->tokens = $tokens; 114 } 115 /** 116 * @return Token[] 117 */ 118 public function getTokens() 119 { 120 return $this->tokens; 121 } 122} 123 124// Adding a class alias for backwards compatibility with the previous class name. 125class_alias(AnnotateTextResponse::class, 'Google_Service_CloudNaturalLanguage_AnnotateTextResponse'); 126