
io.apicurio.registry.rest.client.models.VersionContent Maven / Gradle / Ivy
package io.apicurio.registry.rest.client.models;
import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class VersionContent implements AdditionalDataHolder, Parsable {
/**
* Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
*/
private Map additionalData;
/**
* Raw content of the artifact version or a valid (and accessible) URL where the content can be found.
*/
private String content;
/**
* The content-type, such as `application/json` or `text/xml`.
*/
private String contentType;
/**
* Collection of references to other artifacts.
*/
private java.util.List references;
/**
* Instantiates a new {@link VersionContent} and sets the default values.
*/
public VersionContent() {
this.setAdditionalData(new HashMap<>());
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link VersionContent}
*/
@jakarta.annotation.Nonnull
public static VersionContent createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new VersionContent();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a {@link Map}
*/
@jakarta.annotation.Nonnull
public Map getAdditionalData() {
return this.additionalData;
}
/**
* Gets the content property value. Raw content of the artifact version or a valid (and accessible) URL where the content can be found.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getContent() {
return this.content;
}
/**
* Gets the contentType property value. The content-type, such as `application/json` or `text/xml`.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getContentType() {
return this.contentType;
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(3);
deserializerMap.put("content", (n) -> { this.setContent(n.getStringValue()); });
deserializerMap.put("contentType", (n) -> { this.setContentType(n.getStringValue()); });
deserializerMap.put("references", (n) -> { this.setReferences(n.getCollectionOfObjectValues(ArtifactReference::createFromDiscriminatorValue)); });
return deserializerMap;
}
/**
* Gets the references property value. Collection of references to other artifacts.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getReferences() {
return this.references;
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("content", this.getContent());
writer.writeStringValue("contentType", this.getContentType());
writer.writeCollectionOfObjectValues("references", this.getReferences());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
*/
public void setAdditionalData(@jakarta.annotation.Nullable final Map value) {
this.additionalData = value;
}
/**
* Sets the content property value. Raw content of the artifact version or a valid (and accessible) URL where the content can be found.
* @param value Value to set for the content property.
*/
public void setContent(@jakarta.annotation.Nullable final String value) {
this.content = value;
}
/**
* Sets the contentType property value. The content-type, such as `application/json` or `text/xml`.
* @param value Value to set for the contentType property.
*/
public void setContentType(@jakarta.annotation.Nullable final String value) {
this.contentType = value;
}
/**
* Sets the references property value. Collection of references to other artifacts.
* @param value Value to set for the references property.
*/
public void setReferences(@jakarta.annotation.Nullable final java.util.List value) {
this.references = value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy