Skip to content

Commit d45607b

Browse files
jeff-arnapaparazzi0329
authored andcommitted
feat(language translator): update based on api definitions
mostly javadoc updates
1 parent 1e2682f commit d45607b

27 files changed

+150
-38
lines changed

language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.53.0-9710cac3-20220713-193508
15+
* IBM OpenAPI SDK Code Generator Version: 3.64.1-cee95189-20230124-211647
1616
*/
1717

1818
package com.ibm.watson.language_translator.v3;
@@ -65,8 +65,10 @@
6565
*/
6666
public class LanguageTranslator extends BaseService {
6767

68+
/** Default service name used when configuring the `LanguageTranslator` client. */
6869
public static final String DEFAULT_SERVICE_NAME = "language_translator";
6970

71+
/** Default service endpoint URL. */
7072
public static final String DEFAULT_SERVICE_URL =
7173
"https://api.us-south.language-translator.watson.cloud.ibm.com";
7274

@@ -490,8 +492,8 @@ public ServiceCall<DeleteModelResult> deleteModel(DeleteModelOptions deleteModel
490492
* Get model details.
491493
*
492494
* <p>Gets information about a translation model, including training status for custom models. Use
493-
* this API call to poll the status of your customization request. A successfully completed
494-
* training has a status of `available`.
495+
* this method to poll the status of your customization request. A successfully completed training
496+
* request has a status of `available`.
495497
*
496498
* @param getModelOptions the {@link GetModelOptions} containing the options for the call
497499
* @return a {@link ServiceCall} with a result of type {@link TranslationModel}
@@ -558,9 +560,20 @@ public ServiceCall<DocumentList> listDocuments() {
558560
* Translate document.
559561
*
560562
* <p>Submit a document for translation. You can submit the document contents in the `file`
561-
* parameter, or you can reference a previously submitted document by document ID. The maximum
562-
* file size for document translation is * 20 MB for service instances on the Standard, Advanced,
563-
* and Premium plans * 2 MB for service instances on the Lite plan
563+
* parameter, or you can specify a previously submitted document by document ID. The maximum file
564+
* size for document translation is * **2 MB** for service instances on the Lite plan * **20 MB**
565+
* for service instances on the Standard plan * **50 MB** for service instances on the Advanced
566+
* plan * **150 MB** for service instances on the Premium plan
567+
*
568+
* <p>You can specify the format of the file to be translated in one of two ways: * By specifying
569+
* the appropriate file extension for the format. * By specifying the content type (MIME type) of
570+
* the format as the `type` of the `file` parameter.
571+
*
572+
* <p>In some cases, especially for subtitle file formats, you must use either the file extension
573+
* or the content type. For more information about all supported file formats, their file
574+
* extensions and content types, and how and when to specify the file extension or content type,
575+
* see [Supported file
576+
* formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats).
564577
*
565578
* <p>**Note:** When translating a previously submitted document, the target language must be
566579
* different from the target language of the original request when the document was initially

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/CreateModelOptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2018, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -37,6 +37,11 @@ public static class Builder {
3737
private String parallelCorpusContentType;
3838
private String name;
3939

40+
/**
41+
* Instantiates a new Builder from an existing CreateModelOptions instance.
42+
*
43+
* @param createModelOptions the instance to initialize the Builder with
44+
*/
4045
private Builder(CreateModelOptions createModelOptions) {
4146
this.baseModelId = createModelOptions.baseModelId;
4247
this.forcedGlossary = createModelOptions.forcedGlossary;

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteDocumentOptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -23,6 +23,11 @@ public class DeleteDocumentOptions extends GenericModel {
2323
public static class Builder {
2424
private String documentId;
2525

26+
/**
27+
* Instantiates a new Builder from an existing DeleteDocumentOptions instance.
28+
*
29+
* @param deleteDocumentOptions the instance to initialize the Builder with
30+
*/
2631
private Builder(DeleteDocumentOptions deleteDocumentOptions) {
2732
this.documentId = deleteDocumentOptions.documentId;
2833
}

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelOptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2017, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -23,6 +23,11 @@ public class DeleteModelOptions extends GenericModel {
2323
public static class Builder {
2424
private String modelId;
2525

26+
/**
27+
* Instantiates a new Builder from an existing DeleteModelOptions instance.
28+
*
29+
* @param deleteModelOptions the instance to initialize the Builder with
30+
*/
2631
private Builder(DeleteModelOptions deleteModelOptions) {
2732
this.modelId = deleteModelOptions.modelId;
2833
}

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DeleteModelResult.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2020.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -19,6 +19,8 @@ public class DeleteModelResult extends GenericModel {
1919

2020
protected String status;
2121

22+
protected DeleteModelResult() {}
23+
2224
/**
2325
* Gets the status.
2426
*

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentList.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2020.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -20,6 +20,8 @@ public class DocumentList extends GenericModel {
2020

2121
protected List<DocumentStatus> documents;
2222

23+
protected DocumentList() {}
24+
2325
/**
2426
* Gets the documents.
2527
*

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/DocumentStatus.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2020.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -56,6 +56,8 @@ public interface Status {
5656
@SerializedName("character_count")
5757
protected Long characterCount;
5858

59+
protected DocumentStatus() {}
60+
5961
/**
6062
* Gets the documentId.
6163
*

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetDocumentStatusOptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -23,6 +23,11 @@ public class GetDocumentStatusOptions extends GenericModel {
2323
public static class Builder {
2424
private String documentId;
2525

26+
/**
27+
* Instantiates a new Builder from an existing GetDocumentStatusOptions instance.
28+
*
29+
* @param getDocumentStatusOptions the instance to initialize the Builder with
30+
*/
2631
private Builder(GetDocumentStatusOptions getDocumentStatusOptions) {
2732
this.documentId = getDocumentStatusOptions.documentId;
2833
}

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetModelOptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2017, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -23,6 +23,11 @@ public class GetModelOptions extends GenericModel {
2323
public static class Builder {
2424
private String modelId;
2525

26+
/**
27+
* Instantiates a new Builder from an existing GetModelOptions instance.
28+
*
29+
* @param getModelOptions the instance to initialize the Builder with
30+
*/
2631
private Builder(GetModelOptions getModelOptions) {
2732
this.modelId = getModelOptions.modelId;
2833
}

language-translator/src/main/java/com/ibm/watson/language_translator/v3/model/GetTranslatedDocumentOptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2022.
2+
* (C) Copyright IBM Corp. 2023.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -25,6 +25,11 @@ public static class Builder {
2525
private String documentId;
2626
private String accept;
2727

28+
/**
29+
* Instantiates a new Builder from an existing GetTranslatedDocumentOptions instance.
30+
*
31+
* @param getTranslatedDocumentOptions the instance to initialize the Builder with
32+
*/
2833
private Builder(GetTranslatedDocumentOptions getTranslatedDocumentOptions) {
2934
this.documentId = getTranslatedDocumentOptions.documentId;
3035
this.accept = getTranslatedDocumentOptions.accept;

0 commit comments

Comments
 (0)