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

com.symphony.bdk.bot.sdk.event.model.StreamDetails Maven / Gradle / Ivy

package com.symphony.bdk.bot.sdk.event.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import model.Stream;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

import com.symphony.bdk.bot.sdk.symphony.model.StreamType;

/**
 * Symphony stream details
 *
 * @author Gabriel Berberian
 */
@Data
@NoArgsConstructor
public class StreamDetails {

  private StreamType streamType;
  private String roomName;
  private List members;
  private Boolean external;
  private Boolean crossPod;

  public StreamDetails(Stream stream) {
    this.streamType = StreamType.value(stream.getStreamType().toUpperCase());
    this.roomName = stream.getRoomName();
    this.members = stream.getMembers() == null ? Collections.emptyList()
        : stream.getMembers().stream().map(UserDetails::new).collect(Collectors.toList());
    this.external = stream.getExternal();
    this.crossPod = stream.getCrossPod();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy