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

models.NewTopicInput Maven / Gradle / Ivy

Go to download

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;
/**
 * Input object to create a new topic.
 */
public class NewTopicInput 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 topic name, this value must be unique. */
    private String name;
    /** The settings that are applicable to this topic. This includes partitions, configuration information, and number of replicas. */
    private TopicSettings settings;
    /**
     * Instantiates a new NewTopicInput and sets the default values.
     * @return a void
     */
    @javax.annotation.Nullable
    public NewTopicInput() {
        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 NewTopicInput
     */
    @javax.annotation.Nonnull
    public static NewTopicInput createFromDiscriminatorValue(@javax.annotation.Nonnull final ParseNode parseNode) {
        Objects.requireNonNull(parseNode);
        return new NewTopicInput();
    }
    /**
     * 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("name", (n) -> { this.setName(n.getStringValue()); });
        deserializerMap.put("settings", (n) -> { this.setSettings(n.getObjectValue(TopicSettings::createFromDiscriminatorValue)); });
        return deserializerMap;
    }
    /**
     * Gets the name property value. The topic name, this value must be unique.
     * @return a string
     */
    @javax.annotation.Nullable
    public String getName() {
        return this.name;
    }
    /**
     * Gets the settings property value. The settings that are applicable to this topic. This includes partitions, configuration information, and number of replicas.
     * @return a TopicSettings
     */
    @javax.annotation.Nullable
    public TopicSettings getSettings() {
        return this.settings;
    }
    /**
     * 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("name", this.getName());
        writer.writeObjectValue("settings", this.getSettings());
        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 name property value. The topic name, this value must be unique.
     * @param value Value to set for the name property.
     * @return a void
     */
    @javax.annotation.Nonnull
    public void setName(@javax.annotation.Nullable final String value) {
        this.name = value;
    }
    /**
     * Sets the settings property value. The settings that are applicable to this topic. This includes partitions, configuration information, and number of replicas.
     * @param value Value to set for the settings property.
     * @return a void
     */
    @javax.annotation.Nonnull
    public void setSettings(@javax.annotation.Nullable final TopicSettings value) {
        this.settings = value;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy