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

io.apicurio.datamodels.models.asyncapi.v23.AsyncApi23MessageTraitImpl Maven / Gradle / Ivy

The newest version!
package io.apicurio.datamodels.models.asyncapi.v23;

import com.fasterxml.jackson.databind.JsonNode;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.asyncapi.AsyncApiCorrelationID;
import io.apicurio.datamodels.models.asyncapi.AsyncApiExternalDocumentation;
import io.apicurio.datamodels.models.asyncapi.AsyncApiMessageBindings;
import io.apicurio.datamodels.models.asyncapi.AsyncApiTag;
import io.apicurio.datamodels.models.asyncapi.v23.visitors.AsyncApi23Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class AsyncApi23MessageTraitImpl extends NodeImpl implements AsyncApi23MessageTrait {

	private String $ref;
	private AsyncApi23Schema headers;
	private AsyncApiCorrelationID correlationId;
	private String schemaFormat;
	private String contentType;
	private String name;
	private String title;
	private String summary;
	private String description;
	private List tags;
	private AsyncApiExternalDocumentation externalDocs;
	private AsyncApiMessageBindings bindings;
	private Map examples;
	private Map extensions;

	@Override
	public String get$ref() {
		return $ref;
	}

	@Override
	public void set$ref(String value) {
		this.$ref = value;
	}

	@Override
	public AsyncApi23Schema getHeaders() {
		return headers;
	}

	@Override
	public void setHeaders(AsyncApi23Schema value) {
		this.headers = value;
	}

	@Override
	public AsyncApi23Schema createSchema() {
		AsyncApi23SchemaImpl node = new AsyncApi23SchemaImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public AsyncApiCorrelationID getCorrelationId() {
		return correlationId;
	}

	@Override
	public void setCorrelationId(AsyncApiCorrelationID value) {
		this.correlationId = value;
	}

	@Override
	public AsyncApi23CorrelationID createCorrelationID() {
		AsyncApi23CorrelationIDImpl node = new AsyncApi23CorrelationIDImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public String getSchemaFormat() {
		return schemaFormat;
	}

	@Override
	public void setSchemaFormat(String value) {
		this.schemaFormat = value;
	}

	@Override
	public String getContentType() {
		return contentType;
	}

	@Override
	public void setContentType(String value) {
		this.contentType = value;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String value) {
		this.name = value;
	}

	@Override
	public String getTitle() {
		return title;
	}

	@Override
	public void setTitle(String value) {
		this.title = value;
	}

	@Override
	public String getSummary() {
		return summary;
	}

	@Override
	public void setSummary(String value) {
		this.summary = value;
	}

	@Override
	public String getDescription() {
		return description;
	}

	@Override
	public void setDescription(String value) {
		this.description = value;
	}

	@Override
	public AsyncApi23Tag createTag() {
		AsyncApi23TagImpl node = new AsyncApi23TagImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public List getTags() {
		return tags;
	}

	@Override
	public void addTag(AsyncApiTag value) {
		if (this.tags == null) {
			this.tags = new ArrayList<>();
		}
		this.tags.add(value);
	}

	@Override
	public void clearTags() {
		if (this.tags != null) {
			this.tags.clear();
		}
	}

	@Override
	public void removeTag(AsyncApiTag value) {
		if (this.tags != null) {
			this.tags.remove(value);
		}
	}

	@Override
	public AsyncApiExternalDocumentation getExternalDocs() {
		return externalDocs;
	}

	@Override
	public void setExternalDocs(AsyncApiExternalDocumentation value) {
		this.externalDocs = value;
	}

	@Override
	public AsyncApi23ExternalDocumentation createExternalDocumentation() {
		AsyncApi23ExternalDocumentationImpl node = new AsyncApi23ExternalDocumentationImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public AsyncApiMessageBindings getBindings() {
		return bindings;
	}

	@Override
	public void setBindings(AsyncApiMessageBindings value) {
		this.bindings = value;
	}

	@Override
	public AsyncApi23MessageBindings createMessageBindings() {
		AsyncApi23MessageBindingsImpl node = new AsyncApi23MessageBindingsImpl();
		node.setParent(this);
		return node;
	}

	@Override
	public Map getExamples() {
		return examples;
	}

	@Override
	public void setExamples(Map value) {
		this.examples = value;
	}

	@Override
	public Map getExtensions() {
		return extensions;
	}

	@Override
	public void addExtension(String name, JsonNode value) {
		if (this.extensions == null) {
			this.extensions = new LinkedHashMap<>();
		}
		this.extensions.put(name, value);
	}

	@Override
	public void clearExtensions() {
		if (this.extensions != null) {
			this.extensions.clear();
		}
	}

	@Override
	public void removeExtension(String name) {
		if (this.extensions != null) {
			this.extensions.remove(name);
		}
	}

	@Override
	public void accept(Visitor visitor) {
		AsyncApi23Visitor viz = (AsyncApi23Visitor) visitor;
		viz.visitMessageTrait(this);
	}

	@Override
	public Node emptyClone() {
		return new AsyncApi23MessageTraitImpl();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy