Class V1TranslateParams.Body.Builder
-
- All Implemented Interfaces:
public final class V1TranslateParams.Body.BuilderA builder for Body.
-
-
Method Summary
-
-
Method Detail
-
q
final V1TranslateParams.Body.Builder q(V1TranslateParams.Q q)
Text to translate. Can be a single string or an array for batch translation.
-
q
final V1TranslateParams.Body.Builder q(JsonField<V1TranslateParams.Q> q)
Sets Builder.q to an arbitrary JSON value.
You should usually call Builder.q with a well-typed Q value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
q
final V1TranslateParams.Body.Builder q(String string)
Alias for calling q with
Q.ofString(string).
-
qOfStrings
final V1TranslateParams.Body.Builder qOfStrings(List<String> strings)
Alias for calling q with
Q.ofStrings(strings).
-
target
final V1TranslateParams.Body.Builder target(String target)
Target language code (ISO 639-1)
-
target
final V1TranslateParams.Body.Builder target(JsonField<String> target)
Sets Builder.target to an arbitrary JSON value.
You should usually call Builder.target with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
format
final V1TranslateParams.Body.Builder format(V1TranslateParams.Format format)
Format of the source text. Use 'html' to preserve HTML tags.
-
format
final V1TranslateParams.Body.Builder format(JsonField<V1TranslateParams.Format> format)
Sets Builder.format to an arbitrary JSON value.
You should usually call Builder.format with a well-typed Format value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final V1TranslateParams.Body.Builder model(V1TranslateParams.Model model)
Translation model. 'nmt' (Neural Machine Translation) is recommended for quality.
-
model
final V1TranslateParams.Body.Builder model(JsonField<V1TranslateParams.Model> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
source
final V1TranslateParams.Body.Builder source(String source)
Source language code (ISO 639-1). If not specified, language is auto-detected.
-
source
final V1TranslateParams.Body.Builder source(JsonField<String> source)
Sets Builder.source to an arbitrary JSON value.
You should usually call Builder.source with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final V1TranslateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final V1TranslateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final V1TranslateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final V1TranslateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final V1TranslateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final V1TranslateParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.q() .target()
-
-
-
-