def save(self):
if self.is_new:<EOL><INDENT>method = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>method = '<STR_LIT>'<EOL><DEDENT>copy_raw = copy.copy(self._raw)<EOL>values_dict = {}<EOL>for key, value in six.iteritems(copy_raw['<STR_LIT>']):<EOL><INDENT>if value is not None:<EOL><INDENT>values_dict[key] = value<EOL><DEDENT><DEDENT>copy_raw['<STR_LIT>'] = values_dict<EOL>self.validate()<EOL>response = self._swimlane.request(<EOL>method,<EOL>'<STR_LIT>'.format(self.app.id),<EOL>json=copy_raw<EOL>)<EOL>self.__init__(self.app, response.json())<EOL>self._swimlane.resources_cache.cache(self)<EOL>
Persist record changes on Swimlane server

        Updates internal raw data with response content from server to guarantee calculated field values match values on
        server

        Raises:
            ValidationError: If any fields fail validation