models.ConfigEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kafka-instance-sdk Show documentation
Show all versions of kafka-instance-sdk Show documentation
Kafka instance SDK for RHOAS API supports interaction with individual Kafka instances
The newest version!
package com.openshift.cloud.api.kas.auth.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;
/**
* Key value pair indicating possible configuration options for a topic.
*/
public class ConfigEntry 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 key indicating what configuration entry you would like to set for the topic. */
private String key;
/** Value to indicate the setting on the topic configuration entry. */
private String value;
/**
* Instantiates a new ConfigEntry and sets the default values.
* @return a void
*/
@javax.annotation.Nullable
public ConfigEntry() {
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 ConfigEntry
*/
@javax.annotation.Nonnull
public static ConfigEntry createFromDiscriminatorValue(@javax.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new ConfigEntry();
}
/**
* 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 Map
*/
@javax.annotation.Nonnull
public Map getAdditionalData() {
return this.additionalData;
}
/**
* The deserialization information for the current model
* @return a Map>
*/
@javax.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(2);
deserializerMap.put("key", (n) -> { this.setKey(n.getStringValue()); });
deserializerMap.put("value", (n) -> { this.setValue(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the key property value. The key indicating what configuration entry you would like to set for the topic.
* @return a string
*/
@javax.annotation.Nullable
public String getKey() {
return this.key;
}
/**
* Gets the value property value. Value to indicate the setting on the topic configuration entry.
* @return a string
*/
@javax.annotation.Nullable
public String getValue() {
return this.value;
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
@javax.annotation.Nonnull
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("key", this.getKey());
writer.writeStringValue("value", this.getValue());
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.
* @return a void
*/
@javax.annotation.Nonnull
public void setAdditionalData(@javax.annotation.Nullable final Map value) {
this.additionalData = value;
}
/**
* Sets the key property value. The key indicating what configuration entry you would like to set for the topic.
* @param value Value to set for the key property.
* @return a void
*/
@javax.annotation.Nonnull
public void setKey(@javax.annotation.Nullable final String value) {
this.key = value;
}
/**
* Sets the value property value. Value to indicate the setting on the topic configuration entry.
* @param value Value to set for the value property.
* @return a void
*/
@javax.annotation.Nonnull
public void setValue(@javax.annotation.Nullable final String value) {
this.value = value;
}
}