// Path: src/main/java/com/github/sheigutn/pushbullet/http/defaults/delete/DeleteSpecificSubscriptionRequest.java
// public class DeleteSpecificSubscriptionRequest extends DeleteRequest<Void> {
// 
//     public DeleteSpecificSubscriptionRequest(String channelIdentity) {
//         super(Urls.SUBSCRIPTIONS + "/" + channelIdentity);
//     }
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/interfaces/Unsubscribable.java
// public interface Unsubscribable {
// 
//     /**
//      * Used to unsubscribe of this object
//      */
//     void unsubscribe();
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/items/PushbulletObject.java
// @Data
// public abstract class PushbulletObject extends PushbulletIdentifiable {
// 
//     /**
//      * Creation timestamp of this object
//      */
//     private Number created;
// 
//     /**
//      * Last modification timestamp of this object
//      */
//     private Number modified;
// 
//     /**
//      * Whether this object is active or not
//      */
//     private boolean active = true;
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/http/defaults/post/UpdateSubscriptionMuteStatusRequest.java
// @Data
// public class UpdateSubscriptionMuteStatusRequest extends PostRequest<Subscription> {
// 
//     @SerializedName("muted")
//     private boolean mute;
// 
//     public UpdateSubscriptionMuteStatusRequest(String subscriptionIdentity, boolean mute) {
//         super(Urls.SUBSCRIPTIONS + "/" + subscriptionIdentity);
//         this.mute = mute;
//     }
// 
//     @Override
//     public void applyBody(Gson gson, HttpPost post) {
//         setJsonBody(gson.toJson(this), post);
//     }
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/interfaces/Deletable.java
// @FunctionalInterface
// public interface Deletable {
// 
//     /**
//      * Used to delete this object
//      */
//     void delete();
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/interfaces/Mutable.java
// public interface Mutable {
// 
//     /**
//      * Used to mute this object
//      */
//     void mute();
// 
//     /**
//      * Used to unmute this object
//      */
//     void unmute();
// }


import com.github.sheigutn.pushbullet.http.defaults.delete.DeleteSpecificSubscriptionRequest;
import com.github.sheigutn.pushbullet.interfaces.Unsubscribable;
import com.github.sheigutn.pushbullet.items.PushbulletObject;
import com.github.sheigutn.pushbullet.http.defaults.post.UpdateSubscriptionMuteStatusRequest;
import com.github.sheigutn.pushbullet.interfaces.Deletable;
import com.github.sheigutn.pushbullet.interfaces.Mutable;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
package com.github.sheigutn.pushbullet.items.channel;


@Getter
@ToString(callSuper = true)
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class Subscription extends PushbulletObject implements Deletable, Mutable, Unsubscribable {

    /**
     * The channel info of this subscription
     */
    private ChannelInfo channel;

    /**
     * Whether this subscription is muted
     */
    private boolean muted;

    @Override
    public void unsubscribe() {
        if(!isActive()) return;
        getPushbullet().executeRequest(new DeleteSpecificSubscriptionRequest(getIdentity()));
        setActive(false);
    }

// Path: src/main/java/com/github/sheigutn/pushbullet/http/defaults/delete/DeleteSpecificSubscriptionRequest.java
// public class DeleteSpecificSubscriptionRequest extends DeleteRequest<Void> {
// 
//     public DeleteSpecificSubscriptionRequest(String channelIdentity) {
//         super(Urls.SUBSCRIPTIONS + "/" + channelIdentity);
//     }
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/interfaces/Unsubscribable.java
// public interface Unsubscribable {
// 
//     /**
//      * Used to unsubscribe of this object
//      */
//     void unsubscribe();
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/items/PushbulletObject.java
// @Data
// public abstract class PushbulletObject extends PushbulletIdentifiable {
// 
//     /**
//      * Creation timestamp of this object
//      */
//     private Number created;
// 
//     /**
//      * Last modification timestamp of this object
//      */
//     private Number modified;
// 
//     /**
//      * Whether this object is active or not
//      */
//     private boolean active = true;
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/http/defaults/post/UpdateSubscriptionMuteStatusRequest.java
// @Data
// public class UpdateSubscriptionMuteStatusRequest extends PostRequest<Subscription> {
// 
//     @SerializedName("muted")
//     private boolean mute;
// 
//     public UpdateSubscriptionMuteStatusRequest(String subscriptionIdentity, boolean mute) {
//         super(Urls.SUBSCRIPTIONS + "/" + subscriptionIdentity);
//         this.mute = mute;
//     }
// 
//     @Override
//     public void applyBody(Gson gson, HttpPost post) {
//         setJsonBody(gson.toJson(this), post);
//     }
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/interfaces/Deletable.java
// @FunctionalInterface
// public interface Deletable {
// 
//     /**
//      * Used to delete this object
//      */
//     void delete();
// }
// 
// Path: src/main/java/com/github/sheigutn/pushbullet/interfaces/Mutable.java
// public interface Mutable {
// 
//     /**
//      * Used to mute this object
//      */
//     void mute();
// 
//     /**
//      * Used to unmute this object
//      */
//     void unmute();
// }


// Path: src/main/java/com/github/sheigutn/pushbullet/items/channel/Subscription.java
import com.github.sheigutn.pushbullet.http.defaults.delete.DeleteSpecificSubscriptionRequest;
import com.github.sheigutn.pushbullet.interfaces.Unsubscribable;
import com.github.sheigutn.pushbullet.items.PushbulletObject;
import com.github.sheigutn.pushbullet.http.defaults.post.UpdateSubscriptionMuteStatusRequest;
import com.github.sheigutn.pushbullet.interfaces.Deletable;
import com.github.sheigutn.pushbullet.interfaces.Mutable;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

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


@Getter
@ToString(callSuper = true)
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class Subscription extends PushbulletObject implements Deletable, Mutable, Unsubscribable {

    /**
     * The channel info of this subscription
     */
    private ChannelInfo channel;

    /**
     * Whether this subscription is muted
     */
    private boolean muted;

    @Override
    public void unsubscribe() {
        if(!isActive()) return;
        getPushbullet().executeRequest(new DeleteSpecificSubscriptionRequest(getIdentity()));
        setActive(false);
    }

    @Override