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

com.sap.cloud.sdk.services.recastai.botresponses.ConversationUpdate Maven / Gradle / Ivy

Go to download

Integration of SAP Conversational AI, aka Recast AI (Beta release, still subject to change - up to discontinuation of module).

There is a newer version: 2.28.0
Show newest version
/*
 * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
 */

package com.sap.cloud.sdk.services.recastai.botresponses;

import java.util.Map;

import javax.annotation.Nullable;

import com.google.common.annotations.Beta;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

/**
 * Class that wraps around Recast Memory.
 */
@Beta
public class ConversationUpdate
{
    @SerializedName( "memory" )
    @Expose
    private Map memory;

    @SerializedName( "language" )
    @Expose
    private String language;

    /**
     * Allows to create a new conversation object with a new memory object.
     * 
     * @param memory
     *            optional memory object
     */
    public ConversationUpdate( @Nullable final Map memory )
    {
        this.memory = memory;
    }

    /**
     * Getter to return the current memory structure.
     *
     * @return an object with the whole memory of this conversation object
     */
    @Nullable
    public Map getMemory()
    {
        return memory;
    }

    /**
     * Setter to entirely replacer the memory of this conversation
     * 
     * @param memory
     *            the new memory
     */
    public void setMemory( @Nullable final Map memory )
    {
        this.memory = memory;
    }

    /**
     * Get the (new) language to set the conversation to (optional).
     * 
     * @return 2 letter code.
     */
    @Nullable
    public String getLanguage()
    {
        return language;
    }

    /**
     * Set the language this conversation should be switched to. Optional.
     * 
     * @param language
     *            a language iso code (2 letters).
     */
    public void setLanguage( @Nullable final String language )
    {
        this.language = language;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy