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

org.whispersystems.signalservice.api.messages.SignalServiceStickerManifest Maven / Gradle / Ivy

There is a newer version: 2.15.3
Show newest version
package org.whispersystems.signalservice.api.messages;

import org.whispersystems.libsignal.util.guava.Optional;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class SignalServiceStickerManifest {

  private final Optional      title;
  private final Optional      author;
  private final Optional cover;
  private final List     stickers;

  public SignalServiceStickerManifest(String title, String author, StickerInfo cover, List stickers) {
    this.title    = Optional.of(title);
    this.author   = Optional.of(author);
    this.cover    = Optional.of(cover);
    this.stickers = (stickers == null) ? Collections.emptyList() : new ArrayList<>(stickers);
  }

  public Optional getTitle() {
    return title;
  }

  public Optional getAuthor() {
    return author;
  }

  public Optional getCover() {
    return cover;
  }

  public List getStickers() {
    return stickers;
  }

  public static final class StickerInfo {
    private final int    id;
    private final String emoji;

    public StickerInfo(int id, String emoji) {
      this.id    = id;
      this.emoji = emoji;
    }

    public int getId() {
      return id;
    }

    public String getEmoji() {
      return emoji;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy