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

io.apicurio.registry.rest.client.models.VersionMetaData Maven / Gradle / Ivy

There is a newer version: 3.0.6
Show newest version
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.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class VersionMetaData 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;
    /**
     * The ID of a single artifact.
     */
    private String artifactId;
    /**
     * The artifactType property
     */
    private String artifactType;
    /**
     * The contentId property
     */
    private Long contentId;
    /**
     * The createdOn property
     */
    private OffsetDateTime createdOn;
    /**
     * The description property
     */
    private String description;
    /**
     * The globalId property
     */
    private Long globalId;
    /**
     * An ID of a single artifact group.
     */
    private String groupId;
    /**
     * User-defined name-value pairs. Name and value must be strings.
     */
    private Labels labels;
    /**
     * The modifiedBy property
     */
    private String modifiedBy;
    /**
     * The modifiedOn property
     */
    private OffsetDateTime modifiedOn;
    /**
     * The name property
     */
    private String name;
    /**
     * The owner property
     */
    private String owner;
    /**
     * Describes the state of an artifact or artifact version.  The following statesare possible:* ENABLED* DISABLED* DEPRECATED
     */
    private VersionState state;
    /**
     * A single version of an artifact.  Can be provided by the client when creating a new version,or it can be server-generated.  The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value.
     */
    private String version;
    /**
     * Instantiates a new {@link VersionMetaData} and sets the default values.
     */
    public VersionMetaData() {
        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 VersionMetaData}
     */
    @jakarta.annotation.Nonnull
    public static VersionMetaData createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
        Objects.requireNonNull(parseNode);
        return new VersionMetaData();
    }
    /**
     * 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 artifactId property value. The ID of a single artifact.
     * @return a {@link String}
     */
    @jakarta.annotation.Nullable
    public String getArtifactId() {
        return this.artifactId;
    }
    /**
     * Gets the artifactType property value. The artifactType property
     * @return a {@link String}
     */
    @jakarta.annotation.Nullable
    public String getArtifactType() {
        return this.artifactType;
    }
    /**
     * Gets the contentId property value. The contentId property
     * @return a {@link Long}
     */
    @jakarta.annotation.Nullable
    public Long getContentId() {
        return this.contentId;
    }
    /**
     * Gets the createdOn property value. The createdOn property
     * @return a {@link OffsetDateTime}
     */
    @jakarta.annotation.Nullable
    public OffsetDateTime getCreatedOn() {
        return this.createdOn;
    }
    /**
     * Gets the description property value. The description property
     * @return a {@link String}
     */
    @jakarta.annotation.Nullable
    public String getDescription() {
        return this.description;
    }
    /**
     * The deserialization information for the current model
     * @return a {@link Map>}
     */
    @jakarta.annotation.Nonnull
    public Map> getFieldDeserializers() {
        final HashMap> deserializerMap = new HashMap>(14);
        deserializerMap.put("artifactId", (n) -> { this.setArtifactId(n.getStringValue()); });
        deserializerMap.put("artifactType", (n) -> { this.setArtifactType(n.getStringValue()); });
        deserializerMap.put("contentId", (n) -> { this.setContentId(n.getLongValue()); });
        deserializerMap.put("createdOn", (n) -> { this.setCreatedOn(n.getOffsetDateTimeValue()); });
        deserializerMap.put("description", (n) -> { this.setDescription(n.getStringValue()); });
        deserializerMap.put("globalId", (n) -> { this.setGlobalId(n.getLongValue()); });
        deserializerMap.put("groupId", (n) -> { this.setGroupId(n.getStringValue()); });
        deserializerMap.put("labels", (n) -> { this.setLabels(n.getObjectValue(Labels::createFromDiscriminatorValue)); });
        deserializerMap.put("modifiedBy", (n) -> { this.setModifiedBy(n.getStringValue()); });
        deserializerMap.put("modifiedOn", (n) -> { this.setModifiedOn(n.getOffsetDateTimeValue()); });
        deserializerMap.put("name", (n) -> { this.setName(n.getStringValue()); });
        deserializerMap.put("owner", (n) -> { this.setOwner(n.getStringValue()); });
        deserializerMap.put("state", (n) -> { this.setState(n.getEnumValue(VersionState::forValue)); });
        deserializerMap.put("version", (n) -> { this.setVersion(n.getStringValue()); });
        return deserializerMap;
    }
    /**
     * Gets the globalId property value. The globalId property
     * @return a {@link Long}
     */
    @jakarta.annotation.Nullable
    public Long getGlobalId() {
        return this.globalId;
    }
    /**
     * Gets the groupId property value. An ID of a single artifact group.
     * @return a {@link String}
     */
    @jakarta.annotation.Nullable
    public String getGroupId() {
        return this.groupId;
    }
    /**
     * Gets the labels property value. User-defined name-value pairs. Name and value must be strings.
     * @return a {@link Labels}
     */
    @jakarta.annotation.Nullable
    public Labels getLabels() {
        return this.labels;
    }
    /**
     * Gets the modifiedBy property value. The modifiedBy property
     * @return a {@link String}
     */
    @jakarta.annotation.Nullable
    public String getModifiedBy() {
        return this.modifiedBy;
    }
    /**
     * Gets the modifiedOn property value. The modifiedOn property
     * @return a {@link OffsetDateTime}
     */
    @jakarta.annotation.Nullable
    public OffsetDateTime getModifiedOn() {
        return this.modifiedOn;
    }
    /**
     * Gets the name property value. The name property
     * @return a {@link String}
     */
    @jakarta.annotation.Nullable
    public String getName() {
        return this.name;
    }
    /**
     * Gets the owner property value. The owner property
     * @return a {@link String}
     */
    @jakarta.annotation.Nullable
    public String getOwner() {
        return this.owner;
    }
    /**
     * Gets the state property value. Describes the state of an artifact or artifact version.  The following statesare possible:* ENABLED* DISABLED* DEPRECATED
     * @return a {@link VersionState}
     */
    @jakarta.annotation.Nullable
    public VersionState getState() {
        return this.state;
    }
    /**
     * Gets the version property value. A single version of an artifact.  Can be provided by the client when creating a new version,or it can be server-generated.  The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value.
     * @return a {@link String}
     */
    @jakarta.annotation.Nullable
    public String getVersion() {
        return this.version;
    }
    /**
     * 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("artifactId", this.getArtifactId());
        writer.writeStringValue("artifactType", this.getArtifactType());
        writer.writeLongValue("contentId", this.getContentId());
        writer.writeOffsetDateTimeValue("createdOn", this.getCreatedOn());
        writer.writeStringValue("description", this.getDescription());
        writer.writeLongValue("globalId", this.getGlobalId());
        writer.writeStringValue("groupId", this.getGroupId());
        writer.writeObjectValue("labels", this.getLabels());
        writer.writeStringValue("modifiedBy", this.getModifiedBy());
        writer.writeOffsetDateTimeValue("modifiedOn", this.getModifiedOn());
        writer.writeStringValue("name", this.getName());
        writer.writeStringValue("owner", this.getOwner());
        writer.writeEnumValue("state", this.getState());
        writer.writeStringValue("version", this.getVersion());
        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 artifactId property value. The ID of a single artifact.
     * @param value Value to set for the artifactId property.
     */
    public void setArtifactId(@jakarta.annotation.Nullable final String value) {
        this.artifactId = value;
    }
    /**
     * Sets the artifactType property value. The artifactType property
     * @param value Value to set for the artifactType property.
     */
    public void setArtifactType(@jakarta.annotation.Nullable final String value) {
        this.artifactType = value;
    }
    /**
     * Sets the contentId property value. The contentId property
     * @param value Value to set for the contentId property.
     */
    public void setContentId(@jakarta.annotation.Nullable final Long value) {
        this.contentId = value;
    }
    /**
     * Sets the createdOn property value. The createdOn property
     * @param value Value to set for the createdOn property.
     */
    public void setCreatedOn(@jakarta.annotation.Nullable final OffsetDateTime value) {
        this.createdOn = value;
    }
    /**
     * Sets the description property value. The description property
     * @param value Value to set for the description property.
     */
    public void setDescription(@jakarta.annotation.Nullable final String value) {
        this.description = value;
    }
    /**
     * Sets the globalId property value. The globalId property
     * @param value Value to set for the globalId property.
     */
    public void setGlobalId(@jakarta.annotation.Nullable final Long value) {
        this.globalId = value;
    }
    /**
     * Sets the groupId property value. An ID of a single artifact group.
     * @param value Value to set for the groupId property.
     */
    public void setGroupId(@jakarta.annotation.Nullable final String value) {
        this.groupId = value;
    }
    /**
     * Sets the labels property value. User-defined name-value pairs. Name and value must be strings.
     * @param value Value to set for the labels property.
     */
    public void setLabels(@jakarta.annotation.Nullable final Labels value) {
        this.labels = value;
    }
    /**
     * Sets the modifiedBy property value. The modifiedBy property
     * @param value Value to set for the modifiedBy property.
     */
    public void setModifiedBy(@jakarta.annotation.Nullable final String value) {
        this.modifiedBy = value;
    }
    /**
     * Sets the modifiedOn property value. The modifiedOn property
     * @param value Value to set for the modifiedOn property.
     */
    public void setModifiedOn(@jakarta.annotation.Nullable final OffsetDateTime value) {
        this.modifiedOn = value;
    }
    /**
     * Sets the name property value. The name property
     * @param value Value to set for the name property.
     */
    public void setName(@jakarta.annotation.Nullable final String value) {
        this.name = value;
    }
    /**
     * Sets the owner property value. The owner property
     * @param value Value to set for the owner property.
     */
    public void setOwner(@jakarta.annotation.Nullable final String value) {
        this.owner = value;
    }
    /**
     * Sets the state property value. Describes the state of an artifact or artifact version.  The following statesare possible:* ENABLED* DISABLED* DEPRECATED
     * @param value Value to set for the state property.
     */
    public void setState(@jakarta.annotation.Nullable final VersionState value) {
        this.state = value;
    }
    /**
     * Sets the version property value. A single version of an artifact.  Can be provided by the client when creating a new version,or it can be server-generated.  The value can be any string unique to the artifact, but it isrecommended to use a simple integer or a semver value.
     * @param value Value to set for the version property.
     */
    public void setVersion(@jakarta.annotation.Nullable final String value) {
        this.version = value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy