org.teamapps.dto.UiContextMenu Maven / Gradle / Ivy
package org.teamapps.dto;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;
/**
* THIS IS GENERATED CODE!
* PLEASE DO NOT MODIFY - ALL YOUR WORK WOULD BE LOST!
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, property = "_type", defaultImpl = UiContextMenu.class)
public class UiContextMenu extends UiComponent implements UiObject {
protected List entries;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public UiContextMenu() {
// default constructor for Jackson
}
public UiContextMenu(List entries) {
super();
this.entries = entries;
}
@com.fasterxml.jackson.annotation.JsonIgnore
public UiObjectType getUiObjectType() {
return UiObjectType.UI_CONTEXT_MENU;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("id=" + id).append(", ")
.append("debuggingId=" + debuggingId).append(", ")
.append("classNamesBySelector=" + classNamesBySelector).append(", ")
.append("visible=" + visible).append(", ")
.append("stylesBySelector=" + stylesBySelector).append(", ")
.append("attributesBySelector=" + attributesBySelector).append(", ")
.append(entries != null ? "entries={" + entries.toString() + "}" : "")
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("entries")
public List getEntries() {
return entries;
}
@com.fasterxml.jackson.annotation.JsonSetter("id")
public UiContextMenu setId(String id) {
this.id = id;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("debuggingId")
public UiContextMenu setDebuggingId(String debuggingId) {
this.debuggingId = debuggingId;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("visible")
public UiContextMenu setVisible(boolean visible) {
this.visible = visible;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("stylesBySelector")
public UiContextMenu setStylesBySelector(Map> stylesBySelector) {
this.stylesBySelector = stylesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("classNamesBySelector")
public UiContextMenu setClassNamesBySelector(Map> classNamesBySelector) {
this.classNamesBySelector = classNamesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("attributesBySelector")
public UiContextMenu setAttributesBySelector(Map> attributesBySelector) {
this.attributesBySelector = attributesBySelector;
return this;
}
public static class ContextMenuSelectionEvent implements UiEvent {
@UiComponentId protected String componentId;
protected String entryId;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public ContextMenuSelectionEvent() {
// default constructor for Jackson
}
public ContextMenuSelectionEvent(String componentId, String entryId) {
this.componentId = componentId;
this.entryId = entryId;
}
public UiEventType getUiEventType() {
return UiEventType.UI_CONTEXT_MENU_CONTEXT_MENU_SELECTION;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId).append(", ")
.append("entryId=" + entryId)
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
@com.fasterxml.jackson.annotation.JsonGetter("entryId")
public String getEntryId() {
return entryId;
}
}
public static class HideCommand implements UiCommand {
@UiComponentId protected String componentId;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public HideCommand() {
// default constructor for Jackson
}
public HideCommand(String componentId) {
this.componentId = componentId;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId)
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
}
}