com.slack.api.model.block.composition.OptionGroupObject Maven / Gradle / Ivy
package com.slack.api.model.block.composition;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* https://api.slack.com/reference/messaging/composition-objects#option-group
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OptionGroupObject {
private PlainTextObject label;
// https://github.com/seratch/jslack/pull/103
// The reason I didn't initialize the List<> fields is because Slack (sometimes) gives errors
// when it encounters an empty list in the generated JSON.
// The proper solution if/when you don't want un-initialized fields is to have a Gson type adapter that skips empty lists
// (e.g. something like https://stackoverflow.com/questions/11942118/how-do-you-get-gson-to-omit-null-or-empty-objects-and-empty-arrays-and-lists)
private List options;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy