Class AnalyzeSyntaxResponse.Builder (2.5.0)

publicstaticfinalclass AnalyzeSyntaxResponse.BuilderextendsGeneratedMessageV3.Builder<AnalyzeSyntaxResponse.Builder>implementsAnalyzeSyntaxResponseOrBuilder

The syntax analysis response message.

Protobuf type google.cloud.language.v1.AnalyzeSyntaxResponse

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

Methods

addAllSentences(Iterable<? extends Sentence> values)

publicAnalyzeSyntaxResponse.BuilderaddAllSentences(Iterable<?extendsSentence>values)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.language.v1.Sentence>
Returns
Type Description

addAllTokens(Iterable<? extends Token> values)

publicAnalyzeSyntaxResponse.BuilderaddAllTokens(Iterable<?extendsToken>values)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.language.v1.Token>
Returns
Type Description

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicAnalyzeSyntaxResponse.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

addSentences(Sentence value)

publicAnalyzeSyntaxResponse.BuilderaddSentences(Sentencevalue)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameter
Name Description
value Sentence
Returns
Type Description

addSentences(Sentence.Builder builderForValue)

publicAnalyzeSyntaxResponse.BuilderaddSentences(Sentence.BuilderbuilderForValue)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameter
Name Description
builderForValue Sentence.Builder
Returns
Type Description

addSentences(int index, Sentence value)

publicAnalyzeSyntaxResponse.BuilderaddSentences(intindex,Sentencevalue)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameters
Name Description
index int
value Sentence
Returns
Type Description

addSentences(int index, Sentence.Builder builderForValue)

publicAnalyzeSyntaxResponse.BuilderaddSentences(intindex,Sentence.BuilderbuilderForValue)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameters
Name Description
index int
builderForValue Sentence.Builder
Returns
Type Description

addSentencesBuilder()

publicSentence.BuilderaddSentencesBuilder()

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Returns
Type Description

addSentencesBuilder(int index)

publicSentence.BuilderaddSentencesBuilder(intindex)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

addTokens(Token value)

publicAnalyzeSyntaxResponse.BuilderaddTokens(Tokenvalue)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameter
Name Description
value Token
Returns
Type Description

addTokens(Token.Builder builderForValue)

publicAnalyzeSyntaxResponse.BuilderaddTokens(Token.BuilderbuilderForValue)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameter
Name Description
builderForValue Token.Builder
Returns
Type Description

addTokens(int index, Token value)

publicAnalyzeSyntaxResponse.BuilderaddTokens(intindex,Tokenvalue)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameters
Name Description
index int
value Token
Returns
Type Description

addTokens(int index, Token.Builder builderForValue)

publicAnalyzeSyntaxResponse.BuilderaddTokens(intindex,Token.BuilderbuilderForValue)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameters
Name Description
index int
builderForValue Token.Builder
Returns
Type Description

addTokensBuilder()

publicToken.BuilderaddTokensBuilder()

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Returns
Type Description

addTokensBuilder(int index)

publicToken.BuilderaddTokensBuilder(intindex)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

build()

publicAnalyzeSyntaxResponsebuild()
Returns
Type Description

buildPartial()

publicAnalyzeSyntaxResponsebuildPartial()
Returns
Type Description

clear()

publicAnalyzeSyntaxResponse.Builderclear()
Returns
Type Description
Overrides

clearField(Descriptors.FieldDescriptor field)

publicAnalyzeSyntaxResponse.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
Overrides

clearLanguage()

publicAnalyzeSyntaxResponse.BuilderclearLanguage()

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.

string language = 3;

Returns
Type Description
AnalyzeSyntaxResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicAnalyzeSyntaxResponse.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
Returns
Type Description
Overrides

clearSentences()

publicAnalyzeSyntaxResponse.BuilderclearSentences()

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Returns
Type Description

clearTokens()

publicAnalyzeSyntaxResponse.BuilderclearTokens()

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Returns
Type Description

clone()

publicAnalyzeSyntaxResponse.Builderclone()
Returns
Type Description
Overrides

getDefaultInstanceForType()

publicAnalyzeSyntaxResponsegetDefaultInstanceForType()
Returns
Type Description

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getLanguage()

publicStringgetLanguage()

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.

string language = 3;

Returns
Type Description
String

The language.

getLanguageBytes()

publicByteStringgetLanguageBytes()

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.

string language = 3;

Returns
Type Description
ByteString

The bytes for language.

getSentences(int index)

publicSentencegetSentences(intindex)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

getSentencesBuilder(int index)

publicSentence.BuildergetSentencesBuilder(intindex)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

getSentencesBuilderList()

publicList<Sentence.Builder>getSentencesBuilderList()

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Returns
Type Description

getSentencesCount()

publicintgetSentencesCount()

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Returns
Type Description
int

getSentencesList()

publicList<Sentence>getSentencesList()

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Returns
Type Description

getSentencesOrBuilder(int index)

publicSentenceOrBuildergetSentencesOrBuilder(intindex)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

getSentencesOrBuilderList()

publicList<?extendsSentenceOrBuilder>getSentencesOrBuilderList()

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Returns
Type Description
List<? extends com.google.cloud.language.v1.SentenceOrBuilder>

getTokens(int index)

publicTokengetTokens(intindex)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

getTokensBuilder(int index)

publicToken.BuildergetTokensBuilder(intindex)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

getTokensBuilderList()

publicList<Token.Builder>getTokensBuilderList()

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Returns
Type Description

getTokensCount()

publicintgetTokensCount()

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Returns
Type Description
int

getTokensList()

publicList<Token>getTokensList()

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Returns
Type Description

getTokensOrBuilder(int index)

publicTokenOrBuildergetTokensOrBuilder(intindex)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

getTokensOrBuilderList()

publicList<?extendsTokenOrBuilder>getTokensOrBuilderList()

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Returns
Type Description
List<? extends com.google.cloud.language.v1.TokenOrBuilder>

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeFrom(AnalyzeSyntaxResponse other)

publicAnalyzeSyntaxResponse.BuildermergeFrom(AnalyzeSyntaxResponseother)
Parameter
Name Description
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicAnalyzeSyntaxResponse.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Overrides Exceptions
Type Description

mergeFrom(Message other)

publicAnalyzeSyntaxResponse.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalAnalyzeSyntaxResponse.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

removeSentences(int index)

publicAnalyzeSyntaxResponse.BuilderremoveSentences(intindex)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameter
Name Description
index int
Returns
Type Description

removeTokens(int index)

publicAnalyzeSyntaxResponse.BuilderremoveTokens(intindex)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameter
Name Description
index int
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

publicAnalyzeSyntaxResponse.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

setLanguage(String value)

publicAnalyzeSyntaxResponse.BuildersetLanguage(Stringvalue)

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.

string language = 3;

Parameter
Name Description
value String

The language to set.

Returns
Type Description
AnalyzeSyntaxResponse.Builder

This builder for chaining.

setLanguageBytes(ByteString value)

publicAnalyzeSyntaxResponse.BuildersetLanguageBytes(ByteStringvalue)

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.

string language = 3;

Parameter
Name Description
value ByteString

The bytes for language to set.

Returns
Type Description
AnalyzeSyntaxResponse.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicAnalyzeSyntaxResponse.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
index int
value Object
Returns
Type Description
Overrides

setSentences(int index, Sentence value)

publicAnalyzeSyntaxResponse.BuildersetSentences(intindex,Sentencevalue)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameters
Name Description
index int
value Sentence
Returns
Type Description

setSentences(int index, Sentence.Builder builderForValue)

publicAnalyzeSyntaxResponse.BuildersetSentences(intindex,Sentence.BuilderbuilderForValue)

Sentences in the input document.

repeated .google.cloud.language.v1.Sentence sentences = 1;

Parameters
Name Description
index int
builderForValue Sentence.Builder
Returns
Type Description

setTokens(int index, Token value)

publicAnalyzeSyntaxResponse.BuildersetTokens(intindex,Tokenvalue)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameters
Name Description
index int
value Token
Returns
Type Description

setTokens(int index, Token.Builder builderForValue)

publicAnalyzeSyntaxResponse.BuildersetTokens(intindex,Token.BuilderbuilderForValue)

Tokens, along with their syntactic information, in the input document.

repeated .google.cloud.language.v1.Token tokens = 2;

Parameters
Name Description
index int
builderForValue Token.Builder
Returns
Type Description

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalAnalyzeSyntaxResponse.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.