# This file is automatically generated by generate.py using api.json

class _Workspaces:
    def __init__(self, client=None):
        self.client = client

    def typeahead(self, workspace_id, params={}, **options):
        """Dispatches a GET request to /workspaces/:workspaceId/typeahead to run a typeahead search in the specified workspace."""
        path = '/workspaces/%d/typeahead' % (workspace_id)
        return self.client.get_collection(path, params, **options)

    def find_all(self, params={}, **options):
        """Show all available workspaces."""
        return self.client.get_collection('/workspaces', params, **options)

    def update(self, workspace_id, params={}, **options):
        """Update a workspace."""
        path = '/workspaces/%d' % (workspace_id)
        return self.client.put(path, params, **options)
