def build(self, response):
response_json = response.json()<EOL>if get_endpoint_path(self.api, response).startswith('<STR_LIT>'):<EOL><INDENT>return TicketAuditGenerator(self, response_json)<EOL><DEDENT>zenpy_objects = self.deserialize(response_json)<EOL>plural_object_type = as_plural(self.api.object_type)<EOL>if plural_object_type in zenpy_objects:<EOL><INDENT>return ZendeskResultGenerator(self, response_json, response_objects=zenpy_objects[plural_object_type])<EOL><DEDENT>if self.api.object_type in zenpy_objects:<EOL><INDENT>return zenpy_objects[self.api.object_type]<EOL><DEDENT>for zenpy_object_name in self.object_mapping.class_mapping:<EOL><INDENT>if zenpy_object_name in zenpy_objects:<EOL><INDENT>return zenpy_objects[zenpy_object_name]<EOL><DEDENT><DEDENT>for zenpy_object_name in self.object_mapping.class_mapping:<EOL><INDENT>plural_zenpy_object_name = as_plural(zenpy_object_name)<EOL>if plural_zenpy_object_name in zenpy_objects:<EOL><INDENT>return ZendeskResultGenerator(self, response_json, object_type=plural_zenpy_object_name)<EOL><DEDENT><DEDENT>raise ZenpyException("<STR_LIT>" + str(response_json))<EOL>
Deserialize the returned objects and return either a single Zenpy object, or a ResultGenerator in
the case of multiple results.

:param response: the requests Response object.