Skip to content

Commit cf1d976

Browse files
committed
feat(discoveryv1): discovery v1 generated with new spec
Modified properties to models BREAKING CHANGE: QueryAggregation - subclasses have changed
1 parent 7f7d96f commit cf1d976

2 files changed

Lines changed: 18 additions & 22 deletions

File tree

discovery/v1.ts

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2017, 2021.
2+
* (C) Copyright IBM Corp. 2017, 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -267,8 +267,8 @@ class DiscoveryV1 extends BaseService {
267267
* @param {string} params.environmentId - The ID of the environment.
268268
* @param {string} [params.name] - Name that identifies the environment.
269269
* @param {string} [params.description] - Description of the environment.
270-
* @param {string} [params.size] - Size that the environment should be increased to. Environment size cannot be
271-
* modified when using a Lite plan. Environment size can only increased and not decreased.
270+
* @param {string} [params.size] - Size to change the environment to. **Note:** Lite plan users cannot change the
271+
* environment size.
272272
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
273273
* @returns {Promise<DiscoveryV1.Response<DiscoveryV1.Environment>>}
274274
*/
@@ -4384,16 +4384,14 @@ namespace DiscoveryV1 {
43844384
name?: string;
43854385
/** Description of the environment. */
43864386
description?: string;
4387-
/** Size that the environment should be increased to. Environment size cannot be modified when using a Lite
4388-
* plan. Environment size can only increased and not decreased.
4389-
*/
4387+
/** Size to change the environment to. **Note:** Lite plan users cannot change the environment size. */
43904388
size?: UpdateEnvironmentConstants.Size | string;
43914389
headers?: OutgoingHttpHeaders;
43924390
}
43934391

43944392
/** Constants for the `updateEnvironment` operation. */
43954393
export namespace UpdateEnvironmentConstants {
4396-
/** Size that the environment should be increased to. Environment size cannot be modified when using a Lite plan. Environment size can only increased and not decreased. */
4394+
/** Size to change the environment to. **Note:** Lite plan users cannot change the environment size. */
43974395
export enum Size {
43984396
S = 'S',
43994397
MS = 'MS',
@@ -5880,26 +5878,26 @@ namespace DiscoveryV1 {
58805878
source_field: string;
58815879
/** Indicates that the enrichments will overwrite the destination_field field if it already exists. */
58825880
overwrite?: boolean;
5883-
/** Name of the enrichment service to call. Current options are `natural_language_understanding` and `elements`.
5884-
*
5885-
* When using `natual_language_understanding`, the **options** object must contain Natural Language Understanding
5886-
* options.
5881+
/** Name of the enrichment service to call. The only supported option is `natural_language_understanding`. The
5882+
* `elements` option is deprecated and support ended on 10 July 2020.
58875883
*
5888-
* When using `elements` the **options** object must contain Element Classification options. Additionally, when
5889-
* using the `elements` enrichment the configuration specified and files ingested must meet all the criteria
5890-
* specified in [the
5891-
* documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-element-classification#element-classification).
5884+
* The **options** object must contain Natural Language Understanding options.
58925885
*/
58935886
enrichment: string;
58945887
/** If true, then most errors generated during the enrichment process will be treated as warnings and will not
58955888
* cause the document to fail processing.
58965889
*/
58975890
ignore_downstream_errors?: boolean;
5898-
/** Options which are specific to a particular enrichment. */
5891+
/** Options that are specific to a particular enrichment.
5892+
*
5893+
* The `elements` enrichment type is deprecated. Use the [Create a
5894+
* project](https://cloud.ibm.com/apidocs/discovery-data#createproject) method of the Discovery v2 API to create a
5895+
* `content_intelligence` project type instead.
5896+
*/
58995897
options?: EnrichmentOptions;
59005898
}
59015899

5902-
/** Options which are specific to a particular enrichment. */
5900+
/** Options that are specific to a particular enrichment. The `elements` enrichment type is deprecated. Use the [Create a project](https://cloud.ibm.com/apidocs/discovery-data#createproject) method of the Discovery v2 API to create a `content_intelligence` project type instead. */
59035901
export interface EnrichmentOptions {
59045902
/** Object containing Natural Language Understanding features to be used. */
59055903
features?: NluEnrichmentFeatures;
@@ -5909,9 +5907,7 @@ namespace DiscoveryV1 {
59095907
* features support all languages, automatic detection is recommended.
59105908
*/
59115909
language?: string;
5912-
/** For use with `elements` enrichments only. The element extraction model to use. The only model available is
5913-
* `contract`.
5914-
*/
5910+
/** The element extraction model to use, which can be `contract` only. The `elements` enrichment is deprecated. */
59155911
model?: string;
59165912
}
59175913

@@ -6802,7 +6798,7 @@ namespace DiscoveryV1 {
68026798
export interface StatusDetails {
68036799
/** Indicates whether the credential is accepted by the target data source. */
68046800
authenticated?: boolean;
6805-
/** If `authenticated` is `false`, a message describes why the authentication was unsuccessful. */
6801+
/** If `authenticated` is `false`, a message describes why authentication is unsuccessful. */
68066802
error_message?: string;
68076803
}
68086804

test/unit/discovery.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2021.
2+
* (C) Copyright IBM Corp. 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)