Package io.elastic.api
Class Message.Builder
java.lang.Object
io.elastic.api.Message.Builder
- Enclosing class:
- Message
Used to build
Message
instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattachments
(jakarta.json.JsonObject attachments) Adds attachments to build message with.body
(jakarta.json.JsonObject body) Adds a body to build message with.build()
Builds aMessage
instance and returns it.headers
(jakarta.json.JsonObject headers) Adds a headers to build message with.Sets message id.Adds method to build message with.originalUrl
(String originalUrl) Adds originalUrl to build message with.passthrough
(jakarta.json.JsonObject passthrough) Adds passthrough to build message with.query
(jakarta.json.JsonObject query) Adds query to build message with.Adds url to build message with.
-
Constructor Details
-
Builder
public Builder()Default constructor.
-
-
Method Details
-
id
Sets message id.- Parameters:
id
- id for the message- Returns:
- same builder instance
-
attachments
Adds attachments to build message with.- Parameters:
attachments
- attachments for the message- Returns:
- same builder instance
-
body
Adds a body to build message with.- Parameters:
body
- body for the message- Returns:
- same builder instance
-
headers
Adds a headers to build message with.- Parameters:
headers
- headers for the message- Returns:
- same builder instance
-
method
Adds method to build message with.- Parameters:
method
- method for the message- Returns:
- same builder instance
-
originalUrl
Adds originalUrl to build message with.- Parameters:
originalUrl
- originalUrl for the message- Returns:
- same builder instance
-
query
Adds query to build message with.- Parameters:
query
- query for the message- Returns:
- same builder instance
-
passthrough
Adds passthrough to build message with.- Parameters:
passthrough
- passthrough for the message- Returns:
- same builder instance
-
url
Adds url to build message with.- Parameters:
url
- url for the message- Returns:
- same builder instance
-
build
Builds aMessage
instance and returns it.- Returns:
- Message
-