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

models.ConnectorNamespaceTenant Maven / Gradle / Ivy

package com.openshift.cloud.api.connector.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;
public class ConnectorNamespaceTenant 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;
    /** Either user or organisation id depending on the value of kind */
    private String id;
    /** The kind property */
    private ConnectorNamespaceTenantKind kind;
    /**
     * Instantiates a new ConnectorNamespaceTenant and sets the default values.
     * @return a void
     */
    @javax.annotation.Nullable
    public ConnectorNamespaceTenant() {
        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 ConnectorNamespaceTenant
     */
    @javax.annotation.Nonnull
    public static ConnectorNamespaceTenant createFromDiscriminatorValue(@javax.annotation.Nonnull final ParseNode parseNode) {
        Objects.requireNonNull(parseNode);
        return new ConnectorNamespaceTenant();
    }
    /**
     * 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("id", (n) -> { this.setId(n.getStringValue()); });
        deserializerMap.put("kind", (n) -> { this.setKind(n.getEnumValue(ConnectorNamespaceTenantKind.class)); });
        return deserializerMap;
    }
    /**
     * Gets the id property value. Either user or organisation id depending on the value of kind
     * @return a string
     */
    @javax.annotation.Nullable
    public String getId() {
        return this.id;
    }
    /**
     * Gets the kind property value. The kind property
     * @return a ConnectorNamespaceTenantKind
     */
    @javax.annotation.Nullable
    public ConnectorNamespaceTenantKind getKind() {
        return this.kind;
    }
    /**
     * 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("id", this.getId());
        writer.writeEnumValue("kind", this.getKind());
        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 id property value. Either user or organisation id depending on the value of kind
     * @param value Value to set for the id property.
     * @return a void
     */
    @javax.annotation.Nonnull
    public void setId(@javax.annotation.Nullable final String value) {
        this.id = value;
    }
    /**
     * Sets the kind property value. The kind property
     * @param value Value to set for the kind property.
     * @return a void
     */
    @javax.annotation.Nonnull
    public void setKind(@javax.annotation.Nullable final ConnectorNamespaceTenantKind value) {
        this.kind = value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy