
com.hubspot.slack.client.methods.interceptor.HasCommaSeperatedChannelIds Maven / Gradle / Ivy
package com.hubspot.slack.client.methods.interceptor;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Strings;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import org.immutables.value.Value.Derived;
public interface HasCommaSeperatedChannelIds {
@JsonIgnore
List getRawChannelIds();
@Derived
@JsonProperty("channels")
default Optional getEncodedChannels() {
String commaSeparatedList = getRawChannelIds()
.stream()
.collect(Collectors.joining(","));
return Optional.ofNullable(Strings.emptyToNull(commaSeparatedList));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy