private AndroidNotification()

in src/main/java/com/google/firebase/messaging/AndroidNotification.java [124:183]


  private AndroidNotification(Builder builder) {
    this.title = builder.title;
    this.body = builder.body;
    this.icon = builder.icon;
    if (builder.color != null) {
      checkArgument(builder.color.matches("^#[0-9a-fA-F]{6}$"),
          "color must be in the form #RRGGBB");
    }
    this.color = builder.color;
    this.sound = builder.sound;
    this.tag = builder.tag;
    this.clickAction = builder.clickAction;
    this.bodyLocKey = builder.bodyLocKey;
    if (!builder.bodyLocArgs.isEmpty()) {
      checkArgument(!Strings.isNullOrEmpty(builder.bodyLocKey),
          "bodyLocKey is required when specifying bodyLocArgs");
      this.bodyLocArgs = ImmutableList.copyOf(builder.bodyLocArgs);
    } else {
      this.bodyLocArgs = null;
    }

    this.titleLocKey = builder.titleLocKey;
    if (!builder.titleLocArgs.isEmpty()) {
      checkArgument(!Strings.isNullOrEmpty(builder.titleLocKey),
          "titleLocKey is required when specifying titleLocArgs");
      this.titleLocArgs = ImmutableList.copyOf(builder.titleLocArgs);
    } else {
      this.titleLocArgs = null;
    }
    this.channelId = builder.channelId;
    this.image = builder.image;    
    this.ticker = builder.ticker;
    this.sticky = builder.sticky;
    this.eventTime = builder.eventTime;
    this.localOnly = builder.localOnly;
    if (builder.priority != null) {
      this.priority = builder.priority.toString();
    } else {
      this.priority = null;
    }
    if (!builder.vibrateTimings.isEmpty()) {
      this.vibrateTimings = ImmutableList.copyOf(builder.vibrateTimings);
    } else {
      this.vibrateTimings = null;
    }
    this.defaultVibrateTimings = builder.defaultVibrateTimings;
    this.defaultSound = builder.defaultSound;
    this.lightSettings = builder.lightSettings;
    this.defaultLightSettings = builder.defaultLightSettings;
    if (builder.visibility != null) {
      this.visibility = builder.visibility.name().toLowerCase();
    } else {
      this.visibility = null;
    }
    if (builder.notificationCount != null) {
      checkArgument(builder.notificationCount >= 0, 
          "notificationCount if specified must be zero or positive valued");
    }
    this.notificationCount = builder.notificationCount;
  }