This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. :ivar paper.AddPaperDocUserResult.success: User was successfully added to the Paper doc. :
| 163 | AddPaperDocUserMemberResult_validator = bv.Struct(AddPaperDocUserMemberResult) |
| 164 | |
| 165 | class AddPaperDocUserResult(bb.Union): |
| 166 | """ |
| 167 | This class acts as a tagged union. Only one of the ``is_*`` methods will |
| 168 | return true. To get the associated value of a tag (if one exists), use the |
| 169 | corresponding ``get_*`` method. |
| 170 | |
| 171 | :ivar paper.AddPaperDocUserResult.success: User was successfully added to |
| 172 | the Paper doc. |
| 173 | :ivar paper.AddPaperDocUserResult.unknown_error: Something unexpected |
| 174 | happened when trying to add the user to the Paper doc. |
| 175 | :ivar paper.AddPaperDocUserResult.sharing_outside_team_disabled: The Paper |
| 176 | doc can be shared only with team members. |
| 177 | :ivar paper.AddPaperDocUserResult.daily_limit_reached: The daily limit of |
| 178 | how many users can be added to the Paper doc was reached. |
| 179 | :ivar paper.AddPaperDocUserResult.user_is_owner: Owner's permissions cannot |
| 180 | be changed. |
| 181 | :ivar paper.AddPaperDocUserResult.failed_user_data_retrieval: User data |
| 182 | could not be retrieved. Clients should retry. |
| 183 | :ivar paper.AddPaperDocUserResult.permission_already_granted: This user |
| 184 | already has the correct permission to the Paper doc. |
| 185 | """ |
| 186 | |
| 187 | _catch_all = 'other' |
| 188 | # Attribute is overwritten below the class definition |
| 189 | success = None |
| 190 | # Attribute is overwritten below the class definition |
| 191 | unknown_error = None |
| 192 | # Attribute is overwritten below the class definition |
| 193 | sharing_outside_team_disabled = None |
| 194 | # Attribute is overwritten below the class definition |
| 195 | daily_limit_reached = None |
| 196 | # Attribute is overwritten below the class definition |
| 197 | user_is_owner = None |
| 198 | # Attribute is overwritten below the class definition |
| 199 | failed_user_data_retrieval = None |
| 200 | # Attribute is overwritten below the class definition |
| 201 | permission_already_granted = None |
| 202 | # Attribute is overwritten below the class definition |
| 203 | other = None |
| 204 | |
| 205 | def is_success(self): |
| 206 | """ |
| 207 | Check if the union tag is ``success``. |
| 208 | |
| 209 | :rtype: bool |
| 210 | """ |
| 211 | return self._tag == 'success' |
| 212 | |
| 213 | def is_unknown_error(self): |
| 214 | """ |
| 215 | Check if the union tag is ``unknown_error``. |
| 216 | |
| 217 | :rtype: bool |
| 218 | """ |
| 219 | return self._tag == 'unknown_error' |
| 220 | |
| 221 | def is_sharing_outside_team_disabled(self): |
| 222 | """ |