@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Citation extends Object implements Serializable, Cloneable, StructuredPojo
An object containing a segment of the generated response that is based on a source in the knowledge base, alongside information about the source.
This data type is used in the following API operations:
InvokeAgent response – in the citations
field
RetrieveAndGenerate response – in the citations
field
Constructor and Description |
---|
Citation() |
Modifier and Type | Method and Description |
---|---|
Citation |
clone() |
boolean |
equals(Object obj) |
GeneratedResponsePart |
getGeneratedResponsePart()
Contains the generated response and metadata
|
List<RetrievedReference> |
getRetrievedReferences()
Contains metadata about the sources cited for the generated response.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setGeneratedResponsePart(GeneratedResponsePart generatedResponsePart)
Contains the generated response and metadata
|
void |
setRetrievedReferences(Collection<RetrievedReference> retrievedReferences)
Contains metadata about the sources cited for the generated response.
|
String |
toString()
Returns a string representation of this object.
|
Citation |
withGeneratedResponsePart(GeneratedResponsePart generatedResponsePart)
Contains the generated response and metadata
|
Citation |
withRetrievedReferences(Collection<RetrievedReference> retrievedReferences)
Contains metadata about the sources cited for the generated response.
|
Citation |
withRetrievedReferences(RetrievedReference... retrievedReferences)
Contains metadata about the sources cited for the generated response.
|
public void setGeneratedResponsePart(GeneratedResponsePart generatedResponsePart)
Contains the generated response and metadata
generatedResponsePart
- Contains the generated response and metadatapublic GeneratedResponsePart getGeneratedResponsePart()
Contains the generated response and metadata
public Citation withGeneratedResponsePart(GeneratedResponsePart generatedResponsePart)
Contains the generated response and metadata
generatedResponsePart
- Contains the generated response and metadatapublic List<RetrievedReference> getRetrievedReferences()
Contains metadata about the sources cited for the generated response.
public void setRetrievedReferences(Collection<RetrievedReference> retrievedReferences)
Contains metadata about the sources cited for the generated response.
retrievedReferences
- Contains metadata about the sources cited for the generated response.public Citation withRetrievedReferences(RetrievedReference... retrievedReferences)
Contains metadata about the sources cited for the generated response.
NOTE: This method appends the values to the existing list (if any). Use
setRetrievedReferences(java.util.Collection)
or withRetrievedReferences(java.util.Collection)
if you want to override the existing values.
retrievedReferences
- Contains metadata about the sources cited for the generated response.public Citation withRetrievedReferences(Collection<RetrievedReference> retrievedReferences)
Contains metadata about the sources cited for the generated response.
retrievedReferences
- Contains metadata about the sources cited for the generated response.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.