Merge "Remove _get_endpoint_type() from RestClient"