Class DetectLanguageResponse.Builder (2.32.0)

public static final class DetectLanguageResponse.Builder extends GeneratedMessageV3.Builder<DetectLanguageResponse.Builder> implements DetectLanguageResponseOrBuilder

The response message for language detection.

Protobuf type google.cloud.translation.v3.DetectLanguageResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllLanguages(Iterable<? extends DetectedLanguage> values)

public DetectLanguageResponse.Builder addAllLanguages(Iterable<? extends DetectedLanguage> values)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.translate.v3.DetectedLanguage>
Returns
TypeDescription
DetectLanguageResponse.Builder

addLanguages(DetectedLanguage value)

public DetectLanguageResponse.Builder addLanguages(DetectedLanguage value)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameter
NameDescription
valueDetectedLanguage
Returns
TypeDescription
DetectLanguageResponse.Builder

addLanguages(DetectedLanguage.Builder builderForValue)

public DetectLanguageResponse.Builder addLanguages(DetectedLanguage.Builder builderForValue)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameter
NameDescription
builderForValueDetectedLanguage.Builder
Returns
TypeDescription
DetectLanguageResponse.Builder

addLanguages(int index, DetectedLanguage value)

public DetectLanguageResponse.Builder addLanguages(int index, DetectedLanguage value)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameters
NameDescription
indexint
valueDetectedLanguage
Returns
TypeDescription
DetectLanguageResponse.Builder

addLanguages(int index, DetectedLanguage.Builder builderForValue)

public DetectLanguageResponse.Builder addLanguages(int index, DetectedLanguage.Builder builderForValue)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameters
NameDescription
indexint
builderForValueDetectedLanguage.Builder
Returns
TypeDescription
DetectLanguageResponse.Builder

addLanguagesBuilder()

public DetectedLanguage.Builder addLanguagesBuilder()

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Returns
TypeDescription
DetectedLanguage.Builder

addLanguagesBuilder(int index)

public DetectedLanguage.Builder addLanguagesBuilder(int index)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DetectedLanguage.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DetectLanguageResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

build()

public DetectLanguageResponse build()
Returns
TypeDescription
DetectLanguageResponse

buildPartial()

public DetectLanguageResponse buildPartial()
Returns
TypeDescription
DetectLanguageResponse

clear()

public DetectLanguageResponse.Builder clear()
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public DetectLanguageResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

clearLanguages()

public DetectLanguageResponse.Builder clearLanguages()

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Returns
TypeDescription
DetectLanguageResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public DetectLanguageResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

clone()

public DetectLanguageResponse.Builder clone()
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

getDefaultInstanceForType()

public DetectLanguageResponse getDefaultInstanceForType()
Returns
TypeDescription
DetectLanguageResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLanguages(int index)

public DetectedLanguage getLanguages(int index)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DetectedLanguage

getLanguagesBuilder(int index)

public DetectedLanguage.Builder getLanguagesBuilder(int index)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DetectedLanguage.Builder

getLanguagesBuilderList()

public List<DetectedLanguage.Builder> getLanguagesBuilderList()

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Returns
TypeDescription
List<Builder>

getLanguagesCount()

public int getLanguagesCount()

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Returns
TypeDescription
int

getLanguagesList()

public List<DetectedLanguage> getLanguagesList()

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Returns
TypeDescription
List<DetectedLanguage>

getLanguagesOrBuilder(int index)

public DetectedLanguageOrBuilder getLanguagesOrBuilder(int index)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DetectedLanguageOrBuilder

getLanguagesOrBuilderList()

public List<? extends DetectedLanguageOrBuilder> getLanguagesOrBuilderList()

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Returns
TypeDescription
List<? extends com.google.cloud.translate.v3.DetectedLanguageOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(DetectLanguageResponse other)

public DetectLanguageResponse.Builder mergeFrom(DetectLanguageResponse other)
Parameter
NameDescription
otherDetectLanguageResponse
Returns
TypeDescription
DetectLanguageResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DetectLanguageResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DetectLanguageResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DetectLanguageResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

removeLanguages(int index)

public DetectLanguageResponse.Builder removeLanguages(int index)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
DetectLanguageResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DetectLanguageResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

setLanguages(int index, DetectedLanguage value)

public DetectLanguageResponse.Builder setLanguages(int index, DetectedLanguage value)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameters
NameDescription
indexint
valueDetectedLanguage
Returns
TypeDescription
DetectLanguageResponse.Builder

setLanguages(int index, DetectedLanguage.Builder builderForValue)

public DetectLanguageResponse.Builder setLanguages(int index, DetectedLanguage.Builder builderForValue)

The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.

repeated .google.cloud.translation.v3.DetectedLanguage languages = 1;

Parameters
NameDescription
indexint
builderForValueDetectedLanguage.Builder
Returns
TypeDescription
DetectLanguageResponse.Builder

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

public DetectLanguageResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DetectLanguageResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DetectLanguageResponse.Builder
Overrides