// Path: reactivefb/src/main/java/com/beltaief/reactivefb/util/Logger.java
// public final class Logger {
// 
//     private static boolean DEBUG = false;
//     private static boolean DEBUG_WITH_STACKTRACE = false;
// 
//     private Logger() {
//     }
// 
//     public static <T> void logInfo(Class<T> cls, String message) {
//         if (DEBUG || DEBUG_WITH_STACKTRACE) {
//             String tag = cls.getName();
//             Log.i(tag, "-----");
//             Log.i(tag, LogType.INFO + ": " + message);
// 
//             if (DEBUG_WITH_STACKTRACE) {
//                 Log.i(tag, getStackTrace());
//             }
//         }
//     }
// 
//     public static <T> void logWarning(Class<T> cls, String message) {
//         if (DEBUG || DEBUG_WITH_STACKTRACE) {
//             String tag = cls.getName();
//             Log.w(tag, "-----");
//             Log.w(tag, LogType.WARNING + ": " + message);
// 
//             if (DEBUG_WITH_STACKTRACE) {
//                 Log.w(tag, getStackTrace());
//             }
//         }
//     }
// 
//     public static <T> void logError(Class<T> cls, String message) {
//         if (DEBUG || DEBUG_WITH_STACKTRACE) {
//             String tag = cls.getName();
//             Log.e(tag, "-----");
//             Log.e(tag, LogType.ERROR + ": " + message);
// 
//             if (DEBUG_WITH_STACKTRACE) {
//                 Log.e(tag, getStackTrace());
//             }
//         }
//     }
// 
//     public static <T> void logError(Class<T> cls, String message, Throwable e) {
//         if (DEBUG || DEBUG_WITH_STACKTRACE) {
//             String tag = cls.getName();
//             Log.e(tag, "-----");
//             Log.e(tag, LogType.ERROR + ": " + message, e);
// 
//             if (DEBUG_WITH_STACKTRACE) {
//                 Log.e(tag, getStackTrace());
//             }
//         }
//     }
// 
//     private enum LogType {
//         INFO,
//         WARNING,
//         ERROR
//     }
// 
//     private static String getStackTrace() {
//         StringWriter sw = new StringWriter();
//         PrintWriter pw = new PrintWriter(sw);
//         new Throwable().printStackTrace(pw);
//         return sw.toString();
//     }
// }
// 
// Path: reactivefb/src/main/java/com/beltaief/reactivefb/util/Utils.java
// public final class Utils {
//     private Utils() {
//     }
// 
//     public static Bundle getBundle(String mFields, int limit) {
//         Bundle bundle = new Bundle();
//         if (mFields != null) {
//             bundle.putString("fields", mFields);
//         }
//         if (limit > 0) {
//             bundle.putString("limit", String.valueOf(limit));
//         }
//         return bundle;
//     }
// 
//     @SuppressWarnings("resource")
//     public static String encode(String key, String data) {
//         try {
//             Mac mac = Mac.getInstance("HmacSHA256");
//             SecretKeySpec secretKey = new SecretKeySpec(key.getBytes(), "HmacSHA256");
//             mac.init(secretKey);
//             byte[] bytes = mac.doFinal(data.getBytes());
//             StringBuilder sb = new StringBuilder(bytes.length * 2);
//             Formatter formatter = new Formatter(sb);
//             for (byte b : bytes) {
//                 formatter.format("%02x", b);
//             }
//             return sb.toString();
//         } catch (Exception e) {
//             Logger.logError(Utils.class, "Failed to create sha256", e);
//             return null;
//         }
//     }
// }


import com.beltaief.reactivefb.util.Logger;
import com.beltaief.reactivefb.util.Utils;
import com.google.gson.annotations.SerializedName;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Collection;

        /**
         * Add a predefined friend list to the allowed list This can <b>only</b>
         * be {@link Privacy.PrivacySettings#ALL_FRIENDS ALL_FRIENDS} or
         * {@link Privacy.PrivacySettings#FRIENDS_OF_FRIENDS FRIENDS_OF_FRIENDS} to
         * include all members of those sets. <br>
         * <b>Only applicable in case of selected {@link Privacy.PrivacySettings#CUSTOM
         * CUSTOM} in {@link #setPrivacySettings(Privacy.PrivacySettings)} method.</b> <br>
         * <br>
         *
         * <b>Note:</b><br>
         * If you defined other privacy setting than
         * {@link Privacy.PrivacySettings#CUSTOM CUSTOM} and still decided to use this
         * method, then the privacy will be changed with warning to
         * {@link Privacy.PrivacySettings#CUSTOM CUSTOM}.
         *
         * @param privacySettings
         *            {@link Privacy.PrivacySettings#ALL_FRIENDS ALL_FRIENDS} or
         *            {@link Privacy.PrivacySettings#FRIENDS_OF_FRIENDS
         *            FRIENDS_OF_FRIENDS} to include all members of those sets.
         * @throws UnsupportedOperationException
         *             in case of using other values than
         *             {@link Privacy.PrivacySettings#ALL_FRIENDS ALL_FRIENDS} or
         *             {@link Privacy.PrivacySettings#FRIENDS_OF_FRIENDS
         *             FRIENDS_OF_FRIENDS}
         */
        public Builder addAllowed(PrivacySettings privacySettings) {
            validateListsAccessRequest();
            if (privacySettings != PrivacySettings.ALL_FRIENDS || privacySettings != PrivacySettings.FRIENDS_OF_FRIENDS) {
                UnsupportedOperationException exception = new UnsupportedOperationException("Can't add this predefined friend list. Only allowed are: ALL_FRIENDS or FRIENDS_OF_FRIENDS");
// Path: reactivefb/src/main/java/com/beltaief/reactivefb/util/Logger.java
// public final class Logger {
// 
//     private static boolean DEBUG = false;
//     private static boolean DEBUG_WITH_STACKTRACE = false;
// 
//     private Logger() {
//     }
// 
//     public static <T> void logInfo(Class<T> cls, String message) {
//         if (DEBUG || DEBUG_WITH_STACKTRACE) {
//             String tag = cls.getName();
//             Log.i(tag, "-----");
//             Log.i(tag, LogType.INFO + ": " + message);
// 
//             if (DEBUG_WITH_STACKTRACE) {
//                 Log.i(tag, getStackTrace());
//             }
//         }
//     }
// 
//     public static <T> void logWarning(Class<T> cls, String message) {
//         if (DEBUG || DEBUG_WITH_STACKTRACE) {
//             String tag = cls.getName();
//             Log.w(tag, "-----");
//             Log.w(tag, LogType.WARNING + ": " + message);
// 
//             if (DEBUG_WITH_STACKTRACE) {
//                 Log.w(tag, getStackTrace());
//             }
//         }
//     }
// 
//     public static <T> void logError(Class<T> cls, String message) {
//         if (DEBUG || DEBUG_WITH_STACKTRACE) {
//             String tag = cls.getName();
//             Log.e(tag, "-----");
//             Log.e(tag, LogType.ERROR + ": " + message);
// 
//             if (DEBUG_WITH_STACKTRACE) {
//                 Log.e(tag, getStackTrace());
//             }
//         }
//     }
// 
//     public static <T> void logError(Class<T> cls, String message, Throwable e) {
//         if (DEBUG || DEBUG_WITH_STACKTRACE) {
//             String tag = cls.getName();
//             Log.e(tag, "-----");
//             Log.e(tag, LogType.ERROR + ": " + message, e);
// 
//             if (DEBUG_WITH_STACKTRACE) {
//                 Log.e(tag, getStackTrace());
//             }
//         }
//     }
// 
//     private enum LogType {
//         INFO,
//         WARNING,
//         ERROR
//     }
// 
//     private static String getStackTrace() {
//         StringWriter sw = new StringWriter();
//         PrintWriter pw = new PrintWriter(sw);
//         new Throwable().printStackTrace(pw);
//         return sw.toString();
//     }
// }
// 
// Path: reactivefb/src/main/java/com/beltaief/reactivefb/util/Utils.java
// public final class Utils {
//     private Utils() {
//     }
// 
//     public static Bundle getBundle(String mFields, int limit) {
//         Bundle bundle = new Bundle();
//         if (mFields != null) {
//             bundle.putString("fields", mFields);
//         }
//         if (limit > 0) {
//             bundle.putString("limit", String.valueOf(limit));
//         }
//         return bundle;
//     }
// 
//     @SuppressWarnings("resource")
//     public static String encode(String key, String data) {
//         try {
//             Mac mac = Mac.getInstance("HmacSHA256");
//             SecretKeySpec secretKey = new SecretKeySpec(key.getBytes(), "HmacSHA256");
//             mac.init(secretKey);
//             byte[] bytes = mac.doFinal(data.getBytes());
//             StringBuilder sb = new StringBuilder(bytes.length * 2);
//             Formatter formatter = new Formatter(sb);
//             for (byte b : bytes) {
//                 formatter.format("%02x", b);
//             }
//             return sb.toString();
//         } catch (Exception e) {
//             Logger.logError(Utils.class, "Failed to create sha256", e);
//             return null;
//         }
//     }
// }


// Path: app/src/main/java/com/beltaief/reactivefbexample/models/Privacy.java
import com.beltaief.reactivefb.util.Logger;
import com.beltaief.reactivefb.util.Utils;
import com.google.gson.annotations.SerializedName;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Collection;


        /**
         * Add a predefined friend list to the allowed list This can <b>only</b>
         * be {@link Privacy.PrivacySettings#ALL_FRIENDS ALL_FRIENDS} or
         * {@link Privacy.PrivacySettings#FRIENDS_OF_FRIENDS FRIENDS_OF_FRIENDS} to
         * include all members of those sets. <br>
         * <b>Only applicable in case of selected {@link Privacy.PrivacySettings#CUSTOM
         * CUSTOM} in {@link #setPrivacySettings(Privacy.PrivacySettings)} method.</b> <br>
         * <br>
         *
         * <b>Note:</b><br>
         * If you defined other privacy setting than
         * {@link Privacy.PrivacySettings#CUSTOM CUSTOM} and still decided to use this
         * method, then the privacy will be changed with warning to
         * {@link Privacy.PrivacySettings#CUSTOM CUSTOM}.
         *
         * @param privacySettings
         *            {@link Privacy.PrivacySettings#ALL_FRIENDS ALL_FRIENDS} or
         *            {@link Privacy.PrivacySettings#FRIENDS_OF_FRIENDS
         *            FRIENDS_OF_FRIENDS} to include all members of those sets.
         * @throws UnsupportedOperationException
         *             in case of using other values than
         *             {@link Privacy.PrivacySettings#ALL_FRIENDS ALL_FRIENDS} or
         *             {@link Privacy.PrivacySettings#FRIENDS_OF_FRIENDS
         *             FRIENDS_OF_FRIENDS}
         */
        public Builder addAllowed(PrivacySettings privacySettings) {
            validateListsAccessRequest();
            if (privacySettings != PrivacySettings.ALL_FRIENDS || privacySettings != PrivacySettings.FRIENDS_OF_FRIENDS) {
                UnsupportedOperationException exception = new UnsupportedOperationException("Can't add this predefined friend list. Only allowed are: ALL_FRIENDS or FRIENDS_OF_FRIENDS");
                Logger.logError(Privacy.class, "failed to add allowed users", exception);