Class FilePart
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockagentruntime.model.FilePart
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ResponseStream
,ToCopyableBuilder<FilePart.Builder,FilePart>
- Direct Known Subclasses:
DefaultFiles
@Generated("software.amazon.awssdk:codegen") public class FilePart extends Object implements SdkPojo, Serializable, ToCopyableBuilder<FilePart.Builder,FilePart>, ResponseStream
Contains intermediate response for code interpreter if any files have been generated.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FilePart.Builder
protected static class
FilePart.BuilderImpl
-
Nested classes/interfaces inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.ResponseStream
ResponseStream.EventType
-
-
Field Summary
-
Fields inherited from interface software.amazon.awssdk.services.bedrockagentruntime.model.ResponseStream
UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FilePart(FilePart.BuilderImpl builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(InvokeAgentResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype ofFilePart
.static FilePart.Builder
builder()
FilePart
copy(Consumer<? super FilePart.Builder> modifier)
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
List<OutputFile>
files()
Files containing intermediate response for the user.<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
boolean
hasFiles()
For responses, this returns true if the service returned a value for the Files property.int
hashCode()
Map<String,SdkField<?>>
sdkFieldNameToField()
List<SdkField<?>>
sdkFields()
static Class<? extends FilePart.Builder>
serializableBuilderClass()
FilePart.Builder
toBuilder()
String
toString()
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.ResponseStream
sdkEventType
-
-
-
-
Constructor Detail
-
FilePart
protected FilePart(FilePart.BuilderImpl builder)
-
-
Method Detail
-
hasFiles
public final boolean hasFiles()
For responses, this returns true if the service returned a value for the Files 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.
-
files
public final List<OutputFile> files()
Files containing intermediate response for the user.
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
hasFiles()
method.- Returns:
- Files containing intermediate response for the user.
-
toBuilder
public FilePart.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<FilePart.Builder,FilePart>
-
builder
public static FilePart.Builder builder()
-
serializableBuilderClass
public static Class<? extends FilePart.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in 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 FilePart copy(Consumer<? super FilePart.Builder> modifier)
- Specified by:
copy
in interfaceToCopyableBuilder<FilePart.Builder,FilePart>
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
-
accept
public void accept(InvokeAgentResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype ofFilePart
.- Specified by:
accept
in interfaceResponseStream
- Parameters:
visitor
- Visitor to invoke.
-
-