|
23 | 23 | */ |
24 | 24 | public class ToneOptions extends GenericModel { |
25 | 25 |
|
26 | | - /** |
27 | | - * The type of the input. A character encoding can be specified by including a `charset` parameter. For example, |
28 | | - * 'text/plain;charset=utf-8'. |
29 | | - */ |
30 | | - public interface ContentType { |
31 | | - /** application/json. */ |
32 | | - String APPLICATION_JSON = "application/json"; |
33 | | - /** text/plain. */ |
34 | | - String TEXT_PLAIN = "text/plain"; |
35 | | - /** text/html. */ |
36 | | - String TEXT_HTML = "text/html"; |
37 | | - } |
38 | | - |
39 | 26 | public interface Tone { |
40 | 27 | /** emotion. */ |
41 | 28 | String EMOTION = "emotion"; |
@@ -90,34 +77,47 @@ public interface AcceptLanguage { |
90 | 77 | String ZH_TW = "zh-tw"; |
91 | 78 | } |
92 | 79 |
|
| 80 | + /** |
| 81 | + * The type of the input. A character encoding can be specified by including a `charset` parameter. For example, |
| 82 | + * 'text/plain;charset=utf-8'. |
| 83 | + */ |
| 84 | + public interface ContentType { |
| 85 | + /** application/json. */ |
| 86 | + String APPLICATION_JSON = "application/json"; |
| 87 | + /** text/plain. */ |
| 88 | + String TEXT_PLAIN = "text/plain"; |
| 89 | + /** text/html. */ |
| 90 | + String TEXT_HTML = "text/html"; |
| 91 | + } |
| 92 | + |
93 | 93 | private ToneInput toneInput; |
94 | 94 | private String body; |
95 | | - private String contentType; |
96 | 95 | private Boolean sentences; |
97 | 96 | private List<String> tones; |
98 | 97 | private String contentLanguage; |
99 | 98 | private String acceptLanguage; |
| 99 | + private String contentType; |
100 | 100 |
|
101 | 101 | /** |
102 | 102 | * Builder. |
103 | 103 | */ |
104 | 104 | public static class Builder { |
105 | 105 | private ToneInput toneInput; |
106 | 106 | private String body; |
107 | | - private String contentType; |
108 | 107 | private Boolean sentences; |
109 | 108 | private List<String> tones; |
110 | 109 | private String contentLanguage; |
111 | 110 | private String acceptLanguage; |
| 111 | + private String contentType; |
112 | 112 |
|
113 | 113 | private Builder(ToneOptions toneOptions) { |
114 | | - toneInput = toneOptions.toneInput; |
115 | | - body = toneOptions.body; |
116 | | - contentType = toneOptions.contentType; |
117 | | - sentences = toneOptions.sentences; |
118 | | - tones = toneOptions.tones; |
119 | | - contentLanguage = toneOptions.contentLanguage; |
120 | | - acceptLanguage = toneOptions.acceptLanguage; |
| 114 | + this.toneInput = toneOptions.toneInput; |
| 115 | + this.body = toneOptions.body; |
| 116 | + this.sentences = toneOptions.sentences; |
| 117 | + this.tones = toneOptions.tones; |
| 118 | + this.contentLanguage = toneOptions.contentLanguage; |
| 119 | + this.acceptLanguage = toneOptions.acceptLanguage; |
| 120 | + this.contentType = toneOptions.contentType; |
121 | 121 | } |
122 | 122 |
|
123 | 123 | /** |
@@ -235,11 +235,11 @@ public Builder html(String html) { |
235 | 235 | private ToneOptions(Builder builder) { |
236 | 236 | toneInput = builder.toneInput; |
237 | 237 | body = builder.body; |
238 | | - contentType = builder.contentType; |
239 | 238 | sentences = builder.sentences; |
240 | 239 | tones = builder.tones; |
241 | 240 | contentLanguage = builder.contentLanguage; |
242 | 241 | acceptLanguage = builder.acceptLanguage; |
| 242 | + contentType = builder.contentType; |
243 | 243 | } |
244 | 244 |
|
245 | 245 | /** |
@@ -275,18 +275,6 @@ public String body() { |
275 | 275 | return body; |
276 | 276 | } |
277 | 277 |
|
278 | | - /** |
279 | | - * Gets the contentType. |
280 | | - * |
281 | | - * The type of the input. A character encoding can be specified by including a `charset` parameter. For example, |
282 | | - * 'text/plain;charset=utf-8'. |
283 | | - * |
284 | | - * @return the contentType |
285 | | - */ |
286 | | - public String contentType() { |
287 | | - return contentType; |
288 | | - } |
289 | | - |
290 | 278 | /** |
291 | 279 | * Gets the sentences. |
292 | 280 | * |
@@ -343,4 +331,16 @@ public String contentLanguage() { |
343 | 331 | public String acceptLanguage() { |
344 | 332 | return acceptLanguage; |
345 | 333 | } |
| 334 | + |
| 335 | + /** |
| 336 | + * Gets the contentType. |
| 337 | + * |
| 338 | + * The type of the input. A character encoding can be specified by including a `charset` parameter. For example, |
| 339 | + * 'text/plain;charset=utf-8'. |
| 340 | + * |
| 341 | + * @return the contentType |
| 342 | + */ |
| 343 | + public String contentType() { |
| 344 | + return contentType; |
| 345 | + } |
346 | 346 | } |
0 commit comments