// 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;
package com.beltaief.reactivefbexample.models;




/**
 * A class that helps control the audience on Facebook that can see a post made
 * by an app on behalf of a user.
 *
 * @author ronlut
 * // @see https://developers.facebook.com/docs/reference/api/privacy-parameter/
 */
public class Privacy {

    private static final String PRIVACY = "value";
    private static final String ALLOW = "allow";
    private static final String DENY = "deny";
    private static final String DESCRIPTION = "description";
    // private static final String FRIENDS = "friends";

    @SerializedName(PRIVACY)
    private PrivacySettings mPrivacySetting = null;

    @SerializedName(ALLOW)
    private ArrayList<String> mAllowedUsers = new ArrayList<String>();

    @SerializedName(DENY)
    private ArrayList<String> mDeniedUsers = new ArrayList<String>();

    @SerializedName(DESCRIPTION)
    private String mDescription;

    public enum PrivacySettings {
        EVERYONE,
        ALL_FRIENDS,
        FRIENDS_OF_FRIENDS,
        SELF,
        CUSTOM
    }

    private Privacy(Builder builder) {
        mPrivacySetting = builder.mPrivacySetting;
        mAllowedUsers = builder.mAllowedUsers;
// 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;

package com.beltaief.reactivefbexample.models;




/**
 * A class that helps control the audience on Facebook that can see a post made
 * by an app on behalf of a user.
 *
 * @author ronlut
 * // @see https://developers.facebook.com/docs/reference/api/privacy-parameter/
 */
public class Privacy {

    private static final String PRIVACY = "value";
    private static final String ALLOW = "allow";
    private static final String DENY = "deny";
    private static final String DESCRIPTION = "description";
    // private static final String FRIENDS = "friends";

    @SerializedName(PRIVACY)
    private PrivacySettings mPrivacySetting = null;

    @SerializedName(ALLOW)
    private ArrayList<String> mAllowedUsers = new ArrayList<String>();

    @SerializedName(DENY)
    private ArrayList<String> mDeniedUsers = new ArrayList<String>();

    @SerializedName(DESCRIPTION)
    private String mDescription;

    public enum PrivacySettings {
        EVERYONE,
        ALL_FRIENDS,
        FRIENDS_OF_FRIENDS,
        SELF,
        CUSTOM
    }

    private Privacy(Builder builder) {
        mPrivacySetting = builder.mPrivacySetting;
        mAllowedUsers = builder.mAllowedUsers;
        mDeniedUsers = builder.mDeniedUsers;