#NEWLINE# @ classmethod #NEWLINE# def from_api_repr( cls , resource , client ) : #NEWLINE# #INDENT# 'Factory:  construct a topic given its API representation\n\n        :type resource: dict\n        :param resource: topic resource representation returned from the API\n\n        :type client: :class:`gcloud.pubsub.client.Client`\n        :param client: Client which holds credentials and project\n                       configuration for the topic.\n\n        :rtype: :class:`gcloud.pubsub.topic.Topic`\n        :returns: Topic parsed from ``resource``.\n        :raises: :class:`ValueError` if ``client`` is not ``None`` and the\n                 project from the resource does not agree with the project\n                 from the client.\n        ' #NEWLINE# topic_name = topic_name_from_path ( resource [ 'name' ] , topic_name . project ) #NEWLINE# return cls ( topic_name , client = client )