Interface ApiResult.Builder

    • Method Detail

      • actionGroup

        ApiResult.Builder actionGroup​(String actionGroup)

        The action group that the API operation belongs to.

        Parameters:
        actionGroup - The action group that the API operation belongs to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • apiPath

        ApiResult.Builder apiPath​(String apiPath)

        The path to the API operation.

        Parameters:
        apiPath - The path to the API operation.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • httpMethod

        ApiResult.Builder httpMethod​(String httpMethod)

        The HTTP method for the API operation.

        Parameters:
        httpMethod - The HTTP method for the API operation.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • httpStatusCode

        ApiResult.Builder httpStatusCode​(Integer httpStatusCode)

        http status code from API execution response (for example: 200, 400, 500).

        Parameters:
        httpStatusCode - http status code from API execution response (for example: 200, 400, 500).
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • responseBody

        ApiResult.Builder responseBody​(Map<String,​ContentBody> responseBody)

        The response body from the API operation. The key of the object is the content type. The response may be returned directly or from the Lambda function.

        Parameters:
        responseBody - The response body from the API operation. The key of the object is the content type. The response may be returned directly or from the Lambda function.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • responseState

        ApiResult.Builder responseState​(String responseState)

        Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt

        Parameters:
        responseState - Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ResponseState, ResponseState
      • responseState

        ApiResult.Builder responseState​(ResponseState responseState)

        Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt

        Parameters:
        responseState - Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ResponseState, ResponseState