app.knock.api.model.PreferenceSetRequest Maven / Gradle / Ivy
package app.knock.api.model;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import lombok.Builder;
import lombok.Singular;
import lombok.Value;
import java.util.Map;
import static app.knock.api.model.util.PropertyBuilderHelper.setProperty;
@Value
@Builder
public class PreferenceSetRequest {
String id;
@Singular("channelType")
@JsonAnySetter
Map channelTypes;
@Singular("workflow")
@JsonAnySetter
Map workflows;
@Singular("category")
@JsonAnySetter
Map categories;
public T channelType(String key, Class clazz) {
return setProperty(this.channelTypes, key, clazz);
}
public T workflow(String key, Class clazz) {
return setProperty(this.workflows, key, clazz);
}
public T category(String key, Class clazz) {
return setProperty(this.categories, key, clazz);
}
}