Class ChatResponse.Builder
- java.lang.Object
-
- com.oracle.bmc.generativeaiagentruntime.responses.ChatResponse.Builder
-
- All Implemented Interfaces:
BmcResponse.Builder<ChatResponse>
- Enclosing class:
- ChatResponse
public static class ChatResponse.Builder extends Object implements BmcResponse.Builder<ChatResponse>
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChatResponse.Builder
__httpStatusCode__(int __httpStatusCode__)
ChatResponse
build()
Build the response object.ChatResponse.Builder
chatResult(ChatResult chatResult)
The returned ChatResult instance.ChatResponse.Builder
copy(ChatResponse o)
Copy method to populate the builder with values from the given instance.ChatResponse.Builder
eventStream(InputStream eventStream)
Returns the event-stream for operations that support ‘text/event-stream’ media type.ChatResponse.Builder
headers(Map<String,List<String>> headers)
ChatResponse.Builder
opcRequestId(String opcRequestId)
Unique Oracle-assigned identifier for the request.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.oracle.bmc.responses.BmcResponse.Builder
isNotModified
-
-
-
-
Method Detail
-
__httpStatusCode__
public ChatResponse.Builder __httpStatusCode__(int __httpStatusCode__)
- Specified by:
__httpStatusCode__
in interfaceBmcResponse.Builder<ChatResponse>
-
headers
public ChatResponse.Builder headers(Map<String,List<String>> headers)
- Specified by:
headers
in interfaceBmcResponse.Builder<ChatResponse>
-
opcRequestId
public ChatResponse.Builder opcRequestId(String opcRequestId)
Unique Oracle-assigned identifier for the request.If you need to contact Oracle about a particular request, please provide the request ID.
- Parameters:
opcRequestId
- the value to set- Returns:
- this builder
-
chatResult
public ChatResponse.Builder chatResult(ChatResult chatResult)
The returned ChatResult instance.- Parameters:
chatResult
- the value to set- Returns:
- this builder
-
eventStream
public ChatResponse.Builder eventStream(InputStream eventStream)
Returns the event-stream for operations that support ‘text/event-stream’ media type.The value can be null in-case a non-streamed response is returned by the server. NOTE : Use try-with-resources or explicitly call eventStream.close() to close the stream. This is important to avoid the issue mentioned in the link below https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdktroubleshooting.htm#javasdktroubleshooting_topic_program_hangs_for_an_indefinite_time
- Returns:
- the event-stream
-
copy
public ChatResponse.Builder copy(ChatResponse o)
Copy method to populate the builder with values from the given instance.- Specified by:
copy
in interfaceBmcResponse.Builder<ChatResponse>
- Parameters:
o
- other request from which to copy values- Returns:
- this builder instance
-
build
public ChatResponse build()
Build the response object.- Specified by:
build
in interfaceBmcResponse.Builder<ChatResponse>
- Returns:
- the response object
-
-