1919
2020class AnnotateTextRequest extends \Google \Model
2121{
22+ /**
23+ * If `EncodingType` is not specified, encoding-dependent information (such as
24+ * `begin_offset`) will be set at `-1`.
25+ */
26+ public const ENCODING_TYPE_NONE = 'NONE ' ;
27+ /**
28+ * Encoding-dependent information (such as `begin_offset`) is calculated based
29+ * on the UTF-8 encoding of the input. C++ and Go are examples of languages
30+ * that use this encoding natively.
31+ */
32+ public const ENCODING_TYPE_UTF8 = 'UTF8 ' ;
33+ /**
34+ * Encoding-dependent information (such as `begin_offset`) is calculated based
35+ * on the UTF-16 encoding of the input. Java and JavaScript are examples of
36+ * languages that use this encoding natively.
37+ */
38+ public const ENCODING_TYPE_UTF16 = 'UTF16 ' ;
39+ /**
40+ * Encoding-dependent information (such as `begin_offset`) is calculated based
41+ * on the UTF-32 encoding of the input. Python is an example of a language
42+ * that uses this encoding natively.
43+ */
44+ public const ENCODING_TYPE_UTF32 = 'UTF32 ' ;
2245 protected $ documentType = Document::class;
2346 protected $ documentDataType = '' ;
2447 /**
48+ * The encoding type used by the API to calculate offsets.
49+ *
2550 * @var string
2651 */
2752 public $ encodingType ;
2853 protected $ featuresType = AnnotateTextRequestFeatures::class;
2954 protected $ featuresDataType = '' ;
3055
3156 /**
32- * @param Document
57+ * Required. Input document.
58+ *
59+ * @param Document $document
3360 */
3461 public function setDocument (Document $ document )
3562 {
@@ -43,21 +70,27 @@ public function getDocument()
4370 return $ this ->document ;
4471 }
4572 /**
46- * @param string
73+ * The encoding type used by the API to calculate offsets.
74+ *
75+ * Accepted values: NONE, UTF8, UTF16, UTF32
76+ *
77+ * @param self::ENCODING_TYPE_* $encodingType
4778 */
4879 public function setEncodingType ($ encodingType )
4980 {
5081 $ this ->encodingType = $ encodingType ;
5182 }
5283 /**
53- * @return string
84+ * @return self::ENCODING_TYPE_*
5485 */
5586 public function getEncodingType ()
5687 {
5788 return $ this ->encodingType ;
5889 }
5990 /**
60- * @param AnnotateTextRequestFeatures
91+ * Required. The enabled features.
92+ *
93+ * @param AnnotateTextRequestFeatures $features
6194 */
6295 public function setFeatures (AnnotateTextRequestFeatures $ features )
6396 {
0 commit comments