All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.urbanairship.api.push.model.notification.android.Style Maven / Gradle / Ivy

There is a newer version: 9.4.2
Show newest version
/*
 * Copyright (c) 2013-2016.  Urban Airship and Contributors
 */
package com.urbanairship.api.push.model.notification.android;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

import java.util.Optional;

/**
 * Base Interface for the Android Style objects.
 *
 * @param  Style Type
 */
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.PROPERTY,
        property = "type")
@JsonSubTypes({
        @JsonSubTypes.Type(value = BigPictureStyle.class, name = "big_picture"),
        @JsonSubTypes.Type(value = BigTextStyle.class, name = "big_text"),
        @JsonSubTypes.Type(value = InboxStyle.class, name = "inbox")
})
public interface Style {

    public static enum Type {
        BIG_PICTURE("big_picture"),
        BIG_TEXT("big_text"),
        INBOX("inbox");

        private final String styleType;

        private Type(String styleType) {
            this.styleType = styleType;
        }

        public String getStyleType() {
            return styleType;
        }
    }

    public T getContent();

    public Type getType();

    public Optional getTitle();

    public Optional getSummary();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy