<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_resource_params(self, resource, for_update=False):
 """Get dictionary containing all parameters for the given resource. When getting params for a coordinate frame update, only name and description are returned because they are the only fields that can be updated. Args: resource (intern.resource.boss.resource.BossResource):
 A sub-class whose parameters will be extracted into a dictionary. for_update (bool):
 True if params will be used for an update. Returns: (dictionary):
 A dictionary containing the resource's parameters as required by the Boss API. Raises: TypeError if resource is not a supported class. """

        if isinstance(resource, CollectionResource):
            return self._get_collection_params(resource)

        if isinstance(resource, ExperimentResource):
            return self._get_experiment_params(resource, for_update)

        if isinstance(resource, CoordinateFrameResource):
            return self._get_coordinate_params(resource, for_update)

        if isinstance(resource, ChannelResource):
            return self._get_channel_params(resource, for_update)

        raise TypeError('resource is not supported type.')