Class V1TranslateParams.Body
-
- All Implemented Interfaces:
public final class V1TranslateParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classV1TranslateParams.Body.BuilderA builder for Body.
-
Method Summary
Modifier and Type Method Description final V1TranslateParams.Qq()Text to translate. final Stringtarget()Target language code (ISO 639-1) final Optional<V1TranslateParams.Format>format()Format of the source text. final Optional<V1TranslateParams.Model>model()Translation model. final Optional<String>source()Source language code (ISO 639-1). final JsonField<V1TranslateParams.Q>_q()Returns the raw JSON value of q. final JsonField<String>_target()Returns the raw JSON value of target. final JsonField<V1TranslateParams.Format>_format()Returns the raw JSON value of format. final JsonField<V1TranslateParams.Model>_model()Returns the raw JSON value of model. final JsonField<String>_source()Returns the raw JSON value of source. final Map<String, JsonValue>_additionalProperties()final V1TranslateParams.Body.BuildertoBuilder()final V1TranslateParams.Bodyvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static V1TranslateParams.Body.Builderbuilder()Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
q
final V1TranslateParams.Q q()
Text to translate. Can be a single string or an array for batch translation.
-
format
final Optional<V1TranslateParams.Format> format()
Format of the source text. Use 'html' to preserve HTML tags.
-
model
final Optional<V1TranslateParams.Model> model()
Translation model. 'nmt' (Neural Machine Translation) is recommended for quality.
-
source
final Optional<String> source()
Source language code (ISO 639-1). If not specified, language is auto-detected.
-
_q
final JsonField<V1TranslateParams.Q> _q()
Returns the raw JSON value of q.
Unlike q, this method doesn't throw if the JSON field has an unexpected type.
-
_target
final JsonField<String> _target()
Returns the raw JSON value of target.
Unlike target, this method doesn't throw if the JSON field has an unexpected type.
-
_format
final JsonField<V1TranslateParams.Format> _format()
Returns the raw JSON value of format.
Unlike format, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<V1TranslateParams.Model> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_source
final JsonField<String> _source()
Returns the raw JSON value of source.
Unlike source, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final V1TranslateParams.Body.Builder toBuilder()
-
validate
final V1TranslateParams.Body validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static V1TranslateParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
The following fields are required:
.q() .target()
-
-
-
-