Skip to content

Commit 9462454

Browse files
cloudant-sdks-automationeiri
authored andcommitted
feat(generated): update API definition to 1.0.0-dev0.1.11
Generated SDK source code using: - Generator version 3.90.1 - Specification version 1.0.0-dev0.1.11 - Automation (cloudant-sdks) version c3257f9
1 parent 33160e3 commit 9462454

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

ibmcloudant/cloudant_v1.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10840,6 +10840,10 @@ class DatabaseInformation:
1084010840
:param int doc_count: A count of the documents in the specified database.
1084110841
:param int doc_del_count: Number of deleted documents.
1084210842
:param str engine: (optional) The engine used for the database.
10843+
:param str instance_start_time: An opaque string to detect whether a database
10844+
has been recreated. The field name is for compatibility with old replicator
10845+
versions. Do not use the value to infer timing infromation. Typically only used
10846+
by replicators.
1084310847
:param DatabaseInformationProps props: Schema for database properties.
1084410848
:param ContentInformationSizes sizes: Schema for size information of content.
1084510849
:param str update_seq: An opaque string that describes the state of the
@@ -10857,6 +10861,7 @@ def __init__(
1085710861
disk_format_version: int,
1085810862
doc_count: int,
1085910863
doc_del_count: int,
10864+
instance_start_time: str,
1086010865
props: 'DatabaseInformationProps',
1086110866
sizes: 'ContentInformationSizes',
1086210867
update_seq: str,
@@ -10879,6 +10884,10 @@ def __init__(
1087910884
the data when it is stored on disk.
1088010885
:param int doc_count: A count of the documents in the specified database.
1088110886
:param int doc_del_count: Number of deleted documents.
10887+
:param str instance_start_time: An opaque string to detect whether a
10888+
database has been recreated. The field name is for compatibility with old
10889+
replicator versions. Do not use the value to infer timing infromation.
10890+
Typically only used by replicators.
1088210891
:param DatabaseInformationProps props: Schema for database properties.
1088310892
:param ContentInformationSizes sizes: Schema for size information of
1088410893
content.
@@ -10902,6 +10911,7 @@ def __init__(
1090210911
self.doc_count = doc_count
1090310912
self.doc_del_count = doc_del_count
1090410913
self.engine = engine
10914+
self.instance_start_time = instance_start_time
1090510915
self.props = props
1090610916
self.sizes = sizes
1090710917
self.update_seq = update_seq
@@ -10942,6 +10952,10 @@ def from_dict(cls, _dict: Dict) -> 'DatabaseInformation':
1094210952
raise ValueError('Required property \'doc_del_count\' not present in DatabaseInformation JSON')
1094310953
if (engine := _dict.get('engine')) is not None:
1094410954
args['engine'] = engine
10955+
if (instance_start_time := _dict.get('instance_start_time')) is not None:
10956+
args['instance_start_time'] = instance_start_time
10957+
else:
10958+
raise ValueError('Required property \'instance_start_time\' not present in DatabaseInformation JSON')
1094510959
if (props := _dict.get('props')) is not None:
1094610960
args['props'] = DatabaseInformationProps.from_dict(props)
1094710961
else:
@@ -10989,6 +11003,8 @@ def to_dict(self) -> Dict:
1098911003
_dict['doc_del_count'] = self.doc_del_count
1099011004
if hasattr(self, 'engine') and self.engine is not None:
1099111005
_dict['engine'] = self.engine
11006+
if hasattr(self, 'instance_start_time') and self.instance_start_time is not None:
11007+
_dict['instance_start_time'] = self.instance_start_time
1099211008
if hasattr(self, 'props') and self.props is not None:
1099311009
if isinstance(self.props, dict):
1099411010
_dict['props'] = self.props

test/unit/test_cloudant_v1.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ def test_post_dbs_info_all_params(self):
11471147
"""
11481148
# Set up mock
11491149
url = preprocess_url('/_dbs_info')
1150-
mock_response = '[{"error": "error", "info": {"cluster": {"n": 3, "q": 1, "r": 1, "w": 1}, "committed_update_seq": "committed_update_seq", "compact_running": false, "compacted_seq": "compacted_seq", "db_name": "db_name", "disk_format_version": 19, "doc_count": 0, "doc_del_count": 0, "engine": "engine", "props": {"partitioned": false}, "sizes": {"active": 6, "external": 8, "file": 4}, "update_seq": "update_seq", "uuid": "uuid", "partitioned_indexes": {"count": 0, "indexes": {"search": 0, "view": 0}, "limit": 10}}, "key": "key"}]'
1150+
mock_response = '[{"error": "error", "info": {"cluster": {"n": 3, "q": 1, "r": 1, "w": 1}, "committed_update_seq": "committed_update_seq", "compact_running": false, "compacted_seq": "compacted_seq", "db_name": "db_name", "disk_format_version": 19, "doc_count": 0, "doc_del_count": 0, "engine": "engine", "instance_start_time": "instance_start_time", "props": {"partitioned": false}, "sizes": {"active": 6, "external": 8, "file": 4}, "update_seq": "update_seq", "uuid": "uuid", "partitioned_indexes": {"count": 0, "indexes": {"search": 0, "view": 0}, "limit": 10}}, "key": "key"}]'
11511151
responses.add(
11521152
responses.POST,
11531153
url,
@@ -1192,7 +1192,7 @@ def test_post_dbs_info_value_error(self):
11921192
"""
11931193
# Set up mock
11941194
url = preprocess_url('/_dbs_info')
1195-
mock_response = '[{"error": "error", "info": {"cluster": {"n": 3, "q": 1, "r": 1, "w": 1}, "committed_update_seq": "committed_update_seq", "compact_running": false, "compacted_seq": "compacted_seq", "db_name": "db_name", "disk_format_version": 19, "doc_count": 0, "doc_del_count": 0, "engine": "engine", "props": {"partitioned": false}, "sizes": {"active": 6, "external": 8, "file": 4}, "update_seq": "update_seq", "uuid": "uuid", "partitioned_indexes": {"count": 0, "indexes": {"search": 0, "view": 0}, "limit": 10}}, "key": "key"}]'
1195+
mock_response = '[{"error": "error", "info": {"cluster": {"n": 3, "q": 1, "r": 1, "w": 1}, "committed_update_seq": "committed_update_seq", "compact_running": false, "compacted_seq": "compacted_seq", "db_name": "db_name", "disk_format_version": 19, "doc_count": 0, "doc_del_count": 0, "engine": "engine", "instance_start_time": "instance_start_time", "props": {"partitioned": false}, "sizes": {"active": 6, "external": 8, "file": 4}, "update_seq": "update_seq", "uuid": "uuid", "partitioned_indexes": {"count": 0, "indexes": {"search": 0, "view": 0}, "limit": 10}}, "key": "key"}]'
11961196
responses.add(
11971197
responses.POST,
11981198
url,
@@ -1316,7 +1316,7 @@ def test_get_database_information_all_params(self):
13161316
"""
13171317
# Set up mock
13181318
url = preprocess_url('/testString')
1319-
mock_response = '{"cluster": {"n": 3, "q": 1, "r": 1, "w": 1}, "committed_update_seq": "committed_update_seq", "compact_running": false, "compacted_seq": "compacted_seq", "db_name": "db_name", "disk_format_version": 19, "doc_count": 0, "doc_del_count": 0, "engine": "engine", "props": {"partitioned": false}, "sizes": {"active": 6, "external": 8, "file": 4}, "update_seq": "update_seq", "uuid": "uuid", "partitioned_indexes": {"count": 0, "indexes": {"search": 0, "view": 0}, "limit": 10}}'
1319+
mock_response = '{"cluster": {"n": 3, "q": 1, "r": 1, "w": 1}, "committed_update_seq": "committed_update_seq", "compact_running": false, "compacted_seq": "compacted_seq", "db_name": "db_name", "disk_format_version": 19, "doc_count": 0, "doc_del_count": 0, "engine": "engine", "instance_start_time": "instance_start_time", "props": {"partitioned": false}, "sizes": {"active": 6, "external": 8, "file": 4}, "update_seq": "update_seq", "uuid": "uuid", "partitioned_indexes": {"count": 0, "indexes": {"search": 0, "view": 0}, "limit": 10}}'
13201320
responses.add(
13211321
responses.GET,
13221322
url,
@@ -1354,7 +1354,7 @@ def test_get_database_information_value_error(self):
13541354
"""
13551355
# Set up mock
13561356
url = preprocess_url('/testString')
1357-
mock_response = '{"cluster": {"n": 3, "q": 1, "r": 1, "w": 1}, "committed_update_seq": "committed_update_seq", "compact_running": false, "compacted_seq": "compacted_seq", "db_name": "db_name", "disk_format_version": 19, "doc_count": 0, "doc_del_count": 0, "engine": "engine", "props": {"partitioned": false}, "sizes": {"active": 6, "external": 8, "file": 4}, "update_seq": "update_seq", "uuid": "uuid", "partitioned_indexes": {"count": 0, "indexes": {"search": 0, "view": 0}, "limit": 10}}'
1357+
mock_response = '{"cluster": {"n": 3, "q": 1, "r": 1, "w": 1}, "committed_update_seq": "committed_update_seq", "compact_running": false, "compacted_seq": "compacted_seq", "db_name": "db_name", "disk_format_version": 19, "doc_count": 0, "doc_del_count": 0, "engine": "engine", "instance_start_time": "instance_start_time", "props": {"partitioned": false}, "sizes": {"active": 6, "external": 8, "file": 4}, "update_seq": "update_seq", "uuid": "uuid", "partitioned_indexes": {"count": 0, "indexes": {"search": 0, "view": 0}, "limit": 10}}'
13581358
responses.add(
13591359
responses.GET,
13601360
url,
@@ -14365,6 +14365,7 @@ def test_database_information_serialization(self):
1436514365
database_information_model_json['doc_count'] = 0
1436614366
database_information_model_json['doc_del_count'] = 0
1436714367
database_information_model_json['engine'] = 'testString'
14368+
database_information_model_json['instance_start_time'] = 'testString'
1436814369
database_information_model_json['props'] = database_information_props_model
1436914370
database_information_model_json['sizes'] = content_information_sizes_model
1437014371
database_information_model_json['update_seq'] = 'testString'
@@ -14565,6 +14566,7 @@ def test_dbs_info_result_serialization(self):
1456514566
database_information_model['doc_count'] = 0
1456614567
database_information_model['doc_del_count'] = 0
1456714568
database_information_model['engine'] = 'testString'
14569+
database_information_model['instance_start_time'] = 'testString'
1456814570
database_information_model['props'] = database_information_props_model
1456914571
database_information_model['sizes'] = content_information_sizes_model
1457014572
database_information_model['update_seq'] = 'testString'

0 commit comments

Comments
 (0)