Class ToneOptions
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
public class ToneOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceToneOptions.AcceptLanguageThe desired language of the response.static classToneOptions.BuilderBuilder.static interfaceToneOptions.ContentLanguageThe language of the input text for the request: English or French.static interfaceToneOptions.Tone -
Method Summary
Modifier and Type Method Description StringacceptLanguage()Gets the acceptLanguage.Stringbody()Gets the body.StringcontentLanguage()Gets the contentLanguage.StringcontentType()Gets the contentType.ToneOptions.BuildernewBuilder()New builder.Booleansentences()Gets the sentences.ToneInputtoneInput()Gets the toneInput.List<String>tones()Gets the tones.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Method Details
-
newBuilder
New builder.- Returns:
- a ToneOptions builder
-
toneInput
Gets the toneInput.JSON, plain text, or HTML input that contains the content to be analyzed. For JSON input, provide an object of type `ToneInput`.
- Returns:
- the toneInput
-
body
Gets the body.JSON, plain text, or HTML input that contains the content to be analyzed. For JSON input, provide an object of type `ToneInput`.
- Returns:
- the body
-
contentType
Gets the contentType.The type of the input. A character encoding can be specified by including a `charset` parameter. For example, 'text/plain;charset=utf-8'.
- Returns:
- the contentType
-
sentences
Gets the 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.
- Returns:
- the sentences
-
tones
Gets the 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.
- Returns:
- the tones
-
contentLanguage
Gets the 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`.
- Returns:
- the contentLanguage
-
acceptLanguage
Gets the 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**.
- Returns:
- the acceptLanguage
-