io.apicurio.registry.rest.client.v2.models.UpdateState Maven / Gradle / Ivy
The newest version!
package io.apicurio.registry.rest.client.v2.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 UpdateState 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;
/**
* Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED
*/
private ArtifactState state;
/**
* Instantiates a new {@link UpdateState} and sets the default values.
*/
public UpdateState() {
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 UpdateState}
*/
@jakarta.annotation.Nonnull
public static UpdateState createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new UpdateState();
}
/**
* 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;
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(1);
deserializerMap.put("state", (n) -> { this.setState(n.getEnumValue(ArtifactState::forValue)); });
return deserializerMap;
}
/**
* Gets the state property value. Describes the state of an artifact or artifact version. The following statesare possible:* ENABLED* DISABLED* DEPRECATED
* @return a {@link ArtifactState}
*/
@jakarta.annotation.Nullable
public ArtifactState getState() {
return this.state;
}
/**
* 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.writeEnumValue("state", this.getState());
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 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 ArtifactState value) {
this.state = value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy