@@ -11720,6 +11720,8 @@ class DesignDocumentViewIndex:
1172011720 :attr str signature: MD5 signature of the views for the design document.
1172111721 :attr ContentInformationSizes sizes: Schema for size information of content.
1172211722 :attr bool updater_running: Indicates if the view is currently being updated.
11723+ :attr UpdatesPending updates_pending: Schema for an ability to tell if view is
11724+ up-to-date without querying it.
1172311725 :attr int waiting_clients: Number of clients waiting on views from this design
1172411726 document.
1172511727 :attr bool waiting_commit: Indicates if there are outstanding commits to the
@@ -11734,6 +11736,7 @@ def __init__(
1173411736 signature: str,
1173511737 sizes: 'ContentInformationSizes',
1173611738 updater_running: bool,
11739+ updates_pending: 'UpdatesPending',
1173711740 waiting_clients: int,
1173811741 waiting_commit: bool,
1173911742 ) -> None:
@@ -11751,6 +11754,8 @@ def __init__(
1175111754 content.
1175211755 :param bool updater_running: Indicates if the view is currently being
1175311756 updated.
11757+ :param UpdatesPending updates_pending: Schema for an ability to tell if
11758+ view is up-to-date without querying it.
1175411759 :param int waiting_clients: Number of clients waiting on views from this
1175511760 design document.
1175611761 :param bool waiting_commit: Indicates if there are outstanding commits to
@@ -11762,6 +11767,7 @@ def __init__(
1176211767 self.signature = signature
1176311768 self.sizes = sizes
1176411769 self.updater_running = updater_running
11770+ self.updates_pending = updates_pending
1176511771 self.waiting_clients = waiting_clients
1176611772 self.waiting_commit = waiting_commit
1176711773
@@ -11793,6 +11799,10 @@ def from_dict(cls, _dict: Dict) -> 'DesignDocumentViewIndex':
1179311799 args['updater_running'] = _dict.get('updater_running')
1179411800 else:
1179511801 raise ValueError('Required property \'updater_running\' not present in DesignDocumentViewIndex JSON')
11802+ if 'updates_pending' in _dict:
11803+ args['updates_pending'] = UpdatesPending.from_dict(_dict.get('updates_pending'))
11804+ else:
11805+ raise ValueError('Required property \'updates_pending\' not present in DesignDocumentViewIndex JSON')
1179611806 if 'waiting_clients' in _dict:
1179711807 args['waiting_clients'] = _dict.get('waiting_clients')
1179811808 else:
@@ -11826,6 +11836,11 @@ def to_dict(self) -> Dict:
1182611836 _dict['sizes'] = self.sizes.to_dict()
1182711837 if hasattr(self, 'updater_running') and self.updater_running is not None:
1182811838 _dict['updater_running'] = self.updater_running
11839+ if hasattr(self, 'updates_pending') and self.updates_pending is not None:
11840+ if isinstance(self.updates_pending, dict):
11841+ _dict['updates_pending'] = self.updates_pending
11842+ else:
11843+ _dict['updates_pending'] = self.updates_pending.to_dict()
1182911844 if hasattr(self, 'waiting_clients') and self.waiting_clients is not None:
1183011845 _dict['waiting_clients'] = self.waiting_clients
1183111846 if hasattr(self, 'waiting_commit') and self.waiting_commit is not None:
@@ -17312,6 +17327,90 @@ class StatusEnum(str, Enum):
1731217327
1731317328
1731417329
17330+ class UpdatesPending:
17331+ """
17332+ Schema for an ability to tell if view is up-to-date without querying it.
17333+
17334+ :attr int minimum: Sum of shard copies with the least amount of work to do.
17335+ :attr int preferred: Sum of unique shards. This value is zero when at least one
17336+ copy of every shard range is up-to-date and the view is able to answer a query
17337+ without index building delays.
17338+ :attr int total: Sum of all shard copies.
17339+ """
17340+
17341+ def __init__(
17342+ self,
17343+ minimum: int,
17344+ preferred: int,
17345+ total: int,
17346+ ) -> None:
17347+ """
17348+ Initialize a UpdatesPending object.
17349+
17350+ :param int minimum: Sum of shard copies with the least amount of work to
17351+ do.
17352+ :param int preferred: Sum of unique shards. This value is zero when at
17353+ least one copy of every shard range is up-to-date and the view is able to
17354+ answer a query without index building delays.
17355+ :param int total: Sum of all shard copies.
17356+ """
17357+ self.minimum = minimum
17358+ self.preferred = preferred
17359+ self.total = total
17360+
17361+ @classmethod
17362+ def from_dict(cls, _dict: Dict) -> 'UpdatesPending':
17363+ """Initialize a UpdatesPending object from a json dictionary."""
17364+ args = {}
17365+ if 'minimum' in _dict:
17366+ args['minimum'] = _dict.get('minimum')
17367+ else:
17368+ raise ValueError('Required property \'minimum\' not present in UpdatesPending JSON')
17369+ if 'preferred' in _dict:
17370+ args['preferred'] = _dict.get('preferred')
17371+ else:
17372+ raise ValueError('Required property \'preferred\' not present in UpdatesPending JSON')
17373+ if 'total' in _dict:
17374+ args['total'] = _dict.get('total')
17375+ else:
17376+ raise ValueError('Required property \'total\' not present in UpdatesPending JSON')
17377+ return cls(**args)
17378+
17379+ @classmethod
17380+ def _from_dict(cls, _dict):
17381+ """Initialize a UpdatesPending object from a json dictionary."""
17382+ return cls.from_dict(_dict)
17383+
17384+ def to_dict(self) -> Dict:
17385+ """Return a json dictionary representing this model."""
17386+ _dict = {}
17387+ if hasattr(self, 'minimum') and self.minimum is not None:
17388+ _dict['minimum'] = self.minimum
17389+ if hasattr(self, 'preferred') and self.preferred is not None:
17390+ _dict['preferred'] = self.preferred
17391+ if hasattr(self, 'total') and self.total is not None:
17392+ _dict['total'] = self.total
17393+ return _dict
17394+
17395+ def _to_dict(self):
17396+ """Return a json dictionary representing this model."""
17397+ return self.to_dict()
17398+
17399+ def __str__(self) -> str:
17400+ """Return a `str` version of this UpdatesPending object."""
17401+ return json.dumps(self.to_dict(), indent=2)
17402+
17403+ def __eq__(self, other: 'UpdatesPending') -> bool:
17404+ """Return `true` when self and other are equal, false otherwise."""
17405+ if not isinstance(other, self.__class__):
17406+ return False
17407+ return self.__dict__ == other.__dict__
17408+
17409+ def __ne__(self, other: 'UpdatesPending') -> bool:
17410+ """Return `true` when self and other are not equal, false otherwise."""
17411+ return not self == other
17412+
17413+
1731517414class UserContext:
1731617415 """
1731717416 Schema for the user context of a session.
0 commit comments