All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.memority.toolkit.inwebo.api.UserAccess Maven / Gradle / Ivy

/*
 * Copyright (c) 2016-2023 Memority. All Rights Reserved.
 *
 * This file is part of Memority Toolkit API , a Memority project.
 *
 * This file is released under the Memority Public Artifacts End-User License Agreement,
 * see 
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 */
package com.memority.toolkit.inwebo.api;

import java.util.Arrays;

/**
 * InWebo user access type.
 * Bookmarks are use by Authenticator and Helium
 * Value in InWebo API is a number.
 */
public enum UserAccess {
    NO_BOOKMARKS(0),
    BOOKMARKS(1);

    private long apiValue;

    UserAccess(long apiValue) {
        this.apiValue = apiValue;
    }

    public static UserAccess getFromApiValue(long apiValue) {
        return Arrays.stream(UserAccess.values())
                .filter(v -> v.apiValue == apiValue)
                .findFirst().orElseThrow(IllegalArgumentException::new);
    }

    public long getApiValue() {
        return apiValue;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy