public class ToneOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static interface |
ToneOptions.AcceptLanguage
The desired language of the response.
|
static class |
ToneOptions.Builder
Builder.
|
static interface |
ToneOptions.ContentLanguage
The language of the input text for the request: English or French.
|
static interface |
ToneOptions.Tone |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
acceptLanguage |
protected java.lang.String |
body |
protected java.lang.String |
contentLanguage |
protected java.lang.String |
contentType |
protected java.lang.Boolean |
sentences |
protected ToneInput |
toneInput |
protected java.util.List<java.lang.String> |
tones |
Modifier | Constructor and Description |
---|---|
protected |
ToneOptions(ToneOptions.Builder builder) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
acceptLanguage()
Gets the acceptLanguage.
|
java.lang.String |
body()
Gets the body.
|
java.lang.String |
contentLanguage()
Gets the contentLanguage.
|
java.lang.String |
contentType()
Gets the contentType.
|
ToneOptions.Builder |
newBuilder()
New builder.
|
java.lang.Boolean |
sentences()
Gets the sentences.
|
ToneInput |
toneInput()
Gets the toneInput.
|
java.util.List<java.lang.String> |
tones()
Gets the tones.
|
protected ToneInput toneInput
protected java.lang.String body
protected java.lang.String contentType
protected java.lang.Boolean sentences
protected java.util.List<java.lang.String> tones
protected java.lang.String contentLanguage
protected java.lang.String acceptLanguage
protected ToneOptions(ToneOptions.Builder builder)
public ToneOptions.Builder newBuilder()
public ToneInput toneInput()
JSON, plain text, or HTML input that contains the content to be analyzed. For JSON input, provide an object of type `ToneInput`.
public java.lang.String body()
JSON, plain text, or HTML input that contains the content to be analyzed. For JSON input, provide an object of type `ToneInput`.
public java.lang.String contentType()
The type of the input. A character encoding can be specified by including a `charset` parameter. For example, 'text/plain;charset=utf-8'.
public java.lang.Boolean sentences()
Indicates whether the service is to return an analysis of each individual sentence in addition to its analysis of the full document. If `true` (the default), the service returns results for each sentence.
public java.util.List<java.lang.String> tones()
**`2017-09-21`:** Deprecated. The service continues to accept the parameter for backward-compatibility, but the parameter no longer affects the response.
**`2016-05-19`:** A comma-separated list of tones for which the service is to return its analysis of the input; the indicated tones apply both to the full document and to individual sentences of the document. You can specify one or more of the valid values. Omit the parameter to request results for all three tones.
public java.lang.String contentLanguage()
The language of the input text for the request: English or French. Regional variants are treated as their parent language; for example, `en-US` is interpreted as `en`. The input content must match the specified language. Do not submit content that contains both languages. You can use different languages for **Content-Language** and **Accept-Language**. * **`2017-09-21`:** Accepts `en` or `fr`. * **`2016-05-19`:** Accepts only `en`.
public java.lang.String acceptLanguage()
The desired language of the response. For two-character arguments, regional variants are treated as their parent language; for example, `en-US` is interpreted as `en`. You can use different languages for **Content-Language** and **Accept-Language**.