@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type") @JsonSubTypes({ @JsonSubTypes.Type(name = "one", value = PayloadOne.class), @JsonSubTypes.Type(name = "two", value = org.immutables.fixture.jackson.poly2.PayloadTwo.class) }) @JsonProperty("payload") public abstract Payload getPayload();
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "name") @JsonTypeName("UrlPath") public class DeliveryRuleUrlPathCondition extends DeliveryRuleCondition { @JsonProperty(value = "parameters", required = true) private UrlPathConditionParameters parameters;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME) @JsonProperty public Comparable getMinValue() { return minValue; }
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type") @JsonSubTypes({ @JsonSubTypes.Type(name = KafkaUserTlsClientAuthentication.TYPE_TLS, value = KafkaUserTlsClientAuthentication.class), @JsonSubTypes.Type(name = KafkaUserScramSha512ClientAuthentication.TYPE_SCRAM_SHA_512, value = KafkaUserScramSha512ClientAuthentication.class), }) @JsonInclude(JsonInclude.Include.NON_NULL) public abstract class KafkaUserAuthentication implements Serializable { private static final long serialVersionUID = 1L; private Map<String, Object> additionalProperties; @Description("Authentication type.") public abstract String getType(); @JsonAnyGetter public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap<>(); } this.additionalProperties.put(name, value); } }
@JsonIgnoreProperties( ignoreUnknown = true ) @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT, property = "type" ) @JsonSubTypes( { @JsonSubTypes.Type( value = EntityIndexEvent.class, name = "entityIndexEvent" ), @JsonSubTypes.Type( value = EdgeIndexEvent.class, name = "edgeIndexEvent" ), @JsonProperty protected long creationTime; @JsonProperty protected String sourceRegion;
/** * Base builder interface for {@link State}s. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = PropertyNames.TYPE) @JsonSubTypes({ @JsonSubTypes.Type(value = ChoiceState.Builder.class, name = CHOICE), @JsonSubTypes.Type(value = FailState.Builder.class, name = FAIL), @JsonSubTypes.Type(value = ParallelState.Builder.class, name = PARALLEL), @JsonSubTypes.Type(value = PassState.Builder.class, name = PASS), @JsonSubTypes.Type(value = SucceedState.Builder.class, name = SUCCEED), @JsonSubTypes.Type(value = TaskState.Builder.class, name = TASK), @JsonSubTypes.Type(value = WaitState.Builder.class, name = WAIT) }) @JsonIgnoreProperties(value = {PropertyNames.TYPE}, allowGetters = true) interface Builder extends Buildable<State> { }
@JsonTypeName(value = "index") @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME) @JsonIgnoreProperties(ignoreUnknown = true, value = {"_version", "result", "_shards", "_primary_term", "_seq_no"}) public abstract class BulkResultItemMixIn { @JsonProperty("_id") String id; @JsonProperty("_type") String type; @JsonProperty("_index") String index; @JsonProperty("error") BulkError bulkError; }
@JsonIgnoreProperties(ignoreUnknown = true) @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, property = "type") @JsonSubTypes({ @Type(value = CodeGroup.class, name = CodeGroup.TYPE), @Type(value = MembersGroup.class, name = MembersGroup.TYPE) }) public abstract class Group implements Serializable, Cloneable { @JsonInclude(Include.NON_NULL) public String id; @JsonInclude(Include.NON_DEFAULT) public LocalizedString title = LocalizedString.empty; @JsonInclude(Include.NON_DEFAULT) public LocalizedString description = LocalizedString.empty;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type") @JsonTypeName("MetricAlertCriteria") @JsonSubTypes({ @JsonSubTypes.Type(name = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", value = MetricAlertSingleResourceMultipleMetricCriteria.class) }) @JsonProperty(value = "") private Map<String, Object> additionalProperties;
/** * A job configuration. All the subclasses are both Java and JSON serializable. */ @JsonIgnoreProperties(ignoreUnknown = true) @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@type") public interface JobConfig extends Serializable { /** * @return the name of the job */ String getName(); }
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "@type") @JsonSubTypes({ @JsonSubTypes.Type(value = CreateHandle.class, name = "CreateHandle"), @JsonSubTypes.Type(value = InsertHandle.class, name = "InsertHandle"), @JsonSubTypes.Type(value = DeleteHandle.class, name = "DeleteHandle")}) @SuppressWarnings({"EmptyClass", "ClassMayBeInterface"}) public abstract static class WriterTarget { @Override public abstract String toString(); }
/** * @author Ruben Bermudez * @version 1.0 * An object used in the Bots API to answer updates */ @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class") public interface InputBotApiObject extends Serializable { }
@JsonIgnoreProperties(ignoreUnknown = true) @JsonTypeName("commandStatuses") @JsonTypeInfo( include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME) @JsonSubTypes({}) public class CommandStatuses extends HashMap<CommandId, CommandStatus.Status> { @JsonCreator public CommandStatuses(final Map<CommandId, CommandStatus.Status> statuses) { super(statuses); } public static CommandStatuses fromFullStatuses(final Map<CommandId, CommandStatus> fullStatuses) { final Map<CommandId, CommandStatus.Status> statuses = fullStatuses.entrySet().stream().collect( Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().getStatus()) ); return new CommandStatuses(statuses); } }
/** * An action for the delivery rule. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "name") @JsonTypeName("DeliveryRuleAction") @JsonSubTypes({ @JsonSubTypes.Type(name = "CacheExpiration", value = DeliveryRuleCacheExpirationAction.class) }) public class DeliveryRuleAction { }
@XmlRootElement(name = "link") @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) @JsonRootName("link") @JsonTypeName("link") @JsonInclude(Include.NON_EMPTY) @JsonTypeInfo(include = As.WRAPPER_OBJECT, use = Id.NAME) @Schema(description = "Represents an association to another resource in the system", title = "link") public class Link<T> {
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") private static class ParentClass { }
if (info.use() == JsonTypeInfo.Id.NONE) { return _constructNoTypeResolverBuilder(); idRes.init(baseType); b = b.init(info.use(), idRes); JsonTypeInfo.As inclusion = info.include(); if (inclusion == JsonTypeInfo.As.EXTERNAL_PROPERTY && (ann instanceof AnnotatedClass)) { inclusion = JsonTypeInfo.As.PROPERTY; b = b.typeProperty(info.property()); Class<?> defaultImpl = info.defaultImpl(); b = b.defaultImpl(defaultImpl); b = b.typeIdVisibility(info.visible()); return b;
@Override public void injectFields(final TypescriptInterface iface, final Class<?> javaClass) { final JsonTypeInfo typeInfoAnnotation = javaClass.getSuperclass().getAnnotation(JsonTypeInfo.class); final JsonSubTypes subTypesAnnotation = javaClass.getSuperclass().getAnnotation(JsonSubTypes.class); for (JsonSubTypes.Type subType : subTypesAnnotation.value()) { if (subType.value().equals(javaClass)) { final TypescriptField field = new TypescriptField(typeInfoAnnotation.property(), new TypescriptStringConstantType(subType.name()), TypescriptField.MANDATORY); iface.field(field); } } }