Who can change a shared folder's access control list (ACL). In other words, who can add, remove, or change the privileges of members. 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
| 175 | AccessLevel_validator = bv.Union(AccessLevel) |
| 176 | |
| 177 | class AclUpdatePolicy(bb.Union): |
| 178 | """ |
| 179 | Who can change a shared folder's access control list (ACL). In other words, |
| 180 | who can add, remove, or change the privileges of members. |
| 181 | |
| 182 | This class acts as a tagged union. Only one of the ``is_*`` methods will |
| 183 | return true. To get the associated value of a tag (if one exists), use the |
| 184 | corresponding ``get_*`` method. |
| 185 | |
| 186 | :ivar sharing.AclUpdatePolicy.owner: Only the owner can update the ACL. |
| 187 | :ivar sharing.AclUpdatePolicy.editors: Any editor can update the ACL. This |
| 188 | may be further restricted to editors on the same team. |
| 189 | """ |
| 190 | |
| 191 | _catch_all = 'other' |
| 192 | # Attribute is overwritten below the class definition |
| 193 | owner = None |
| 194 | # Attribute is overwritten below the class definition |
| 195 | editors = None |
| 196 | # Attribute is overwritten below the class definition |
| 197 | other = None |
| 198 | |
| 199 | def is_owner(self): |
| 200 | """ |
| 201 | Check if the union tag is ``owner``. |
| 202 | |
| 203 | :rtype: bool |
| 204 | """ |
| 205 | return self._tag == 'owner' |
| 206 | |
| 207 | def is_editors(self): |
| 208 | """ |
| 209 | Check if the union tag is ``editors``. |
| 210 | |
| 211 | :rtype: bool |
| 212 | """ |
| 213 | return self._tag == 'editors' |
| 214 | |
| 215 | def is_other(self): |
| 216 | """ |
| 217 | Check if the union tag is ``other``. |
| 218 | |
| 219 | :rtype: bool |
| 220 | """ |
| 221 | return self._tag == 'other' |
| 222 | |
| 223 | def _process_custom_annotations(self, annotation_type, field_path, processor): |
| 224 | super(AclUpdatePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) |
| 225 | |
| 226 | AclUpdatePolicy_validator = bv.Union(AclUpdatePolicy) |
| 227 |