io.sphere.sdk.channels.Channel Maven / Gradle / Ivy
package io.sphere.sdk.channels;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.models.DefaultModel;
import io.sphere.sdk.models.LocalizedStrings;
import io.sphere.sdk.models.Reference;
import java.util.Optional;
import java.util.Set;
/** Channels represent a source or destination of different entities.
Operations:
- Create a channel with {@link io.sphere.sdk.channels.commands.ChannelCreateCommand}.
- Fetch a channel by key with {@link io.sphere.sdk.channels.queries.ChannelByKeyFetch}.
- Query a channel with {@link io.sphere.sdk.channels.queries.ChannelQuery}.
- Delete a channel with {@link io.sphere.sdk.channels.commands.ChannelDeleteCommand}.
*/
@JsonDeserialize(as = ChannelImpl.class)
public interface Channel extends DefaultModel {
public String getKey();
public Set getRoles();
public Optional getName();
public Optional getDescription();
public default Reference toReference() {
return Reference.of(typeId(), getId());
}
public static String typeId(){
return "channel";
}
public static TypeReference typeReference(){
return new TypeReference() {
@Override
public String toString() {
return "TypeReference";
}
};
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy