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>self.drive = parent if isinstance(parent, Drive) else (<EOL>parent.drive if isinstance(parent.drive, Drive) else kwargs.get(<EOL>'<STR_LIT>', 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>if parent and not isinstance(parent, DriveItem):<EOL><INDENT>drive_id = (None if parent.object_id == '<STR_LIT:root>'<EOL>else parent.object_id) or None<EOL>resource_prefix = '<STR_LIT>'.format(<EOL>drive_id=drive_id) if drive_id else '<STR_LIT>'<EOL>main_resource = '<STR_LIT>'.format(main_resource or (<EOL>protocol.default_resource if protocol else '<STR_LIT>'), resource_prefix)<EOL><DEDENT>super().__init__(protocol=protocol, main_resource=main_resource)<EOL>cloud_data = kwargs.get(self._cloud_data_key, {})<EOL>self.object_id = cloud_data.get(self._cc('<STR_LIT:id>'))<EOL>self.name = cloud_data.get(self._cc('<STR_LIT:name>'), '<STR_LIT>')<EOL>self.web_url = cloud_data.get(self._cc('<STR_LIT>'))<EOL>created_by = cloud_data.get(self._cc('<STR_LIT>'), {}).get('<STR_LIT:user>', None)<EOL>self.created_by = Contact(con=self.con, protocol=self.protocol, **{<EOL>self._cloud_data_key: created_by}) if created_by else None<EOL>modified_by = cloud_data.get(self._cc('<STR_LIT>'), {}).get('<STR_LIT:user>',<EOL>None)<EOL>self.modified_by = Contact(con=self.con, protocol=self.protocol, **{<EOL>self._cloud_data_key: modified_by}) if modified_by else None<EOL>created = cloud_data.get(self._cc('<STR_LIT>'), None)<EOL>modified = cloud_data.get(self._cc('<STR_LIT>'), None)<EOL>local_tz = self.protocol.timezone<EOL>self.created = parse(created).astimezone(local_tz) if created else None<EOL>self.modified = parse(modified).astimezone(<EOL>local_tz) if modified else None<EOL>self.description = cloud_data.get(self._cc('<STR_LIT:description>'), '<STR_LIT>')<EOL>self.size = cloud_data.get(self._cc('<STR_LIT:size>'), <NUM_LIT:0>)<EOL>self.shared = cloud_data.get(self._cc('<STR_LIT>'), {}).get('<STR_LIT>', None)<EOL>parent_reference = cloud_data.get(self._cc('<STR_LIT>'), {})<EOL>self.parent_id = parent_reference.get('<STR_LIT:id>', None)<EOL>self.drive_id = parent_reference.get(self._cc('<STR_LIT>'), None)<EOL>remote_item = cloud_data.get(self._cc('<STR_LIT>'), None)<EOL>self.remote_item = self._classifier(remote_item)(parent=self, **{<EOL>self._cloud_data_key: remote_item}) if remote_item else None<EOL>self.thumbnails = cloud_data.get(self._cc('<STR_LIT>'), [])<EOL>
Create a DriveItem

        :param parent: parent for this operation
        :type parent: Drive or drive.Folder
        :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)