Interface AgentResponsesRequest


public interface AgentResponsesRequest

JSON body for an application/json /responses request to the Intake Agent. prompt is required.

To attach files, send a multipart/form-data request with an AgentResponsesPayload as the payload part.


Example to create an instance using the builder pattern

     AgentResponsesRequest agentResponsesRequest = AgentResponsesRequest.builder()
             .outputType(AgentResponsesOutputType.CART)
             .locale("{locale}")
             .prompt("{prompt}")
             .build()
 
  • Method Details

    • getOutputType

      @NotNull @NotNull AgentResponsesOutputType getOutputType()

      The entity to create.

      Returns:
      outputType
    • getLocale

      @NotNull @NotNull String getLocale()

      A valid BCP 47 language tag, for example en-US.

      Returns:
      locale
    • getPrompt

      @NotNull @NotNull String getPrompt()

      Natural-language description of the desired Cart or Quote Request, such as the body of an email or a note.

      Returns:
      prompt
    • getBusinessUnit

      @Valid @Valid BusinessUnitResourceIdentifier getBusinessUnit()

      BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from prompt.

      Returns:
      businessUnit
    • getStore

      @Valid @Valid StoreResourceIdentifier getStore()

      Store to use for the request. If omitted, the Intake Agent resolves it from prompt.

      Returns:
      store
    • setOutputType

      void setOutputType(AgentResponsesOutputType outputType)

      The entity to create.

      Parameters:
      outputType - value to be set
    • setLocale

      void setLocale(String locale)

      A valid BCP 47 language tag, for example en-US.

      Parameters:
      locale - value to be set
    • setPrompt

      void setPrompt(String 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
    • setBusinessUnit

      void setBusinessUnit(BusinessUnitResourceIdentifier businessUnit)

      BusinessUnit to use for the request. If omitted, the Intake Agent resolves it from prompt.

      Parameters:
      businessUnit - value to be set
    • setStore

      void setStore(StoreResourceIdentifier store)

      Store to use for the request. If omitted, the Intake Agent resolves it from prompt.

      Parameters:
      store - value to be set
    • of

      static AgentResponsesRequest of()
      factory method
      Returns:
      instance of AgentResponsesRequest
    • of

      factory method to create a shallow copy AgentResponsesRequest
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

    • deepCopy

      @Nullable static AgentResponsesRequest deepCopy(@Nullable AgentResponsesRequest template)
      factory method to create a deep copy of AgentResponsesRequest
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static AgentResponsesRequestBuilder builder()
      builder factory method for AgentResponsesRequest
      Returns:
      builder
    • builder

      create builder for AgentResponsesRequest instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAgentResponsesRequest

      default <T> T withAgentResponsesRequest(Function<AgentResponsesRequest,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<AgentResponsesRequest> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference