Skip to content

Regenerate sdk release 2 2019 #833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 6, 2019
Next Next commit
feat(discovery): add method getStopwordListStatus
  • Loading branch information
dpopp07 committed Feb 5, 2019
commit ea9eaf9ff29b278b18ecf6c00f8f789704effd48
59 changes: 58 additions & 1 deletion discovery/v1-generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,52 @@ class DiscoveryV1 extends BaseService {
return this.createRequest(parameters, _callback);
};

/**
* Get stopword list status.
*
* Returns the current status of the stopword list for the specified collection.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.environment_id - The ID of the environment.
* @param {string} params.collection_id - The ID of the collection.
* @param {Object} [params.headers] - Custom request headers
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public getStopwordListStatus(params: DiscoveryV1.GetStopwordListStatusParams, callback?: DiscoveryV1.Callback<DiscoveryV1.TokenDictStatusResponse>): NodeJS.ReadableStream | void {
const _params = extend({}, params);
const _callback = (callback) ? callback : () => { /* noop */ };
const requiredParams = ['environment_id', 'collection_id'];

const missingParams = getMissingParams(_params, requiredParams);
if (missingParams) {
return _callback(missingParams);
}

const path = {
'environment_id': _params.environment_id,
'collection_id': _params.collection_id
};

const defaultHeaders = getDefaultHeaders('discovery', 'v1', 'getStopwordListStatus');

const parameters = {
options: {
url: '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords',
method: 'GET',
path,
},
defaultOptions: extend(true, {}, this._options, {
headers: extend(true, defaultHeaders, {
'Accept': 'application/json',
'Content-Type': 'application/json',
}, _params.headers),
}),
};

return this.createRequest(parameters, _callback);
};

/**
* Get tokenization dictionary status.
*
Expand Down Expand Up @@ -4047,6 +4093,15 @@ namespace DiscoveryV1 {
headers?: Object;
}

/** Parameters for the `getStopwordListStatus` operation. */
export interface GetStopwordListStatusParams {
/** The ID of the environment. */
environment_id: string;
/** The ID of the collection. */
collection_id: string;
headers?: Object;
}

/** Parameters for the `getTokenizationDictionaryStatus` operation. */
export interface GetTokenizationDictionaryStatusParams {
/** The ID of the environment. */
Expand Down Expand Up @@ -4935,7 +4990,7 @@ namespace DiscoveryV1 {
export interface DocumentAccepted {
/** The unique identifier of the ingested document. */
document_id?: string;
/** Status of the document in the ingestion process. */
/** Status of the document in the ingestion process. A status of `processing` is returned for documents that are ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others. */
status?: string;
/** Array of notices produced by the document-ingestion process. */
notices?: Notice[];
Expand All @@ -4949,6 +5004,8 @@ namespace DiscoveryV1 {
processing?: number;
/** The number of documents in the collection that failed to be ingested. */
failed?: number;
/** The number of documents that have been uploaded to the collection, but have not yet started processing. */
pending?: number;
}

/** DocumentSnapshot. */
Expand Down