Skip to content

Commit 9b0200d

Browse files
1 parent c4dc433 commit 9b0200d

132 files changed

Lines changed: 4111 additions & 501 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/CloudNaturalLanguage/AnalyzeEntitiesRequest.php

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,42 @@
1919

2020
class AnalyzeEntitiesRequest 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

2954
/**
30-
* @param Document
55+
* Required. Input document.
56+
*
57+
* @param Document $document
3158
*/
3259
public function setDocument(Document $document)
3360
{
@@ -41,14 +68,18 @@ public function getDocument()
4168
return $this->document;
4269
}
4370
/**
44-
* @param string
71+
* The encoding type used by the API to calculate offsets.
72+
*
73+
* Accepted values: NONE, UTF8, UTF16, UTF32
74+
*
75+
* @param self::ENCODING_TYPE_* $encodingType
4576
*/
4677
public function setEncodingType($encodingType)
4778
{
4879
$this->encodingType = $encodingType;
4980
}
5081
/**
51-
* @return string
82+
* @return self::ENCODING_TYPE_*
5283
*/
5384
public function getEncodingType()
5485
{

src/CloudNaturalLanguage/AnalyzeEntitiesResponse.php

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,26 @@ class AnalyzeEntitiesResponse extends \Google\Collection
2323
protected $entitiesType = Entity::class;
2424
protected $entitiesDataType = 'array';
2525
/**
26+
* The language of the text, which will be the same as the language specified
27+
* in the request or, if not specified, the automatically-detected language.
28+
* See Document.language_code field for more details.
29+
*
2630
* @var string
2731
*/
2832
public $languageCode;
2933
/**
34+
* Whether the language is officially supported. The API may still return a
35+
* response when the language is not supported, but it is on a best effort
36+
* basis.
37+
*
3038
* @var bool
3139
*/
3240
public $languageSupported;
3341

3442
/**
35-
* @param Entity[]
43+
* The recognized entities in the input document.
44+
*
45+
* @param Entity[] $entities
3646
*/
3747
public function setEntities($entities)
3848
{
@@ -46,7 +56,11 @@ public function getEntities()
4656
return $this->entities;
4757
}
4858
/**
49-
* @param string
59+
* The language of the text, which will be the same as the language specified
60+
* in the request or, if not specified, the automatically-detected language.
61+
* See Document.language_code field for more details.
62+
*
63+
* @param string $languageCode
5064
*/
5165
public function setLanguageCode($languageCode)
5266
{
@@ -60,7 +74,11 @@ public function getLanguageCode()
6074
return $this->languageCode;
6175
}
6276
/**
63-
* @param bool
77+
* Whether the language is officially supported. The API may still return a
78+
* response when the language is not supported, but it is on a best effort
79+
* basis.
80+
*
81+
* @param bool $languageSupported
6482
*/
6583
public function setLanguageSupported($languageSupported)
6684
{

src/CloudNaturalLanguage/AnalyzeSentimentRequest.php

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,42 @@
1919

2020
class AnalyzeSentimentRequest 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 sentence offsets.
49+
*
2550
* @var string
2651
*/
2752
public $encodingType;
2853

2954
/**
30-
* @param Document
55+
* Required. Input document.
56+
*
57+
* @param Document $document
3158
*/
3259
public function setDocument(Document $document)
3360
{
@@ -41,14 +68,18 @@ public function getDocument()
4168
return $this->document;
4269
}
4370
/**
44-
* @param string
71+
* The encoding type used by the API to calculate sentence offsets.
72+
*
73+
* Accepted values: NONE, UTF8, UTF16, UTF32
74+
*
75+
* @param self::ENCODING_TYPE_* $encodingType
4576
*/
4677
public function setEncodingType($encodingType)
4778
{
4879
$this->encodingType = $encodingType;
4980
}
5081
/**
51-
* @return string
82+
* @return self::ENCODING_TYPE_*
5283
*/
5384
public function getEncodingType()
5485
{

src/CloudNaturalLanguage/AnalyzeSentimentResponse.php

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,28 @@ class AnalyzeSentimentResponse extends \Google\Collection
2323
protected $documentSentimentType = Sentiment::class;
2424
protected $documentSentimentDataType = '';
2525
/**
26+
* The language of the text, which will be the same as the language specified
27+
* in the request or, if not specified, the automatically-detected language.
28+
* See Document.language_code field for more details.
29+
*
2630
* @var string
2731
*/
2832
public $languageCode;
2933
/**
34+
* Whether the language is officially supported. The API may still return a
35+
* response when the language is not supported, but it is on a best effort
36+
* basis.
37+
*
3038
* @var bool
3139
*/
3240
public $languageSupported;
3341
protected $sentencesType = Sentence::class;
3442
protected $sentencesDataType = 'array';
3543

3644
/**
37-
* @param Sentiment
45+
* The overall sentiment of the input document.
46+
*
47+
* @param Sentiment $documentSentiment
3848
*/
3949
public function setDocumentSentiment(Sentiment $documentSentiment)
4050
{
@@ -48,7 +58,11 @@ public function getDocumentSentiment()
4858
return $this->documentSentiment;
4959
}
5060
/**
51-
* @param string
61+
* The language of the text, which will be the same as the language specified
62+
* in the request or, if not specified, the automatically-detected language.
63+
* See Document.language_code field for more details.
64+
*
65+
* @param string $languageCode
5266
*/
5367
public function setLanguageCode($languageCode)
5468
{
@@ -62,7 +76,11 @@ public function getLanguageCode()
6276
return $this->languageCode;
6377
}
6478
/**
65-
* @param bool
79+
* Whether the language is officially supported. The API may still return a
80+
* response when the language is not supported, but it is on a best effort
81+
* basis.
82+
*
83+
* @param bool $languageSupported
6684
*/
6785
public function setLanguageSupported($languageSupported)
6886
{
@@ -76,7 +94,9 @@ public function getLanguageSupported()
7694
return $this->languageSupported;
7795
}
7896
/**
79-
* @param Sentence[]
97+
* The sentiment for all the sentences in the document.
98+
*
99+
* @param Sentence[] $sentences
80100
*/
81101
public function setSentences($sentences)
82102
{

src/CloudNaturalLanguage/AnnotateTextRequest.php

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,44 @@
1919

2020
class 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
{

src/CloudNaturalLanguage/AnnotateTextRequestFeatures.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,34 @@
2020
class AnnotateTextRequestFeatures extends \Google\Model
2121
{
2222
/**
23+
* Optional. Classify the full document into categories.
24+
*
2325
* @var bool
2426
*/
2527
public $classifyText;
2628
/**
29+
* Optional. Extract document-level sentiment.
30+
*
2731
* @var bool
2832
*/
2933
public $extractDocumentSentiment;
3034
/**
35+
* Optional. Extract entities.
36+
*
3137
* @var bool
3238
*/
3339
public $extractEntities;
3440
/**
41+
* Optional. Moderate the document for harmful and sensitive categories.
42+
*
3543
* @var bool
3644
*/
3745
public $moderateText;
3846

3947
/**
40-
* @param bool
48+
* Optional. Classify the full document into categories.
49+
*
50+
* @param bool $classifyText
4151
*/
4252
public function setClassifyText($classifyText)
4353
{
@@ -51,7 +61,9 @@ public function getClassifyText()
5161
return $this->classifyText;
5262
}
5363
/**
54-
* @param bool
64+
* Optional. Extract document-level sentiment.
65+
*
66+
* @param bool $extractDocumentSentiment
5567
*/
5668
public function setExtractDocumentSentiment($extractDocumentSentiment)
5769
{
@@ -65,7 +77,9 @@ public function getExtractDocumentSentiment()
6577
return $this->extractDocumentSentiment;
6678
}
6779
/**
68-
* @param bool
80+
* Optional. Extract entities.
81+
*
82+
* @param bool $extractEntities
6983
*/
7084
public function setExtractEntities($extractEntities)
7185
{
@@ -79,7 +93,9 @@ public function getExtractEntities()
7993
return $this->extractEntities;
8094
}
8195
/**
82-
* @param bool
96+
* Optional. Moderate the document for harmful and sensitive categories.
97+
*
98+
* @param bool $moderateText
8399
*/
84100
public function setModerateText($moderateText)
85101
{

0 commit comments

Comments
 (0)