Class AgentResponsesRequestBuilder
- All Implemented Interfaces:
Builder<AgentResponsesRequest>
Example to create an instance using the builder pattern
AgentResponsesRequest agentResponsesRequest = AgentResponsesRequest.builder()
.outputType(AgentResponsesOutputType.CART)
.locale("{locale}")
.prompt("{prompt}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds AgentResponsesRequest with checking for non-null required valuesbuilds AgentResponsesRequest 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 AgentResponsesRequestBuilderof()factory method for an instance of AgentResponsesRequestBuilderstatic AgentResponsesRequestBuilderof(AgentResponsesRequest template) create builder for AgentResponsesRequest 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
-
AgentResponsesRequestBuilder
public AgentResponsesRequestBuilder()
-
-
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.
- Parameters:
prompt- value to be set- Returns:
- Builder
-
businessUnit
public AgentResponsesRequestBuilder businessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from
prompt.- Parameters:
builder- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
public AgentResponsesRequestBuilder withBusinessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from
prompt.- Parameters:
builder- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
public AgentResponsesRequestBuilder businessUnit(@Nullable BusinessUnitResourceIdentifier businessUnit) BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from
prompt.- Parameters:
businessUnit- value to be set- Returns:
- Builder
-
store
public AgentResponsesRequestBuilder store(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifierBuilder> builder) Store to use for the request. If omitted, the Intake Agent resolves it from
prompt.- Parameters:
builder- function to build the store value- Returns:
- Builder
-
withStore
public AgentResponsesRequestBuilder withStore(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifier> builder) Store to use for the request. If omitted, the Intake Agent resolves it from
prompt.- 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
prompt.- 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.
- Returns:
- prompt
-
getBusinessUnit
BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from
prompt.- Returns:
- businessUnit
-
getStore
Store to use for the request. If omitted, the Intake Agent resolves it from
prompt.- Returns:
- store
-
build
builds AgentResponsesRequest with checking for non-null required values- Specified by:
buildin interfaceBuilder<AgentResponsesRequest>- Returns:
- AgentResponsesRequest
-
buildUnchecked
builds AgentResponsesRequest without checking for non-null required values- Returns:
- AgentResponsesRequest
-
of
factory method for an instance of AgentResponsesRequestBuilder- Returns:
- builder
-
of
create builder for AgentResponsesRequest instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-