Class Message.Builder
- 
                    
                    - All Implemented Interfaces:
 
 public final class Message.BuilderA builder for Message. 
- 
                
                    
                    - 
                                
                            
                                Method SummaryModifier and Type Method Description final Message.Builderid(String id)The identifier, which can be referenced in API endpoints. final Message.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final Message.BuilderassistantId(String assistantId)If applicable, the ID of the assistant that authored this message. final Message.BuilderassistantId(Optional<String> assistantId)Alias for calling Builder.assistantId with assistantId.orElse(null).final Message.BuilderassistantId(JsonField<String> assistantId)Sets Builder.assistantId to an arbitrary JSON value. final Message.Builderattachments(List<Message.Attachment> attachments)A list of files attached to the message, and the tools they were added to. final Message.Builderattachments(Optional<List<Message.Attachment>> attachments)Alias for calling Builder.attachments with attachments.orElse(null).final Message.Builderattachments(JsonField<List<Message.Attachment>> attachments)Sets Builder.attachments to an arbitrary JSON value. final Message.BuilderaddAttachment(Message.Attachment attachment)Adds a single Attachment to attachments. final Message.BuildercompletedAt(Long completedAt)The Unix timestamp (in seconds) for when the message was completed. final Message.BuildercompletedAt(Long completedAt)Alias for Builder.completedAt. final Message.BuildercompletedAt(Optional<Long> completedAt)Alias for calling Builder.completedAt with completedAt.orElse(null).final Message.BuildercompletedAt(JsonField<Long> completedAt)Sets Builder.completedAt to an arbitrary JSON value. final Message.Buildercontent(List<MessageContent> content)The content of the message in array of text and/or images. final Message.Buildercontent(JsonField<List<MessageContent>> content)Sets Builder.content to an arbitrary JSON value. final Message.BuilderaddContent(MessageContent content)Adds a single MessageContent to Builder.content. final Message.BuilderaddContent(ImageFileContentBlock imageFile)Alias for calling addContent with MessageContent.ofImageFile(imageFile).final Message.BuilderaddContent(ImageUrlContentBlock imageUrl)Alias for calling addContent with MessageContent.ofImageUrl(imageUrl).final Message.BuilderaddContent(TextContentBlock text)Alias for calling addContent with MessageContent.ofText(text).final Message.BuilderaddContent(RefusalContentBlock refusal)Alias for calling addContent with MessageContent.ofRefusal(refusal).final Message.BuilderaddImageFileContent(ImageFile imageFile)Alias for calling addContent with the following: ImageFileContentBlock.builder() .imageFile(imageFile) .build()final Message.BuilderaddImageUrlContent(ImageUrl imageUrl)Alias for calling addContent with the following: ImageUrlContentBlock.builder() .imageUrl(imageUrl) .build()final Message.BuilderaddTextContent(Text text)Alias for calling addContent with the following: TextContentBlock.builder() .text(text) .build()final Message.BuilderaddRefusalContent(String refusal)Alias for calling addContent with the following: RefusalContentBlock.builder() .refusal(refusal) .build()final Message.BuildercreatedAt(Long createdAt)The Unix timestamp (in seconds) for when the message was created. final Message.BuildercreatedAt(JsonField<Long> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final Message.BuilderincompleteAt(Long incompleteAt)The Unix timestamp (in seconds) for when the message was marked as incomplete. final Message.BuilderincompleteAt(Long incompleteAt)Alias for Builder.incompleteAt. final Message.BuilderincompleteAt(Optional<Long> incompleteAt)Alias for calling Builder.incompleteAt with incompleteAt.orElse(null).final Message.BuilderincompleteAt(JsonField<Long> incompleteAt)Sets Builder.incompleteAt to an arbitrary JSON value. final Message.BuilderincompleteDetails(Message.IncompleteDetails incompleteDetails)On an incomplete message, details about why the message is incomplete. final Message.BuilderincompleteDetails(Optional<Message.IncompleteDetails> incompleteDetails)Alias for calling Builder.incompleteDetails with incompleteDetails.orElse(null).final Message.BuilderincompleteDetails(JsonField<Message.IncompleteDetails> incompleteDetails)Sets Builder.incompleteDetails to an arbitrary JSON value. final Message.Buildermetadata(Message.Metadata metadata)Set of 16 key-value pairs that can be attached to an object. final Message.Buildermetadata(Optional<Message.Metadata> metadata)Alias for calling Builder.metadata with metadata.orElse(null).final Message.Buildermetadata(JsonField<Message.Metadata> metadata)Sets Builder.metadata to an arbitrary JSON value. final Message.Builderobject_(JsonValue object_)Sets the field to an arbitrary JSON value. final Message.Builderrole(Message.Role role)The entity that produced the message. final Message.Builderrole(JsonField<Message.Role> role)Sets Builder.role to an arbitrary JSON value. final Message.BuilderrunId(String runId)The ID of the run associated with the creation of this message. final Message.BuilderrunId(Optional<String> runId)Alias for calling Builder.runId with runId.orElse(null).final Message.BuilderrunId(JsonField<String> runId)Sets Builder.runId to an arbitrary JSON value. final Message.Builderstatus(Message.Status status)The status of the message, which can be either in_progress,incomplete, orcompleted.final Message.Builderstatus(JsonField<Message.Status> status)Sets Builder.status to an arbitrary JSON value. final Message.BuilderthreadId(String threadId)The thread ID that this message belongs to. final Message.BuilderthreadId(JsonField<String> threadId)Sets Builder.threadId to an arbitrary JSON value. final Message.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Message.BuilderputAdditionalProperty(String key, JsonValue value)final Message.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Message.BuilderremoveAdditionalProperty(String key)final Message.BuilderremoveAllAdditionalProperties(Set<String> keys)final Messagebuild()Returns an immutable instance of Message. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        idfinal Message.Builder id(String id) The identifier, which can be referenced in API endpoints. 
 - 
                                        idfinal Message.Builder id(JsonField<String> id) Sets Builder.id to an arbitrary JSON value. You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        assistantIdfinal Message.Builder assistantId(String assistantId) If applicable, the ID of the assistant that authored this message. 
 - 
                                        assistantIdfinal Message.Builder assistantId(Optional<String> assistantId) Alias for calling Builder.assistantId with assistantId.orElse(null).
 - 
                                        assistantIdfinal Message.Builder assistantId(JsonField<String> assistantId) Sets Builder.assistantId to an arbitrary JSON value. You should usually call Builder.assistantId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        attachmentsfinal Message.Builder attachments(List<Message.Attachment> attachments) A list of files attached to the message, and the tools they were added to. 
 - 
                                        attachmentsfinal Message.Builder attachments(Optional<List<Message.Attachment>> attachments) Alias for calling Builder.attachments with attachments.orElse(null).
 - 
                                        attachmentsfinal Message.Builder attachments(JsonField<List<Message.Attachment>> attachments) Sets Builder.attachments to an arbitrary JSON value. You should usually call Builder.attachments with a well-typed List<Attachment>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 - 
                                        addAttachmentfinal Message.Builder addAttachment(Message.Attachment attachment) Adds a single Attachment to attachments. 
 - 
                                        completedAtfinal Message.Builder completedAt(Long completedAt) The Unix timestamp (in seconds) for when the message was completed. 
 - 
                                        completedAtfinal Message.Builder completedAt(Long completedAt) Alias for Builder.completedAt. This unboxed primitive overload exists for backwards compatibility. 
 - 
                                        completedAtfinal Message.Builder completedAt(Optional<Long> completedAt) Alias for calling Builder.completedAt with completedAt.orElse(null).
 - 
                                        completedAtfinal Message.Builder completedAt(JsonField<Long> completedAt) Sets Builder.completedAt to an arbitrary JSON value. You should usually call Builder.completedAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        contentfinal Message.Builder content(List<MessageContent> content) The content of the message in array of text and/or images. 
 - 
                                        contentfinal Message.Builder content(JsonField<List<MessageContent>> content) Sets Builder.content to an arbitrary JSON value. You should usually call Builder.content with a well-typed List<MessageContent>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 - 
                                        addContentfinal Message.Builder addContent(MessageContent content) Adds a single MessageContent to Builder.content. 
 - 
                                        addContentfinal Message.Builder addContent(ImageFileContentBlock imageFile) Alias for calling addContent with MessageContent.ofImageFile(imageFile).
 - 
                                        addContentfinal Message.Builder addContent(ImageUrlContentBlock imageUrl) Alias for calling addContent with MessageContent.ofImageUrl(imageUrl).
 - 
                                        addContentfinal Message.Builder addContent(TextContentBlock text) Alias for calling addContent with MessageContent.ofText(text).
 - 
                                        addContentfinal Message.Builder addContent(RefusalContentBlock refusal) Alias for calling addContent with MessageContent.ofRefusal(refusal).
 - 
                                        addImageFileContentfinal Message.Builder addImageFileContent(ImageFile imageFile) Alias for calling addContent with the following: ImageFileContentBlock.builder() .imageFile(imageFile) .build()
 - 
                                        addImageUrlContentfinal Message.Builder addImageUrlContent(ImageUrl imageUrl) Alias for calling addContent with the following: ImageUrlContentBlock.builder() .imageUrl(imageUrl) .build()
 - 
                                        addTextContentfinal Message.Builder addTextContent(Text text) Alias for calling addContent with the following: TextContentBlock.builder() .text(text) .build()
 - 
                                        addRefusalContentfinal Message.Builder addRefusalContent(String refusal) Alias for calling addContent with the following: RefusalContentBlock.builder() .refusal(refusal) .build()
 - 
                                        createdAtfinal Message.Builder createdAt(Long createdAt) The Unix timestamp (in seconds) for when the message was created. 
 - 
                                        createdAtfinal Message.Builder createdAt(JsonField<Long> createdAt) Sets Builder.createdAt to an arbitrary JSON value. You should usually call Builder.createdAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        incompleteAtfinal Message.Builder incompleteAt(Long incompleteAt) The Unix timestamp (in seconds) for when the message was marked as incomplete. 
 - 
                                        incompleteAtfinal Message.Builder incompleteAt(Long incompleteAt) Alias for Builder.incompleteAt. This unboxed primitive overload exists for backwards compatibility. 
 - 
                                        incompleteAtfinal Message.Builder incompleteAt(Optional<Long> incompleteAt) Alias for calling Builder.incompleteAt with incompleteAt.orElse(null).
 - 
                                        incompleteAtfinal Message.Builder incompleteAt(JsonField<Long> incompleteAt) Sets Builder.incompleteAt to an arbitrary JSON value. You should usually call Builder.incompleteAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        incompleteDetailsfinal Message.Builder incompleteDetails(Message.IncompleteDetails incompleteDetails) On an incomplete message, details about why the message is incomplete. 
 - 
                                        incompleteDetailsfinal Message.Builder incompleteDetails(Optional<Message.IncompleteDetails> incompleteDetails) Alias for calling Builder.incompleteDetails with incompleteDetails.orElse(null).
 - 
                                        incompleteDetailsfinal Message.Builder incompleteDetails(JsonField<Message.IncompleteDetails> incompleteDetails) Sets Builder.incompleteDetails to an arbitrary JSON value. You should usually call Builder.incompleteDetails with a well-typed IncompleteDetails value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        metadatafinal Message.Builder metadata(Message.Metadata metadata) Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. 
 - 
                                        metadatafinal Message.Builder metadata(Optional<Message.Metadata> metadata) Alias for calling Builder.metadata with metadata.orElse(null).
 - 
                                        metadatafinal Message.Builder metadata(JsonField<Message.Metadata> metadata) Sets Builder.metadata to an arbitrary JSON value. You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        object_final Message.Builder object_(JsonValue object_) Sets the field to an arbitrary JSON value. It is usually unnecessary to call this method because the field defaults to the following: JsonValue.from("thread.message")This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        rolefinal Message.Builder role(Message.Role role) The entity that produced the message. One of userorassistant.
 - 
                                        rolefinal Message.Builder role(JsonField<Message.Role> role) Sets Builder.role to an arbitrary JSON value. You should usually call Builder.role with a well-typed Role value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        runIdfinal Message.Builder runId(String runId) The ID of the run associated with the creation of this message. Value is nullwhen messages are created manually using the create message or create thread endpoints.
 - 
                                        runIdfinal Message.Builder runId(Optional<String> runId) Alias for calling Builder.runId with runId.orElse(null).
 - 
                                        runIdfinal Message.Builder runId(JsonField<String> runId) Sets Builder.runId to an arbitrary JSON value. You should usually call Builder.runId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        statusfinal Message.Builder status(Message.Status status) The status of the message, which can be either in_progress,incomplete, orcompleted.
 - 
                                        statusfinal Message.Builder status(JsonField<Message.Status> status) Sets Builder.status to an arbitrary JSON value. You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        threadIdfinal Message.Builder threadId(String threadId) The thread ID that this message belongs to. 
 - 
                                        threadIdfinal Message.Builder threadId(JsonField<String> threadId) Sets Builder.threadId to an arbitrary JSON value. You should usually call Builder.threadId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        additionalPropertiesfinal Message.Builder additionalProperties(Map<String, JsonValue> additionalProperties) 
 - 
                                        putAdditionalPropertyfinal Message.Builder putAdditionalProperty(String key, JsonValue value) 
 - 
                                        putAllAdditionalPropertiesfinal Message.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties) 
 - 
                                        removeAdditionalPropertyfinal Message.Builder removeAdditionalProperty(String key) 
 - 
                                        removeAllAdditionalPropertiesfinal Message.Builder removeAllAdditionalProperties(Set<String> keys) 
 - 
                                        buildfinal Message build() Returns an immutable instance of Message. Further updates to this Builder will not mutate the returned instance. The following fields are required: .id() .assistantId() .attachments() .completedAt() .content() .createdAt() .incompleteAt() .incompleteDetails() .metadata() .role() .runId() .status() .threadId()
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-