Class MessageStopEvent
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockruntime.model.MessageStopEvent
-
- All Implemented Interfaces:
Serializable,SdkPojo,ConverseStreamOutput,ToCopyableBuilder<MessageStopEvent.Builder,MessageStopEvent>
- Direct Known Subclasses:
DefaultMessageStop
@Generated("software.amazon.awssdk:codegen") public class MessageStopEvent extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MessageStopEvent.Builder,MessageStopEvent>, ConverseStreamOutput
The stop event for a message.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMessageStopEvent.Builderprotected static classMessageStopEvent.BuilderImpl-
Nested classes/interfaces inherited from interface software.amazon.awssdk.services.bedrockruntime.model.ConverseStreamOutput
ConverseStreamOutput.EventType
-
-
Field Summary
-
Fields inherited from interface software.amazon.awssdk.services.bedrockruntime.model.ConverseStreamOutput
UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMessageStopEvent(MessageStopEvent.BuilderImpl builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ConverseStreamResponseHandler.Visitor visitor)Calls the appropriate visit method depending on the subtype ofMessageStopEvent.DocumentadditionalModelResponseFields()The additional model response fields.static MessageStopEvent.Builderbuilder()MessageStopEventcopy(Consumer<? super MessageStopEvent.Builder> modifier)booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()List<SdkField<?>>sdkFields()static Class<? extends MessageStopEvent.Builder>serializableBuilderClass()StopReasonstopReason()The reason why the model stopped generating output.StringstopReasonAsString()The reason why the model stopped generating output.MessageStopEvent.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.bedrockruntime.model.ConverseStreamOutput
sdkEventType
-
-
-
-
Constructor Detail
-
MessageStopEvent
protected MessageStopEvent(MessageStopEvent.BuilderImpl builder)
-
-
Method Detail
-
stopReason
public final StopReason stopReason()
The reason why the model stopped generating output.
If the service returns an enum value that is not available in the current SDK version,
stopReasonwill returnStopReason.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstopReasonAsString().- Returns:
- The reason why the model stopped generating output.
- See Also:
StopReason
-
stopReasonAsString
public final String stopReasonAsString()
The reason why the model stopped generating output.
If the service returns an enum value that is not available in the current SDK version,
stopReasonwill returnStopReason.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstopReasonAsString().- Returns:
- The reason why the model stopped generating output.
- See Also:
StopReason
-
additionalModelResponseFields
public final Document additionalModelResponseFields()
The additional model response fields.
- Returns:
- The additional model response fields.
-
toBuilder
public MessageStopEvent.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<MessageStopEvent.Builder,MessageStopEvent>
-
builder
public static MessageStopEvent.Builder builder()
-
serializableBuilderClass
public static Class<? extends MessageStopEvent.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 MessageStopEvent copy(Consumer<? super MessageStopEvent.Builder> modifier)
- Specified by:
copyin interfaceToCopyableBuilder<MessageStopEvent.Builder,MessageStopEvent>
-
accept
public void accept(ConverseStreamResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype ofMessageStopEvent.- Specified by:
acceptin interfaceConverseStreamOutput- Parameters:
visitor- Visitor to invoke.
-
-