Class Response.Builder

  • Enclosing class:
    Response

    public static class Response.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • status

        public Response.Builder status​(String status)
        The status code of the response.

        Example: 200

        Parameters:
        status - the value to set
        Returns:
        this builder
      • responseTime

        public Response.Builder responseTime​(Date responseTime)
        The time of the response to the audited request, expressed in RFC 3339 timestamp format.

        Example: 2019-09-18T00:10:59.278Z

        Parameters:
        responseTime - the value to set
        Returns:
        this builder
      • headers

        public Response.Builder headers​(Map<String,​List<String>> headers)
        The headers of the response.

        Example:

        ----- { "ETag": [ "" ], "Connection": [ "close" ], "Content-Length": [ "1828" ], "opc-request-id": [ "" ], "Date": [ "Wed, 18 Sep 2019 00:10:59 GMT" ], "Content-Type": [ "application/json" ] } -----

        Parameters:
        headers - the value to set
        Returns:
        this builder
      • payload

        public Response.Builder payload​(Map<String,​Object> payload)
        This value is included for backward compatibility with the Audit version 1 schema, where it contained metadata of interest from the response payload.

        Example:

        ----- { "resourceName": "my_instance", "id": "ocid1.instance.oc1.phx." } -----

        Parameters:
        payload - the value to set
        Returns:
        this builder
      • message

        public Response.Builder message​(String message)
        A friendly description of what happened during the operation.

        Use this for troubleshooting.

        Parameters:
        message - the value to set
        Returns:
        this builder