|
18 | 18 | import enum |
19 | 19 |
|
20 | 20 |
|
21 | | -class NullValue(enum.IntEnum): |
22 | | - """ |
23 | | - ``NullValue`` is a singleton enumeration to represent the null value for |
24 | | - the ``Value`` type union. |
25 | | -
|
26 | | - The JSON representation for ``NullValue`` is JSON ``null``. |
| 21 | +class TargetChange(object): |
| 22 | + class TargetChangeType(enum.IntEnum): |
| 23 | + """ |
| 24 | + The type of change. |
27 | 25 |
|
28 | | - Attributes: |
29 | | - NULL_VALUE (int): Null value. |
30 | | - """ |
31 | | - NULL_VALUE = 0 |
| 26 | + Attributes: |
| 27 | + NO_CHANGE (int): No change has occurred. Used only to send an updated ``resume_token``. |
| 28 | + ADD (int): The targets have been added. |
| 29 | + REMOVE (int): The targets have been removed. |
| 30 | + CURRENT (int): The targets reflect all changes committed before the targets were added |
| 31 | + to the stream. |
32 | 32 |
|
| 33 | + This will be sent after or with a ``read_time`` that is greater than or |
| 34 | + equal to the time at which the targets were added. |
33 | 35 |
|
34 | | -class DocumentTransform(object): |
35 | | - class FieldTransform(object): |
36 | | - class ServerValue(enum.IntEnum): |
37 | | - """ |
38 | | - A value that is calculated by the server. |
| 36 | + Listeners can wait for this change if read-after-write semantics are |
| 37 | + desired. |
| 38 | + RESET (int): The targets have been reset, and a new initial state for the targets |
| 39 | + will be returned in subsequent changes. |
39 | 40 |
|
40 | | - Attributes: |
41 | | - SERVER_VALUE_UNSPECIFIED (int): Unspecified. This value must not be used. |
42 | | - REQUEST_TIME (int): The time at which the server processed the request, with millisecond |
43 | | - precision. |
44 | | - """ |
45 | | - SERVER_VALUE_UNSPECIFIED = 0 |
46 | | - REQUEST_TIME = 1 |
| 41 | + After the initial state is complete, ``CURRENT`` will be returned even |
| 42 | + if the target was previously indicated to be ``CURRENT``. |
| 43 | + """ |
| 44 | + NO_CHANGE = 0 |
| 45 | + ADD = 1 |
| 46 | + REMOVE = 2 |
| 47 | + CURRENT = 3 |
| 48 | + RESET = 4 |
47 | 49 |
|
48 | 50 |
|
49 | 51 | class StructuredQuery(object): |
@@ -110,31 +112,16 @@ class Operator(enum.IntEnum): |
110 | 112 | IS_NULL = 3 |
111 | 113 |
|
112 | 114 |
|
113 | | -class TargetChange(object): |
114 | | - class TargetChangeType(enum.IntEnum): |
115 | | - """ |
116 | | - The type of change. |
117 | | -
|
118 | | - Attributes: |
119 | | - NO_CHANGE (int): No change has occurred. Used only to send an updated ``resume_token``. |
120 | | - ADD (int): The targets have been added. |
121 | | - REMOVE (int): The targets have been removed. |
122 | | - CURRENT (int): The targets reflect all changes committed before the targets were added |
123 | | - to the stream. |
124 | | -
|
125 | | - This will be sent after or with a ``read_time`` that is greater than or |
126 | | - equal to the time at which the targets were added. |
127 | | -
|
128 | | - Listeners can wait for this change if read-after-write semantics are |
129 | | - desired. |
130 | | - RESET (int): The targets have been reset, and a new initial state for the targets |
131 | | - will be returned in subsequent changes. |
| 115 | +class DocumentTransform(object): |
| 116 | + class FieldTransform(object): |
| 117 | + class ServerValue(enum.IntEnum): |
| 118 | + """ |
| 119 | + A value that is calculated by the server. |
132 | 120 |
|
133 | | - After the initial state is complete, ``CURRENT`` will be returned even |
134 | | - if the target was previously indicated to be ``CURRENT``. |
135 | | - """ |
136 | | - NO_CHANGE = 0 |
137 | | - ADD = 1 |
138 | | - REMOVE = 2 |
139 | | - CURRENT = 3 |
140 | | - RESET = 4 |
| 121 | + Attributes: |
| 122 | + SERVER_VALUE_UNSPECIFIED (int): Unspecified. This value must not be used. |
| 123 | + REQUEST_TIME (int): The time at which the server processed the request, with millisecond |
| 124 | + precision. |
| 125 | + """ |
| 126 | + SERVER_VALUE_UNSPECIFIED = 0 |
| 127 | + REQUEST_TIME = 1 |
0 commit comments