def determine_type(api_version: str, kind: str):
    """Return name of Swagger model for this `api_version` and `kind`.

    Example: ('Extensions/v1beta1', 'Deployment') -> 'ExtensionsV1beta1Deployment'

    This is useful to convert the K8s Json response into a Swagger generated
    Python object. The `api_version` and `kind` should be copied verbatime
    (including capitalisation) from the manifests K8s returns.

    Input:
        api_version: str
            As returned by K8s API, eg `V1`, `Extensions/v1beta1` ...
        kind: str
            As returned by K8s API, eg `Deployment`, `Namespace` ...

    Returns:
        str: Name of Swagger model that can wrap the specified data.

    """
    # Split the API name by '/', eg Extensions/v1beta1 -> (Extensions,
    # v1beta1). Then capitalize the first character only, leaving all other
    # characters untouched. This is the scheme Swagger uses for its classes.
    words = api_version.split('/')
    words = [word[0].capitalize() + word[1:] for word in words]
    api = str.join('', words)

    # Capitalise the first character of the `kind` and compile the Swagger name.
    kind = kind[0].capitalize() + kind[1:]
    klass = f'{api}{kind}'

    # Capitalise trailing `list` to match the Swagger class name.
    if klass.endswith('list'):
        klass = str.join('', klass.rpartition('list')[0]) + 'List'
    return klass