diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java index 83599259b50..1817c9e0ce3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/Discovery.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.53.0-9710cac3-20220713-193508 + * IBM OpenAPI SDK Code Generator Version: 3.64.1-cee95189-20230124-211647 */ package com.ibm.watson.discovery.v2; @@ -107,8 +107,8 @@ import okhttp3.MultipartBody; /** - * IBM Watson™ Discovery is a cognitive search and content analytics engine that you can - * add to applications to identify patterns, trends and actionable insights to drive better + * IBM Watson® Discovery is a cognitive search and content analytics engine that you can add + * to applications to identify patterns, trends and actionable insights to drive better * decision-making. Securely unify structured and unstructured data with pre-enriched content, and * use a simplified query language to eliminate the need for manual filtering of results. * @@ -116,8 +116,10 @@ */ public class Discovery extends BaseService { + /** Default service name used when configuring the `Discovery` client. */ public static final String DEFAULT_SERVICE_NAME = "discovery"; + /** Default service endpoint URL. */ public static final String DEFAULT_SERVICE_URL = "https://api.us-south.discovery.watson.cloud.ibm.com"; @@ -465,12 +467,6 @@ public ServiceCall createCollection( com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() .toJsonTree(createCollectionOptions.enrichments())); } - if (createCollectionOptions.smartDocumentUnderstanding() != null) { - contentJson.add( - "smart_document_understanding", - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() - .toJsonTree(createCollectionOptions.smartDocumentUnderstanding())); - } builder.bodyJson(contentJson); ResponseConverter responseConverter = ResponseConverterUtils.getValue( @@ -597,7 +593,8 @@ public ServiceCall deleteCollection(DeleteCollectionOptions deleteCollecti * each document and returns information for up to 10,000 documents. * *

**Note**: This method is available only from Cloud Pak for Data version 4.0.9 and later - * installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. + * installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. It is not + * currently available from Premium plan instances. * * @param listDocumentsOptions the {@link ListDocumentsOptions} containing the options for the * call @@ -653,8 +650,8 @@ public ServiceCall listDocuments( * *

Returns immediately after the system has accepted the document for processing. * - *

This operation works with a file upload collection. It cannot be used to modify a collection - * that crawls an external data source. + *

Use this method to upload a file to the collection. You cannot use this method to crawl an + * external data source. * *

* For a list of supported file types, see the [product * documentation](/docs/discovery-data?topic=discovery-data-collections#supportedfiletypes). @@ -731,7 +728,8 @@ public ServiceCall addDocument(AddDocumentOptions addDocumentO * by crawling an external data source. * *

**Note**: This method is available only from Cloud Pak for Data version 4.0.9 and later - * installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. + * installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. It is not + * currently available from Premium plan instances. * * @param getDocumentOptions the {@link GetDocumentOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link DocumentDetails} @@ -767,8 +765,8 @@ public ServiceCall getDocument(GetDocumentOptions getDocumentOp *

Replace an existing document or add a document with a specified document ID. Starts * ingesting a document with optional metadata. * - *

This operation works with a file upload collection. It cannot be used to modify a collection - * that crawls an external data source. + *

Use this method to upload a file to a collection. You cannot use this method to crawl an + * external data source. * *

If the document is uploaded to a collection that shares its data with another collection, * the **X-Watson-Discovery-Force** header must be set to `true`. @@ -832,15 +830,17 @@ public ServiceCall updateDocument(UpdateDocumentOptions update /** * Delete a document. * - *

If the given document ID is invalid, or if the document is not found, then the a success - * response is returned (HTTP status code `200`) with the status set to 'deleted'. - * - *

**Note:** This operation only works on collections created to accept direct file uploads. It - * cannot be used to modify a collection that connects to an external source such as Microsoft - * SharePoint. + *

Deletes the document with the document ID that you specify from the collection. Removes + * uploaded documents from the collection permanently. If you delete a document that was added by + * crawling an external data source, the document will be added again with the next scheduled + * crawl of the data source. The delete function removes the document from the collection, not + * from the external data source. * - *

**Note:** Segments of an uploaded document cannot be deleted individually. Delete all - * segments by deleting using the `parent_document_id` of a segment result. + *

**Note:** Files such as CSV or JSON files generate subdocuments when they are added to a + * collection. If you delete a subdocument, and then repeat the action that created it, the + * deleted document is added back in to your collection. To remove subdocuments that are generated + * by an uploaded file, delete the original document instead. You can get the document ID of the + * original document from the `parent_document_id` of the subdocument result. * * @param deleteDocumentOptions the {@link DeleteDocumentOptions} containing the options for the * call @@ -880,12 +880,11 @@ public ServiceCall deleteDocument( * *

Search your data by submitting queries that are written in natural language or formatted in * the Discovery Query Language. For more information, see the [Discovery - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-concepts). - * The default query parameters differ by project type. For more information about the project - * default settings, see the [Discovery - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-defaults). - * See [the Projects API documentation](#create-project) for details about how to set custom - * default query settings. + * documentation](/docs/discovery-data?topic=discovery-data-query-concepts). The default query + * parameters differ by project type. For more information about the project default settings, see + * the [Discovery documentation](/docs/discovery-data?topic=discovery-data-query-defaults). See + * [the Projects API documentation](#create-project) for details about how to set custom default + * query settings. * *

The length of the UTF-8 encoding of the POST body cannot exceed 10,000 bytes, which is * roughly equivalent to 10,000 characters in English. @@ -1163,10 +1162,8 @@ public ServiceCall getStopwordList(GetStopwordListOptions getStopw * indexing time and at query time. A custom stop words list that you add is used at query time * only. * - *

The custom stop words list replaces the default stop words list. Therefore, if you want to - * keep the stop words that were used when the collection was indexed, get the default stop words - * list for the language of the collection first and edit it to create your custom list. For - * information about the default stop words lists per language, see [the product + *

The custom stop words list augments the default stop words list; you cannot remove stop + * words. For information about the default stop words lists per language, see [the product * documentation](/docs/discovery-data?topic=discovery-data-stopwords). * * @param createStopwordListOptions the {@link CreateStopwordListOptions} containing the options @@ -2260,7 +2257,7 @@ public ServiceCall analyzeDocument( *

You associate a customer ID with data by passing the **X-Watson-Metadata** header with a * request that passes data. For more information about personal data and customer IDs, see * [Information - * security](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-information-security#information-security). + * security](/docs/discovery-data?topic=discovery-data-information-security#information-security). * *

**Note:** This method is only supported on IBM Cloud instances of Discovery. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java index e20c5ab13d8..f3d3c1a89a3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AddDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,11 @@ public static class Builder { private String metadata; private Boolean xWatsonDiscoveryForce; + /** + * Instantiates a new Builder from an existing AddDocumentOptions instance. + * + * @param addDocumentOptions the instance to initialize the Builder with + */ private Builder(AddDocumentOptions addDocumentOptions) { this.projectId = addDocumentOptions.projectId; this.collectionId = addDocumentOptions.collectionId; @@ -218,7 +223,7 @@ public String collectionId() { * *

When adding a document, the content of the document to ingest. For maximum supported file * size limits, see [the - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits). + * documentation](/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits). * *

When analyzing a document, the content of the document to analyze but not ingest. Only the * `application/json` content type is supported currently. For maximum supported file size limits, diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java index c475893c195..7d29b9225b3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzeDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -37,6 +37,11 @@ public static class Builder { private String fileContentType; private String metadata; + /** + * Instantiates a new Builder from an existing AnalyzeDocumentOptions instance. + * + * @param analyzeDocumentOptions the instance to initialize the Builder with + */ private Builder(AnalyzeDocumentOptions analyzeDocumentOptions) { this.projectId = analyzeDocumentOptions.projectId; this.collectionId = analyzeDocumentOptions.collectionId; @@ -203,7 +208,7 @@ public String collectionId() { * *

When adding a document, the content of the document to ingest. For maximum supported file * size limits, see [the - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits). + * documentation](/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits). * *

When analyzing a document, the content of the document to analyze but not ingest. Only the * `application/json` content type is supported currently. For maximum supported file size limits, diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java index 3a6743f3f4b..a5c06d58592 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/AnalyzedDocument.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class AnalyzedDocument extends GenericModel { protected List notices; protected AnalyzedResult result; + protected AnalyzedDocument() {} + /** * Gets the notices. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java index e7c87c3d985..ce28bd2ecb7 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierFederatedModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class ClassifierFederatedModel extends GenericModel { public static class Builder { private String field; + /** + * Instantiates a new Builder from an existing ClassifierFederatedModel instance. + * + * @param classifierFederatedModel the instance to initialize the Builder with + */ private Builder(ClassifierFederatedModel classifierFederatedModel) { this.field = classifierFederatedModel.field; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java index c095def5eae..e113a2755bd 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ClassifierModelEvaluation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -28,6 +28,8 @@ public class ClassifierModelEvaluation extends GenericModel { @SerializedName("per_class") protected List perClass; + protected ClassifierModelEvaluation() {} + /** * Gets the microAverage. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java index 93d14e6f419..ef1229e651a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Collection.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,8 @@ public class Collection extends GenericModel { protected String name; + protected Collection() {} + /** * Gets the collectionId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java index 34ed4205708..60e24394f98 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,14 +39,17 @@ public static class Builder { private String description; private String language; private List enrichments; - private CollectionDetailsSmartDocumentUnderstanding smartDocumentUnderstanding; + /** + * Instantiates a new Builder from an existing CollectionDetails instance. + * + * @param collectionDetails the instance to initialize the Builder with + */ private Builder(CollectionDetails collectionDetails) { this.name = collectionDetails.name; this.description = collectionDetails.description; this.language = collectionDetails.language; this.enrichments = collectionDetails.enrichments; - this.smartDocumentUnderstanding = collectionDetails.smartDocumentUnderstanding; } /** Instantiates a new builder. */ @@ -128,18 +131,6 @@ public Builder enrichments(List enrichments) { this.enrichments = enrichments; return this; } - - /** - * Set the smartDocumentUnderstanding. - * - * @param smartDocumentUnderstanding the smartDocumentUnderstanding - * @return the CollectionDetails builder - */ - public Builder smartDocumentUnderstanding( - CollectionDetailsSmartDocumentUnderstanding smartDocumentUnderstanding) { - this.smartDocumentUnderstanding = smartDocumentUnderstanding; - return this; - } } protected CollectionDetails() {} @@ -150,7 +141,6 @@ protected CollectionDetails(Builder builder) { description = builder.description; language = builder.language; enrichments = builder.enrichments; - smartDocumentUnderstanding = builder.smartDocumentUnderstanding; } /** diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java index e51c0d836ba..12187a0b39b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionDetailsSmartDocumentUnderstanding.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -51,6 +51,13 @@ public static class Builder { private Boolean enabled; private String model; + /** + * Instantiates a new Builder from an existing CollectionDetailsSmartDocumentUnderstanding + * instance. + * + * @param collectionDetailsSmartDocumentUnderstanding the instance to initialize the Builder + * with + */ private Builder( CollectionDetailsSmartDocumentUnderstanding collectionDetailsSmartDocumentUnderstanding) { this.enabled = collectionDetailsSmartDocumentUnderstanding.enabled; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java index 4e59df810a4..e958b268ec5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CollectionEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -30,6 +30,11 @@ public static class Builder { private String enrichmentId; private List fields; + /** + * Instantiates a new Builder from an existing CollectionEnrichment instance. + * + * @param collectionEnrichment the instance to initialize the Builder with + */ private Builder(CollectionEnrichment collectionEnrichment) { this.enrichmentId = collectionEnrichment.enrichmentId; this.fields = collectionEnrichment.fields; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java index 0f1e40b7ae5..f507bee5509 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Completions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class Completions extends GenericModel { protected List completions; + protected Completions() {} + /** * Gets the completions. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java index 9ae2b6babec..cbef5b7d913 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,8 @@ public interface VisualizationType { @SerializedName("visualization_type") protected String visualizationType; + protected ComponentSettingsAggregation() {} + /** * Gets the name. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java index e8e953c4e4b..e009cdc0c2d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShown.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class ComponentSettingsFieldsShown extends GenericModel { protected ComponentSettingsFieldsShownBody body; protected ComponentSettingsFieldsShownTitle title; + protected ComponentSettingsFieldsShown() {} + /** * Gets the body. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java index 8849d918ded..b496e81487a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownBody.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,8 @@ public class ComponentSettingsFieldsShownBody extends GenericModel { protected String field; + protected ComponentSettingsFieldsShownBody() {} + /** * Gets the usePassage. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java index 5534b8a3b70..8af5d59c76b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsFieldsShownTitle.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -19,6 +19,8 @@ public class ComponentSettingsFieldsShownTitle extends GenericModel { protected String field; + protected ComponentSettingsFieldsShownTitle() {} + /** * Gets the field. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java index 655d178837b..b7460b37844 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ComponentSettingsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -32,6 +32,8 @@ public class ComponentSettingsResponse extends GenericModel { protected List aggregations; + protected ComponentSettingsResponse() {} + /** * Gets the fieldsShown. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java index fb5bdaa32c7..314e93f9a4d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,7 +24,6 @@ public class CreateCollectionOptions extends GenericModel { protected String description; protected String language; protected List enrichments; - protected CollectionDetailsSmartDocumentUnderstanding smartDocumentUnderstanding; /** Builder. */ public static class Builder { @@ -33,15 +32,18 @@ public static class Builder { private String description; private String language; private List enrichments; - private CollectionDetailsSmartDocumentUnderstanding smartDocumentUnderstanding; + /** + * Instantiates a new Builder from an existing CreateCollectionOptions instance. + * + * @param createCollectionOptions the instance to initialize the Builder with + */ private Builder(CreateCollectionOptions createCollectionOptions) { this.projectId = createCollectionOptions.projectId; this.name = createCollectionOptions.name; this.description = createCollectionOptions.description; this.language = createCollectionOptions.language; this.enrichments = createCollectionOptions.enrichments; - this.smartDocumentUnderstanding = createCollectionOptions.smartDocumentUnderstanding; } /** Instantiates a new builder. */ @@ -137,18 +139,6 @@ public Builder enrichments(List enrichments) { return this; } - /** - * Set the smartDocumentUnderstanding. - * - * @param smartDocumentUnderstanding the smartDocumentUnderstanding - * @return the CreateCollectionOptions builder - */ - public Builder smartDocumentUnderstanding( - CollectionDetailsSmartDocumentUnderstanding smartDocumentUnderstanding) { - this.smartDocumentUnderstanding = smartDocumentUnderstanding; - return this; - } - /** * Set the collectionDetails. * @@ -160,7 +150,6 @@ public Builder collectionDetails(CollectionDetails collectionDetails) { this.description = collectionDetails.description(); this.language = collectionDetails.language(); this.enrichments = collectionDetails.enrichments(); - this.smartDocumentUnderstanding = collectionDetails.smartDocumentUnderstanding(); return this; } } @@ -175,7 +164,6 @@ protected CreateCollectionOptions(Builder builder) { description = builder.description; language = builder.language; enrichments = builder.enrichments; - smartDocumentUnderstanding = builder.smartDocumentUnderstanding; } /** @@ -248,15 +236,4 @@ public String language() { public List enrichments() { return enrichments; } - - /** - * Gets the smartDocumentUnderstanding. - * - *

An object that describes the Smart Document Understanding model for a collection. - * - * @return the smartDocumentUnderstanding - */ - public CollectionDetailsSmartDocumentUnderstanding smartDocumentUnderstanding() { - return smartDocumentUnderstanding; - } } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java index 612736777a2..f1dec0cbe30 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -44,6 +44,11 @@ public static class Builder { private List enrichments; private ClassifierFederatedModel federatedClassification; + /** + * Instantiates a new Builder from an existing CreateDocumentClassifier instance. + * + * @param createDocumentClassifier the instance to initialize the Builder with + */ private Builder(CreateDocumentClassifier createDocumentClassifier) { this.name = createDocumentClassifier.name; this.description = createDocumentClassifier.description; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java index 2a18d2eaa46..64821679bd0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -41,6 +41,11 @@ public static class Builder { private Long trainingMaxSteps; private Double improvementRatio; + /** + * Instantiates a new Builder from an existing CreateDocumentClassifierModelOptions instance. + * + * @param createDocumentClassifierModelOptions the instance to initialize the Builder with + */ private Builder(CreateDocumentClassifierModelOptions createDocumentClassifierModelOptions) { this.projectId = createDocumentClassifierModelOptions.projectId; this.classifierId = createDocumentClassifierModelOptions.classifierId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java index c7c485df65c..1375e1a1a2a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,6 +33,11 @@ public static class Builder { private CreateDocumentClassifier classifier; private InputStream testData; + /** + * Instantiates a new Builder from an existing CreateDocumentClassifierOptions instance. + * + * @param createDocumentClassifierOptions the instance to initialize the Builder with + */ private Builder(CreateDocumentClassifierOptions createDocumentClassifierOptions) { this.projectId = createDocumentClassifierOptions.projectId; this.trainingData = createDocumentClassifierOptions.trainingData; @@ -176,8 +181,7 @@ public String projectId() { * a field that contains the text you want to classify and a field that contains the * classification labels that you want to use to classify your data. If you want to specify * multiple values in a single field, use a semicolon as the value separator. For a sample file, - * see [the product - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-cm-doc-classifier). + * see [the product documentation](/docs/discovery-data?topic=discovery-data-cm-doc-classifier). * * @return the trainingData */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java index 769eee6e8b0..85f1f808f05 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -71,6 +71,11 @@ public static class Builder { private String type; private EnrichmentOptions options; + /** + * Instantiates a new Builder from an existing CreateEnrichment instance. + * + * @param createEnrichment the instance to initialize the Builder with + */ private Builder(CreateEnrichment createEnrichment) { this.name = createEnrichment.name; this.description = createEnrichment.description; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java index 5aed176b95c..62755e661aa 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -31,6 +31,11 @@ public static class Builder { private CreateEnrichment enrichment; private InputStream file; + /** + * Instantiates a new Builder from an existing CreateEnrichmentOptions instance. + * + * @param createEnrichmentOptions the instance to initialize the Builder with + */ private Builder(CreateEnrichmentOptions createEnrichmentOptions) { this.projectId = createEnrichmentOptions.projectId; this.enrichment = createEnrichmentOptions.enrichment; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java index 63092f3584f..bf9fb2b1a9b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,11 @@ public static class Builder { private String collectionId; private List expansions; + /** + * Instantiates a new Builder from an existing CreateExpansionsOptions instance. + * + * @param createExpansionsOptions the instance to initialize the Builder with + */ private Builder(CreateExpansionsOptions createExpansionsOptions) { this.projectId = createExpansionsOptions.projectId; this.collectionId = createExpansionsOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java index b47b7be50f2..0b36bc293a1 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -49,6 +49,11 @@ public static class Builder { private String type; private DefaultQueryParams defaultQueryParameters; + /** + * Instantiates a new Builder from an existing CreateProjectOptions instance. + * + * @param createProjectOptions the instance to initialize the Builder with + */ private Builder(CreateProjectOptions createProjectOptions) { this.name = createProjectOptions.name; this.type = createProjectOptions.type; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java index a661d0d76f4..17508d43156 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,11 @@ public static class Builder { private String collectionId; private List stopwords; + /** + * Instantiates a new Builder from an existing CreateStopwordListOptions instance. + * + * @param createStopwordListOptions the instance to initialize the Builder with + */ private Builder(CreateStopwordListOptions createStopwordListOptions) { this.projectId = createStopwordListOptions.projectId; this.collectionId = createStopwordListOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java index e163f8feeb5..72d5ef2736a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/CreateTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -31,6 +31,11 @@ public static class Builder { private List examples; private String filter; + /** + * Instantiates a new Builder from an existing CreateTrainingQueryOptions instance. + * + * @param createTrainingQueryOptions the instance to initialize the Builder with + */ private Builder(CreateTrainingQueryOptions createTrainingQueryOptions) { this.projectId = createTrainingQueryOptions.projectId; this.naturalLanguageQuery = createTrainingQueryOptions.naturalLanguageQuery; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java index ba33f81cb5f..f07f54a2115 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParams.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -56,6 +56,11 @@ public static class Builder { private String sort; private List xReturn; + /** + * Instantiates a new Builder from an existing DefaultQueryParams instance. + * + * @param defaultQueryParams the instance to initialize the Builder with + */ private Builder(DefaultQueryParams defaultQueryParams) { this.collectionIds = defaultQueryParams.collectionIds; this.passages = defaultQueryParams.passages; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java index ca74f75db4f..b651bbea94d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsPassages.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -40,6 +40,11 @@ public static class Builder { private Boolean perDocument; private Long maxPerDocument; + /** + * Instantiates a new Builder from an existing DefaultQueryParamsPassages instance. + * + * @param defaultQueryParamsPassages the instance to initialize the Builder with + */ private Builder(DefaultQueryParamsPassages defaultQueryParamsPassages) { this.enabled = defaultQueryParamsPassages.enabled; this.count = defaultQueryParamsPassages.count; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java index 82c4619a004..0673d7144e9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsSuggestedRefinements.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -30,6 +30,11 @@ public static class Builder { private Boolean enabled; private Long count; + /** + * Instantiates a new Builder from an existing DefaultQueryParamsSuggestedRefinements instance. + * + * @param defaultQueryParamsSuggestedRefinements the instance to initialize the Builder with + */ private Builder(DefaultQueryParamsSuggestedRefinements defaultQueryParamsSuggestedRefinements) { this.enabled = defaultQueryParamsSuggestedRefinements.enabled; this.count = defaultQueryParamsSuggestedRefinements.count; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java index a2d52256fe0..da0cb44a8ab 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DefaultQueryParamsTableResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -30,6 +30,11 @@ public static class Builder { private Long count; private Long perDocument; + /** + * Instantiates a new Builder from an existing DefaultQueryParamsTableResults instance. + * + * @param defaultQueryParamsTableResults the instance to initialize the Builder with + */ private Builder(DefaultQueryParamsTableResults defaultQueryParamsTableResults) { this.enabled = defaultQueryParamsTableResults.enabled; this.count = defaultQueryParamsTableResults.count; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java index 5793d2f35e2..6893a2c8d8a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String collectionId; + /** + * Instantiates a new Builder from an existing DeleteCollectionOptions instance. + * + * @param deleteCollectionOptions the instance to initialize the Builder with + */ private Builder(DeleteCollectionOptions deleteCollectionOptions) { this.projectId = deleteCollectionOptions.projectId; this.collectionId = deleteCollectionOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java index fea0165b1da..07b9ebc61ee 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -27,6 +27,11 @@ public static class Builder { private String classifierId; private String modelId; + /** + * Instantiates a new Builder from an existing DeleteDocumentClassifierModelOptions instance. + * + * @param deleteDocumentClassifierModelOptions the instance to initialize the Builder with + */ private Builder(DeleteDocumentClassifierModelOptions deleteDocumentClassifierModelOptions) { this.projectId = deleteDocumentClassifierModelOptions.projectId; this.classifierId = deleteDocumentClassifierModelOptions.classifierId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java index dd0a77274ec..66a0c798637 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String classifierId; + /** + * Instantiates a new Builder from an existing DeleteDocumentClassifierOptions instance. + * + * @param deleteDocumentClassifierOptions the instance to initialize the Builder with + */ private Builder(DeleteDocumentClassifierOptions deleteDocumentClassifierOptions) { this.projectId = deleteDocumentClassifierOptions.projectId; this.classifierId = deleteDocumentClassifierOptions.classifierId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java index 09930358bfe..6d427cd12ac 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,11 @@ public static class Builder { private String documentId; private Boolean xWatsonDiscoveryForce; + /** + * Instantiates a new Builder from an existing DeleteDocumentOptions instance. + * + * @param deleteDocumentOptions the instance to initialize the Builder with + */ private Builder(DeleteDocumentOptions deleteDocumentOptions) { this.projectId = deleteDocumentOptions.projectId; this.collectionId = deleteDocumentOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java index dd3961ca4d4..37cbf370285 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteDocumentResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,8 @@ public interface Status { protected String status; + protected DeleteDocumentResponse() {} + /** * Gets the documentId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java index 18ba2c90098..12e9cc1fbf9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String enrichmentId; + /** + * Instantiates a new Builder from an existing DeleteEnrichmentOptions instance. + * + * @param deleteEnrichmentOptions the instance to initialize the Builder with + */ private Builder(DeleteEnrichmentOptions deleteEnrichmentOptions) { this.projectId = deleteEnrichmentOptions.projectId; this.enrichmentId = deleteEnrichmentOptions.enrichmentId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java index b3a7ac1407d..eeeeda24c28 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String collectionId; + /** + * Instantiates a new Builder from an existing DeleteExpansionsOptions instance. + * + * @param deleteExpansionsOptions the instance to initialize the Builder with + */ private Builder(DeleteExpansionsOptions deleteExpansionsOptions) { this.projectId = deleteExpansionsOptions.projectId; this.collectionId = deleteExpansionsOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java index 2f47eac67e7..a5e49ebd576 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class DeleteProjectOptions extends GenericModel { public static class Builder { private String projectId; + /** + * Instantiates a new Builder from an existing DeleteProjectOptions instance. + * + * @param deleteProjectOptions the instance to initialize the Builder with + */ private Builder(DeleteProjectOptions deleteProjectOptions) { this.projectId = deleteProjectOptions.projectId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java index 83b8fe56228..ddb651df8ff 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String collectionId; + /** + * Instantiates a new Builder from an existing DeleteStopwordListOptions instance. + * + * @param deleteStopwordListOptions the instance to initialize the Builder with + */ private Builder(DeleteStopwordListOptions deleteStopwordListOptions) { this.projectId = deleteStopwordListOptions.projectId; this.collectionId = deleteStopwordListOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java index 3e844804224..990ad91e1fa 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueriesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class DeleteTrainingQueriesOptions extends GenericModel { public static class Builder { private String projectId; + /** + * Instantiates a new Builder from an existing DeleteTrainingQueriesOptions instance. + * + * @param deleteTrainingQueriesOptions the instance to initialize the Builder with + */ private Builder(DeleteTrainingQueriesOptions deleteTrainingQueriesOptions) { this.projectId = deleteTrainingQueriesOptions.projectId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java index 1b6cd182101..d9219edf124 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String queryId; + /** + * Instantiates a new Builder from an existing DeleteTrainingQueryOptions instance. + * + * @param deleteTrainingQueryOptions the instance to initialize the Builder with + */ private Builder(DeleteTrainingQueryOptions deleteTrainingQueryOptions) { this.projectId = deleteTrainingQueryOptions.projectId; this.queryId = deleteTrainingQueryOptions.queryId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java index 7a2c85eeeec..80a14d235a3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DeleteUserDataOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class DeleteUserDataOptions extends GenericModel { public static class Builder { private String customerId; + /** + * Instantiates a new Builder from an existing DeleteUserDataOptions instance. + * + * @param deleteUserDataOptions the instance to initialize the Builder with + */ private Builder(DeleteUserDataOptions deleteUserDataOptions) { this.customerId = deleteUserDataOptions.customerId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java index 9266a29478a..4cc16332cf2 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAccepted.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,8 @@ public interface Status { protected String status; + protected DocumentAccepted() {} + /** * Gets the documentId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java index 93372e78b53..6adf9a3a7f4 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentAttribute.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -21,6 +21,8 @@ public class DocumentAttribute extends GenericModel { protected String text; protected TableElementLocation location; + protected DocumentAttribute() {} + /** * Gets the type. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java index 97cd00d8933..6ec9624e46b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -44,6 +44,8 @@ public class DocumentClassifier extends GenericModel { @SerializedName("federated_classification") protected ClassifierFederatedModel federatedClassification; + protected DocumentClassifier() {} + /** * Gets the classifierId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java index d19bf39d8f3..7791d0fafc4 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierEnrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,6 +33,11 @@ public static class Builder { private String enrichmentId; private List fields; + /** + * Instantiates a new Builder from an existing DocumentClassifierEnrichment instance. + * + * @param documentClassifierEnrichment the instance to initialize the Builder with + */ private Builder(DocumentClassifierEnrichment documentClassifierEnrichment) { this.enrichmentId = documentClassifierEnrichment.enrichmentId; this.fields = documentClassifierEnrichment.fields; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java index 1cdbd13679f..b55200f7f0c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModel.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -52,6 +52,8 @@ public interface Status { @SerializedName("deployed_at") protected Date deployedAt; + protected DocumentClassifierModel() {} + /** * Gets the modelId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java index 6a02b8b56e6..d3e9bfe8d88 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifierModels.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class DocumentClassifierModels extends GenericModel { protected List models; + protected DocumentClassifierModels() {} + /** * Gets the models. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java index 19445616a80..0b01ec5855a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentClassifiers.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class DocumentClassifiers extends GenericModel { protected List classifiers; + protected DocumentClassifiers() {} + /** * Gets the classifiers. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java index 00566c2250e..f7f406586df 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -57,6 +57,8 @@ public interface Status { protected String sha256; + protected DocumentDetails() {} + /** * Gets the documentId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java index f70acb7e164..036cd7b18c0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/DocumentDetailsChildren.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -26,6 +26,8 @@ public class DocumentDetailsChildren extends GenericModel { protected Long count; + protected DocumentDetailsChildren() {} + /** * Gets the haveNotices. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java index 7a3de61dc34..8d6f0e24772 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichment.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -48,6 +48,8 @@ public interface Type { protected String type; protected EnrichmentOptions options; + protected Enrichment() {} + /** * Gets the enrichmentId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java index 8570d63f144..e8305410ff1 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/EnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -57,6 +57,11 @@ public static class Builder { private Double confidenceThreshold; private Long topK; + /** + * Instantiates a new Builder from an existing EnrichmentOptions instance. + * + * @param enrichmentOptions the instance to initialize the Builder with + */ private Builder(EnrichmentOptions enrichmentOptions) { this.languages = enrichmentOptions.languages; this.entityType = enrichmentOptions.entityType; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java index 7d04a0a71bc..c17b8bb773a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Enrichments.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class Enrichments extends GenericModel { protected List enrichments; + protected Enrichments() {} + /** * Gets the enrichments. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java index ae5fb8bc858..6c65a79f5bc 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansion.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -41,6 +41,11 @@ public static class Builder { private List inputTerms; private List expandedTerms; + /** + * Instantiates a new Builder from an existing Expansion instance. + * + * @param expansion the instance to initialize the Builder with + */ private Builder(Expansion expansion) { this.inputTerms = expansion.inputTerms; this.expandedTerms = expansion.expandedTerms; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java index d8bc830e6cb..2964211a770 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Expansions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public class Expansions extends GenericModel { public static class Builder { private List expansions; + /** + * Instantiates a new Builder from an existing Expansions instance. + * + * @param expansions the instance to initialize the Builder with + */ private Builder(Expansions expansions) { this.expansions = expansions.expansions; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java index c119ec728cc..46d241c8bcb 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Field.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -50,6 +50,8 @@ public interface Type { @SerializedName("collection_id") protected String collectionId; + protected Field() {} + /** * Gets the field. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java index 6b95acbdc95..897e3d8573b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetAutocompletionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,6 +33,11 @@ public static class Builder { private String field; private Long count; + /** + * Instantiates a new Builder from an existing GetAutocompletionOptions instance. + * + * @param getAutocompletionOptions the instance to initialize the Builder with + */ private Builder(GetAutocompletionOptions getAutocompletionOptions) { this.projectId = getAutocompletionOptions.projectId; this.prefix = getAutocompletionOptions.prefix; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java index 5f0e67a1dd3..8694d79c5ee 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String collectionId; + /** + * Instantiates a new Builder from an existing GetCollectionOptions instance. + * + * @param getCollectionOptions the instance to initialize the Builder with + */ private Builder(GetCollectionOptions getCollectionOptions) { this.projectId = getCollectionOptions.projectId; this.collectionId = getCollectionOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java index fd70b890478..30e50fe538c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetComponentSettingsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class GetComponentSettingsOptions extends GenericModel { public static class Builder { private String projectId; + /** + * Instantiates a new Builder from an existing GetComponentSettingsOptions instance. + * + * @param getComponentSettingsOptions the instance to initialize the Builder with + */ private Builder(GetComponentSettingsOptions getComponentSettingsOptions) { this.projectId = getComponentSettingsOptions.projectId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java index eeb1ee6b2be..73e86948ea9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -27,6 +27,11 @@ public static class Builder { private String classifierId; private String modelId; + /** + * Instantiates a new Builder from an existing GetDocumentClassifierModelOptions instance. + * + * @param getDocumentClassifierModelOptions the instance to initialize the Builder with + */ private Builder(GetDocumentClassifierModelOptions getDocumentClassifierModelOptions) { this.projectId = getDocumentClassifierModelOptions.projectId; this.classifierId = getDocumentClassifierModelOptions.classifierId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java index 69bbcc54f14..bac2b88c43f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String classifierId; + /** + * Instantiates a new Builder from an existing GetDocumentClassifierOptions instance. + * + * @param getDocumentClassifierOptions the instance to initialize the Builder with + */ private Builder(GetDocumentClassifierOptions getDocumentClassifierOptions) { this.projectId = getDocumentClassifierOptions.projectId; this.classifierId = getDocumentClassifierOptions.classifierId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java index a52bc8491eb..bc9332879af 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -27,6 +27,11 @@ public static class Builder { private String collectionId; private String documentId; + /** + * Instantiates a new Builder from an existing GetDocumentOptions instance. + * + * @param getDocumentOptions the instance to initialize the Builder with + */ private Builder(GetDocumentOptions getDocumentOptions) { this.projectId = getDocumentOptions.projectId; this.collectionId = getDocumentOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java index 297304a7ae1..6566858c972 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String enrichmentId; + /** + * Instantiates a new Builder from an existing GetEnrichmentOptions instance. + * + * @param getEnrichmentOptions the instance to initialize the Builder with + */ private Builder(GetEnrichmentOptions getEnrichmentOptions) { this.projectId = getEnrichmentOptions.projectId; this.enrichmentId = getEnrichmentOptions.enrichmentId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java index c4376f68813..63f90a89fd0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class GetProjectOptions extends GenericModel { public static class Builder { private String projectId; + /** + * Instantiates a new Builder from an existing GetProjectOptions instance. + * + * @param getProjectOptions the instance to initialize the Builder with + */ private Builder(GetProjectOptions getProjectOptions) { this.projectId = getProjectOptions.projectId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java index 1196b7807b3..e69b7f5acfe 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetStopwordListOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String collectionId; + /** + * Instantiates a new Builder from an existing GetStopwordListOptions instance. + * + * @param getStopwordListOptions the instance to initialize the Builder with + */ private Builder(GetStopwordListOptions getStopwordListOptions) { this.projectId = getStopwordListOptions.projectId; this.collectionId = getStopwordListOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java index ffa2873f07e..d8aa82532e0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/GetTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String queryId; + /** + * Instantiates a new Builder from an existing GetTrainingQueryOptions instance. + * + * @param getTrainingQueryOptions the instance to initialize the Builder with + */ private Builder(GetTrainingQueryOptions getTrainingQueryOptions) { this.projectId = getTrainingQueryOptions.projectId; this.queryId = getTrainingQueryOptions.queryId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java index a77afa00a20..4a8c93cad38 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class ListCollectionsOptions extends GenericModel { public static class Builder { private String projectId; + /** + * Instantiates a new Builder from an existing ListCollectionsOptions instance. + * + * @param listCollectionsOptions the instance to initialize the Builder with + */ private Builder(ListCollectionsOptions listCollectionsOptions) { this.projectId = listCollectionsOptions.projectId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java index 2db2df5cfc2..e23b41d310c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListCollectionsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class ListCollectionsResponse extends GenericModel { protected List collections; + protected ListCollectionsResponse() {} + /** * Gets the collections. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java index d667474cf80..c9531c07dc5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifierModelsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String classifierId; + /** + * Instantiates a new Builder from an existing ListDocumentClassifierModelsOptions instance. + * + * @param listDocumentClassifierModelsOptions the instance to initialize the Builder with + */ private Builder(ListDocumentClassifierModelsOptions listDocumentClassifierModelsOptions) { this.projectId = listDocumentClassifierModelsOptions.projectId; this.classifierId = listDocumentClassifierModelsOptions.classifierId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java index d5d86a23288..689c91fbfed 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentClassifiersOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class ListDocumentClassifiersOptions extends GenericModel { public static class Builder { private String projectId; + /** + * Instantiates a new Builder from an existing ListDocumentClassifiersOptions instance. + * + * @param listDocumentClassifiersOptions the instance to initialize the Builder with + */ private Builder(ListDocumentClassifiersOptions listDocumentClassifiersOptions) { this.projectId = listDocumentClassifiersOptions.projectId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java index dee40a6c63a..b98ec5dd665 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -37,6 +37,11 @@ public static class Builder { private String parentDocumentId; private String sha256; + /** + * Instantiates a new Builder from an existing ListDocumentsOptions instance. + * + * @param listDocumentsOptions the instance to initialize the Builder with + */ private Builder(ListDocumentsOptions listDocumentsOptions) { this.projectId = listDocumentsOptions.projectId; this.collectionId = listDocumentsOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java index 2c092bc5982..27611dc9290 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListDocumentsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class ListDocumentsResponse extends GenericModel { protected List documents; + protected ListDocumentsResponse() {} + /** * Gets the matchingResults. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java index b8274ceeb16..c7fb01209f1 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListEnrichmentsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class ListEnrichmentsOptions extends GenericModel { public static class Builder { private String projectId; + /** + * Instantiates a new Builder from an existing ListEnrichmentsOptions instance. + * + * @param listEnrichmentsOptions the instance to initialize the Builder with + */ private Builder(ListEnrichmentsOptions listEnrichmentsOptions) { this.projectId = listEnrichmentsOptions.projectId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java index c3e163693b4..3c822c94ddc 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListExpansionsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String collectionId; + /** + * Instantiates a new Builder from an existing ListExpansionsOptions instance. + * + * @param listExpansionsOptions the instance to initialize the Builder with + */ private Builder(ListExpansionsOptions listExpansionsOptions) { this.projectId = listExpansionsOptions.projectId; this.collectionId = listExpansionsOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java index 600949447cd..d3cbc75fbe7 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -27,6 +27,11 @@ public static class Builder { private String projectId; private List collectionIds; + /** + * Instantiates a new Builder from an existing ListFieldsOptions instance. + * + * @param listFieldsOptions the instance to initialize the Builder with + */ private Builder(ListFieldsOptions listFieldsOptions) { this.projectId = listFieldsOptions.projectId; this.collectionIds = listFieldsOptions.collectionIds; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java index 38f024c0fba..fe0e57045bb 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListFieldsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -31,6 +31,8 @@ public class ListFieldsResponse extends GenericModel { protected List fields; + protected ListFieldsResponse() {} + /** * Gets the fields. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java index 32af19b7089..6b139deed0c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,4 +15,8 @@ import com.ibm.cloud.sdk.core.service.model.GenericModel; /** The listProjects options. */ -public class ListProjectsOptions extends GenericModel {} +public class ListProjectsOptions extends GenericModel { + + /** Construct a new instance of ListProjectsOptions. */ + public ListProjectsOptions() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java index 583a476094e..aa18b2500e3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListProjectsResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class ListProjectsResponse extends GenericModel { protected List projects; + protected ListProjectsResponse() {} + /** * Gets the projects. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java index 541b240a051..f232187cb5b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ListTrainingQueriesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,11 @@ public class ListTrainingQueriesOptions extends GenericModel { public static class Builder { private String projectId; + /** + * Instantiates a new Builder from an existing ListTrainingQueriesOptions instance. + * + * @param listTrainingQueriesOptions the instance to initialize the Builder with + */ private Builder(ListTrainingQueriesOptions listTrainingQueriesOptions) { this.projectId = listTrainingQueriesOptions.projectId; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java index 94cd6aa812c..2e77bc26977 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMacroAverage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class ModelEvaluationMacroAverage extends GenericModel { protected Double recall; protected Double f1; + protected ModelEvaluationMacroAverage() {} + /** * Gets the precision. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java index c701ceaf2d5..12080346c2f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ModelEvaluationMicroAverage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class ModelEvaluationMicroAverage extends GenericModel { protected Double recall; protected Double f1; + protected ModelEvaluationMicroAverage() {} + /** * Gets the precision. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java index 0cbced99ee0..5a6cd28667a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/Notice.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -45,6 +45,8 @@ public interface Severity { protected String step; protected String description; + protected Notice() {} + /** * Gets the noticeId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java index 088c1ae6c9b..b5677e5cbcd 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/PerClassModelEvaluation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class PerClassModelEvaluation extends GenericModel { protected Double recall; protected Double f1; + protected PerClassModelEvaluation() {} + /** * Gets the name. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java index d31a3ad1774..27b8966b0c3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -55,6 +55,8 @@ public interface Type { @SerializedName("default_query_parameters") protected DefaultQueryParams defaultQueryParameters; + protected ProjectDetails() {} + /** * Gets the projectId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java index 0bae1c1b4cd..34d78e7f55b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -52,6 +52,8 @@ public interface Type { @SerializedName("collection_count") protected Long collectionCount; + protected ProjectListDetails() {} + /** * Gets the projectId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java index d8d50f8c419..55c2e3951c6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ProjectListDetailsRelevancyTrainingStatus.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -41,6 +41,8 @@ public class ProjectListDetailsRelevancyTrainingStatus extends GenericModel { @SerializedName("minimum_queries_added") protected Boolean minimumQueriesAdded; + protected ProjectListDetailsRelevancyTrainingStatus() {} + /** * Gets the dataUpdated. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java index 7059f519f1a..a719dd64406 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -12,9 +12,21 @@ */ package com.ibm.watson.discovery.v2.model; +import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; +import java.util.Map; -/** An abstract aggregation type produced by Discovery to analyze the input provided. */ +/** + * An object that defines how to aggregate query results. + * + *

Classes which extend this class: - QueryAggregationQueryTermAggregation - + * QueryAggregationQueryGroupByAggregation - QueryAggregationQueryHistogramAggregation - + * QueryAggregationQueryTimesliceAggregation - QueryAggregationQueryNestedAggregation - + * QueryAggregationQueryFilterAggregation - QueryAggregationQueryCalculationAggregation - + * QueryAggregationQueryTopHitsAggregation - QueryAggregationQueryPairAggregation - + * QueryAggregationQueryTrendAggregation - QueryAggregationQueryTopicAggregation + */ public class QueryAggregation extends GenericModel { @SuppressWarnings("unused") protected static String discriminatorPropertyName = "type"; @@ -23,31 +35,266 @@ public class QueryAggregation extends GenericModel { static { discriminatorMapping = new java.util.HashMap<>(); - discriminatorMapping.put("term", QueryTermAggregation.class); - discriminatorMapping.put("histogram", QueryHistogramAggregation.class); - discriminatorMapping.put("timeslice", QueryTimesliceAggregation.class); - discriminatorMapping.put("nested", QueryNestedAggregation.class); - discriminatorMapping.put("filter", QueryFilterAggregation.class); - discriminatorMapping.put("min", QueryCalculationAggregation.class); - discriminatorMapping.put("max", QueryCalculationAggregation.class); - discriminatorMapping.put("sum", QueryCalculationAggregation.class); - discriminatorMapping.put("average", QueryCalculationAggregation.class); - discriminatorMapping.put("unique_count", QueryCalculationAggregation.class); - discriminatorMapping.put("top_hits", QueryTopHitsAggregation.class); - discriminatorMapping.put("group_by", QueryGroupByAggregation.class); + discriminatorMapping.put("term", QueryAggregationQueryTermAggregation.class); + discriminatorMapping.put("group_by", QueryAggregationQueryGroupByAggregation.class); + discriminatorMapping.put("histogram", QueryAggregationQueryHistogramAggregation.class); + discriminatorMapping.put("timeslice", QueryAggregationQueryTimesliceAggregation.class); + discriminatorMapping.put("nested", QueryAggregationQueryNestedAggregation.class); + discriminatorMapping.put("filter", QueryAggregationQueryFilterAggregation.class); + discriminatorMapping.put("min", QueryAggregationQueryCalculationAggregation.class); + discriminatorMapping.put("max", QueryAggregationQueryCalculationAggregation.class); + discriminatorMapping.put("sum", QueryAggregationQueryCalculationAggregation.class); + discriminatorMapping.put("average", QueryAggregationQueryCalculationAggregation.class); + discriminatorMapping.put("unique_count", QueryAggregationQueryCalculationAggregation.class); + discriminatorMapping.put("top_hits", QueryAggregationQueryTopHitsAggregation.class); + discriminatorMapping.put("pair", QueryAggregationQueryPairAggregation.class); + discriminatorMapping.put("trend", QueryAggregationQueryTrendAggregation.class); + discriminatorMapping.put("topic", QueryAggregationQueryTopicAggregation.class); } protected String type; + protected String field; + protected Long count; + protected String name; + protected List results; + protected Long interval; + protected String path; + + @SerializedName("matching_results") + protected Long matchingResults; + + protected List> aggregations; + protected String match; + protected Double value; + protected Long size; + protected QueryTopHitsAggregationResult hits; + protected String first; + protected String second; + + @SerializedName("show_estimated_matching_results") + protected Boolean showEstimatedMatchingResults; + + @SerializedName("show_total_matching_documents") + protected Boolean showTotalMatchingDocuments; + + protected String facet; + + @SerializedName("time_segments") + protected String timeSegments; + + protected QueryAggregation() {} /** * Gets the type. * - *

The type of aggregation command used. Options include: term, histogram, timeslice, nested, - * filter, min, max, sum, average, unique_count, and top_hits. + *

Specifies that the aggregation type is `term`. * * @return the type */ public String getType() { return type; } + + /** + * Gets the field. + * + *

The field in the document where the values come from. + * + * @return the field + */ + public String getField() { + return field; + } + + /** + * Gets the count. + * + *

The number of results returned. Not returned if `relevancy:true` is specified in the + * request. + * + * @return the count + */ + public Long getCount() { + return count; + } + + /** + * Gets the name. + * + *

Identifier specified in the query request of this aggregation. Not returned if + * `relevancy:true` is specified in the request. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the results. + * + *

An array of results. + * + * @return the results + */ + public List getResults() { + return results; + } + + /** + * Gets the interval. + * + *

The size of the sections that the results are split into. + * + * @return the interval + */ + public Long getInterval() { + return interval; + } + + /** + * Gets the path. + * + *

The path to the document field to scope subsequent aggregations to. + * + * @return the path + */ + public String getPath() { + return path; + } + + /** + * Gets the matchingResults. + * + *

Number of nested documents found in the specified field. + * + * @return the matchingResults + */ + public Long getMatchingResults() { + return matchingResults; + } + + /** + * Gets the aggregations. + * + *

An array of subaggregations. + * + * @return the aggregations + */ + public List> getAggregations() { + return aggregations; + } + + /** + * Gets the match. + * + *

The filter that is written in Discovery Query Language syntax and is applied to the + * documents before subaggregations are run. + * + * @return the match + */ + public String getMatch() { + return match; + } + + /** + * Gets the value. + * + *

The value of the calculation. + * + * @return the value + */ + public Double getValue() { + return value; + } + + /** + * Gets the size. + * + *

The number of documents to return. + * + * @return the size + */ + public Long getSize() { + return size; + } + + /** + * Gets the hits. + * + *

A query response that contains the matching documents for the preceding aggregations. + * + * @return the hits + */ + public QueryTopHitsAggregationResult getHits() { + return hits; + } + + /** + * Gets the first. + * + *

Specifies the first aggregation in the pair. The aggregation must be a `term`, `group_by`, + * `histogram`, or `timeslice` aggregation type. + * + * @return the first + */ + public String getFirst() { + return first; + } + + /** + * Gets the second. + * + *

Specifies the second aggregation in the pair. The aggregation must be a `term`, `group_by`, + * `histogram`, or `timeslice` aggregation type. + * + * @return the second + */ + public String getSecond() { + return second; + } + + /** + * Gets the showEstimatedMatchingResults. + * + *

Indicates whether to include estimated matching result information. + * + * @return the showEstimatedMatchingResults + */ + public Boolean isShowEstimatedMatchingResults() { + return showEstimatedMatchingResults; + } + + /** + * Gets the showTotalMatchingDocuments. + * + *

Indicates whether to include total matching documents information. + * + * @return the showTotalMatchingDocuments + */ + public Boolean isShowTotalMatchingDocuments() { + return showTotalMatchingDocuments; + } + + /** + * Gets the facet. + * + *

Specifies the `term` or `group_by` aggregation for the facet that you want to analyze. + * + * @return the facet + */ + public String getFacet() { + return facet; + } + + /** + * Gets the timeSegments. + * + *

Specifies the `timeslice` aggregation that defines the time segments. + * + * @return the timeSegments + */ + public String getTimeSegments() { + return timeSegments; + } } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCalculationAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java similarity index 61% rename from discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCalculationAggregation.java rename to discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java index 40cb8b1be94..7c19cc9ffce 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCalculationAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryCalculationAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -16,30 +16,7 @@ * Returns a scalar calculation across all documents for the field specified. Possible calculations * include min, max, sum, average, and unique_count. */ -public class QueryCalculationAggregation extends QueryAggregation { +public class QueryAggregationQueryCalculationAggregation extends QueryAggregation { - protected String field; - protected Double value; - - /** - * Gets the field. - * - *

The field to perform the calculation on. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the value. - * - *

The value of the calculation. - * - * @return the value - */ - public Double getValue() { - return value; - } + protected QueryAggregationQueryCalculationAggregation() {} } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java similarity index 58% rename from discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregation.java rename to discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java index 03f73f9cefa..cfe378d53d6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryFilterAggregation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -12,21 +12,8 @@ */ package com.ibm.watson.discovery.v2.model; -import java.util.List; +/** A modifier that narrows the document set of the subaggregations it precedes. */ +public class QueryAggregationQueryFilterAggregation extends QueryAggregation { -/** Returns the top values for the field specified. */ -public class QueryGroupByAggregation extends QueryAggregation { - - protected List results; - - /** - * Gets the results. - * - *

Array of top values for the field. - * - * @return the results - */ - public List getResults() { - return results; - } + protected QueryAggregationQueryFilterAggregation() {} } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java new file mode 100644 index 00000000000..f1a24c8b66f --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryGroupByAggregation.java @@ -0,0 +1,19 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** Separates document results into groups that meet the conditions you specify. */ +public class QueryAggregationQueryGroupByAggregation extends QueryAggregation { + + protected QueryAggregationQueryGroupByAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java new file mode 100644 index 00000000000..5eaf03013e9 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryHistogramAggregation.java @@ -0,0 +1,22 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** + * Numeric interval segments to categorize documents by using field values from a single numeric + * field to describe the category. + */ +public class QueryAggregationQueryHistogramAggregation extends QueryAggregation { + + protected QueryAggregationQueryHistogramAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java new file mode 100644 index 00000000000..f619de39a20 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryNestedAggregation.java @@ -0,0 +1,22 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** + * A restriction that alters the document set that is used by the aggregations that it precedes. + * Subsequent aggregations are applied to nested documents from the specified field. + */ +public class QueryAggregationQueryNestedAggregation extends QueryAggregation { + + protected QueryAggregationQueryNestedAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java new file mode 100644 index 00000000000..dba66be466d --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryPairAggregation.java @@ -0,0 +1,22 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** + * Calculates relevancy values using combinations of document sets from results of the specified + * pair of aggregations. + */ +public class QueryAggregationQueryPairAggregation extends QueryAggregation { + + protected QueryAggregationQueryPairAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java new file mode 100644 index 00000000000..317fea807e4 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTermAggregation.java @@ -0,0 +1,19 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** Returns results from the field that is specified. */ +public class QueryAggregationQueryTermAggregation extends QueryAggregation { + + protected QueryAggregationQueryTermAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java new file mode 100644 index 00000000000..34c482f7edc --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTimesliceAggregation.java @@ -0,0 +1,19 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** A specialized histogram aggregation that uses dates to create interval segments. */ +public class QueryAggregationQueryTimesliceAggregation extends QueryAggregation { + + protected QueryAggregationQueryTimesliceAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java new file mode 100644 index 00000000000..ac10e1d0195 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopHitsAggregation.java @@ -0,0 +1,19 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** Returns the top documents ranked by the score of the query. */ +public class QueryAggregationQueryTopHitsAggregation extends QueryAggregation { + + protected QueryAggregationQueryTopHitsAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java new file mode 100644 index 00000000000..db23c0b4230 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTopicAggregation.java @@ -0,0 +1,24 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** + * Detects how much the frequency of a given facet value deviates from the expected average for the + * given time period. This aggregation type does not use data from previous time periods. It + * calculates an index by using the averages of frequency counts of other facet values for the given + * time period. + */ +public class QueryAggregationQueryTopicAggregation extends QueryAggregation { + + protected QueryAggregationQueryTopicAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java new file mode 100644 index 00000000000..322225959d6 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryAggregationQueryTrendAggregation.java @@ -0,0 +1,22 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +/** + * Detects sharp and unexpected changes in the frequency of a facet or facet value over time based + * on the past history of frequency changes of the facet value. + */ +public class QueryAggregationQueryTrendAggregation extends QueryAggregation { + + protected QueryAggregationQueryTrendAggregation() {} +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java index f006eb491bd..eed4325dc4f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryCollectionNoticesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,11 @@ public static class Builder { private Long count; private Long offset; + /** + * Instantiates a new Builder from an existing QueryCollectionNoticesOptions instance. + * + * @param queryCollectionNoticesOptions the instance to initialize the Builder with + */ private Builder(QueryCollectionNoticesOptions queryCollectionNoticesOptions) { this.projectId = queryCollectionNoticesOptions.projectId; this.collectionId = queryCollectionNoticesOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryFilterAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryFilterAggregation.java deleted file mode 100644 index febc5d163a8..00000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryFilterAggregation.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v2.model; - -import com.google.gson.annotations.SerializedName; -import java.util.List; - -/** A modifier that narrows the document set of the sub-aggregations it precedes. */ -public class QueryFilterAggregation extends QueryAggregation { - - protected String match; - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List aggregations; - - /** - * Gets the match. - * - *

The filter that is written in Discovery Query Language syntax and is applied to the - * documents before sub-aggregations are run. - * - * @return the match - */ - public String getMatch() { - return match; - } - - /** - * Gets the matchingResults. - * - *

Number of documents that match the filter. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the aggregations. - * - *

An array of sub-aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java index 4fc29f6e486..56dd34dbf3a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryGroupByAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,8 +15,9 @@ import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; import java.util.List; +import java.util.Map; -/** Top value result for the term aggregation. */ +/** Result group for the `group_by` aggregation. */ public class QueryGroupByAggregationResult extends GenericModel { protected String key; @@ -29,15 +30,17 @@ public class QueryGroupByAggregationResult extends GenericModel { @SerializedName("total_matching_documents") protected Long totalMatchingDocuments; - @SerializedName("estimated_matching_documents") - protected Long estimatedMatchingDocuments; + @SerializedName("estimated_matching_results") + protected Double estimatedMatchingResults; - protected List aggregations; + protected List> aggregations; + + protected QueryGroupByAggregationResult() {} /** * Gets the key. * - *

Value of the field with a non-zero frequency in the document set. + *

The condition that is met by the documents in this group. For example, `YEARTXT<2000`. * * @return the key */ @@ -48,7 +51,7 @@ public String getKey() { /** * Gets the matchingResults. * - *

Number of documents that contain the 'key'. + *

Number of documents that meet the query and condition. * * @return the matchingResults */ @@ -59,7 +62,7 @@ public Long getMatchingResults() { /** * Gets the relevancy. * - *

The relevancy for this group. + *

The relevancy for this group. Returned only if `relevancy:true` is specified in the request. * * @return the relevancy */ @@ -70,9 +73,8 @@ public Double getRelevancy() { /** * Gets the totalMatchingDocuments. * - *

The number of documents which have the group as the value of specified field in the whole - * set of documents in this collection. Returned only when the `relevancy` parameter is set to - * `true`. + *

Number of documents that meet the condition in the whole set of documents in this + * collection. Returned only when `relevancy:true` is specified in the request. * * @return the totalMatchingDocuments */ @@ -81,25 +83,26 @@ public Long getTotalMatchingDocuments() { } /** - * Gets the estimatedMatchingDocuments. + * Gets the estimatedMatchingResults. * - *

The estimated number of documents which would match the query and also meet the condition. - * Returned only when the `relevancy` parameter is set to `true`. + *

The number of documents that are estimated to match the query and condition. Returned only + * when `relevancy:true` is specified in the request. * - * @return the estimatedMatchingDocuments + * @return the estimatedMatchingResults */ - public Long getEstimatedMatchingDocuments() { - return estimatedMatchingDocuments; + public Double getEstimatedMatchingResults() { + return estimatedMatchingResults; } /** * Gets the aggregations. * - *

An array of sub-aggregations. + *

An array of subaggregations. Returned only when this aggregation is returned as a + * subaggregation. * * @return the aggregations */ - public List getAggregations() { + public List> getAggregations() { return aggregations; } } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregation.java deleted file mode 100644 index d97715cf334..00000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregation.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v2.model; - -import java.util.List; - -/** - * Numeric interval segments to categorize documents by using field values from a single numeric - * field to describe the category. - */ -public class QueryHistogramAggregation extends QueryAggregation { - - protected String field; - protected Long interval; - protected String name; - protected List results; - - /** - * Gets the field. - * - *

The numeric field name used to create the histogram. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the interval. - * - *

The size of the sections that the results are split into. - * - * @return the interval - */ - public Long getInterval() { - return interval; - } - - /** - * Gets the name. - * - *

Identifier specified in the query request of this aggregation. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the results. - * - *

Array of numeric intervals. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java index 25c3496d5c2..da1c49be486 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryHistogramAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; import java.util.List; +import java.util.Map; /** Histogram numeric interval result. */ public class QueryHistogramAggregationResult extends GenericModel { @@ -24,7 +25,9 @@ public class QueryHistogramAggregationResult extends GenericModel { @SerializedName("matching_results") protected Long matchingResults; - protected List aggregations; + protected List> aggregations; + + protected QueryHistogramAggregationResult() {} /** * Gets the key. @@ -51,11 +54,12 @@ public Long getMatchingResults() { /** * Gets the aggregations. * - *

An array of sub-aggregations. + *

An array of subaggregations. Returned only when this aggregation is returned as a + * subaggregation. * * @return the aggregations */ - public List getAggregations() { + public List> getAggregations() { return aggregations; } } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java index 3f052eec86c..197410195d5 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargePassages.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -49,6 +49,11 @@ public static class Builder { private Boolean findAnswers; private Long maxAnswersPerPassage; + /** + * Instantiates a new Builder from an existing QueryLargePassages instance. + * + * @param queryLargePassages the instance to initialize the Builder with + */ private Builder(QueryLargePassages queryLargePassages) { this.enabled = queryLargePassages.enabled; this.perDocument = queryLargePassages.perDocument; @@ -240,8 +245,9 @@ public Long maxPerDocument() { /** * Gets the fields. * - *

A list of fields to extract passages from. If this parameter is an empty list, then all - * root-level fields are included. + *

A list of fields to extract passages from. By default, passages are extracted from the + * `text` and `title` fields only. If you add this parameter and specify an empty list (`[]`) as + * its value, then the service searches all root-level fields for suitable passages. * * @return the fields */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java index 0db8722af6a..f56d77eb7d3 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSimilar.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -37,6 +37,11 @@ public static class Builder { private List documentIds; private List fields; + /** + * Instantiates a new Builder from an existing QueryLargeSimilar instance. + * + * @param queryLargeSimilar the instance to initialize the Builder with + */ private Builder(QueryLargeSimilar queryLargeSimilar) { this.enabled = queryLargeSimilar.enabled; this.documentIds = queryLargeSimilar.documentIds; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java index c8183b9b489..7ad3d207a7f 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeSuggestedRefinements.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -30,6 +30,11 @@ public static class Builder { private Boolean enabled; private Long count; + /** + * Instantiates a new Builder from an existing QueryLargeSuggestedRefinements instance. + * + * @param queryLargeSuggestedRefinements the instance to initialize the Builder with + */ private Builder(QueryLargeSuggestedRefinements queryLargeSuggestedRefinements) { this.enabled = queryLargeSuggestedRefinements.enabled; this.count = queryLargeSuggestedRefinements.count; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java index e784e92e2b1..15574b0af89 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryLargeTableResults.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private Boolean enabled; private Long count; + /** + * Instantiates a new Builder from an existing QueryLargeTableResults instance. + * + * @param queryLargeTableResults the instance to initialize the Builder with + */ private Builder(QueryLargeTableResults queryLargeTableResults) { this.enabled = queryLargeTableResults.enabled; this.count = queryLargeTableResults.count; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNestedAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNestedAggregation.java deleted file mode 100644 index f6af63a9eac..00000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNestedAggregation.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2021. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v2.model; - -import com.google.gson.annotations.SerializedName; -import java.util.List; - -/** - * A restriction that alters the document set that is used for sub-aggregations it precedes to - * nested documents found in the field specified. - */ -public class QueryNestedAggregation extends QueryAggregation { - - protected String path; - - @SerializedName("matching_results") - protected Long matchingResults; - - protected List aggregations; - - /** - * Gets the path. - * - *

The path to the document field to scope sub-aggregations to. - * - * @return the path - */ - public String getPath() { - return path; - } - - /** - * Gets the matchingResults. - * - *

Number of nested documents found in the specified field. - * - * @return the matchingResults - */ - public Long getMatchingResults() { - return matchingResults; - } - - /** - * Gets the aggregations. - * - *

An array of sub-aggregations. - * - * @return the aggregations - */ - public List getAggregations() { - return aggregations; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java index fd7d7cfc9d5..d4a55a83312 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,6 +33,11 @@ public static class Builder { private Long count; private Long offset; + /** + * Instantiates a new Builder from an existing QueryNoticesOptions instance. + * + * @param queryNoticesOptions the instance to initialize the Builder with + */ private Builder(QueryNoticesOptions queryNoticesOptions) { this.projectId = queryNoticesOptions.projectId; this.filter = queryNoticesOptions.filter; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java index 163e9bb908d..23b1b11e782 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryNoticesResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class QueryNoticesResponse extends GenericModel { protected List notices; + protected QueryNoticesResponse() {} + /** * Gets the matchingResults. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java index 5a456aa6715..dfd9ea0c7e0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -55,6 +55,11 @@ public static class Builder { private QueryLargePassages passages; private QueryLargeSimilar similar; + /** + * Instantiates a new Builder from an existing QueryOptions instance. + * + * @param queryOptions the instance to initialize the Builder with + */ private Builder(QueryOptions queryOptions) { this.projectId = queryOptions.projectId; this.collectionIds = queryOptions.collectionIds; @@ -403,7 +408,7 @@ public String naturalLanguageQuery() { *

An aggregation search that returns an exact answer by combining query search with filters. * Useful for applications to build lists, tables, and time series. For more information about the * supported types of aggregations, see the [Discovery - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-aggregations). + * documentation](/docs/discovery-data?topic=discovery-data-query-aggregations). * * @return the aggregation */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java new file mode 100644 index 00000000000..02c78d25008 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryPairAggregationResult.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; +import java.util.Map; + +/** Result for the `pair` aggregation. */ +public class QueryPairAggregationResult extends GenericModel { + + protected List> aggregations; + + protected QueryPairAggregationResult() {} + + /** + * Gets the aggregations. + * + *

Array of subaggregations of type `term`, `group_by`, `histogram`, or `timeslice`. Each + * element of the matrix that is returned contains a **relevancy** value that is calculated from + * the combination of each value from the first and second aggregations. + * + * @return the aggregations + */ + public List> getAggregations() { + return aggregations; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java index 600a14af242..1b47df236fa 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponse.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -39,6 +39,8 @@ public class QueryResponse extends GenericModel { protected List passages; + protected QueryResponse() {} + /** * Gets the matchingResults. * @@ -102,7 +104,9 @@ public String getSuggestedQuery() { * identified dynamic facets from the data is deprecated. * * @return the suggestedRefinements + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public List getSuggestedRefinements() { return suggestedRefinements; } @@ -122,6 +126,7 @@ public List getTableResults() { * Gets the passages. * *

Passages that best match the query from across all of the collections in the project. + * Returned if **passages.per_document** is `false`. * * @return the passages */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java index ceaa15782b5..a9196398c4d 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResponsePassage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -38,9 +38,10 @@ public class QueryResponsePassage extends GenericModel { protected Long endOffset; protected String field; - protected Double confidence; protected List answers; + protected QueryResponsePassage() {} + /** * Gets the passageText. * @@ -120,21 +121,11 @@ public String getField() { return field; } - /** - * Gets the confidence. - * - *

An estimate of the probability that the passage is relevant. - * - * @return the confidence - */ - public Double getConfidence() { - return confidence; - } - /** * Gets the answers. * - *

An array of extracted answers to the specified query. + *

An array of extracted answers to the specified query. Returned for natural language queries + * when **passages.per_document** is `false`. * * @return the answers */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java index 441ac08580a..608e246fbbe 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -73,7 +73,8 @@ public QueryResultMetadata getResultMetadata() { /** * Gets the documentPassages. * - *

Passages from the document that best matches the query. + *

Passages from the document that best matches the query. Returned if + * **passages.per_document** is `true`. * * @return the documentPassages */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java index 83452594629..accab35f1d7 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultMetadata.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -34,6 +34,8 @@ public interface DocumentRetrievalSource { protected Double confidence; + protected QueryResultMetadata() {} + /** * Gets the documentRetrievalSource. * @@ -60,10 +62,10 @@ public String getCollectionId() { * Gets the confidence. * *

The confidence score for the given result. Calculated based on how relevant the result is - * estimated to be. confidence can range from `0.0` to `1.0`. The higher the number, the more + * estimated to be. The score can range from `0.0` to `1.0`. The higher the number, the more * relevant the document. The `confidence` value for a result was calculated using the model - * specified in the `document_retrieval_strategy` field of the result set. This field is only - * returned if the **natural_language_query** parameter is specified in the query. + * specified in the `document_retrieval_strategy` field of the result set. This field is returned + * only if the **natural_language_query** parameter is specified in the query. * * @return the confidence */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java index 238bdba179d..cbd4c315ebd 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryResultPassage.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,9 +29,10 @@ public class QueryResultPassage extends GenericModel { protected Long endOffset; protected String field; - protected Double confidence; protected List answers; + protected QueryResultPassage() {} + /** * Gets the passageText. * @@ -76,21 +77,11 @@ public String getField() { return field; } - /** - * Gets the confidence. - * - *

Estimate of the probability that the passage is relevant. - * - * @return the confidence - */ - public Double getConfidence() { - return confidence; - } - /** * Gets the answers. * - *

An arry of extracted answers to the specified query. + *

An arry of extracted answers to the specified query. Returned for natural language queries + * when **passages.per_document** is `true`. * * @return the answers */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java index df58d02e75a..7d8353c3dde 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QuerySuggestedRefinement.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -22,6 +22,8 @@ public class QuerySuggestedRefinement extends GenericModel { protected String text; + protected QuerySuggestedRefinement() {} + /** * Gets the text. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java index 63f67642a47..633d40da5f6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTableResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,8 @@ public class QueryTableResult extends GenericModel { protected TableResultTable table; + protected QueryTableResult() {} + /** * Gets the tableId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregation.java deleted file mode 100644 index e331ec8a970..00000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregation.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v2.model; - -import java.util.List; - -/** Returns the top values for the field specified. */ -public class QueryTermAggregation extends QueryAggregation { - - protected String field; - protected Long count; - protected String name; - protected List results; - - /** - * Gets the field. - * - *

The field in the document used to generate top values from. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the count. - * - *

The number of top values returned. - * - * @return the count - */ - public Long getCount() { - return count; - } - - /** - * Gets the name. - * - *

Identifier specified in the query request of this aggregation. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the results. - * - *

Array of top values for the field. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java index a3b4460977d..77e15395502 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTermAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,8 +15,9 @@ import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; import java.util.List; +import java.util.Map; -/** Top value result for the term aggregation. */ +/** Top value result for the `term` aggregation. */ public class QueryTermAggregationResult extends GenericModel { protected String key; @@ -29,15 +30,17 @@ public class QueryTermAggregationResult extends GenericModel { @SerializedName("total_matching_documents") protected Long totalMatchingDocuments; - @SerializedName("estimated_matching_documents") - protected Long estimatedMatchingDocuments; + @SerializedName("estimated_matching_results") + protected Double estimatedMatchingResults; - protected List aggregations; + protected List> aggregations; + + protected QueryTermAggregationResult() {} /** * Gets the key. * - *

Value of the field with a non-zero frequency in the document set. + *

Value of the field with a nonzero frequency in the document set. * * @return the key */ @@ -59,7 +62,8 @@ public Long getMatchingResults() { /** * Gets the relevancy. * - *

The relevancy for this term. + *

The relevancy score for this result. Returned only if `relevancy:true` is specified in the + * request. * * @return the relevancy */ @@ -70,8 +74,8 @@ public Double getRelevancy() { /** * Gets the totalMatchingDocuments. * - *

The number of documents which have the term as the value of specified field in the whole set - * of documents in this collection. Returned only when the `relevancy` parameter is set to `true`. + *

Number of documents in the collection that contain the term in the specified field. Returned + * only when `relevancy:true` is specified in the request. * * @return the totalMatchingDocuments */ @@ -80,25 +84,26 @@ public Long getTotalMatchingDocuments() { } /** - * Gets the estimatedMatchingDocuments. + * Gets the estimatedMatchingResults. * - *

The estimated number of documents which would match the query and also meet the condition. - * Returned only when the `relevancy` parameter is set to `true`. + *

Number of documents that are estimated to match the query and also meet the condition. + * Returned only when `relevancy:true` is specified in the request. * - * @return the estimatedMatchingDocuments + * @return the estimatedMatchingResults */ - public Long getEstimatedMatchingDocuments() { - return estimatedMatchingDocuments; + public Double getEstimatedMatchingResults() { + return estimatedMatchingResults; } /** * Gets the aggregations. * - *

An array of sub-aggregations. + *

An array of subaggregations. Returned only when this aggregation is combined with other + * aggregations in the request or is returned as a subaggregation. * * @return the aggregations */ - public List getAggregations() { + public List> getAggregations() { return aggregations; } } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregation.java deleted file mode 100644 index bfbaefebae0..00000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregation.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v2.model; - -import java.util.List; - -/** A specialized histogram aggregation that uses dates to create interval segments. */ -public class QueryTimesliceAggregation extends QueryAggregation { - - protected String field; - protected String interval; - protected String name; - protected List results; - - /** - * Gets the field. - * - *

The date field name used to create the timeslice. - * - * @return the field - */ - public String getField() { - return field; - } - - /** - * Gets the interval. - * - *

The date interval value. Valid values are seconds, minutes, hours, days, weeks, and years. - * - * @return the interval - */ - public String getInterval() { - return interval; - } - - /** - * Gets the name. - * - *

Identifier specified in the query request of this aggregation. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the results. - * - *

Array of aggregation results. - * - * @return the results - */ - public List getResults() { - return results; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java index aa2f558657b..3a85b34088a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTimesliceAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -15,6 +15,7 @@ import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; import java.util.List; +import java.util.Map; /** A timeslice interval segment. */ public class QueryTimesliceAggregationResult extends GenericModel { @@ -27,7 +28,9 @@ public class QueryTimesliceAggregationResult extends GenericModel { @SerializedName("matching_results") protected Long matchingResults; - protected List aggregations; + protected List> aggregations; + + protected QueryTimesliceAggregationResult() {} /** * Gets the keyAsString. @@ -66,11 +69,12 @@ public Long getMatchingResults() { /** * Gets the aggregations. * - *

An array of sub-aggregations. + *

An array of subaggregations. Returned only when this aggregation is returned as a + * subaggregation. * * @return the aggregations */ - public List getAggregations() { + public List> getAggregations() { return aggregations; } } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregation.java deleted file mode 100644 index 6089ab2dad6..00000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregation.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v2.model; - -/** Returns the top documents ranked by the score of the query. */ -public class QueryTopHitsAggregation extends QueryAggregation { - - protected Long size; - protected String name; - protected QueryTopHitsAggregationResult hits; - - /** - * Gets the size. - * - *

The number of documents to return. - * - * @return the size - */ - public Long getSize() { - return size; - } - - /** - * Gets the name. - * - *

Identifier specified in the query request of this aggregation. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the hits. - * - * @return the hits - */ - public QueryTopHitsAggregationResult getHits() { - return hits; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java index 2a239c54a64..e2c99f76f95 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopHitsAggregationResult.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,8 @@ public class QueryTopHitsAggregationResult extends GenericModel { protected List> hits; + protected QueryTopHitsAggregationResult() {} + /** * Gets the matchingResults. * @@ -39,7 +41,7 @@ public Long getMatchingResults() { /** * Gets the hits. * - *

An array of the document results. + *

An array of the document results in an ordered list. * * @return the hits */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java new file mode 100644 index 00000000000..3dc978de200 --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTopicAggregationResult.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; +import java.util.Map; + +/** Result for the `topic` aggregation. */ +public class QueryTopicAggregationResult extends GenericModel { + + protected List> aggregations; + + protected QueryTopicAggregationResult() {} + + /** + * Gets the aggregations. + * + *

Array of subaggregations of type `term` or `group_by` and `timeslice`. Each element of the + * matrix that is returned contains a **topic_indicator** that is calculated from the combination + * of each aggregation value and segment of time. + * + * @return the aggregations + */ + public List> getAggregations() { + return aggregations; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java new file mode 100644 index 00000000000..f15d77694dd --- /dev/null +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/QueryTrendAggregationResult.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2023. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ibm.watson.discovery.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; +import java.util.Map; + +/** Result for the `trend` aggregation. */ +public class QueryTrendAggregationResult extends GenericModel { + + protected List> aggregations; + + protected QueryTrendAggregationResult() {} + + /** + * Gets the aggregations. + * + *

Array of subaggregations of type `term` or `group_by` and `timeslice`. Each element of the + * matrix that is returned contains a **trend_indicator** that is calculated from the combination + * of each aggregation value and segment of time. + * + * @return the aggregations + */ + public List> getAggregations() { + return aggregations; + } +} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java index b20ef33ac2b..edd8ff905de 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/ResultPassageAnswer.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,8 @@ public class ResultPassageAnswer extends GenericModel { protected Double confidence; + protected ResultPassageAnswer() {} + /** * Gets the answerText. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java index 21aae637408..4833bd9a539 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/RetrievalDetails.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2021. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,8 @@ public interface DocumentRetrievalStrategy { @SerializedName("document_retrieval_strategy") protected String documentRetrievalStrategy; + protected RetrievalDetails() {} + /** * Gets the documentRetrievalStrategy. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java index ba06ae135b9..2ea9dc4cf8b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/StopWordList.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public class StopWordList extends GenericModel { public static class Builder { private List stopwords; + /** + * Instantiates a new Builder from an existing StopWordList instance. + * + * @param stopWordList the instance to initialize the Builder with + */ private Builder(StopWordList stopWordList) { this.stopwords = stopWordList.stopwords; } diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java index db12f281fa4..e041efc89c6 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -57,6 +57,8 @@ public class TableBodyCells extends GenericModel { protected List attributes; + protected TableBodyCells() {} + /** * Gets the cellId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java index 13c16b71e41..7dd1ae183ee 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellKey.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class TableCellKey extends GenericModel { protected TableElementLocation location; protected String text; + protected TableCellKey() {} + /** * Gets the cellId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java index cf9ed887097..796cb3dce78 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableCellValues.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class TableCellValues extends GenericModel { protected TableElementLocation location; protected String text; + protected TableCellValues() {} + /** * Gets the cellId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderIds.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderIds.java index 5102f6867e0..e82a5f8ce83 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderIds.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderIds.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -22,6 +22,8 @@ public class TableColumnHeaderIds extends GenericModel { protected String id; + protected TableColumnHeaderIds() {} + /** * Gets the id. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderTexts.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderTexts.java index 4c785cac224..a5830219f69 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderTexts.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderTexts.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -22,6 +22,8 @@ public class TableColumnHeaderTexts extends GenericModel { protected String text; + protected TableColumnHeaderTexts() {} + /** * Gets the text. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderTextsNormalized.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderTextsNormalized.java index a3799ea14af..bfb87334a10 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderTextsNormalized.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaderTextsNormalized.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class TableColumnHeaderTextsNormalized extends GenericModel { @SerializedName("text_normalized") protected String textNormalized; + protected TableColumnHeaderTextsNormalized() {} + /** * Gets the textNormalized. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java index cc45308b615..132da1e4d6e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -43,6 +43,8 @@ public class TableColumnHeaders extends GenericModel { @SerializedName("column_index_end") protected Long columnIndexEnd; + protected TableColumnHeaders() {} + /** * Gets the cellId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java index 717202c265c..afcecfe701c 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableElementLocation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -23,6 +23,8 @@ public class TableElementLocation extends GenericModel { protected Long begin; protected Long end; + protected TableElementLocation() {} + /** * Gets the begin. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java index f9a79a7b7eb..c26c6a68dc9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2018, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -37,6 +37,8 @@ public class TableHeaders extends GenericModel { @SerializedName("column_index_end") protected Long columnIndexEnd; + protected TableHeaders() {} + /** * Gets the cellId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java index 37d5b89e942..9b94eb18922 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableKeyValuePairs.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -21,6 +21,8 @@ public class TableKeyValuePairs extends GenericModel { protected TableCellKey key; protected List value; + protected TableKeyValuePairs() {} + /** * Gets the key. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java index 7823d437f81..1db4715b396 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableResultTable.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -44,6 +44,8 @@ public class TableResultTable extends GenericModel { protected List contexts; + protected TableResultTable() {} + /** * Gets the location. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderIds.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderIds.java index fbc2ab4d052..74ae03e8ccf 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderIds.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderIds.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -22,6 +22,8 @@ public class TableRowHeaderIds extends GenericModel { protected String id; + protected TableRowHeaderIds() {} + /** * Gets the id. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderTexts.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderTexts.java index 8f44e0222b3..45320230c97 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderTexts.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderTexts.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -22,6 +22,8 @@ public class TableRowHeaderTexts extends GenericModel { protected String text; + protected TableRowHeaderTexts() {} + /** * Gets the text. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderTextsNormalized.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderTextsNormalized.java index 75599d8eec3..92639ecfa95 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderTextsNormalized.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaderTextsNormalized.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -24,6 +24,8 @@ public class TableRowHeaderTextsNormalized extends GenericModel { @SerializedName("text_normalized") protected String textNormalized; + protected TableRowHeaderTextsNormalized() {} + /** * Gets the textNormalized. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java index f3be2a90e52..6c464330e70 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableRowHeaders.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -42,6 +42,8 @@ public class TableRowHeaders extends GenericModel { @SerializedName("column_index_end") protected Long columnIndexEnd; + protected TableRowHeaders() {} + /** * Gets the cellId. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java index 85e4067ab9a..706099f59b8 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableTextLocation.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2020. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class TableTextLocation extends GenericModel { protected String text; protected TableElementLocation location; + protected TableTextLocation() {} + /** * Gets the text. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java index b558372398c..d5a6e97b53b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingExample.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,11 @@ public static class Builder { private String collectionId; private Long relevance; + /** + * Instantiates a new Builder from an existing TrainingExample instance. + * + * @param trainingExample the instance to initialize the Builder with + */ private Builder(TrainingExample trainingExample) { this.documentId = trainingExample.documentId; this.collectionId = trainingExample.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java index b774d64de6a..3a1991b889e 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuery.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -38,6 +38,11 @@ public static class Builder { private String filter; private List examples; + /** + * Instantiates a new Builder from an existing TrainingQuery instance. + * + * @param trainingQuery the instance to initialize the Builder with + */ private Builder(TrainingQuery trainingQuery) { this.naturalLanguageQuery = trainingQuery.naturalLanguageQuery; this.filter = trainingQuery.filter; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java index 7ac04bb8d27..8a2b9b75e0b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/TrainingQuerySet.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -20,6 +20,8 @@ public class TrainingQuerySet extends GenericModel { protected List queries; + protected TrainingQuerySet() {} + /** * Gets the queries. * diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java index 562639d0a81..56167823dbb 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateCollectionOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,6 +33,11 @@ public static class Builder { private String description; private List enrichments; + /** + * Instantiates a new Builder from an existing UpdateCollectionOptions instance. + * + * @param updateCollectionOptions the instance to initialize the Builder with + */ private Builder(UpdateCollectionOptions updateCollectionOptions) { this.projectId = updateCollectionOptions.projectId; this.collectionId = updateCollectionOptions.collectionId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java index 7ae781cccaf..c5018ded7b0 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifier.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -28,6 +28,11 @@ public static class Builder { private String name; private String description; + /** + * Instantiates a new Builder from an existing UpdateDocumentClassifier instance. + * + * @param updateDocumentClassifier the instance to initialize the Builder with + */ private Builder(UpdateDocumentClassifier updateDocumentClassifier) { this.name = updateDocumentClassifier.name; this.description = updateDocumentClassifier.description; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java index b3e04d5e11e..7448f69fd59 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierModelOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -31,6 +31,11 @@ public static class Builder { private String name; private String description; + /** + * Instantiates a new Builder from an existing UpdateDocumentClassifierModelOptions instance. + * + * @param updateDocumentClassifierModelOptions the instance to initialize the Builder with + */ private Builder(UpdateDocumentClassifierModelOptions updateDocumentClassifierModelOptions) { this.projectId = updateDocumentClassifierModelOptions.projectId; this.classifierId = updateDocumentClassifierModelOptions.classifierId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java index 8425384654c..b6214fb2b8a 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentClassifierOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -35,6 +35,11 @@ public static class Builder { private InputStream trainingData; private InputStream testData; + /** + * Instantiates a new Builder from an existing UpdateDocumentClassifierOptions instance. + * + * @param updateDocumentClassifierOptions the instance to initialize the Builder with + */ private Builder(UpdateDocumentClassifierOptions updateDocumentClassifierOptions) { this.projectId = updateDocumentClassifierOptions.projectId; this.classifierId = updateDocumentClassifierOptions.classifierId; @@ -213,8 +218,7 @@ public UpdateDocumentClassifier classifier() { * a field that contains the text you want to classify and a field that contains the * classification labels that you want to use to classify your data. If you want to specify * multiple values in a single column, use a semicolon as the value separator. For a sample file, - * see [the product - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-cm-doc-classifier). + * see [the product documentation](/docs/discovery-data?topic=discovery-data-cm-doc-classifier). * * @return the trainingData */ diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java index 182c1e635cc..56de28e6ac9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateDocumentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -41,6 +41,11 @@ public static class Builder { private String metadata; private Boolean xWatsonDiscoveryForce; + /** + * Instantiates a new Builder from an existing UpdateDocumentOptions instance. + * + * @param updateDocumentOptions the instance to initialize the Builder with + */ private Builder(UpdateDocumentOptions updateDocumentOptions) { this.projectId = updateDocumentOptions.projectId; this.collectionId = updateDocumentOptions.collectionId; @@ -248,7 +253,7 @@ public String documentId() { * *

When adding a document, the content of the document to ingest. For maximum supported file * size limits, see [the - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits). + * documentation](/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits). * *

When analyzing a document, the content of the document to analyze but not ingest. Only the * `application/json` content type is supported currently. For maximum supported file size limits, diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java index 994dac3086a..0dd1d07bec1 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateEnrichmentOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -29,6 +29,11 @@ public static class Builder { private String name; private String description; + /** + * Instantiates a new Builder from an existing UpdateEnrichmentOptions instance. + * + * @param updateEnrichmentOptions the instance to initialize the Builder with + */ private Builder(UpdateEnrichmentOptions updateEnrichmentOptions) { this.projectId = updateEnrichmentOptions.projectId; this.enrichmentId = updateEnrichmentOptions.enrichmentId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java index c4cd0efc25a..a080aa071e9 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateProjectOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2020, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -25,6 +25,11 @@ public static class Builder { private String projectId; private String name; + /** + * Instantiates a new Builder from an existing UpdateProjectOptions instance. + * + * @param updateProjectOptions the instance to initialize the Builder with + */ private Builder(UpdateProjectOptions updateProjectOptions) { this.projectId = updateProjectOptions.projectId; this.name = updateProjectOptions.name; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java index 473ab9b40db..6777e50888b 100644 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java +++ b/discovery/src/main/java/com/ibm/watson/discovery/v2/model/UpdateTrainingQueryOptions.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,6 +33,11 @@ public static class Builder { private List examples; private String filter; + /** + * Instantiates a new Builder from an existing UpdateTrainingQueryOptions instance. + * + * @param updateTrainingQueryOptions the instance to initialize the Builder with + */ private Builder(UpdateTrainingQueryOptions updateTrainingQueryOptions) { this.projectId = updateTrainingQueryOptions.projectId; this.queryId = updateTrainingQueryOptions.queryId; diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/query/AggregationDeserializer.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/query/AggregationDeserializer.java deleted file mode 100644 index ccde5ccd4d3..00000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/query/AggregationDeserializer.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2019, 2020. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ibm.watson.discovery.v2.query; - -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.ibm.cloud.sdk.core.util.GsonSingleton; -import com.ibm.watson.discovery.query.AggregationType; -import com.ibm.watson.discovery.v2.model.QueryAggregation; -import com.ibm.watson.discovery.v2.model.QueryCalculationAggregation; -import com.ibm.watson.discovery.v2.model.QueryFilterAggregation; -import com.ibm.watson.discovery.v2.model.QueryHistogramAggregation; -import com.ibm.watson.discovery.v2.model.QueryNestedAggregation; -import com.ibm.watson.discovery.v2.model.QueryTermAggregation; -import com.ibm.watson.discovery.v2.model.QueryTimesliceAggregation; -import com.ibm.watson.discovery.v2.model.QueryTopHitsAggregation; -import java.lang.reflect.Type; - -/** - * Deserializer to transform JSON into a {@link QueryAggregation}. - * - * @deprecated This class has been replaced by logic inside of the QueryAggregation class. - */ -public class AggregationDeserializer implements JsonDeserializer { - - private static final String TYPE = "type"; - - /** - * Deserializes JSON and converts it to the appropriate {@link QueryAggregation} subclass. - * - * @param json the JSON data being deserialized - * @param typeOfT the type to deserialize to, which should be {@link QueryAggregation} - * @param context additional information about the deserialization state - * @return the appropriate {@link QueryAggregation} subclass - * @throws JsonParseException signals that there has been an issue parsing the JSON - */ - @Override - public QueryAggregation deserialize( - JsonElement json, Type typeOfT, JsonDeserializationContext context) - throws JsonParseException { - - // get aggregation type from response - JsonObject jsonObject = json.getAsJsonObject(); - String aggregationType = ""; - for (String key : jsonObject.keySet()) { - if (key.equals(TYPE)) { - aggregationType = jsonObject.get(key).getAsString(); - } - } - - QueryAggregation aggregation; - if (aggregationType.equals(AggregationType.HISTOGRAM.getName())) { - aggregation = GsonSingleton.getGson().fromJson(json, QueryHistogramAggregation.class); - } else if (aggregationType.equals(AggregationType.MAX.getName()) - || aggregationType.equals(AggregationType.MIN.getName()) - || aggregationType.equals(AggregationType.AVERAGE.getName()) - || aggregationType.equals(AggregationType.SUM.getName()) - || aggregationType.equals(AggregationType.UNIQUE_COUNT.getName())) { - aggregation = GsonSingleton.getGson().fromJson(json, QueryCalculationAggregation.class); - } else if (aggregationType.equals(AggregationType.TERM.getName())) { - aggregation = GsonSingleton.getGson().fromJson(json, QueryTermAggregation.class); - } else if (aggregationType.equals(AggregationType.FILTER.getName())) { - aggregation = GsonSingleton.getGson().fromJson(json, QueryFilterAggregation.class); - } else if (aggregationType.equals(AggregationType.NESTED.getName())) { - aggregation = GsonSingleton.getGson().fromJson(json, QueryNestedAggregation.class); - } else if (aggregationType.equals(AggregationType.TIMESLICE.getName())) { - aggregation = GsonSingleton.getGson().fromJson(json, QueryTimesliceAggregation.class); - } else if (aggregationType.equals(AggregationType.TOP_HITS.getName())) { - aggregation = GsonSingleton.getGson().fromJson(json, QueryTopHitsAggregation.class); - } else { - aggregation = GsonSingleton.getGson().fromJson(json, GenericQueryAggregation.class); - } - - return aggregation; - } -} diff --git a/discovery/src/main/java/com/ibm/watson/discovery/v2/query/GenericQueryAggregation.java b/discovery/src/main/java/com/ibm/watson/discovery/v2/query/GenericQueryAggregation.java deleted file mode 100644 index 4f882832ed1..00000000000 --- a/discovery/src/main/java/com/ibm/watson/discovery/v2/query/GenericQueryAggregation.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.ibm.watson.discovery.v2.query; - -import com.ibm.watson.discovery.v2.model.QueryAggregation; - -/** - * Catch-all class for query aggregations which can't be identified and deserialized to a known - * class. - * - * @deprecated This class is no longer necessary with the built-in deserialization logic in the - * QueryAggregation class. - */ -public class GenericQueryAggregation extends QueryAggregation {}