com.sap.cloud.sdk.services.recastai.botresponses.CarouselResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of recast-ai Show documentation
Show all versions of recast-ai Show documentation
Integration of SAP Conversational AI, aka Recast AI
(Beta release, still subject to change - up to discontinuation of module).
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.cloud.sdk.services.recastai.botresponses;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.annotations.Beta;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* This class is the outermost wrapper for a carousel response to be sent to a conversation.
*/
@Beta
public class CarouselResponse implements ResponseInterface
{
@SerializedName( "type" )
@Expose
private final String type = "carousel";
@SerializedName( "content" )
@Expose
private List content;
/**
* Contructor allows to create a CarouselResponse with an existing List of CardContent
*
* @param content
* a list of CardContent
*/
public CarouselResponse( @Nonnull final List content )
{
this.content = content;
}
/**
* Returns the List of CardContents which are currently the content of this object.
*
* @return a List of all CardContent objects
*/
@Nullable
public List getContent()
{
return content;
}
/**
* Sets the Content to the given List of CardContents.
*
* @param content
* a list of card contents
*/
public void setContent( @Nonnull final List content )
{
this.content = content;
}
/**
* returns the present type, which is immutable to the user. Follows the Response types of Recast
*
* @return the type of this response (carousel)
*/
@Nullable
@Override
public String getType()
{
return type;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy