// Path: src/main/java/com/github/sheigutn/pushbullet/http/defaults/post/UpdatePreferencesRequest.java
// @Data
// public class UpdatePreferencesRequest extends PostRequest<CurrentUser> {
// 
//     private JsonObject preferences;
// 
//     public UpdatePreferencesRequest(JsonObject preferences) {
//         super(Urls.CURRENT_USER);
//         this.preferences = preferences;
//     }
// 
//     @Override
//     public void applyBody(Gson gson, HttpPost post) {
//         setJsonBody(gson.toJson(this), post);
//     }
// }


import com.github.sheigutn.pushbullet.http.defaults.post.UpdatePreferencesRequest;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
package com.github.sheigutn.pushbullet.items.user;


@Getter
@ToString(callSuper = true)
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CurrentUser extends User {

    /**
     * The google user info of this user
     */
    @SerializedName("google_userinfo")
    private GoogleUserInfo googleUserInfo;

    /**
     * The preferences of this user
     */
    private JsonObject preferences;

    /**
     * The maximum allowed upload size for files allowed to this user
     */
    @SerializedName("max_upload_size")
    private long maxUploadSize;

    /**
     * Used to update the preferences of this user
     * @param preferences The preferences object
     */
    public void updatePreferences(JsonObject preferences) {
// Path: src/main/java/com/github/sheigutn/pushbullet/http/defaults/post/UpdatePreferencesRequest.java
// @Data
// public class UpdatePreferencesRequest extends PostRequest<CurrentUser> {
// 
//     private JsonObject preferences;
// 
//     public UpdatePreferencesRequest(JsonObject preferences) {
//         super(Urls.CURRENT_USER);
//         this.preferences = preferences;
//     }
// 
//     @Override
//     public void applyBody(Gson gson, HttpPost post) {
//         setJsonBody(gson.toJson(this), post);
//     }
// }


// Path: src/main/java/com/github/sheigutn/pushbullet/items/user/CurrentUser.java
import com.github.sheigutn.pushbullet.http.defaults.post.UpdatePreferencesRequest;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

package com.github.sheigutn.pushbullet.items.user;


@Getter
@ToString(callSuper = true)
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CurrentUser extends User {

    /**
     * The google user info of this user
     */
    @SerializedName("google_userinfo")
    private GoogleUserInfo googleUserInfo;

    /**
     * The preferences of this user
     */
    private JsonObject preferences;

    /**
     * The maximum allowed upload size for files allowed to this user
     */
    @SerializedName("max_upload_size")
    private long maxUploadSize;

    /**
     * Used to update the preferences of this user
     * @param preferences The preferences object
     */
    public void updatePreferences(JsonObject preferences) {
        getPushbullet().executeRequest(new UpdatePreferencesRequest(preferences));