// Path: src/main/java/com/gikk/twirk/types/usernotice/subtype/Subscription.java
// public interface Subscription {
//     public SubscriptionPlan getSubscriptionPlan();
// 
//     /**Get the number of month's the subscription's been active. New subscriptions
//      * return 1, whilst re-subscriptions tells which month was just activated.
//      *
//      * @return number of months
//      */
//     public int getMonths();
// 
//     /**Get the number of month's the subscription's been active consecutive.
//      *
//      * @return number of months
//      */
//     public int getStreak();
// 
//     /** Returns if user decide to share the streak, this decide if the value of {@code getStreak} its zero or another.
//      *
//      * @return {@code true} if user share the streak
//      */
//     public boolean isSharedStreak();
// 
//     /**Returns the name of the purchased subscription plan.  This may be a
//      * default name or one created by the channel owner.
//      *
//      * @return display name of the subscription plan
//      */
//     public String getSubscriptionPlanName();
// 
//     /**Returns whether this was a new sub or a re-sub.
//      *
//      * @return {@code true} if this was a re-subscription
//      */
//     public boolean isResub();
// 
//     /**Tells whether this is a subscription gift or not.
//      *
//      * @return {@code true} if this was a gift
//      */
//     public boolean isGift();
// 
//     /**Retrieves the SubscriptionGift item, which holds information about the
//      * gift and the recipiant of the gift. The Optional object wraps the
//      * SubscriptionGift object (as an alternative to returning {@code null}).
//      *
//      * @return the subscription gift, wrapped in a {@link Optional}
//      */
//     public Optional<SubscriptionGift> getSubscriptionGift();
// }
// 
// Path: src/main/java/com/gikk/twirk/types/usernotice/subtype/SubscriptionGift.java
// public interface SubscriptionGift {
//     /**
//      * Fetches the recipients display name (as configured by the user).
//      * @return the display name
//      */
//     public String getRecipiantDisplayName();
// 
//     /**
//      * Fetches the recipients user name (i.e. their login name).
//      * @return the user name
//      */
//     public String getRecipiantUserName();
// 
//     /**
//      *Fetches the recipients user ID
//      * @return the user ID
//      */
//     public long getRecipiantUserID();
// }
// 
// Path: src/main/java/com/gikk/twirk/types/usernotice/subtype/SubscriptionPlan.java
// public enum SubscriptionPlan {
//     /** Subscribed with Twitch Prime
//      */
//     SUB_PRIME("Prime", "Prime"),
// 
//     /** Subscribed with a 4.99$ plan
//      */
//     SUB_LOW("1000", "4.99$"),
// 
//     /** Subscribed with a 9.99$ plan
//      */
//     SUB_MID("2000", "9.99$"),
// 
//     /** Subscribed with a 24.99$ plan
//      */
//     SUB_HIGH("3000", "24.99$");
// 
//     private final String message;
//     private final String value;
//     private SubscriptionPlan(String msg, String val){
//         this.message = msg;
//         this.value = val;
//     }
// 
//     public String getValue(){
//         return value;
//     }
// 
//     /**Attempts to parse which Subscription plan that's been used, given the
//      * subscription notice message.
//      * <p>
//      * If no match is found (i.e. the input parameter is unknown) this defaults
//      * to returning {@link SubscriptionPlan#SUB_LOW}
//      *
//      * @param paramSubPlan the sub-plan message
//      * @return a SubscriptionPlan
//      */
//     public static SubscriptionPlan of(String paramSubPlan){
//         for(SubscriptionPlan s : values()){
//             if(s.message.equals(paramSubPlan)) {
//                 return s;
//             }
//         }
//         return SUB_LOW;
//     }
// }


import com.gikk.twirk.types.usernotice.subtype.Subscription;
import com.gikk.twirk.types.usernotice.subtype.SubscriptionGift;
import com.gikk.twirk.types.usernotice.subtype.SubscriptionPlan;
import java.util.Optional;
package com.gikk.twirk.types.usernotice;


/**
 *
 * @author Gikkman
 */
class SubscriptionImpl implements Subscription {

    private final SubscriptionPlan plan;
    private final int months;
    private final int streak;
    private final boolean shareStreak;
    private final String planName;
    private final Optional<SubscriptionGift> subGift;

    SubscriptionImpl(SubscriptionPlan plan, int months, int streak, boolean sharedStreak, String planName, SubscriptionGift subGift) {
        this.plan = plan;
        this.months = months;
        this.streak = streak;
        this.shareStreak = sharedStreak;
        this.planName = planName;
        this.subGift = Optional.ofNullable(subGift);
    }

    @Override
    public SubscriptionPlan getSubscriptionPlan() {
        return plan;
    }

    @Override
// Path: src/main/java/com/gikk/twirk/types/usernotice/subtype/Subscription.java
// public interface Subscription {
//     public SubscriptionPlan getSubscriptionPlan();
// 
//     /**Get the number of month's the subscription's been active. New subscriptions
//      * return 1, whilst re-subscriptions tells which month was just activated.
//      *
//      * @return number of months
//      */
//     public int getMonths();
// 
//     /**Get the number of month's the subscription's been active consecutive.
//      *
//      * @return number of months
//      */
//     public int getStreak();
// 
//     /** Returns if user decide to share the streak, this decide if the value of {@code getStreak} its zero or another.
//      *
//      * @return {@code true} if user share the streak
//      */
//     public boolean isSharedStreak();
// 
//     /**Returns the name of the purchased subscription plan.  This may be a
//      * default name or one created by the channel owner.
//      *
//      * @return display name of the subscription plan
//      */
//     public String getSubscriptionPlanName();
// 
//     /**Returns whether this was a new sub or a re-sub.
//      *
//      * @return {@code true} if this was a re-subscription
//      */
//     public boolean isResub();
// 
//     /**Tells whether this is a subscription gift or not.
//      *
//      * @return {@code true} if this was a gift
//      */
//     public boolean isGift();
// 
//     /**Retrieves the SubscriptionGift item, which holds information about the
//      * gift and the recipiant of the gift. The Optional object wraps the
//      * SubscriptionGift object (as an alternative to returning {@code null}).
//      *
//      * @return the subscription gift, wrapped in a {@link Optional}
//      */
//     public Optional<SubscriptionGift> getSubscriptionGift();
// }
// 
// Path: src/main/java/com/gikk/twirk/types/usernotice/subtype/SubscriptionGift.java
// public interface SubscriptionGift {
//     /**
//      * Fetches the recipients display name (as configured by the user).
//      * @return the display name
//      */
//     public String getRecipiantDisplayName();
// 
//     /**
//      * Fetches the recipients user name (i.e. their login name).
//      * @return the user name
//      */
//     public String getRecipiantUserName();
// 
//     /**
//      *Fetches the recipients user ID
//      * @return the user ID
//      */
//     public long getRecipiantUserID();
// }
// 
// Path: src/main/java/com/gikk/twirk/types/usernotice/subtype/SubscriptionPlan.java
// public enum SubscriptionPlan {
//     /** Subscribed with Twitch Prime
//      */
//     SUB_PRIME("Prime", "Prime"),
// 
//     /** Subscribed with a 4.99$ plan
//      */
//     SUB_LOW("1000", "4.99$"),
// 
//     /** Subscribed with a 9.99$ plan
//      */
//     SUB_MID("2000", "9.99$"),
// 
//     /** Subscribed with a 24.99$ plan
//      */
//     SUB_HIGH("3000", "24.99$");
// 
//     private final String message;
//     private final String value;
//     private SubscriptionPlan(String msg, String val){
//         this.message = msg;
//         this.value = val;
//     }
// 
//     public String getValue(){
//         return value;
//     }
// 
//     /**Attempts to parse which Subscription plan that's been used, given the
//      * subscription notice message.
//      * <p>
//      * If no match is found (i.e. the input parameter is unknown) this defaults
//      * to returning {@link SubscriptionPlan#SUB_LOW}
//      *
//      * @param paramSubPlan the sub-plan message
//      * @return a SubscriptionPlan
//      */
//     public static SubscriptionPlan of(String paramSubPlan){
//         for(SubscriptionPlan s : values()){
//             if(s.message.equals(paramSubPlan)) {
//                 return s;
//             }
//         }
//         return SUB_LOW;
//     }
// }


// Path: src/main/java/com/gikk/twirk/types/usernotice/SubscriptionImpl.java
import com.gikk.twirk.types.usernotice.subtype.Subscription;
import com.gikk.twirk.types.usernotice.subtype.SubscriptionGift;
import com.gikk.twirk.types.usernotice.subtype.SubscriptionPlan;
import java.util.Optional;

package com.gikk.twirk.types.usernotice;


/**
 *
 * @author Gikkman
 */
class SubscriptionImpl implements Subscription {

    private final SubscriptionPlan plan;
    private final int months;
    private final int streak;
    private final boolean shareStreak;
    private final String planName;
    private final Optional<SubscriptionGift> subGift;

    SubscriptionImpl(SubscriptionPlan plan, int months, int streak, boolean sharedStreak, String planName, SubscriptionGift subGift) {
        this.plan = plan;
        this.months = months;
        this.streak = streak;
        this.shareStreak = sharedStreak;
        this.planName = planName;
        this.subGift = Optional.ofNullable(subGift);
    }

    @Override
    public SubscriptionPlan getSubscriptionPlan() {
        return plan;
    }

    @Override
    public int getMonths() {