Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
/**
 * Describes a fully-qualified entity.
 */
public class QuotaEntity {
    /**
     * Type of an entity entry.
     */
    public static final String USER = "user";
    public static final String CLIENT_ID = "client-id";

    /**
     * Represents the default name for an entity, i.e. the entity that's matched
     * when an exact match isn't found.
     */
    public static final String QUOTA_ENTITY_NAME_DEFAULT = // implementation defined

    /**
     * `entries`Constructs describesa the fully-qualified entity. The key is a {@code Type} string, however
     * there may also exist keys that are not enumerated by {@code Type} that still apply, e.g.
     * the@param serverentries may internally associate anothermaps entity type. When querying entities, it's necessary
     * to return all quota types because quota values for these types may influence the resolved
     * quota value. However, when altering a quota, any types that aren't specified must be able
     * to be inferred by the server, otherwise an error is returned.
     *
     * For example, {("CLIENT_ID" -> "test-client"),
     *               ("USER" -> "test-user"),
     *               ("GROUP" -> "internal-group")}.its name
     */
    public QuotaEntity(Map<String, String> entries);
}

/**
 * Describes a quota entity filter.
 */
public class QuotaFilter {
    /**
     * A filter to be applied.
     *
     * @param entityType the entity type the filter applies to
     * @param match the string that's matched exactly, or null if the type should be omitted
     */
    public QuotaFilter(String entityType, String match);
}

...