package com.atlassian.bitbucket.ssh;

import com.atlassian.bitbucket.permission.Permission;

import javax.annotation.Nonnull;

/**
 * Represents the privileged access to Bitbucket to be granted to any outside entity who successfully authenticates
 * with the associated {@link #getKey() SSH key}.
 *
 * @since 4.3
 */
public interface SshAccessKey {
    /**
     * @return the SSH key for this key access
     */
    @Nonnull
    SshKey getKey();

    /**
     * @return the permission on the {@link #getResource() resource} for this key access
     */
    @Nonnull
    Permission getPermission();

    /**
     * @return the resource for this key access
     */
    @Nonnull
    Object getResource();
}
