@NonNull
    public Session<?> getSession() {
    """
	Gets session based on current {@link SessionConfiguration} and {@link AccessTokenStorage}.
	
	@return Session to use with API requests.
	@throws IllegalStateException when not logged in
    """
        if (sessionConfiguration.getServerToken() != null) {
            return new ServerTokenSession(sessionConfiguration);
        } else if (accessTokenStorage.getAccessToken() != null) {
            return new AccessTokenSession(sessionConfiguration, accessTokenStorage);
        } else {
            throw new IllegalStateException("Tried to call getSession but not logged in or server token set.");
        }
    }
@NonNull
    public Session<?> getSession() {
        if (sessionConfiguration.getServerToken() != null) {
            return new ServerTokenSession(sessionConfiguration);
        } else if (accessTokenStorage.getAccessToken() != null) {
            return new AccessTokenSession(sessionConfiguration, accessTokenStorage);
        } else {
            throw new IllegalStateException("Tried to call getSession but not logged in or server token set.");
        }
    }
@ NonNull public Session < ? > getSession ( ) { if ( sessionConfiguration . getServerToken ( ) != null ) { return new ServerTokenSession ( sessionConfiguration ) ; } else if ( accessTokenStorage . getAccessToken ( ) != null ) { return new AccessTokenSession ( sessionConfiguration , accessTokenStorage ) ; } else { throw new IllegalStateException ( "Tried to call getSession but not logged in or server token set." ) ; } }
Gets session based on current {@link SessionConfiguration} and {@link AccessTokenStorage}.

@return Session to use with API requests.
@throws IllegalStateException when not logged in
Gets session based on current { @link SessionConfiguration } and { @link AccessTokenStorage } .