|
1 | 1 | /* |
2 | | - * (C) Copyright IBM Corp. 2018, 2020. |
| 2 | + * (C) Copyright IBM Corp. 2022. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
5 | 5 | * the License. You may obtain a copy of the License at |
@@ -23,20 +23,26 @@ public class CreateModelOptions extends GenericModel { |
23 | 23 |
|
24 | 24 | protected String baseModelId; |
25 | 25 | protected InputStream forcedGlossary; |
| 26 | + protected String forcedGlossaryContentType; |
26 | 27 | protected InputStream parallelCorpus; |
| 28 | + protected String parallelCorpusContentType; |
27 | 29 | protected String name; |
28 | 30 |
|
29 | 31 | /** Builder. */ |
30 | 32 | public static class Builder { |
31 | 33 | private String baseModelId; |
32 | 34 | private InputStream forcedGlossary; |
| 35 | + private String forcedGlossaryContentType; |
33 | 36 | private InputStream parallelCorpus; |
| 37 | + private String parallelCorpusContentType; |
34 | 38 | private String name; |
35 | 39 |
|
36 | 40 | private Builder(CreateModelOptions createModelOptions) { |
37 | 41 | this.baseModelId = createModelOptions.baseModelId; |
38 | 42 | this.forcedGlossary = createModelOptions.forcedGlossary; |
| 43 | + this.forcedGlossaryContentType = createModelOptions.forcedGlossaryContentType; |
39 | 44 | this.parallelCorpus = createModelOptions.parallelCorpus; |
| 45 | + this.parallelCorpusContentType = createModelOptions.parallelCorpusContentType; |
40 | 46 | this.name = createModelOptions.name; |
41 | 47 | } |
42 | 48 |
|
@@ -83,6 +89,17 @@ public Builder forcedGlossary(InputStream forcedGlossary) { |
83 | 89 | return this; |
84 | 90 | } |
85 | 91 |
|
| 92 | + /** |
| 93 | + * Set the forcedGlossaryContentType. |
| 94 | + * |
| 95 | + * @param forcedGlossaryContentType the forcedGlossaryContentType |
| 96 | + * @return the CreateModelOptions builder |
| 97 | + */ |
| 98 | + public Builder forcedGlossaryContentType(String forcedGlossaryContentType) { |
| 99 | + this.forcedGlossaryContentType = forcedGlossaryContentType; |
| 100 | + return this; |
| 101 | + } |
| 102 | + |
86 | 103 | /** |
87 | 104 | * Set the parallelCorpus. |
88 | 105 | * |
@@ -94,6 +111,17 @@ public Builder parallelCorpus(InputStream parallelCorpus) { |
94 | 111 | return this; |
95 | 112 | } |
96 | 113 |
|
| 114 | + /** |
| 115 | + * Set the parallelCorpusContentType. |
| 116 | + * |
| 117 | + * @param parallelCorpusContentType the parallelCorpusContentType |
| 118 | + * @return the CreateModelOptions builder |
| 119 | + */ |
| 120 | + public Builder parallelCorpusContentType(String parallelCorpusContentType) { |
| 121 | + this.parallelCorpusContentType = parallelCorpusContentType; |
| 122 | + return this; |
| 123 | + } |
| 124 | + |
97 | 125 | /** |
98 | 126 | * Set the name. |
99 | 127 | * |
@@ -135,7 +163,9 @@ protected CreateModelOptions(Builder builder) { |
135 | 163 | builder.baseModelId, "baseModelId cannot be null"); |
136 | 164 | baseModelId = builder.baseModelId; |
137 | 165 | forcedGlossary = builder.forcedGlossary; |
| 166 | + forcedGlossaryContentType = builder.forcedGlossaryContentType; |
138 | 167 | parallelCorpus = builder.parallelCorpus; |
| 168 | + parallelCorpusContentType = builder.parallelCorpusContentType; |
139 | 169 | name = builder.name; |
140 | 170 | } |
141 | 171 |
|
@@ -181,6 +211,18 @@ public InputStream forcedGlossary() { |
181 | 211 | return forcedGlossary; |
182 | 212 | } |
183 | 213 |
|
| 214 | + /** |
| 215 | + * Gets the forcedGlossaryContentType. |
| 216 | + * |
| 217 | + * <p>The content type of forcedGlossary. Values for this parameter can be obtained from the |
| 218 | + * HttpMediaType class. |
| 219 | + * |
| 220 | + * @return the forcedGlossaryContentType |
| 221 | + */ |
| 222 | + public String forcedGlossaryContentType() { |
| 223 | + return forcedGlossaryContentType; |
| 224 | + } |
| 225 | + |
184 | 226 | /** |
185 | 227 | * Gets the parallelCorpus. |
186 | 228 | * |
@@ -201,6 +243,18 @@ public InputStream parallelCorpus() { |
201 | 243 | return parallelCorpus; |
202 | 244 | } |
203 | 245 |
|
| 246 | + /** |
| 247 | + * Gets the parallelCorpusContentType. |
| 248 | + * |
| 249 | + * <p>The content type of parallelCorpus. Values for this parameter can be obtained from the |
| 250 | + * HttpMediaType class. |
| 251 | + * |
| 252 | + * @return the parallelCorpusContentType |
| 253 | + */ |
| 254 | + public String parallelCorpusContentType() { |
| 255 | + return parallelCorpusContentType; |
| 256 | + } |
| 257 | + |
204 | 258 | /** |
205 | 259 | * Gets the name. |
206 | 260 | * |
|