package org.tio.sitexxx.service.service.jpush.honor.message;

import com.alibaba.fastjson.annotation.JSONField;
import org.tio.sitexxx.service.service.jpush.honor.android.AndroidNotification;

/**
 * <pre>
 *    @author : vagrancy
 *    e-mail : 18050829067@163.com
 *    time   : 2025-02-21 10:39
 *    desc   :
 * </pre>
 */
public class AndroidConfig {
    @JSONField(name = "notification")
    private AndroidNotification notification;

    public AndroidConfig(Builder builder) {

        this.notification = builder.notification;
    }

    /**
     * check androidConfig's parameters
     *
     * @param notification whcic is in message
     */
    public void check(Notification notification) {
        if (null != this.notification) {
            this.notification.check(notification);
        }
    }

    public AndroidNotification getNotification() {
        return notification;
    }

    /**
     * builder
     */
    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private AndroidNotification notification;

        private Builder() {
        }

        public Builder setNotification(AndroidNotification notification) {
            this.notification = notification;
            return this;
        }

        public AndroidConfig build() {
            return new AndroidConfig(this);
        }
    }

}
