def __init__(self, *, parent=None, con=None, **kwargs):
if parent and con:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>self.con = parent.con if parent else con<EOL>self._parent = parent if isinstance(parent, DriveItem) else None<EOL>main_resource = kwargs.pop('<STR_LIT>', None) or (<EOL>getattr(parent, '<STR_LIT>', None) if parent else None)<EOL>protocol = parent.protocol if parent else kwargs.get('<STR_LIT>')<EOL>super().__init__(protocol=protocol, main_resource=main_resource)<EOL>self.driveitem_id = self._parent.object_id<EOL>cloud_data = kwargs.get(self._cloud_data_key, {})<EOL>self.object_id = cloud_data.get(self._cc('<STR_LIT:id>'))<EOL>self.inherited_from = cloud_data.get(self._cc('<STR_LIT>'), None)<EOL>link = cloud_data.get(self._cc('<STR_LIT>'), None)<EOL>self.permission_type = '<STR_LIT>'<EOL>if link:<EOL><INDENT>self.permission_type = '<STR_LIT>'<EOL>self.share_type = link.get('<STR_LIT:type>', '<STR_LIT>')<EOL>self.share_scope = link.get('<STR_LIT>', '<STR_LIT>')<EOL>self.share_link = link.get('<STR_LIT>', None)<EOL><DEDENT>invitation = cloud_data.get(self._cc('<STR_LIT>'), None)<EOL>if invitation:<EOL><INDENT>self.permission_type = '<STR_LIT>'<EOL>self.share_email = invitation.get('<STR_LIT:email>', '<STR_LIT>')<EOL>invited_by = invitation.get('<STR_LIT>', {})<EOL>self.invited_by = invited_by.get('<STR_LIT:user>', {}).get(<EOL>self._cc('<STR_LIT>'), None) or invited_by.get('<STR_LIT>',<EOL>{}).get(<EOL>self._cc('<STR_LIT>'), None)<EOL>self.require_sign_in = invitation.get(self._cc('<STR_LIT>'),<EOL>True)<EOL><DEDENT>self.roles = cloud_data.get(self._cc('<STR_LIT>'), [])<EOL>granted_to = cloud_data.get(self._cc('<STR_LIT>'), {})<EOL>self.granted_to = granted_to.get('<STR_LIT:user>', {}).get(<EOL>self._cc('<STR_LIT>')) or granted_to.get('<STR_LIT>', {}).get(<EOL>self._cc('<STR_LIT>'))<EOL>self.share_id = cloud_data.get(self._cc('<STR_LIT>'), None)<EOL>
Permissions for DriveItem

        :param parent: parent for this operation
        :type parent: DriveItem
        :param Connection con: connection to use if no parent specified
        :param Protocol protocol: protocol to use if no parent specified
         (kwargs)
        :param str main_resource: use this resource instead of parent resource
         (kwargs)