All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.apicurio.datamodels.asyncapi.models.AaiMessageBase Maven / Gradle / Ivy

There is a newer version: 3.5.0.Final
Show newest version
package io.apicurio.datamodels.asyncapi.models;

import java.util.List;
import java.util.Map;

import io.apicurio.datamodels.core.models.ExtensibleNode;
import io.apicurio.datamodels.core.models.IReferenceNode;
import io.apicurio.datamodels.core.models.Node;
import io.apicurio.datamodels.core.models.common.ExternalDocumentation;
import io.apicurio.datamodels.core.models.common.INamed;
import io.apicurio.datamodels.core.models.common.Tag;

/**
 * Contains shared fields in {@link AaiMessage} and {@link AaiMessageTrait}
 *
 * @author Jakub Senko 
 */
public abstract class AaiMessageBase extends ExtensibleNode implements IReferenceNode, INamed {

    public String _name; // Map
    public String $ref;

    /**
     * Represents `Schema Object | Reference Object` type.
     */
    public AaiHeaderItem headers;

    public AaiCorrelationId correlationId;
    public String schemaFormat;
    public String contentType;
    public String name;
    public String title;
    public String summary;
    public String description;
    public List tags;
    public ExternalDocumentation externalDocs;
    public AaiMessageBindings bindings;

    /**
     * Represents `Map[string, any]` type.
     * 

* Objects of `any` type are deserialized as follows: * In TypeScript, this field contains the raw JS object, in case of Java * it is a {@link com.fasterxml.jackson.databind.node.ObjectNode}. * * @see AsyncAPI 2.0.0 spec */ public Map examples; /** * Constructor. */ public AaiMessageBase(String name) { this._name = name; } /** * Constructor. * @param parent */ public AaiMessageBase(Node parent) { if(parent != null) { this._parent = parent; this._ownerDocument = parent.ownerDocument(); } } /** * Constructor. * @param parent * @param name */ public AaiMessageBase(Node parent, String name) { this(parent); this._name = name; } /** * @see io.apicurio.datamodels.core.models.common.INamed#getName() */ @Override public String getName() { return _name; } /** * @see io.apicurio.datamodels.core.models.common.INamed#rename(java.lang.String) */ @Override public void rename(String newName) { this._name = newName; } @Override public String getReference() { return $ref; } @Override public void setReference(String reference) { $ref = reference; } public abstract void addTag(AaiTag tag); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy