org.teamapps.dto.UiLabel 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 = UiLabel.class)
public class UiLabel extends UiField implements UiObject {
protected String caption;
protected String icon;
protected UiClientObjectReference targetComponent;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public UiLabel() {
// default constructor for Jackson
}
public UiLabel(String caption) {
super();
this.caption = caption;
}
@com.fasterxml.jackson.annotation.JsonIgnore
public UiObjectType getUiObjectType() {
return UiObjectType.UI_LABEL;
}
@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("editingMode=" + editingMode).append(", ")
.append("value=" + value).append(", ")
.append("caption=" + caption).append(", ")
.append("icon=" + icon).append(", ")
.append(fieldMessages != null ? "fieldMessages={" + fieldMessages.toString() + "}" : "").append(", ")
.append(targetComponent != null ? "targetComponent={" + targetComponent.toString() + "}" : "")
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("caption")
public String getCaption() {
return caption;
}
@com.fasterxml.jackson.annotation.JsonGetter("icon")
public String getIcon() {
return icon;
}
@com.fasterxml.jackson.annotation.JsonGetter("targetComponent")
public UiClientObjectReference getTargetComponent() {
return targetComponent;
}
@com.fasterxml.jackson.annotation.JsonSetter("id")
public UiLabel setId(String id) {
this.id = id;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("debuggingId")
public UiLabel setDebuggingId(String debuggingId) {
this.debuggingId = debuggingId;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("visible")
public UiLabel setVisible(boolean visible) {
this.visible = visible;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("stylesBySelector")
public UiLabel setStylesBySelector(Map> stylesBySelector) {
this.stylesBySelector = stylesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("classNamesBySelector")
public UiLabel setClassNamesBySelector(Map> classNamesBySelector) {
this.classNamesBySelector = classNamesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("attributesBySelector")
public UiLabel setAttributesBySelector(Map> attributesBySelector) {
this.attributesBySelector = attributesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("editingMode")
public UiLabel setEditingMode(UiFieldEditingMode editingMode) {
this.editingMode = editingMode;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("value")
public UiLabel setValue(Object value) {
this.value = value;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("fieldMessages")
public UiLabel setFieldMessages(List fieldMessages) {
this.fieldMessages = fieldMessages;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("icon")
public UiLabel setIcon(String icon) {
this.icon = icon;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("targetComponent")
public UiLabel setTargetComponent(UiClientObjectReference targetComponent) {
this.targetComponent = targetComponent;
return this;
}
public static class ClickedEvent implements UiEvent {
@UiComponentId protected String componentId;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public ClickedEvent() {
// default constructor for Jackson
}
public ClickedEvent(String componentId) {
this.componentId = componentId;
}
public UiEventType getUiEventType() {
return UiEventType.UI_LABEL_CLICKED;
}
@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;
}
}
public static class SetCaptionCommand implements UiCommand {
@UiComponentId protected String componentId;
protected String caption;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public SetCaptionCommand() {
// default constructor for Jackson
}
public SetCaptionCommand(String componentId, String caption) {
this.componentId = componentId;
this.caption = caption;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId).append(", ")
.append("caption=" + caption)
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
@com.fasterxml.jackson.annotation.JsonGetter("caption")
public String getCaption() {
return caption;
}
}
public static class SetIconCommand implements UiCommand {
@UiComponentId protected String componentId;
protected String icon;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public SetIconCommand() {
// default constructor for Jackson
}
public SetIconCommand(String componentId, String icon) {
this.componentId = componentId;
this.icon = icon;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId).append(", ")
.append("icon=" + icon)
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
@com.fasterxml.jackson.annotation.JsonGetter("icon")
public String getIcon() {
return icon;
}
}
public static class SetTargetComponentCommand implements UiCommand {
@UiComponentId protected String componentId;
protected UiClientObjectReference targetField;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public SetTargetComponentCommand() {
// default constructor for Jackson
}
public SetTargetComponentCommand(String componentId, UiClientObjectReference targetField) {
this.componentId = componentId;
this.targetField = targetField;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId).append(", ")
.append(targetField != null ? "targetField={" + targetField.toString() + "}" : "")
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
@com.fasterxml.jackson.annotation.JsonGetter("targetField")
public UiClientObjectReference getTargetField() {
return targetField;
}
}
}