Class AgentResponsesPayloadBuilder
- All Implemented Interfaces:
Builder<AgentResponsesPayload>
Example to create an instance using the builder pattern
AgentResponsesPayload agentResponsesPayload = AgentResponsesPayload.builder()
.outputType(AgentResponsesOutputType.CART)
.locale("{locale}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds AgentResponsesPayload with checking for non-null required valuesbuilds AgentResponsesPayload without checking for non-null required valuesbusinessUnit(BusinessUnitResourceIdentifier businessUnit) BusinessUnit to use for the request.businessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) BusinessUnit to use for the request.BusinessUnit to use for the request.A valid BCP 47 language tag, for exampleen-US.The entity to create.Natural-language description of the desired Cart or Quote Request, such as the body of an email or a note.getStore()Store to use for the request.A valid BCP 47 language tag, for exampleen-US.static AgentResponsesPayloadBuilderof()factory method for an instance of AgentResponsesPayloadBuilderstatic AgentResponsesPayloadBuilderof(AgentResponsesPayload template) create builder for AgentResponsesPayload instanceoutputType(AgentResponsesOutputType outputType) The entity to create.Natural-language description of the desired Cart or Quote Request, such as the body of an email or a note.store(StoreResourceIdentifier store) Store to use for the request.Store to use for the request.withBusinessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) BusinessUnit to use for the request.Store to use for the request.
-
Constructor Details
-
AgentResponsesPayloadBuilder
public AgentResponsesPayloadBuilder()
-
-
Method Details
-
outputType
The entity to create.
- Parameters:
outputType- value to be set- Returns:
- Builder
-
locale
A valid BCP 47 language tag, for example
en-US.- Parameters:
locale- value to be set- Returns:
- Builder
-
prompt
Natural-language description of the desired Cart or Quote Request, such as the body of an email or a note. Required if no file is attached.
- Parameters:
prompt- value to be set- Returns:
- Builder
-
businessUnit
public AgentResponsesPayloadBuilder businessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from the input.
- Parameters:
builder- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
public AgentResponsesPayloadBuilder withBusinessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from the input.
- Parameters:
builder- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
public AgentResponsesPayloadBuilder businessUnit(@Nullable BusinessUnitResourceIdentifier businessUnit) BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from the input.
- Parameters:
businessUnit- value to be set- Returns:
- Builder
-
store
public AgentResponsesPayloadBuilder store(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifierBuilder> builder) Store to use for the request. If omitted, the Intake Agent resolves it from the input.
- Parameters:
builder- function to build the store value- Returns:
- Builder
-
withStore
public AgentResponsesPayloadBuilder withStore(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifier> builder) Store to use for the request. If omitted, the Intake Agent resolves it from the input.
- Parameters:
builder- function to build the store value- Returns:
- Builder
-
store
Store to use for the request. If omitted, the Intake Agent resolves it from the input.
- Parameters:
store- value to be set- Returns:
- Builder
-
getOutputType
The entity to create.
- Returns:
- outputType
-
getLocale
A valid BCP 47 language tag, for example
en-US.- Returns:
- locale
-
getPrompt
Natural-language description of the desired Cart or Quote Request, such as the body of an email or a note. Required if no file is attached.
- Returns:
- prompt
-
getBusinessUnit
BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from the input.
- Returns:
- businessUnit
-
getStore
Store to use for the request. If omitted, the Intake Agent resolves it from the input.
- Returns:
- store
-
build
builds AgentResponsesPayload with checking for non-null required values- Specified by:
buildin interfaceBuilder<AgentResponsesPayload>- Returns:
- AgentResponsesPayload
-
buildUnchecked
builds AgentResponsesPayload without checking for non-null required values- Returns:
- AgentResponsesPayload
-
of
factory method for an instance of AgentResponsesPayloadBuilder- Returns:
- builder
-
of
create builder for AgentResponsesPayload instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-