Skip to content

Commit

Permalink
feat: regenerate services based on current API def
Browse files Browse the repository at this point in the history
  • Loading branch information
mamoonraja committed May 28, 2020
1 parent fa2cd1b commit c538bd2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
4 changes: 4 additions & 0 deletions ibm_watson/discovery_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ def update_document(self,
**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.
**Note:** If an uploaded document is segmented, all segments will be overwritten,
even if the updated version of the document has fewer segments.
:param str project_id: The ID of the project. This information can be found
from the deploy page of the Discovery administrative tooling.
Expand Down Expand Up @@ -665,6 +667,8 @@ def delete_document(self,
**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.
**Note:** Segments of an uploaded document cannot be deleted individually. Delete
all segments by deleting using the `parent_document_id` of a segment result.
:param str project_id: The ID of the project. This information can be found
from the deploy page of the Discovery administrative tooling.
Expand Down
18 changes: 14 additions & 4 deletions ibm_watson/natural_language_understanding_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2701,8 +2701,10 @@ class Model():
:attr str description: (optional) Model description.
:attr str workspace_id: (optional) ID of the Watson Knowledge Studio workspace
that deployed this model to Natural Language Understanding.
:attr str version: (optional) The model version, if it was manually provided in
Watson Knowledge Studio.
:attr str model_version: (optional) The model version, if it was manually
provided in Watson Knowledge Studio.
:attr str version: (optional) (Deprecated — use `model_version`) The model
version, if it was manually provided in Watson Knowledge Studio.
:attr str version_description: (optional) The description of the version, if it
was manually provided in Watson Knowledge Studio.
:attr datetime created: (optional) A dateTime indicating when the model was
Expand All @@ -2716,6 +2718,7 @@ def __init__(self,
language: str = None,
description: str = None,
workspace_id: str = None,
model_version: str = None,
version: str = None,
version_description: str = None,
created: datetime = None) -> None:
Expand All @@ -2730,8 +2733,10 @@ def __init__(self,
:param str description: (optional) Model description.
:param str workspace_id: (optional) ID of the Watson Knowledge Studio
workspace that deployed this model to Natural Language Understanding.
:param str version: (optional) The model version, if it was manually
:param str model_version: (optional) The model version, if it was manually
provided in Watson Knowledge Studio.
:param str version: (optional) (Deprecated — use `model_version`) The model
version, if it was manually provided in Watson Knowledge Studio.
:param str version_description: (optional) The description of the version,
if it was manually provided in Watson Knowledge Studio.
:param datetime created: (optional) A dateTime indicating when the model
Expand All @@ -2742,6 +2747,7 @@ def __init__(self,
self.language = language
self.description = description
self.workspace_id = workspace_id
self.model_version = model_version
self.version = version
self.version_description = version_description
self.created = created
Expand All @@ -2752,7 +2758,7 @@ def from_dict(cls, _dict: Dict) -> 'Model':
args = {}
valid_keys = [
'status', 'model_id', 'language', 'description', 'workspace_id',
'version', 'version_description', 'created'
'model_version', 'version', 'version_description', 'created'
]
bad_keys = set(_dict.keys()) - set(valid_keys)
if bad_keys:
Expand All @@ -2769,6 +2775,8 @@ def from_dict(cls, _dict: Dict) -> 'Model':
args['description'] = _dict.get('description')
if 'workspace_id' in _dict:
args['workspace_id'] = _dict.get('workspace_id')
if 'model_version' in _dict:
args['model_version'] = _dict.get('model_version')
if 'version' in _dict:
args['version'] = _dict.get('version')
if 'version_description' in _dict:
Expand All @@ -2795,6 +2803,8 @@ def to_dict(self) -> Dict:
_dict['description'] = self.description
if hasattr(self, 'workspace_id') and self.workspace_id is not None:
_dict['workspace_id'] = self.workspace_id
if hasattr(self, 'model_version') and self.model_version is not None:
_dict['model_version'] = self.model_version
if hasattr(self, 'version') and self.version is not None:
_dict['version'] = self.version
if hasattr(
Expand Down
21 changes: 11 additions & 10 deletions ibm_watson/text_to_speech_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@
dialects, and voices. The service supports at least one male or female voice, sometimes
both, for each language. The audio is streamed back to the client with minimal delay.
For speech synthesis, the service supports a synchronous HTTP Representational State
Transfer (REST) interface. It also supports a WebSocket interface that provides both plain
text and SSML input, including the SSML <mark> element and word timings. SSML is an
XML-based markup language that provides text annotation for speech-synthesis applications.
The service also offers a customization interface. You can use the interface to define
sounds-like or phonetic translations for words. A sounds-like translation consists of one
or more words that, when combined, sound like the word. A phonetic translation is based on
the SSML phoneme format for representing a word. You can specify a phonetic translation in
standard International Phonetic Alphabet (IPA) representation or in the proprietary IBM
Symbolic Phonetic Representation (SPR). The Arabic, Chinese, Dutch, and Korean languages
support only IPA.
Transfer (REST) interface and a WebSocket interface. Both interfaces support plain text
and SSML input. SSML is an XML-based markup language that provides text annotation for
speech-synthesis applications. The WebSocket interface also supports the SSML
<code>&lt;mark&gt;</code> element and word timings.
The service offers a customization interface that you can use to define sounds-like or
phonetic translations for words. A sounds-like translation consists of one or more words
that, when combined, sound like the word. A phonetic translation is based on the SSML
phoneme format for representing a word. You can specify a phonetic translation in standard
International Phonetic Alphabet (IPA) representation or in the proprietary IBM Symbolic
Phonetic Representation (SPR). The Arabic, Chinese, Dutch, and Korean languages support
only IPA.
"""

import json
Expand Down

0 comments on commit c538bd2

Please sign in to comment.