Class CitationEvent
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockagentruntime.model.CitationEvent
-
- All Implemented Interfaces:
Serializable,SdkPojo,RetrieveAndGenerateStreamResponseOutput,ToCopyableBuilder<CitationEvent.Builder,CitationEvent>
- Direct Known Subclasses:
DefaultCitation
@Generated("software.amazon.awssdk:codegen") public class CitationEvent extends Object implements SdkPojo, Serializable, ToCopyableBuilder<CitationEvent.Builder,CitationEvent>, RetrieveAndGenerateStreamResponseOutput
A citation event.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCitationEvent.Builderprotected static classCitationEvent.BuilderImpl-
Nested classes/interfaces inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveAndGenerateStreamResponseOutput
RetrieveAndGenerateStreamResponseOutput.EventType
-
-
Field Summary
-
Fields inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveAndGenerateStreamResponseOutput
UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCitationEvent(CitationEvent.BuilderImpl builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaccept(RetrieveAndGenerateStreamResponseHandler.Visitor visitor)Calls the appropriate visit method depending on the subtype ofCitationEvent.static CitationEvent.Builderbuilder()Citationcitation()Deprecated.Citation is deprecated.CitationEventcopy(Consumer<? super CitationEvent.Builder> modifier)booleanequals(Object obj)booleanequalsBySdkFields(Object obj)GeneratedResponsePartgeneratedResponsePart()The generated response to the citation event.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasRetrievedReferences()For responses, this returns true if the service returned a value for the RetrievedReferences property.List<RetrievedReference>retrievedReferences()The retrieved references of the citation event.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends CitationEvent.Builder>serializableBuilderClass()CitationEvent.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveAndGenerateStreamResponseOutput
sdkEventType
-
-
-
-
Constructor Detail
-
CitationEvent
protected CitationEvent(CitationEvent.BuilderImpl builder)
-
-
Method Detail
-
citation
@Deprecated public final Citation citation()
Deprecated.Citation is deprecated. Please use GeneratedResponsePart and RetrievedReferences for citation event.The citation.
- Returns:
- The citation.
-
generatedResponsePart
public final GeneratedResponsePart generatedResponsePart()
The generated response to the citation event.
- Returns:
- The generated response to the citation event.
-
hasRetrievedReferences
public final boolean hasRetrievedReferences()
For responses, this returns true if the service returned a value for the RetrievedReferences property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
retrievedReferences
public final List<RetrievedReference> retrievedReferences()
The retrieved references of the citation event.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRetrievedReferences()method.- Returns:
- The retrieved references of the citation event.
-
toBuilder
public CitationEvent.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CitationEvent.Builder,CitationEvent>
-
builder
public static CitationEvent.Builder builder()
-
serializableBuilderClass
public static Class<? extends CitationEvent.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
copy
public final CitationEvent copy(Consumer<? super CitationEvent.Builder> modifier)
- Specified by:
copyin interfaceToCopyableBuilder<CitationEvent.Builder,CitationEvent>
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
accept
public void accept(RetrieveAndGenerateStreamResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype ofCitationEvent.- Specified by:
acceptin interfaceRetrieveAndGenerateStreamResponseOutput- Parameters:
visitor- Visitor to invoke.
-
-